summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2023-01-02 18:06:33 -0600
committerZach van Rijn <me@zv.io>2023-01-02 18:13:44 -0600
commit775611f4880c202bc3fd1a693d9c1ad006456372 (patch)
treedb8dc38f36e4e85647e1739511a7cdf75ec84e9d
parentab53e9db11895ebeddc3a42335ca40c2097f8d81 (diff)
downloadpackages-775611f4880c202bc3fd1a693d9c1ad006456372.tar.gz
packages-775611f4880c202bc3fd1a693d9c1ad006456372.tar.bz2
packages-775611f4880c202bc3fd1a693d9c1ad006456372.tar.xz
packages-775611f4880c202bc3fd1a693d9c1ad006456372.zip
user/gambit-c: support s390/s390x.
Upstream: https://github.com/gambit/gambit/pull/809
-rw-r--r--user/gambit-c/APKBUILD4
-rw-r--r--user/gambit-c/s390.patch46
2 files changed, 49 insertions, 1 deletions
diff --git a/user/gambit-c/APKBUILD b/user/gambit-c/APKBUILD
index 4cffffae5..bf9852b47 100644
--- a/user/gambit-c/APKBUILD
+++ b/user/gambit-c/APKBUILD
@@ -3,7 +3,7 @@
pkgname=gambit-c
pkgver=4.9.4
_pkgver=$(printf "%s" "${pkgver}" | tr . _)
-pkgrel=2
+pkgrel=3
pkgdesc="An efficient implementation of the Scheme programming language."
url="https://gambitscheme.org/"
arch="all"
@@ -16,6 +16,7 @@ source="https://gambitscheme.org/$pkgver/gambit-v${_pkgver}.tgz
remove-non-ascii-character-from-gambit-txi.patch
reproducibility.patch
0001-Avoid-fixnum-overflow-on-32-bit-machines-in-port-set.patch
+ s390.patch
disable-srfi-179.patch
"
@@ -78,4 +79,5 @@ a878994ea7c40b301d30b4d05879c335ad42e1ca8c25387556691192b6945276d6d6ff017ff56830
45336179d3f61fa3d70c3517f368fd8ccd744b5981c4bbc2091ed0016e10940c1b24dd58ee4c8d59637d89865a4c6f0ea80dc49a8859b7a900331fdb0e1efe49 remove-non-ascii-character-from-gambit-txi.patch
133ef5442c1bfe51e57caecd509c12cdecd86cfb941114a5038fad2c3e2bda1770fde7e367561039d523db5ea9cba5cebae7a9ed9daca699863267e7224f1ad6 reproducibility.patch
2b11fe9957c22a4410070f887f507215703e7476f050ef90ee8ea04e66f0f602f5cf2877a6efb71e7355a767e50a4f2fa4ecdc7b4bd9b1971f3d1234ca980b8c 0001-Avoid-fixnum-overflow-on-32-bit-machines-in-port-set.patch
+a47db8bc273b7133647aac986339569cf5cd6724064634caeee9e90976265ff40983869960f8ccfd44600b8d357b4bd25f49567aee7e9e3ff429d4881512aae3 s390.patch
d0da7949db7a83020fc7e4e139c7df292b4671adf0ba42fdfee4448915e6b697fbcecb3ca206507a3756dc39506e0d0c1f8d07ea5906bb5ce6ab6b42c18f0781 disable-srfi-179.patch"
diff --git a/user/gambit-c/s390.patch b/user/gambit-c/s390.patch
new file mode 100644
index 000000000..9580f2e75
--- /dev/null
+++ b/user/gambit-c/s390.patch
@@ -0,0 +1,46 @@
+diff --git a/include/gambit.h.in b/include/gambit.h.in
+index 71e712a7..f8eeb2ea 100644
+--- a/include/gambit.h.in
++++ b/include/gambit.h.in
+@@ -443,11 +443,27 @@
+ #endif
+ #endif
+
++#ifndef ___CPU_s390
++
++#ifdef __s390__
++#define ___CPU_s390
++#else
++#ifdef __s390x__
++#define ___CPU_s390
++#else
++#ifdef __zarch__
++#define ___CPU_s390
++#endif
++#endif
++#endif
++
++#endif
++
+ /*
+ * Determine the byte order endianness based on the processor type.
+- * We assume that all processors are little-endian, except the sparc and
+- * m68k. The PowerPC, MIPS, ARM and Itanium can be either big-endian or
+- * little-endian so extra tests are needed.
++ * We assume that all processors are little-endian, except the sparc,
++ * m68k, and s390. The PowerPC, MIPS, ARM and Itanium can be either
++ * big-endian or little-endian so extra tests are needed.
+ */
+
+ #ifndef ___BIG_ENDIAN
+@@ -484,6 +500,10 @@
+ #define ___BIG_ENDIAN
+ #endif
+
++#ifdef ___CPU_s390
++#define ___BIG_ENDIAN
++#endif
++
+ #ifdef ___CPU_mips
+ #ifdef _MIPSEL
+ #define ___LITTLE_ENDIAN