summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2024-11-25 18:34:34 +0000
committerZach van Rijn <me@zv.io>2024-11-25 18:34:34 +0000
commitd4710d9b89c50130b6b4101168551d5ae4fb7a6b (patch)
treeb77dbe68c9d8725f09905ca5c982c35f64d7af9e
parenta37c2c1662c128b8f406420541cf894db47c008a (diff)
downloadpackages-d4710d9b89c50130b6b4101168551d5ae4fb7a6b.tar.gz
packages-d4710d9b89c50130b6b4101168551d5ae4fb7a6b.tar.bz2
packages-d4710d9b89c50130b6b4101168551d5ae4fb7a6b.tar.xz
packages-d4710d9b89c50130b6b4101168551d5ae4fb7a6b.zip
user/ol: fix invalid shell, avoid surprises.
-rw-r--r--user/ol/APKBUILD23
-rw-r--r--user/ol/require-explicit-cdefs.patch28
2 files changed, 41 insertions, 10 deletions
diff --git a/user/ol/APKBUILD b/user/ol/APKBUILD
index 486c15781..032ec3e25 100644
--- a/user/ol/APKBUILD
+++ b/user/ol/APKBUILD
@@ -10,27 +10,30 @@ license="LGPL-3.0+ OR MIT"
depends=""
makedepends="vim"
subpackages="$pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/yuriy-chumak/$pkgname/archive/$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/yuriy-chumak/$pkgname/archive/$pkgver.tar.gz
+ require-explicit-cdefs.patch
+ "
-HAS32_CDEFS = 0
-HAS64_CDEFS = 0
+_HAS_32CDEFS=0
+_HAS_64CDEFS=0
case "$CARCH" in
- armel | armhf | armv7) HAS32_CDEFS = 1 ;;
- x86 | pmmx) HAS32_CDEFS = 1 ;;
- x86_64 | mips64* | aarch64* | ppc64*) HAS64_CDEFS = 1 ;;
- mips* | ppc | s390*) HAS32_CDEFS = 1 ;;
+ armel | armhf | armv7) _HAS_32CDEFS=1 ;;
+ x86 | pmmx) _HAS_32CDEFS=1 ;;
+ x86_64 | mips64* | aarch64* | ppc64*) _HAS_64CDEFS=1 ;;
+ mips* | ppc | s390*) _HAS_32CDEFS=1 ;;
esac
build() {
- make
+ make HAS_32CDEFS="${_HAS_32CDEFS}" HAS_64CDEFS="${_HAS_64CDEFS}"
}
check() {
- make check
+ make HAS_32CDEFS="${_HAS_32CDEFS}" HAS_64CDEFS="${_HAS_64CDEFS}" check
}
package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="22e61379d97e52e8f780213780d7f29a93e4846d158629e554f404a1c39e86daef9ce2a1b27d608c40c40850eaff4c2715bdfcb66af6b81cd906f0bcd43bf450 ol-2.6.tar.gz"
+sha512sums="22e61379d97e52e8f780213780d7f29a93e4846d158629e554f404a1c39e86daef9ce2a1b27d608c40c40850eaff4c2715bdfcb66af6b81cd906f0bcd43bf450 ol-2.6.tar.gz
+3b8d5b984b6cb483a51389905648119c3d1de568d13ded6f5606163f8538f9426078357f8494a752af4ee80809fce6fe587f308be9ab010fe19d6eded688ed5a require-explicit-cdefs.patch"
diff --git a/user/ol/require-explicit-cdefs.patch b/user/ol/require-explicit-cdefs.patch
new file mode 100644
index 000000000..fd4a70ad0
--- /dev/null
+++ b/user/ol/require-explicit-cdefs.patch
@@ -0,0 +1,28 @@
+diff -ur a/tests/Makefile b/tests/Makefile
+--- a/tests/Makefile 2024-11-25 18:28:34.957193217 +0000
++++ b/tests/Makefile 2024-11-25 18:30:17.261515826 +0000
+@@ -53,20 +53,11 @@
+
+ # special case, test 64- and 32-bit both
+ # (maximal testings under main development platform)
+-ifeq ($(UNAME)-$(MACHINE),Linux-x86_64)
+-HAS_64CDEFS ?= $(call exists,-m64,sys/cdefs.h,exit)
+-ifeq ($(HAS_64CDEFS),1)
+-DEV_MACHINE ?= 1
++ifndef HAS_32CDEFS
++$(error HAS_32CDEFS is not set)
+ endif
+-# sudo apt-get install gcc-multilib
+-HAS_32CDEFS ?= $(call exists,-m32,sys/cdefs.h,exit)
+-ifeq ($(HAS_32CDEFS),1)
+-DEV_MACHINE ?= 1
+-endif
+-else
+-DEV_MACHINE ?= 0
+-HAS_64CDEFS ?= 0
+-HAS_32CDEFS ?= 0
++ifndef HAS_64CDEFS
++$(error HAS_64CDEFS is not set)
+ endif
+
+ # -------------