[arch-commits] Commit in argon2/trunk (4 files)

Christian Hesse eworm at archlinux.org
Thu Dec 28 20:14:51 UTC 2017


    Date: Thursday, December 28, 2017 @ 20:14:50
  Author: eworm
Revision: 276608

upgpkg: argon2 20171227-1

new upstream release

Added:
  argon2/trunk/argon2.install
Modified:
  argon2/trunk/PKGBUILD
Deleted:
  argon2/trunk/fix-cflags.patch
  argon2/trunk/only-install-shared-lib.patch

-------------------------------+
 PKGBUILD                      |   44 ++++++++++++++++++----------------------
 argon2.install                |    6 +++++
 fix-cflags.patch              |   21 -------------------
 only-install-shared-lib.patch |   17 ---------------
 4 files changed, 26 insertions(+), 62 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-28 20:08:18 UTC (rev 276607)
+++ PKGBUILD	2017-12-28 20:14:50 UTC (rev 276608)
@@ -1,30 +1,23 @@
 # Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
+
 pkgname=argon2
-pkgver=20161029
-pkgrel=3
-pkgdesc="A password-hashing function (reference C implementation)"
-arch=("x86_64")
-url="https://github.com/P-H-C/phc-winner-argon2"
+pkgver=20171227
+pkgrel=1
+pkgdesc='A password-hashing function (reference C implementation)'
+arch=('x86_64')
+url='https://github.com/P-H-C/phc-winner-argon2'
 license=('Apache')
-depends=("glibc")
+depends=('glibc')
+install=argon2.install
 source=("https://github.com/P-H-C/phc-winner-argon2/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
-        "libargon2.pc"
-        "fix-cflags.patch"
-        "only-install-shared-lib.patch")
-sha256sums=('fe0049728b946b58b94cc6db89b34e2d050c62325d16316a534d2bedd78cd5e7'
-            '4189ce6c183319ceaf2c4ec96facd424deeaa9e2819efb7511893bcf3ef5c836'
-            '4e6d2676d28a9a9a34ec58788ea942083e3892e6b67d2d765eafb32150246728'
-            '5b032ecbbdf057518f13ba29a8599c376551170de891780923502b65ff8bc128')
+        'libargon2.pc')
+sha256sums=('eaea0172c1f4ee4550d1b6c9ce01aab8d1ab66b4207776aa67991eb5872fdcd8'
+            '4189ce6c183319ceaf2c4ec96facd424deeaa9e2819efb7511893bcf3ef5c836')
 
 prepare() {
   cd "$srcdir/phc-winner-$pkgname-$pkgver"
-  # Fix an attempt at voodoo magic with the build flags (resulting in
-  # -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
+
+  # Copy and prepare custom pkg-config file
   cp "${srcdir}/libargon2.pc" libargon2.pc
   sed -i -e "s/@UPSTREAM_VER@/${pkgver}/" libargon2.pc
 }
@@ -31,19 +24,22 @@
 
 build() {
   cd "$srcdir/phc-winner-$pkgname-$pkgver"
-  make argon2 libargon2.so OPTTARGET="${pkgarch/_/-}"
+
+  make
 }
 
 check() {
   cd "$srcdir/phc-winner-$pkgname-$pkgver"
-  make test OPTTARGET="${pkgarch/_/-}"
+
+  make test
 }
 
 package() {
   cd "$srcdir/phc-winner-$pkgname-$pkgver"
+
   make DESTDIR="$pkgdir" install
-  chmod -x "${pkgdir}/usr/include/argon2.h"
-  install -Dm644 libargon2.pc "${pkgdir}/usr/lib/pkgconfig/libargon2.pc"
+
+  install -D -m0644 libargon2.pc "${pkgdir}/usr/lib/pkgconfig/libargon2.pc"
 }
 
 # vim:set ts=2 sw=2 et:

Added: argon2.install
===================================================================
--- argon2.install	                        (rev 0)
+++ argon2.install	2017-12-28 20:14:50 UTC (rev 276608)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+post_upgrade() {
+  # clean up upstream soname mess
+  rm -f usr/lib/libargon2.so.0
+}

Deleted: fix-cflags.patch
===================================================================
--- fix-cflags.patch	2017-12-28 20:08:18 UTC (rev 276607)
+++ fix-cflags.patch	2017-12-28 20:14:50 UTC (rev 276608)
@@ -1,21 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 1838c13..6c28506 100644
---- a/Makefile
-+++ b/Makefile
-@@ -27,7 +27,7 @@ SRC_BENCH = src/bench.c
- SRC_GENKAT = src/genkat.c
- OBJ = $(SRC:.c=.o)
- 
--CFLAGS += -std=c89 -pthread -O3 -Wall -g -Iinclude -Isrc
-+CFLAGS += -std=c89 -pthread -Iinclude -Isrc
- CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
- 				-Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
- 
-@@ -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
- 

Deleted: only-install-shared-lib.patch
===================================================================
--- only-install-shared-lib.patch	2017-12-28 20:08:18 UTC (rev 276607)
+++ only-install-shared-lib.patch	2017-12-28 20:14:50 UTC (rev 276608)
@@ -1,17 +0,0 @@
-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