[arch-commits] Commit in argon2/trunk (3 files)
Baptiste Jonglez
zorun at archlinux.org
Tue Aug 8 08:40:12 UTC 2017
Date: Tuesday, August 8, 2017 @ 08:40:11
Author: zorun
Revision: 249562
argon2: Fix build for i686
Added:
argon2/trunk/only-install-shared-lib.patch
Modified:
argon2/trunk/PKGBUILD
argon2/trunk/fix-cflags.patch
-------------------------------+
PKGBUILD | 10 +++++++---
fix-cflags.patch | 31 ++++++++-----------------------
only-install-shared-lib.patch | 17 +++++++++++++++++
3 files changed, 32 insertions(+), 26 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-08-08 08:17:13 UTC (rev 249561)
+++ PKGBUILD 2017-08-08 08:40:11 UTC (rev 249562)
@@ -9,10 +9,12 @@
depends=("glibc")
source=("https://github.com/P-H-C/phc-winner-argon2/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
"libargon2.pc"
- "fix-cflags.patch")
+ "fix-cflags.patch"
+ "only-install-shared-lib.patch")
sha256sums=('fe0049728b946b58b94cc6db89b34e2d050c62325d16316a534d2bedd78cd5e7'
'4189ce6c183319ceaf2c4ec96facd424deeaa9e2819efb7511893bcf3ef5c836'
- '9cbebcb3aab9477d4f1c2021f2014a707b3721072322d69c98dc97d3de4b48bb')
+ '4e6d2676d28a9a9a34ec58788ea942083e3892e6b67d2d765eafb32150246728'
+ '5b032ecbbdf057518f13ba29a8599c376551170de891780923502b65ff8bc128')
prepare() {
cd "$srcdir/phc-winner-$pkgname-$pkgver"
@@ -20,6 +22,8 @@
# -march=native, which produces invalid opcodes when run on older CPUs)
# Similar issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=828779
patch -p1 < "${srcdir}/fix-cflags.patch"
+ # This just avoids compiling the static lib in the package() function.
+ patch -p1 < "${srcdir}/only-install-shared-lib.patch"
# Copy custom pkg-config file
cp "${srcdir}/libargon2.pc" libargon2.pc
sed -i -e "s/@UPSTREAM_VER@/${pkgver}/" libargon2.pc
@@ -27,7 +31,7 @@
build() {
cd "$srcdir/phc-winner-$pkgname-$pkgver"
- make argon2 libargon2.so
+ make argon2 libargon2.so OPTTARGET="${arch/_/-}"
}
check() {
Modified: fix-cflags.patch
===================================================================
--- fix-cflags.patch 2017-08-08 08:17:13 UTC (rev 249561)
+++ fix-cflags.patch 2017-08-08 08:40:11 UTC (rev 249562)
@@ -1,15 +1,8 @@
diff --git a/Makefile b/Makefile
-index 1838c13..4d5523b 100644
+index 1838c13..6c28506 100644
--- a/Makefile
+++ b/Makefile
-@@ -21,29 +21,16 @@ GENKAT = genkat
-
- DIST = phc-winner-argon2
-
--SRC = src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c
-+SRC = src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/opt.c
- SRC_RUN = src/run.c
- SRC_BENCH = src/bench.c
+@@ -27,7 +27,7 @@ SRC_BENCH = src/bench.c
SRC_GENKAT = src/genkat.c
OBJ = $(SRC:.c=.o)
@@ -18,19 +11,11 @@
CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
-Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
--OPTTARGET ?= native
--OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
-- -o /dev/null 2>/dev/null; echo $$?)
--# Detect compatible platform
--ifneq ($(OPTTEST), 0)
--$(info Building without optimizations)
-- SRC += src/ref.c
--else
--$(info Building with optimizations for $(OPTTARGET))
+@@ -40,7 +40,6 @@ $(info Building without optimizations)
+ SRC += src/ref.c
+ else
+ $(info Building with optimizations for $(OPTTARGET))
- CFLAGS += -march=$(OPTTARGET)
-- SRC += src/opt.c
--endif
--
- BUILD_PATH := $(shell pwd)
- KERNEL_NAME := $(shell uname -s)
+ SRC += src/opt.c
+ endif
Added: only-install-shared-lib.patch
===================================================================
--- only-install-shared-lib.patch (rev 0)
+++ only-install-shared-lib.patch 2017-08-08 08:40:11 UTC (rev 249562)
@@ -0,0 +1,17 @@
+diff --git a/Makefile b/Makefile
+index 6c28506..1c1b028 100644
+--- a/Makefile
++++ b/Makefile
+@@ -151,10 +151,10 @@ format:
+ clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4}" \
+ -i include/*.h src/*.c src/*.h src/blake2/*.c src/blake2/*.h
+
+-install: $(RUN) libs
++install:
+ $(INSTALL) -d $(INST_INCLUDE)
+ $(INSTALL) $(HEADERS) $(INST_INCLUDE)
+ $(INSTALL) -d $(INST_LIBRARY)
+- $(INSTALL) $(LIBRARIES) $(INST_LIBRARY)
++ $(INSTALL) $(LIB_SH) $(INST_LIBRARY)
+ $(INSTALL) -d $(INST_BINARY)
+ $(INSTALL) $(RUN) $(INST_BINARY)
More information about the arch-commits
mailing list