Mail archive
alpine-aports

[alpine-aports] [PATCH 3/6] main/cmocka: __WORDSIZE definition on s390x

From: Tuan M. Hoang <tmhoang_at_flatglobe.org>
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
_at_@ -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"
 
_at_@ -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
_at_@ -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
+_at_@ -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
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Apr 11 2017 - 21:00:09 GMT