[arch-commits] Commit in encpipe/trunk (PKGBUILD ldflags.patch)

Kpcyrd kpcyrd at gemini.archlinux.org
Thu Nov 18 23:36:16 UTC 2021


    Date: Thursday, November 18, 2021 @ 23:36:16
  Author: kpcyrd
Revision: 1052749

upgpkg: encpipe 0.5-2

Added:
  encpipe/trunk/ldflags.patch
Modified:
  encpipe/trunk/PKGBUILD

---------------+
 PKGBUILD      |   17 ++++++++++++-----
 ldflags.patch |   29 +++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-18 23:25:38 UTC (rev 1052748)
+++ PKGBUILD	2021-11-18 23:36:16 UTC (rev 1052749)
@@ -2,19 +2,26 @@
 
 pkgname=encpipe
 pkgver=0.5
-pkgrel=1
+pkgrel=2
 pkgdesc='Encrypt data from stdin to stdout with libhydrogen'
 url='https://github.com/jedisct1/encpipe'
 arch=('x86_64')
 license=('ISC')
 makedepends=('git')
-source=("git+https://github.com/jedisct1/${pkgname}.git#tag=${pkgver}")
-b2sums=('SKIP')
+source=("git+https://github.com/jedisct1/${pkgname}.git#tag=${pkgver}"
+        # this patch was commited upstream as f278117be2e5ee563813df83e1f22fd567461d4e
+        "ldflags.patch")
+b2sums=('SKIP'
+        '7f874694b9af75592f44cc037a032099e56b2d83459da95ae02e6bc6d76b4e3a7fc3d39fa302141a2666cb1d6a7eb7ce5f2ed0d8bd2dc7885801d73f3b02b8ed')
 
+prepare() {
+  cd ${pkgname}
+  patch -p1 -i ../ldflags.patch
+}
+
 build() {
   cd ${pkgname}
-  #make CFLAGS="${CFLAGS} -Iext/libhydrogen ${LDFLAGS}" bin
-  make CFLAGS="${CFLAGS} -Iext/libhydrogen ${LDFLAGS}" bin
+  make bin
 }
 
 check() {

Added: ldflags.patch
===================================================================
--- ldflags.patch	                        (rev 0)
+++ ldflags.patch	2021-11-18 23:36:16 UTC (rev 1052749)
@@ -0,0 +1,29 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,10 +1,11 @@
+ PREFIX ?= /usr/local
+ WFLAGS ?= -Wall -Wextra -Wmissing-prototypes -Wdiv-by-zero -Wbad-function-cast -Wcast-align -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wnested-externs -Wno-unknown-pragmas -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wswitch-enum -Wno-type-limits
+ CFLAGS ?= -Os -march=native -fno-exceptions $(WFLAGS)
+-CFLAGS += -I. -Iext/libhydrogen
+-OBJ = ext/libhydrogen/hydrogen.o src/encpipe.o src/safe_rw.o
++CPPFLAGS += -I. -Iext/libhydrogen
+ STRIP ?= strip
+ 
++OBJ = ext/libhydrogen/hydrogen.o src/encpipe.o src/safe_rw.o
++
+ SRC = \
+ 	ext/libhydrogen/hydrogen.c \
+ 	src/common.h \
+@@ -20,10 +21,10 @@ bin: encpipe
+ $(OBJ): $(SRC)
+ 
+ .c.o:
+-	$(CC) $(CFLAGS) -o $@ -c $<
++	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
+ 
+ encpipe: $(OBJ)
+-	$(CC) $(CFLAGS) -o encpipe $(OBJ)
++	$(CC) $(CFLAGS) -o encpipe $(LDFLAGS) $(OBJ)
+ 
+ ext/libhydrogen/hydrogen.c:
+ 	git submodule update --init || echo "** Make sure you cloned the repository **" >&2



More information about the arch-commits mailing list