summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2022-09-15 20:57:59 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2022-09-15 20:57:59 -0700
commita402679acc0b532bd85af1677f0352abd86f9ef1 (patch)
treec6f8ae4b2078e9dd651c7a01447642f3d5f49184
parentFix spidermonkey to use MAKEFLAGS for threads. (diff)
download0ad-a402679acc0b532bd85af1677f0352abd86f9ef1.tar.xz
Rebuild with processor detection fix.
-rw-r--r--D4669.diff13
-rw-r--r--PKGBUILD7
2 files changed, 19 insertions, 1 deletions
diff --git a/D4669.diff b/D4669.diff
new file mode 100644
index 0000000..d0ad398
--- /dev/null
+++ b/D4669.diff
@@ -0,0 +1,13 @@
+Index: source/lib/sysdep/os/linux/lcpu.cpp
+===================================================================
+--- source/lib/sysdep/os/linux/lcpu.cpp
++++ source/lib/sysdep/os/linux/lcpu.cpp
+@@ -48,7 +48,7 @@
+ else
+ #endif
+ {
+- long res = sysconf(_SC_NPROCESSORS_CONF);
++ long res = sysconf(_SC_NPROCESSORS_ONLN);
+ ENSURE(res != -1);
+ numProcessors = (size_t)res;
+ }
diff --git a/PKGBUILD b/PKGBUILD
index 98e067d..cb30a88 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,11 +5,12 @@
# # I maintain this because:
# Arch version lacks additional optimization and hardening flags
+# Arch version does not honour $MAKEFLAGS
pkgname=0ad
pkgver=a25.b
_pkgver=0.0.25b-alpha
-pkgrel=8
+pkgrel=9
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
arch=('x86_64')
url="https://play0ad.com/"
@@ -20,17 +21,21 @@ depends=('0ad-data' 'binutils' 'boost-libs' 'curl' 'enet' 'libogg' 'libpng' 'lib
makedepends=('boost' 'cmake' 'mesa' 'zip' 'libsm' 'rust' 'python' 'clang')
options=('!lto') # breaks spidermonkey linking (https://bugs.gentoo.org/746947)
source=("https://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz"
+ "D4669.diff"
"glibc-2.35.patch"
"python-3.10.patch")
sha512sums=('e8069897b97b381099ab5ec5868d27e96c699105b3307054d1bc7bf9236a537f02625ba9034892d91f3e951b4f95c9ce5fb75ed0a7c14b8a294882482fd9c1b4'
+ '4824b5f800dd3691b903bb1aa2c4e1ccee986c7dfe2c8d17c6fed72bbeec2032c1767a19c8ddb116f7b0f795d1c7e39de3af70aa51b3addd5a99c5cd189ccc6f'
'e56fa4a3a43f7510dde50d5fd0ccda2f935d9ad2aac44d9af9e89109c655b605f8ef582e1188be3dc1d42b7feef0caefa0ec514776696603c237f054fd6778c9'
'42df5eb7c4a99b31365b7f15c5bcd76c978339f2837eb8bc6ec371979429d0f0a6e31e870f6851aa40fc4859cb3e82f74821a01d04b82b486342db0fa60bf55e')
b2sums=('674d69d625137709a186f9273607dc353fc99aea68ef3f2ea5031dbe2f684176910d757c3f03c7fbdac475d30708be448b71f5020d27a65c346bf147223bcb9d'
+ '76863d66e1b2cfd6303d8c419f7918f5ee744d1766c9dcf24cbf66b7b12ef2c789bbb2343c1d11ed114b25a9139444508c83ff01eba8a01b98661bf51d97d535'
'e7d372e68b450f98631239ab0bb0c9eafdedb48f8a788037ce60851f28258a962a31a22afe80968bc1d706017acf7e9b25821fbe282db889ef534670b6954c89'
'6b6853eacbeadfe7e95382c97572c60b1838d5f4b0b925c2bb977be76db6a0a2ac97376089a42fca6a7956319b69c56ec0d2fb59a1114002d708486582de346d')
prepare() {
cd $pkgname-$_pkgver
+ patch -Np0 -i ../D4669.diff # Fix https://code.wildfiregames.com/D4669 / https://bugs.archlinux.org/task/75534
patch -Np1 -i ../glibc-2.35.patch # https://code.wildfiregames.com/rP26536
patch -Np1 -i ../python-3.10.patch # Fix spidermonkey build with Python 3.10
}