aboutsummaryrefslogtreecommitdiffstats
path: root/main/cmocka
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-07-12 09:56:44 +0000
committerTimo Teräs <timo.teras@iki.fi>2017-07-12 09:58:40 +0000
commit045fc2eacbc07040bed00a1baee22f5c1f5250b9 (patch)
tree2218dcb719cafc8febe7810d3fc678e627eadf41 /main/cmocka
parent225ac308672fe0f00ce52d39a6fa3f6d353aaf72 (diff)
downloadaports-045fc2eacbc07040bed00a1baee22f5c1f5250b9.tar.bz2
aports-045fc2eacbc07040bed00a1baee22f5c1f5250b9.tar.xz
main/cmocka: fix wordsize detection universally on musl, enable aarch64
Diffstat (limited to 'main/cmocka')
-rw-r--r--main/cmocka/APKBUILD8
-rw-r--r--main/cmocka/s390x_wordsize.patch13
-rw-r--r--main/cmocka/wordsize.patch21
3 files changed, 25 insertions, 17 deletions
diff --git a/main/cmocka/APKBUILD b/main/cmocka/APKBUILD
index f4a33c6149..e6bed5b8b0 100644
--- a/main/cmocka/APKBUILD
+++ b/main/cmocka/APKBUILD
@@ -2,16 +2,16 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=cmocka
pkgver=1.1.1
-pkgrel=0
+pkgrel=1
pkgdesc="An elegant unit testing framework for C with support for mock objects"
url="https://cmocka.org/"
-arch="all !aarch64"
+arch="all"
license="ASL-2.0"
depends=""
makedepends="cmake"
subpackages="$pkgname-dev"
source="https://cmocka.org/files/${pkgver%.*}/$pkgname-$pkgver.tar.xz
- s390x_wordsize.patch
+ wordsize.patch
musl_uintptr.patch"
builddir="$srcdir/$pkgname-$pkgver"
@@ -49,5 +49,5 @@ package() {
}
sha512sums="801c4a3e1bb9047241b1cb5a90c1cbdee1b0aff5e3d0a84ec8b2dbaee79274618c24fbe5e9fedbf0b3ee18c6c98b55d93e135d037ac33ab872edc7665af41577 cmocka-1.1.1.tar.xz
-f7db110909662dc1a185d09d1f00aef967eee99753f6929b1f0794422c1ca38f4a3643f39960813355b7da155f96325a30dfbe66ac6f19e55967a241a0e923de s390x_wordsize.patch
+16dfd8e6e2b21bda549a31cae0e60405039ff3559c879bc35811b55b06d64dcc75402d6a0cb89d029d69faeaa6484329ce03788feb9e69c1a844e63ac8d21f69 wordsize.patch
b20b5c0d172a9df756ec093a3df4bf5bdf2a0c06a3d3ad39ec001248ccb86e6fd3dcedfc9ce42e8309cc01ea34fadffd4ebcc0fb3af9f5e795e7fe40c461ac60 musl_uintptr.patch"
diff --git a/main/cmocka/s390x_wordsize.patch b/main/cmocka/s390x_wordsize.patch
deleted file mode 100644
index 135fd65195..0000000000
--- a/main/cmocka/s390x_wordsize.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-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
diff --git a/main/cmocka/wordsize.patch b/main/cmocka/wordsize.patch
new file mode 100644
index 0000000000..bd514018ba
--- /dev/null
+++ b/main/cmocka/wordsize.patch
@@ -0,0 +1,21 @@
+musl defines __WORDSIZE in bits/reg.h so include that. Also
+error out on if it's not defined, otherwise we might get wrong
+assumption which causes weird failures.
+
+--- cmocka-1.1.1.orig/include/cmocka.h
++++ cmocka-1.1.1/include/cmocka.h
+@@ -55,12 +55,9 @@
+ */
+
+ /* If __WORDSIZE is not set, try to figure it out and default to 32 bit. */
++#include <bits/reg.h>
+ #ifndef __WORDSIZE
+-# if defined(__x86_64__) && !defined(__ILP32__)
+-# define __WORDSIZE 64
+-# else
+-# define __WORDSIZE 32
+-# endif
++#error __WORDSIZE not defined
+ #endif
+
+ #ifdef DOXYGEN