From 26dc1657f6e3c0ad9f1180ca38cd79b933ef0c8b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Nov 09 2016 06:30:19 +0000 Subject: building fixes for newest mozjs Signed-off-by: Igor Gnatenko --- 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-mozjs-no-minor-check.patch b/0ad-mozjs-no-minor-check.patch deleted file mode 100644 index 114ac78..0000000 --- a/0ad-mozjs-no-minor-check.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 --git a/0ad.spec b/0ad.spec index f19fcfa..eaa20a7 100644 --- a/0ad.spec +++ b/0ad.spec @@ -107,7 +107,8 @@ Patch1: %{name}-debug.patch Patch3: %{name}-valgrind.patch # We have don't want to ensure that we have 38.3.x of mozjs (we just don't have it) -Patch4: %{name}-mozjs-no-minor-check.patch +# And other fixes +Patch4: %{name}-mozjs-incompatible.patch %description 0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform