Mail archive
alpine-aports

[alpine-aports] [PATCH 3/4] testing/b2sum: new aport

From: Alex Raschi <raschi.alex_at_gmail.com>
Date: Tue, 20 Nov 2018 21:25:58 +0100

https://blake2.net/
BLAKE2 command line utility with multiple algorithms
---
 testing/b2sum/APKBUILD       | 40 ++++++++++++++++++++++++++++++++++++
 testing/b2sum/makefile.patch | 27 ++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 testing/b2sum/APKBUILD
 create mode 100644 testing/b2sum/makefile.patch
diff --git a/testing/b2sum/APKBUILD b/testing/b2sum/APKBUILD
new file mode 100644
index 0000000000..7a6fc3db8c
--- /dev/null
+++ b/testing/b2sum/APKBUILD
_at_@ -0,0 +1,40 @@
+# Maintainer: Alex Raschi <raschi.alex_at_gmail.com>
+pkgname=b2sum
+_pkgname=BLAKE2
+pkgver=20180711
+_commit=320c325437539ae91091ce62efec1913cd8093c2
+pkgrel=0
+pkgdesc="BLAKE2 command line utility with multiple algorithms"
+url="https://blake2.net/"
+arch="all"
+license="CC0-1.0"
+depends=""
+makedepends=""
+subpackages="$pkgname-doc"
+replaces="coreutils"
+options="!check" # no test suite
+source="$pkgname-$pkgver.tar.gz::https://github.com/$_pkgname/$_pkgname/archive/$_commit.tar.gz
+	makefile.patch"
+builddir="$srcdir/$_pkgname-$_commit/$pkgname"
+
+build() {
+	cd "$builddir"
+
+	# SSE2 is not enabled for x86.
+	# arm* leave disabled for now, fails to build at least on armhf.
+	case "$CARCH" in
+		#aarch64|arm*) _use=neon;;
+		x86_64)       _use=sse;;
+		*)            _use=ref;;
+	esac
+
+	USE="$_use" make
+}
+
+package() {
+	cd "$builddir"
+	PREFIX="$pkgdir"/usr make install
+}
+
+sha512sums="db668b6fad82c82a9431db0bad5982d9ba7ea3aeb3ede0a5335702a44fd19d23f2b89207940c060dba992009e1de7d8d892f6719cd8ffdeaed26303bdc7a7a6f  b2sum-20180711.tar.gz
+36a537986c5723e96c6f73bf6676863ffa0d09768884a9b9ccb05dbfff12c8e045ce4bfce57a92588f25c50f101ba9f9814902b91b7f58121399d28943cd5328  makefile.patch"
diff --git a/testing/b2sum/makefile.patch b/testing/b2sum/makefile.patch
new file mode 100644
index 0000000000..c2f334d7dc
--- /dev/null
+++ b/testing/b2sum/makefile.patch
_at_@ -0,0 +1,27 @@
+--- b2sum/makefile.orig	2018-11-19 20:12:51.247182616 +0100
++++ b2sum/makefile	2018-11-19 21:07:32.725287176 +0100
+_at_@ -1,6 +1,6 @@
+ PROG=b2sum
+ PREFIX?=/usr/local
+-MANDIR?=$(PREFIX)/man
++MANDIR?=$(PREFIX)/share/man
+ NO_OPENMP?=0
+ NO_OPENMP_0=-fopenmp
+ NO_OPENMP_1=
+_at_@ -9,8 +9,14 @@ CFLAGS?=-O3 -march=native
+ CFLAGS+=-std=c89 -Wall -Wextra -pedantic -Wno-long-long -I../sse
+ CFLAGS+=$(NO_OPENMP_$(NO_OPENMP))
+ LIBS=
+-#FILES=b2sum.c ../ref/blake2b-ref.c ../ref/blake2s-ref.c ../ref/blake2bp-ref.c ../ref/blake2sp-ref.c
+-FILES=b2sum.c ../sse/blake2b.c ../sse/blake2s.c ../sse/blake2bp.c ../sse/blake2sp.c
++
++USE?=ref
++LIB_ref=../ref/blake2b-ref.c ../ref/blake2s-ref.c ../ref/blake2bp-ref.c ../ref/blake2sp-ref.c
++LIB_sse=../sse/blake2b.c ../sse/blake2s.c ../sse/blake2bp.c ../sse/blake2sp.c
++LIB_neon=../neon/blake2b.c ../neon/blake2s.c ../neon/blake2bp.c ../neon/blake2sp.c
++
++FILES=b2sum.c $(LIB_$(USE))
++
+ all: $(FILES)
+ 	$(CC) $(FILES) $(CFLAGS) $(LIBS) -o $(PROG)
+ 
-- 
2.19.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Nov 20 2018 - 21:25:58 UTC