* remove 0ad
This commit is contained in:
parent
e48c12bd0b
commit
1e37c247c3
@ -1,257 +0,0 @@
|
||||
--- 0ad/source/graphics/TextureConverter.cpp.orig 2019-08-13 20:18:15.565595627 +0200
|
||||
+++ 0ad/source/graphics/TextureConverter.cpp 2019-08-13 20:59:13.685280351 +0200
|
||||
@@ -52,6 +52,10 @@
|
||||
memcpy(&buffer[off], data, size);
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+ virtual void endImage()
|
||||
+ {
|
||||
+ }
|
||||
};
|
||||
|
||||
/**
|
||||
diff --git a/source/lib/sysdep/arch.h b/source/lib/sysdep/arch.h
|
||||
index e3e520f2e1..c9e69fea4c 100644
|
||||
--- 0ad/source/lib/sysdep/arch.h
|
||||
+++ 0ad/source/lib/sysdep/arch.h
|
||||
@@ -70,9 +70,15 @@
|
||||
#else
|
||||
# define ARCH_MIPS 0
|
||||
#endif
|
||||
+// PowerPC
|
||||
+#if defined(_ARCH_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) != 1
|
||||
+#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_PPC64) != 1
|
||||
# error "architecture not correctly detected (either none or multiple ARCH_* defined)"
|
||||
#endif
|
||||
|
||||
--- 0ad/source/ps/GameSetup/HWDetect.cpp.orig 2019-08-13 22:34:46.043612866 +0200
|
||||
+++ 0ad/source/ps/GameSetup/HWDetect.cpp 2019-08-13 22:35:13.600616429 +0200
|
||||
@@ -260,6 +260,7 @@
|
||||
scriptInterface.SetProperty(settings, "arch_amd64", ARCH_AMD64);
|
||||
scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM);
|
||||
scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64);
|
||||
+ scriptInterface.SetProperty(settings, "arch_powerpc64", ARCH_PPC64);
|
||||
|
||||
#ifdef NDEBUG
|
||||
scriptInterface.SetProperty(settings, "build_debug", 0);
|
||||
--- 0ad/build/premake/premake5/src/_premake_init.lua.orig 2019-08-13 23:07:30.339014479 +0200
|
||||
+++ 0ad/build/premake/premake5/src/_premake_init.lua 2019-08-13 23:07:58.215958647 +0200
|
||||
@@ -28,6 +28,7 @@
|
||||
p.X86_64,
|
||||
p.ARM,
|
||||
p.ARM64,
|
||||
+ p.PPC,
|
||||
},
|
||||
aliases = {
|
||||
i386 = p.X86,
|
||||
--- 0ad/build/premake/premake5/src/base/_foundation.lua.orig 2019-08-13 23:09:42.224556581 +0200
|
||||
+++ 0ad/build/premake/premake5/src/base/_foundation.lua 2019-08-13 23:10:06.031946496 +0200
|
||||
@@ -56,7 +56,7 @@
|
||||
premake.X86_64 = "x86_64"
|
||||
premake.ARM = "ARM"
|
||||
premake.ARM64 = "ARM64"
|
||||
-
|
||||
+ premake.PPC = "PPC"
|
||||
|
||||
|
||||
---
|
||||
--- 0ad/build/premake/premake5/tests/tools/test_gcc.lua.orig 2019-08-13 23:19:04.443044203 +0200
|
||||
+++ 0ad/build/premake/premake5/tests/tools/test_gcc.lua 2019-08-13 23:19:49.718102273 +0200
|
||||
@@ -423,6 +423,11 @@
|
||||
test.contains({ "-m64" }, gcc.getldflags(cfg))
|
||||
end
|
||||
|
||||
+ function suite.ldflags_onPPC()
|
||||
+ architecture "powerpc64"
|
||||
+ prepare()
|
||||
+ test.contains({ "-m64" }, gcc.getldflags(cfg))
|
||||
+ end
|
||||
|
||||
--
|
||||
-- Non-Windows shared libraries should marked as position independent.
|
||||
--- 0ad/build/premake/premake5.lua.orig 2019-08-14 11:18:09.811969264 +0200
|
||||
+++ 0ad/build/premake/premake5.lua 2019-08-14 11:19:28.733457005 +0200
|
||||
@@ -59,7 +59,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
--- detect CPU architecture (simplistic, currently only supports x86, amd64 and ARM)
|
||||
+-- detect CPU architecture (simplistic, currently only supports x86, amd64, ARM, powerpc64)
|
||||
arch = "x86"
|
||||
if _OPTIONS["android"] then
|
||||
arch = "arm"
|
||||
@@ -84,6 +84,8 @@
|
||||
arch = "arm"
|
||||
elseif string.find(machine, "aarch64") == 1 then
|
||||
arch = "aarch64"
|
||||
+ elseif string.find(machine, "powerpc64") == 1 then
|
||||
+ arch = "powerpc64"
|
||||
else
|
||||
print("WARNING: Cannot determine architecture from GCC, assuming x86")
|
||||
end
|
||||
@@ -817,6 +819,8 @@
|
||||
table.insert(source_dirs, "lib/sysdep/arch/arm");
|
||||
elseif arch == "aarch64" then
|
||||
table.insert(source_dirs, "lib/sysdep/arch/aarch64");
|
||||
+ elseif arch == "powerpc64" then
|
||||
+ table.insert(source_dirs, "lib/sysdep/arch/powerpc64");
|
||||
end
|
||||
|
||||
-- OS-specific
|
||||
diff -ruN empty/powerpc64.cpp src/0ad/source/lib/sysdep/arch/powerpc64/powerpc64.cpp
|
||||
--- 0ad/source/lib/sysdep/arch/powerpc64/powerpc64.cpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ 0ad/source/lib/sysdep/arch/powerpc64/powerpc64.cpp 2019-08-14 11:31:50.963280190 +0200
|
||||
@@ -0,0 +1,107 @@
|
||||
+/* Copyright (C) 2010 Wildfire Games.
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+#include "precompiled.h"
|
||||
+
|
||||
+#if ARCH_PPC64
|
||||
+
|
||||
+#include "lib/sysdep/cpu.h"
|
||||
+#include "lib/sysdep/arch/powerpc64/powerpc64.h"
|
||||
+
|
||||
+
|
||||
+void cpu_ConfigureFloatingPoint()
|
||||
+{
|
||||
+ // no need to change the FPU control word.
|
||||
+}
|
||||
+
|
||||
+#if MSC_VERSION
|
||||
+
|
||||
+// VC 2008 and ICC 12 differ in their declaration of _Interlocked*
|
||||
+#if ICC_VERSION
|
||||
+typedef __int64* P64;
|
||||
+#else
|
||||
+typedef volatile __int64* P64;
|
||||
+#endif
|
||||
+
|
||||
+bool cpu_CAS(volatile intptr_t* location, intptr_t expected, intptr_t newValue)
|
||||
+{
|
||||
+ const intptr_t initial = _InterlockedCompareExchange64((P64)location, newValue, expected);
|
||||
+ return initial == expected;
|
||||
+}
|
||||
+
|
||||
+bool cpu_CAS64(volatile i64* location, i64 expected, i64 newValue)
|
||||
+{
|
||||
+ const i64 initial = _InterlockedCompareExchange64((P64)location, newValue, expected);
|
||||
+ return initial == expected;
|
||||
+}
|
||||
+
|
||||
+intptr_t cpu_AtomicAdd(volatile intptr_t* location, intptr_t increment)
|
||||
+{
|
||||
+ return _InterlockedExchangeAdd64((P64)location, increment);
|
||||
+}
|
||||
+
|
||||
+#elif OS_MACOSX
|
||||
+
|
||||
+#include <libkern/OSAtomic.h>
|
||||
+
|
||||
+intptr_t cpu_AtomicAdd(volatile intptr_t* location, intptr_t increment)
|
||||
+{
|
||||
+ cassert(sizeof(intptr_t) == sizeof(int64_t));
|
||||
+ return OSAtomicAdd64Barrier(increment, (volatile int64_t*)location);
|
||||
+}
|
||||
+
|
||||
+bool cpu_CAS(volatile intptr_t* location, intptr_t expected, intptr_t newValue)
|
||||
+{
|
||||
+ cassert(sizeof(intptr_t) == sizeof(void*));
|
||||
+ return OSAtomicCompareAndSwapPtrBarrier((void*)expected, (void*)newValue, (void* volatile*)location);
|
||||
+}
|
||||
+
|
||||
+bool cpu_CAS64(volatile i64* location, i64 expected, i64 newValue)
|
||||
+{
|
||||
+ return OSAtomicCompareAndSwap64Barrier(expected, newValue, location);
|
||||
+}
|
||||
+
|
||||
+#elif GCC_VERSION
|
||||
+
|
||||
+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);
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+const char* cpu_IdentifierString()
|
||||
+{
|
||||
+ return "unknown"; // TODO
|
||||
+}
|
||||
+
|
||||
+#endif // ARCH_PPC64
|
||||
diff -ruN empty/powerpc64.h src/0ad/source/lib/sysdep/arch/powerpc64/powerpc64.h
|
||||
--- 0ad/source/lib/sysdep/arch/powerpc64/powerpc64.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ 0ad/source/lib/sysdep/arch/powerpc64/powerpc64.h 2019-08-14 11:22:12.655768009 +0200
|
||||
@@ -0,0 +1,34 @@
|
||||
+/* Copyright (C) 2010 Wildfire Games.
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * C++ and inline asm implementations of PPC functions
|
||||
+ */
|
||||
+
|
||||
+#ifndef INCLUDED_PPC64
|
||||
+#define INCLUDED_PPC64
|
||||
+
|
||||
+#if !ARCH_PPC64
|
||||
+#error "including powerpc64.h without ARCH_PPC64=1"
|
||||
+#endif
|
||||
+
|
||||
+#endif // #ifndef INCLUDED_PPC
|
@ -1,77 +0,0 @@
|
||||
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
||||
# Maintainer: Brenton Horne <brentonhorne77@gmail.com>
|
||||
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
|
||||
# Contributor: t3ddy <t3ddy1988 "at" gmail {dot} com>
|
||||
# Contributor: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
|
||||
pkgname=('0ad' '0ad-data')
|
||||
pkgver=0.23+20190814
|
||||
pkgrel=2
|
||||
arch=(x86_64 powerpc64le)
|
||||
url="http://play0ad.com/"
|
||||
license=('GPL2' 'CCPL')
|
||||
depends=('binutils' 'boost-libs' 'curl' 'enet' 'libogg' 'libpng' 'libvorbis'
|
||||
'libxml2' 'openal' 'sdl2' 'wxgtk' 'zlib' 'libgl' 'glu'
|
||||
'gloox' 'miniupnpc' 'icu' 'nspr' 'nvidia-texture-tools' 'libsodium')
|
||||
makedepends=('boost' 'cmake' 'mesa' 'zip' 'python2' 'libsm' 'git')
|
||||
commit=1880cabf79f6f3bb594eae1b922acd6206c1373c
|
||||
source=("${pkgname}::git+https://github.com/0ad/0ad.git#commit=${commit}"
|
||||
spidermonkey-powerpc.patch
|
||||
spidermonkey-patchset.patch
|
||||
0ad-powerpc64-support.patch)
|
||||
sha512sums=('SKIP'
|
||||
'3a1de09a0d6c084292d3914cd39638e9fa09fbef6f8993147528c39abdae20d77496d5bab6416fe5e4b49593eb5cf74e899d96066847ce76a6156af44f429a91'
|
||||
'9892fddf043b42103501d5bbf054a39fa377f8ca9e94b0adfaa2f06ac50d91b66d3faee5196fb24d85929bfb4a98b8af9152da92e95611ad586c6da30ad7b7ca'
|
||||
'02907941146ce066b4dcafc9dc6c4e987686aa26abbec9f4cab5f8ba425d00354f31af148c4b9d6c8f1133a923262a7d187ec8c51898144e24398ae20a60d16a')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}"
|
||||
sed -i "s/env python/env python2/g" libraries/source/cxxtest-4.4/bin/cxxtestgen
|
||||
patch -Np0 -i "${srcdir}/spidermonkey-patchset.patch"
|
||||
patch -Np1 -i "${srcdir}/0ad-powerpc64-support.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}/build/workspaces"
|
||||
|
||||
unset CPPFLAGS # for le spidermonkey
|
||||
export SDL2_CONFIG="pkg-config sdl2"
|
||||
export HOSTTYPE=${CARCH}
|
||||
|
||||
./update-workspaces.sh \
|
||||
--bindir=/usr/bin \
|
||||
--libdir=/usr/lib/0ad \
|
||||
--datadir=/usr/share/${pkgname}/data \
|
||||
--with-system-nvtt
|
||||
|
||||
cd "${srcdir}/${pkgname}/libraries/source/fcollada/src"
|
||||
make config=release
|
||||
|
||||
cd "${srcdir}/${pkgname}/build/workspaces/gcc"
|
||||
make config=release
|
||||
}
|
||||
|
||||
package_0ad() {
|
||||
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
|
||||
depends=('0ad-data')
|
||||
provides=('0ad')
|
||||
|
||||
install -d "${pkgdir}"/usr/{bin,lib/${pkgname}}
|
||||
cd "${srcdir}/${pkgname}"
|
||||
|
||||
install -Dm755 binaries/system/pyrogenesis "${pkgdir}/usr/bin"
|
||||
install -Dm755 binaries/system/*.so "${pkgdir}/usr/lib/${pkgname}"
|
||||
install -Dm755 build/resources/${pkgname}.sh "${pkgdir}/usr/bin/${pkgname}"
|
||||
install -Dm644 build/resources/${pkgname}.desktop \
|
||||
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
||||
install -Dm644 build/resources/${pkgname}.png \
|
||||
"${pkgdir}/usr/share/pixmaps/${pkgname}.png"
|
||||
}
|
||||
|
||||
package_0ad-data() {
|
||||
pkgdesc="Data package for 0ad"
|
||||
depends=('0ad')
|
||||
provides=('0ad-data')
|
||||
|
||||
mkdir -p ${pkgdir}/usr/share/${pkgbase}
|
||||
cp -r ${srcdir}/${pkgbase}/binaries/data ${pkgdir}/usr/share/${pkgbase}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
--- libraries/source/spidermonkey/patch.sh.orig 2019-08-13 13:05:01.967329932 +0200
|
||||
+++ libraries/source/spidermonkey/patch.sh 2019-08-13 13:12:11.120904449 +0200
|
||||
@@ -51,3 +51,6 @@
|
||||
# Will be included in SM52.
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1379538
|
||||
patch -p1 < ../FixLinking.diff
|
||||
+
|
||||
+# seemingly powerpc specific patches
|
||||
+patch -Np1 -i ../../../../../spidermonkey-powerpc.patch
|
@ -1,11 +0,0 @@
|
||||
--- mozjs-45.0.2/js/src/jit/none/MacroAssembler-none.h.orig 2019-08-13 13:22:01.067053603 +0200
|
||||
+++ mozjs-45.0.2/js/src/jit/none/MacroAssembler-none.h 2019-08-13 13:22:37.323128477 +0200
|
||||
@@ -259,6 +259,8 @@
|
||||
template <typename T, typename S> void branchPrivatePtr(Condition, T, S, Label*) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void decBranchPtr(Condition, T, S, Label*) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void branchTest64(Condition, T, T, S, Label*) { MOZ_CRASH(); }
|
||||
+ template <typename T, typename S> void branch64(Condition, T, S, Label*) { MOZ_CRASH(); }
|
||||
+ template <typename T, typename S> void branch64(Condition, T, T, S, Label*) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void mov(T, S) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void movq(T, S) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void movePtr(T, S) { MOZ_CRASH(); }
|
Loading…
x
Reference in New Issue
Block a user