From 55aef591ee06af99101e1000fe44182c93cf331b Mon Sep 17 00:00:00 2001 From: Duncaen Date: Sat, 16 Dec 2023 19:50:37 +0100 Subject: [PATCH] 0ad: rebuild for libsodium-1.0.19_1 --- srcpkgs/0ad/files/rust-target.patch | 11 +++++++++++ srcpkgs/0ad/patches/python-3.11.patch | 5 ++++- srcpkgs/0ad/template | 6 ++++-- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/0ad/files/rust-target.patch diff --git a/srcpkgs/0ad/files/rust-target.patch b/srcpkgs/0ad/files/rust-target.patch new file mode 100644 index 00000000000..90c69691155 --- /dev/null +++ b/srcpkgs/0ad/files/rust-target.patch @@ -0,0 +1,11 @@ +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -352,7 +352,7 @@ + + return None + +- rustc_target = find_candidate(candidates) ++ rustc_target = os.environ["RUST_TARGET"] + + if rustc_target is None: + die("Don't know how to translate {} for rustc".format( diff --git a/srcpkgs/0ad/patches/python-3.11.patch b/srcpkgs/0ad/patches/python-3.11.patch index 104a862cea8..6dd59715e01 100644 --- a/srcpkgs/0ad/patches/python-3.11.patch +++ b/srcpkgs/0ad/patches/python-3.11.patch @@ -2,7 +2,7 @@ Index: 0ad-0.0.26/libraries/source/spidermonkey/patch.sh =================================================================== --- 0ad-0.0.26.orig/libraries/source/spidermonkey/patch.sh +++ 0ad-0.0.26/libraries/source/spidermonkey/patch.sh -@@ -2,6 +2,21 @@ +@@ -2,6 +2,24 @@ # Apply patches if needed # This script gets called from build.sh. @@ -20,6 +20,9 @@ Index: 0ad-0.0.26/libraries/source/spidermonkey/patch.sh + +git am --keep-cr ../1654457-virtualenv.patch +git am --keep-cr ../python-3.11.patch ++patch -p1 < ../rust-target.patch ++ ++ sed -i -e 's/exec python3 /exec python3.11 /' js/src/configure* + # SM78 fails to create virtual envs on macs with python > 3.7 # Unfortunately, 3.7 is mostly unavailable on ARM macs. diff --git a/srcpkgs/0ad/template b/srcpkgs/0ad/template index 68cdd1e60d2..ae29ee78b02 100644 --- a/srcpkgs/0ad/template +++ b/srcpkgs/0ad/template @@ -1,9 +1,10 @@ # Template file for '0ad' pkgname=0ad version=0.0.26 -revision=8 +revision=9 archs="x86_64* i686* aarch64* armv7l* ppc64le*" -hostmakedepends="pkg-config perl cmake python3 rust cargo yasm tar clang" +build_helper=rust +hostmakedepends="pkg-config perl cmake python3.11 rust cargo yasm tar clang" makedepends="SDL2-devel boost-devel gloox-devel libcurl-devel libenet-devel libopenal-devel libpng-devel libsodium-devel libxml2-devel miniupnpc-devel nspr-devel wxWidgets-gtk3-devel fmt-devel freetype-devel" @@ -37,6 +38,7 @@ post_patch() { libraries/source/nvtt/src/src/nvcore/CMakeLists.txt fi cp ${FILESDIR}/python-3.11.patch libraries/source/spidermonkey/ + cp ${FILESDIR}/rust-target.patch libraries/source/spidermonkey/ cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/1654457-virtualenv.patch \ libraries/source/spidermonkey/ }