Subject: [alpine-aports] [PATCH v2] main/zeromq: upgrade to 4.2.2

From: Valery Kartel <[email-masked]>
Date: Thu, 6 Apr 2017 15:58:24 +0300

- add check()
- cleanups

---
v1 -> v2: fix config/test-driver to pass checks
---
 main/zeromq/APKBUILD          | 35 +++++++++++++++++------------------
 main/zeromq/test-driver.patch | 11 +++++++++++
 2 files changed, 28 insertions(+), 18 deletions(-)
 create mode 100644 main/zeromq/test-driver.patch

diff --git a/main/zeromq/APKBUILD b/main/zeromq/APKBUILD
index 02c99c1c27..35cf0c06b9 100644
--- a/main/zeromq/APKBUILD
+++ b/main/zeromq/APKBUILD
@@ -1,25 +1,20 @@
 # Contributor: Natanael Copa <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=zeromq
-pkgver=4.1.5
-pkgrel=1
+pkgver=4.2.2
+pkgrel=0
 pkgdesc="The ZeroMQ messaging library and tools"
 url="http://www.zeromq.org/"
 arch="all"
 license="LGPLv3+ with exceptions"
-depends=""
-makedepends="util-linux-dev libsodium-dev perl python2 asciidoc xmlto
-	autoconf automake"
+makedepends="util-linux-dev libsodium-dev libunwind-dev
+	perl python2 asciidoc xmlto autoconf automake
+	"
 subpackages="$pkgname-dev $pkgname-doc libzmq"
-source="https://github.com/zeromq/zeromq4-1/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"
-
-builddir="$srcdir"/$pkgname-$pkgver
-
-prepare() {
-	cd "$builddir"
-	update_config_sub || return 1
-	default_prepare || return 1
-}
+source="https://github.com/zeromq/libzmq/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
+	test-driver.patch
+	"
+builddir="$srcdir/$pkgname-$pkgver"
 
 build() {
 	cd "$builddir"
@@ -35,6 +30,11 @@ build() {
 	make || return 1
 }
 
+check() {
+	cd "$builddir"
+	make check
+}
+
 package() {
 	cd "$builddir"
 	make DESTDIR="$pkgdir" install || return 1
@@ -42,10 +42,9 @@ package() {
 
 libzmq() {
 	pkgdesc="The ZeroMQ messaging library"
-	install -d "$subpkgdir"/usr/lib
+	mkdir -p "$subpkgdir"/usr/lib || return 1
 	mv "$pkgdir"/usr/lib/libzmq.so.* "$subpkgdir"/usr/lib/
 }
 
-md5sums="e7adf4b7dbae09b28cfd10d26cd67fac  zeromq-4.1.5.tar.gz"
-sha256sums="04aac57f081ffa3a2ee5ed04887be9e205df3a7ddade0027460b8042432bdbcf  zeromq-4.1.5.tar.gz"
-sha512sums="b5098e7ea7fe7fdae75846a804d175bcb414a4f8212a15b9c1c2e52f3541aa603e773061db7ea92075e1f9f9be40572aba1c133b233a8ac2458bccf8427e407e  zeromq-4.1.5.tar.gz"
+sha512sums="d78813a61ce3311a1f8c230f7da0f5aedc97ef4b792afb6d398c5710da239348c0c7a67bdfeb38a7ab0282af498f1ed173649aff4add1bc35f0ef1b66f965443  zeromq-4.2.2.tar.gz
+64e4ae2c89469359480743beeb4f1e08976a4c52dbfd2dd33020463df78e927993319e456299682901001e0832ebed85291eea0decc1d27a58de78a6c891e660  test-driver.patch"
diff --git a/main/zeromq/test-driver.patch b/main/zeromq/test-driver.patch
new file mode 100644
index 0000000000..f8b7fe3898
--- /dev/null
+++ b/main/zeromq/test-driver.patch
@@ -0,0 +1,11 @@
+--- a/config/test-driver
++++ b/config/test-driver
+@@ -104,7 +104,7 @@
+ trap "st=143; $do_exit" 15
+ 
+ # Test script is run here.
+-"$@" >$log_file 2>&1
++: "$@" >$log_file 2>&1
+ estatus=$?
+ if test $enable_hard_errors = no && test $estatus -eq 99; then
+   estatus=1
-- 
2.12.2

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---