diff --git a/srcpkgs/0ad/patches/ppc64.patch b/srcpkgs/0ad/patches/ppc64.patch index 20688372e42..93e90e139b4 100644 --- a/srcpkgs/0ad/patches/ppc64.patch +++ b/srcpkgs/0ad/patches/ppc64.patch @@ -1,116 +1,3 @@ ---- a/build/premake/premake5.lua -+++ b/build/premake/premake5.lua -@@ -85,6 +85,8 @@ else - arch = "arm" - elseif string.find(machine, "aarch64") == 1 then - arch = "aarch64" -+ elseif string.find(machine, "ppc64") == 1 or string.find(machine, "powerpc64") == 1 then -+ arch = "ppc64" - elseif string.find(machine, "e2k") == 1 then - arch = "e2k" - else -@@ -863,6 +865,8 @@ function setup_all_libs () - table.insert(source_dirs, "lib/sysdep/arch/arm"); - elseif arch == "aarch64" then - table.insert(source_dirs, "lib/sysdep/arch/aarch64"); -+ elseif arch == "ppc64" then -+ table.insert(source_dirs, "lib/sysdep/arch/ppc64"); - elseif arch == "e2k" then - table.insert(source_dirs, "lib/sysdep/arch/e2k"); - end ---- /dev/null -+++ b/source/lib/sysdep/arch/ppc64/ppc64.cpp -@@ -0,0 +1,50 @@ -+/* Copyright (C) 2012 Wildfire Games -+ * Copyright (C) 2018 Raptor Engineering, LLC -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining -+ * a copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sublicense, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included -+ * in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/* -+ * routines specific to POWER -+ */ -+ -+#include "precompiled.h" -+ -+#include "lib/sysdep/cpu.h" -+ -+intptr_t cpu_AtomicAdd(volatile intptr_t* location, intptr_t increment) -+{ -+ return __sync_fetch_and_add(location, increment); -+} -+ -+bool cpu_CAS(volatile intptr_t* location, intptr_t expected, intptr_t newValue) -+{ -+ return __sync_bool_compare_and_swap(location, expected, newValue); -+} -+ -+bool cpu_CAS64(volatile i64* location, i64 expected, i64 newValue) -+{ -+ return __sync_bool_compare_and_swap(location, expected, newValue); -+} -+ -+const char* cpu_IdentifierString() -+{ -+ return "IBM POWER"; // TODO -+} ---- a/source/lib/byte_order.h 2021-02-28 16:59:34.041933978 +0100 -+++ b/source/lib/byte_order.h 2021-02-28 16:59:59.311582587 +0100 -@@ -33,7 +33,7 @@ - #ifndef BYTE_ORDER - # define LITTLE_ENDIAN 0x4321 - # define BIG_ENDIAN 0x1234 --# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || defined(__LITTLE_ENDIAN__) -+# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || ARCH_PPC64 || defined(__LITTLE_ENDIAN__) - # define BYTE_ORDER LITTLE_ENDIAN - # else - # define BYTE_ORDER BIG_ENDIAN ---- a/source/ps/GameSetup/HWDetect.cpp 2021-02-28 18:09:30.331118437 +0100 -+++ b/source/ps/GameSetup/HWDetect.cpp 2021-02-28 18:09:52.209822367 +0100 -@@ -124,6 +124,7 @@ - scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM); - scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64); - scriptInterface.SetProperty(settings, "arch_e2k", ARCH_E2K); -+ scriptInterface.SetProperty(settings, "arch_ppc64", ARCH_PPC64); - - #ifdef NDEBUG - scriptInterface.SetProperty(settings, "build_debug", 0); ---- a/source/lib/sysdep/arch.h 2021-02-28 18:45:28.761727174 +0100 -+++ b/source/lib/sysdep/arch.h 2021-02-28 18:46:03.270251202 +0100 -@@ -76,9 +76,15 @@ - #else - # define ARCH_E2K 0 - #endif -+// .. PowerPC64 (PPC64) -+#if defined(__PPC64__) -+# define ARCH_PPC64 1 -+#else -+# define ARCH_PPC64 0 -+#endif - - // ensure exactly one architecture has been detected --#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K) != 1 -+#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K+ARCH_PPC64) != 1 - # error "architecture not correctly detected (either none or multiple ARCH_* defined)" - #endif - --- a/libraries/source/nvtt/src/src/nvmath/SimdVector_VE.h +++ b/libraries/source/nvtt/src/src/nvmath/SimdVector_VE.h @@ -27,10 +27,7 @@ diff --git a/srcpkgs/0ad/patches/spidermonkey-78.6-rust-1.50.patch b/srcpkgs/0ad/patches/spidermonkey-78.6-rust-1.50.patch deleted file mode 100644 index 95007b32f25..00000000000 --- a/srcpkgs/0ad/patches/spidermonkey-78.6-rust-1.50.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 087a277e66c0456c2d6fdb7403d032ad09cbd18b Mon Sep 17 00:00:00 2001 -From: wraitii -Date: Sat, 27 Feb 2021 09:31:17 +0000 -Subject: [PATCH] Patch SM78.6 for Rust 1.50 - -Upstreamed from https://hg.mozilla.org/releases/mozilla-esr78/rev/0e8f444683cb -(this fix is integrated in SM78.8) - -Reviewed By: s0600204 - -Differential Revision: https://code.wildfiregames.com/D3590 - - - -git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@24941 3db68df2-c116-0410-a063-a993310a9797 ---- - libraries/source/spidermonkey/FixRust150.diff | 65 +++++++++++++++++++ - libraries/source/spidermonkey/patch.sh | 4 ++ - 2 files changed, 69 insertions(+) - create mode 100644 libraries/source/spidermonkey/FixRust150.diff - -diff --git a/libraries/source/spidermonkey/FixRust150.diff b/libraries/source/spidermonkey/FixRust150.diff -new file mode 100644 -index 00000000000..cfb0d58b4a0 ---- /dev/null -+++ b/libraries/source/spidermonkey/FixRust150.diff -@@ -0,0 +1,65 @@ -+ -+# HG changeset patch -+# User Emilio Cobos Álvarez -+# Date 1609006565 0 -+# Node ID 0e8f444683cb9c4079d3b2250f32f986043ea582 -+# Parent 55097a5cf353f1b2a2228820bdf26bb69a1372a0 -+Bug 1684261 - Fix build with rust nightly. r=jrmuizel, a=RyanVM -+ -+Fixes errors like: -+ -+ dependency (nix) specification is ambiguous. Only one of `branch`, `tag` or `rev` is allowed. -+ -+I've left the most specific dependency, but for wgpu the rev is not -+right, so I've kept the branch which effectively preserves behavior. -+ -+Differential Revision: https://phabricator.services.mozilla.com/D100485 -+ -+diff --git a/.cargo/config.in b/.cargo/config.in -+--- a/.cargo/config.in -++++ b/.cargo/config.in -+@@ -1,16 +1,16 @@ -+ # This file contains vendoring instructions for cargo. -+ # It was generated by `mach vendor rust`. -+ # Please do not edit. -+ -+ [source."https://github.com/shravanrn/nix/"] -+-branch = "r0.13.1" -+ git = "https://github.com/shravanrn/nix/" -+ replace-with = "vendored-sources" -++rev = "4af6c367603869a30fddb5ffb0aba2b9477ba92e" -+ -+ [source."https://github.com/mozilla/rkv"] -+ git = "https://github.com/mozilla/rkv" -+ replace-with = "vendored-sources" -+ rev = "e3c3388e6632cf55e08d773b32e58b1cab9b2731" -+ -+ [source."https://github.com/mozilla/neqo"] -+ git = "https://github.com/mozilla/neqo" -+diff --git a/Cargo.lock b/Cargo.lock -+--- a/Cargo.lock -++++ b/Cargo.lock -+@@ -3200,7 +3200,7 @@ -+ [[package]] -+ name = "nix" -+ version = "0.13.1" -+-source = "git+https://github.com/shravanrn/nix/?branch=r0.13.1#4af6c367603869a30fddb5ffb0aba2b9477ba92e" -++source = "git+https://github.com/shravanrn/nix/?rev=4af6c367603869a30fddb5ffb0aba2b9477ba92e#4af6c367603869a30fddb5ffb0aba2b9477ba92e" -+ dependencies = [ -+ "bitflags", -+ "cc", -+diff --git a/Cargo.toml b/Cargo.toml -+--- a/Cargo.toml -++++ b/Cargo.toml -+@@ -60,8 +60,8 @@ -+ [patch.crates-io] -+ packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="3541e3818fdc7c2a24f87e3459151a4ce955a67a" } -+ rlbox_lucet_sandbox = { git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/", rev="d510da5999a744c563b0acd18056069d1698273f" } -+-nix = { git = "https://github.com/shravanrn/nix/", branch = "r0.13.1", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" } -+-spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3", rev = "20191ad2f370afd6d247edcb9ff9da32d3bedb9c" } -++nix = { git = "https://github.com/shravanrn/nix/", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" } -++spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3" } -+ # failure's backtrace feature might break our builds, see bug 1608157. -+ failure = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" } -+ failure_derive = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" } -+ -diff --git a/libraries/source/spidermonkey/patch.sh b/libraries/source/spidermonkey/patch.sh -index 58be1fbdef0..879964b0f2e 100644 ---- a/libraries/source/spidermonkey/patch.sh -+++ b/libraries/source/spidermonkey/patch.sh -@@ -39,6 +39,10 @@ patch -p1 < ../FixMacBuild.diff - # https://bugzilla.mozilla.org/show_bug.cgi?id=1536491 - patch -p1 < ../FixRpiUnalignedFpAccess.diff - -+# Bug 1684261 upstreamed from 78.8: https://hg.mozilla.org/releases/mozilla-esr78/rev/0e8f444683cb -+# Note that this isn't quite the upstream patch to match our version. -+patch -p1 < ../FixRust150.diff -+ - # Patch those separately, as they might interfere with normal behaviour. - if [ "$(uname -s)" = "FreeBSD" ]; - then diff --git a/srcpkgs/0ad/template b/srcpkgs/0ad/template index f6e6b41899d..2e095d293a6 100644 --- a/srcpkgs/0ad/template +++ b/srcpkgs/0ad/template @@ -1,7 +1,7 @@ # Template file for '0ad' pkgname=0ad -version=0.0.24b -revision=3 +version=0.0.25 +revision=1 archs="x86_64* i686* aarch64* armv7l* ppc64le*" wrksrc="${pkgname}-${version}-alpha" hostmakedepends="pkg-config perl cmake python3 rust cargo yasm tar clang" @@ -14,7 +14,7 @@ maintainer="Helmut Pozimski " license="GPL-2.0-or-later, CC-BY-SA-3.0, MPL-2.0, MIT" homepage="https://play0ad.com" distfiles="https://releases.wildfiregames.com/${pkgname}-${version}-alpha-unix-build.tar.xz" -checksum=325c23c9b6bfc16eb636af6a7a7bdaadbf19214b6eed0422d74cc0090bf137a8 +checksum=592eab37c1a1588e87b1f22d328fd6ca84ba47f32219f9e0fc4bbf67e745430f nocross="uses bundled third-party libraries that do not cross-compile" lib32disabled=yes