Subject: [alpine-aports] [PATCH 1/6] main/openobex: no need update_config_sub

From: "Tuan M. Hoang" <[email-masked]>
Date: Tue, 11 Apr 2017 20:59:36 -0400

---
 main/openobex/APKBUILD | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/main/openobex/APKBUILD b/main/openobex/APKBUILD
index 11c95551c2..ca4485cc2b 100644
--- a/main/openobex/APKBUILD
+++ b/main/openobex/APKBUILD
@@ -14,11 +14,6 @@ source="http://downloads.sourceforge.net/project/openobex/openobex/$pkgver/openo
 
 _builddir="$srcdir"/openobex-$pkgver-Source
 
-prepare() {
-	cd "$_builddir"
-	update_config_sub || return 1
-}
-
 build() {
 	cd "$_builddir"
 	cmake \
-- 
2.12.2

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

---

From: "Tuan M. Hoang" <[email-masked]>
Date: Tue, 11 Apr 2017 21:00:06 -0400

s390x support for compiler-rt starts from llvm3.9

---
 main/compiler-rt/APKBUILD | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/compiler-rt/APKBUILD b/main/compiler-rt/APKBUILD
index 3b40d6f116..402c59011b 100644
--- a/main/compiler-rt/APKBUILD
+++ b/main/compiler-rt/APKBUILD
@@ -4,7 +4,7 @@ pkgname=compiler-rt
 pkgver=3.8.1
 pkgrel=0
 pkgdesc="LLVM compiler-rt runtime libraries"
-arch="all"
+arch="all !s390x"
 url="http://llvm.org/"
 license="UOI-NCSA"
 depends=""
-- 
2.12.2

---

---

From: "Tuan M. Hoang" <[email-masked]>
Date: Tue, 11 Apr 2017 21:00:09 -0400

There should be a more elegant solution for this but it would work fine

---
 main/cmocka/APKBUILD             |  2 ++
 main/cmocka/s390x_wordsize.patch | 13 +++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 main/cmocka/s390x_wordsize.patch

diff --git a/main/cmocka/APKBUILD b/main/cmocka/APKBUILD
index bfe3b55c86..6d15fff284 100644
--- a/main/cmocka/APKBUILD
+++ b/main/cmocka/APKBUILD
@@ -11,6 +11,7 @@ depends=""
 makedepends="cmake"
 subpackages="$pkgname-dev"
 source="https://cmocka.org/files/${pkgver%.*}/$pkgname-$pkgver.tar.xz
+	s390x_wordsize.patch
 	musl_uintptr.patch"
 builddir="$srcdir/$pkgname-$pkgver"
 
@@ -46,4 +47,5 @@ package() {
 }
 
 sha512sums="b45b6c6bf6c1a0e12cbbfa203afc0172aa53215e0bd43a21b30db04c0490609a7a262f1b4d87be9df0c5c486c4f4891d3432e0e053418d373d9750a6cf5adf70  cmocka-1.1.0.tar.xz
+f7db110909662dc1a185d09d1f00aef967eee99753f6929b1f0794422c1ca38f4a3643f39960813355b7da155f96325a30dfbe66ac6f19e55967a241a0e923de  s390x_wordsize.patch
 b20b5c0d172a9df756ec093a3df4bf5bdf2a0c06a3d3ad39ec001248ccb86e6fd3dcedfc9ce42e8309cc01ea34fadffd4ebcc0fb3af9f5e795e7fe40c461ac60  musl_uintptr.patch"
diff --git a/main/cmocka/s390x_wordsize.patch b/main/cmocka/s390x_wordsize.patch
new file mode 100644
index 0000000000..135fd65195
--- /dev/null
+++ b/main/cmocka/s390x_wordsize.patch
@@ -0,0 +1,13 @@
+diff --git a/include/cmocka.h b/include/cmocka.h
+index bfcdd3f..60467b9 100644
+--- a/include/cmocka.h
++++ b/include/cmocka.h
+@@ -56,7 +56,7 @@ int __stdcall IsDebuggerPresent();
+ 
+ /* If __WORDSIZE is not set, try to figure it out and default to 32 bit. */
+ #ifndef __WORDSIZE
+-# if defined(__x86_64__) && !defined(__ILP32__)
++# if ( defined(__x86_64__) && !defined(__ILP32__) ) || defined(__s390x__)
+ #  define __WORDSIZE 64
+ # else
+ #  define __WORDSIZE 32
-- 
2.12.2

---

---

From: "Tuan M. Hoang" <[email-masked]>
Date: Tue, 11 Apr 2017 21:00:11 -0400

---
 community/arpack/APKBUILD      | 2 +-
 community/openblas/APKBUILD    | 2 +-
 community/py-numpy/APKBUILD    | 2 +-
 community/suitesparse/APKBUILD | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/community/arpack/APKBUILD b/community/arpack/APKBUILD
index 3ffe1301ed..7e760ac47d 100644
--- a/community/arpack/APKBUILD
+++ b/community/arpack/APKBUILD
@@ -6,7 +6,7 @@ pkgver=3.4.0
 pkgrel=2
 pkgdesc="Collection of Fortran77 subroutines designed to solve large scale eigenvalue problems"
 url="https://github.com/opencollab/arpack-ng"
-arch="all !ppc64le" #openblas not avail on excluded platform
+arch="all !ppc64le !s390x" #openblas not avail on excluded platform
 license="BSD"
 depends=""
 depends_dev="openblas-dev"
diff --git a/community/openblas/APKBUILD b/community/openblas/APKBUILD
index fd7e59af10..8c1cd2b091 100644
--- a/community/openblas/APKBUILD
+++ b/community/openblas/APKBUILD
@@ -8,7 +8,7 @@ pkgrel=2
 pkgdesc="A fast BSD-licensed BLAS based on gotoBLAS2, with LAPACK"
 url="http://www.openblas.net"
 # does not build yet on ppc64le
-arch="all"
+arch="all !s390x"
 license="BSD"
 depends=""
 depends_dev="gfortran"
diff --git a/community/py-numpy/APKBUILD b/community/py-numpy/APKBUILD
index 6c7cfb9ae1..329244db46 100644
--- a/community/py-numpy/APKBUILD
+++ b/community/py-numpy/APKBUILD
@@ -7,7 +7,7 @@ pkgver=1.12.1
 pkgrel=1
 pkgdesc="Scientific tools for Python"
 url="http://numpy.scipy.org/"
-arch="all "
+arch="all !s390x"
 license="BSD"
 options="!check"
 makedepends="python2-dev py-setuptools python3-dev 
diff --git a/community/suitesparse/APKBUILD b/community/suitesparse/APKBUILD
index 34433c5189..fd80579144 100644
--- a/community/suitesparse/APKBUILD
+++ b/community/suitesparse/APKBUILD
@@ -6,7 +6,7 @@ pkgver=4.5.3
 pkgrel=0
 pkgdesc="A collection of sparse matrix libraries"
 url="http://faculty.cse.tamu.edu/davis/suitesparse.html"
-arch="all"
+arch="all !s390x"
 license="GPL"
 depends_dev="openblas-dev"
 makedepends="$depends_dev"
-- 
2.12.2

---

---

From: "Tuan M. Hoang" <[email-masked]>
Date: Tue, 11 Apr 2017 21:00:14 -0400

---
 community/php7/APKBUILD | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD
index 15aec60af4..62a8fa1e60 100644
--- a/community/php7/APKBUILD
+++ b/community/php7/APKBUILD
@@ -71,6 +71,7 @@ prepare() {
 }
 
 _build() {
+	[ "$CARCH" = "s390x" ] && _disable_pcre_jit="--without-pcre-jit"
 	export EXTENSION_DIR=/usr/lib/$pkgname/modules
 	./configure \
 		--build=$CBUILD \
@@ -89,6 +90,7 @@ _build() {
 		--disable-short-tags \
 		--with-openssl=shared --with-kerberos --with-system-ciphers \
 		--with-pcre-regex --with-pcre-dir \
+		$_disable_pcre_jit \
 		--with-zlib=shared --with-zlib-dir \
 		--enable-bcmath=shared \
 		--with-bz2=shared \
-- 
2.12.2

---

---

From: "Tuan M. Hoang" <[email-masked]>
Date: Tue, 11 Apr 2017 21:00:16 -0400

---
 community/pcre2/APKBUILD | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/community/pcre2/APKBUILD b/community/pcre2/APKBUILD
index 7a892dede2..4072d35a2a 100644
--- a/community/pcre2/APKBUILD
+++ b/community/pcre2/APKBUILD
@@ -19,6 +19,7 @@ build() {
 	cd "$builddir"
 
 	# Note: Forced -O3 is recommended (needed?) for Julia.
+	[ "$CARCH" != "s390x" ] && _enable_jit="--enable-jit"
 	./configure \
 		CFLAGS="$CFLAGS -O3" \
 		--build=$CBUILD \
@@ -28,11 +29,10 @@ build() {
 		--htmldir=/usr/share/doc/$pkgname-$pkgver/html \
 		--enable-pcre2-16 \
 		--enable-pcre2-32 \
-		--enable-jit \
 		--enable-pcre2grep-libz \
 		--enable-pcre2test-libedit \
 		--with-match-limit-recursion=8192 \
-		|| return 1
+		$_enable_jit
 	make
 }
 
-- 
2.12.2

---