From 3736b85f777f6ae3f2ff4fff3526df42374f082f Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Mon, 5 Dec 2016 16:02:55 +1000 Subject: [PATCH] New version 0.0.21 Now uses mozjs-38 instead of mozjs-31 --- .abf.yml | 2 +- 0ad-0.0.21-desktop.patch | 11 +++++++++++ 0ad-mozjs-incompatible.patch | 38 ++++++++++++++++++++++++++++++++++++ 0ad-rpath.patch | 9 +++++---- 0ad.spec | 16 +++++++++------ 5 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 0ad-0.0.21-desktop.patch create mode 100644 0ad-mozjs-incompatible.patch diff --git a/.abf.yml b/.abf.yml index d2af1a1..288e8a6 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - 0ad-0.0.20-alpha-unix-build.tar.xz: 4c056ee114e6b50f456ad14be961a101728e99a3 + 0ad-0.0.21-alpha-unix-build.tar.xz: efcdc0a15011df39d604aefc7a5d784158a9b884 diff --git a/0ad-0.0.21-desktop.patch b/0ad-0.0.21-desktop.patch new file mode 100644 index 0000000..8dbf548 --- /dev/null +++ b/0ad-0.0.21-desktop.patch @@ -0,0 +1,11 @@ +diff -urN 0ad-0.0.21-alpha/build/resources/0ad.desktop 0ad-0.0.21-alpha-patched/build/resources/0ad.desktop +--- 0ad-0.0.21-alpha/build/resources/0ad.desktop 2016-11-02 04:07:21.000000000 +1000 ++++ 0ad-0.0.21-alpha-patched/build/resources/0ad.desktop 2016-12-05 15:54:01.181109914 +1000 +@@ -6,7 +6,6 @@ + Terminal=false + Type=Application + Categories=Game;StrategyGame; +-URL=https://play0ad.com/ + Comment=A real-time strategy game of ancient warfare + Comment[de]=Ein Echtzeitstrategiespiel, das die Kriegsführung der Antike behandelt + Comment[es]=Un juego de estrategia en tiempo real de guerra antigua diff --git a/0ad-mozjs-incompatible.patch b/0ad-mozjs-incompatible.patch new file mode 100644 index 0000000..3d1d91a --- /dev/null +++ b/0ad-mozjs-incompatible.patch @@ -0,0 +1,38 @@ +diff -uNr 0ad-0.0.21-alpha.orig/source/scriptinterface/ScriptTypes.h 0ad-0.0.21-alpha/source/scriptinterface/ScriptTypes.h +--- 0ad-0.0.21-alpha.orig/source/scriptinterface/ScriptTypes.h 2016-09-02 18:19:31.000000000 +0200 ++++ 0ad-0.0.21-alpha/source/scriptinterface/ScriptTypes.h 2016-11-09 07:14:16.227277422 +0100 +@@ -79,19 +79,6 @@ + include paths. + #endif + +-#if MOZJS_MINOR_VERSION != 3 +-#error Your compiler is trying to use an untested minor version of the \ +-SpiderMonkey library. If you are a package maintainer, please make sure \ +-to check very carefully that this version does not change the behaviour \ +-of the code executed by SpiderMonkey. Different parts of the game (e.g. \ +-the multiplayer mode) rely on deterministic behaviour of the JavaScript \ +-engine. A simple way for testing this would be playing a network game \ +-with one player using the old version and one player using the new \ +-version. Another way for testing is running replays and comparing the \ +-final hash (check trac.wildfiregames.com/wiki/Debugging#Replaymode). \ +-For more information check this link: trac.wildfiregames.com/wiki/Debugging#Outofsync +-#endif +- + class ScriptInterface; + + #endif // INCLUDED_SCRIPTTYPES +diff -uNr 0ad-0.0.21-alpha.orig/source/simulation2/serialization/BinarySerializer.cpp 0ad-0.0.21-alpha/source/simulation2/serialization/BinarySerializer.cpp +--- 0ad-0.0.21-alpha.orig/source/simulation2/serialization/BinarySerializer.cpp 2016-09-18 11:34:45.000000000 +0200 ++++ 0ad-0.0.21-alpha/source/simulation2/serialization/BinarySerializer.cpp 2016-11-09 07:29:10.293824242 +0100 +@@ -145,11 +145,7 @@ + const JSClass* jsclass = JS_GetClass(obj); + if (!jsclass) + throw PSERROR_Serialize_ScriptError("JS_GetClass failed"); +-// TODO: Remove this workaround for upstream API breakage when updating SpiderMonkey +-// See https://bugzilla.mozilla.org/show_bug.cgi?id=1236373 +-#define JSCLASS_CACHED_PROTO_WIDTH js::JSCLASS_CACHED_PROTO_WIDTH + JSProtoKey protokey = JSCLASS_CACHED_PROTO_KEY(jsclass); +-#undef JSCLASS_CACHED_PROTO_WIDTH + + if (protokey == JSProto_Object) + { diff --git a/0ad-rpath.patch b/0ad-rpath.patch index aeaf823..ab76d4d 100644 --- a/0ad-rpath.patch +++ b/0ad-rpath.patch @@ -1,6 +1,7 @@ ---- 0ad-0.0.16-alpha/build/premake/premake4.lua.orig 2014-05-17 22:21:52.787713008 +0200 -+++ 0ad-0.0.16-alpha/build/premake/premake4.lua 2014-05-17 22:22:39.659845979 +0200 -@@ -356,26 +356,6 @@ +diff -urN 0ad-0.0.21-alpha/build/premake/premake4.lua 0ad-0.0.21-alpha-patched/build/premake/premake4.lua +--- 0ad-0.0.21-alpha/build/premake/premake4.lua 2016-09-18 18:54:27.000000000 +1000 ++++ 0ad-0.0.21-alpha-patched/build/premake/premake4.lua 2016-12-05 13:42:29.678426569 +1000 +@@ -368,26 +368,6 @@ defines { "INSTALLED_LIBDIR=" .. _OPTIONS["libdir"] } end @@ -17,7 +18,7 @@ - - -- Adding the executable path and taking care of correct escaping - if _ACTION == "gmake" then -- linkoptions { "-Wl,-rpath,'$$ORIGIN'" } +- linkoptions { "-Wl,-rpath,'$$ORIGIN'" } - elseif _ACTION == "codeblocks" then - linkoptions { "-Wl,-R\\\\$$$ORIGIN" } - end diff --git a/0ad.spec b/0ad.spec index 9169065..201e6d0 100644 --- a/0ad.spec +++ b/0ad.spec @@ -15,7 +15,7 @@ Summary: Cross-Platform RTS Game of Ancient Warfare Name: 0ad -Version: 0.0.20 +Version: 0.0.21 Release: 1 Epoch: 1 License: GPLv2+ and BSD and MIT and IBM @@ -28,12 +28,14 @@ Source0: http://releases.wildfiregames.com/%{name}-%{version}-alpha-unix-build.t # and disabled options were not added to the manual page. Source1: %{name}.6 # http://trac.wildfiregames.com/ticket/1421 -Patch0: %{name}-rpath.patch +Patch0: 0ad-rpath.patch # Only do fcollada debug build with enabling debug maintainer mode # It also prevents assumption there that it is building in x86 -Patch1: %{name}-0.0.19-debug.patch +Patch1: 0ad-0.0.19-debug.patch +Patch2: 0ad-mozjs-incompatible.patch # After some trial&error this corrects a %%check failure with gcc 4.9 on i686 -Patch3: %{name}-check.patch +Patch3: 0ad-check.patch +Patch4: 0ad-0.0.21-desktop.patch BuildRequires: cmake BuildRequires: desktop-file-utils @@ -55,7 +57,7 @@ BuildRequires: pkgconfig(libenet) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libzip) -BuildRequires: pkgconfig(mozjs-31) +BuildRequires: pkgconfig(mozjs-38) BuildRequires: pkgconfig(nspr) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(sdl2) @@ -96,7 +98,9 @@ hobbyist game developers, since 2001. # disable debug build, and "int 0x3" to trap to debugger (x86 only) %patch1 -p1 %endif +%patch2 -p1 %patch3 -p1 +%patch4 -p1 %if %{with_system_nvtt} rm -fr libraries/nvtt @@ -111,7 +115,7 @@ build/workspaces/update-workspaces.sh \ --bindir %{_gamesbindir} \ --datadir %{_gamesdatadir}/%{name} \ --libdir %{_libdir}/%{name} \ - --with-system-mozjs31 \ + --with-system-mozjs38 \ %if %{with_system_nvtt} --with-system-nvtt \ %endif