I keep this bug open because Georgiewskiy did not subscribe to the
upstream BTS. The attached patch reverts the libmojs-dev -
mozjs185-dev changes, hoping to get a crashing executable *and* a
meaningful backtrace.
To build 1.76.1-2, you did:
$ apt-get source --tar-only oolite
$ git clone git://anonscm.debian.org/pkg-games/oolite.git
$ cd oolite
$ grep Build-Depends -A4 debian/control
$ sudo apt-get missing_build_dependencies
$ DEB_BUILD_OPTIONS=noopt nostrip debuild -us -uc
$ sudo dpkg -i ../oolite*.deb
Now, please:
$ debuild clean
$ git status # Check that workspace is clean.
$ git checkout 7e5f3143858f0f4d38ccc501a73dd5d35a77b4d7 # Check revision.
$ patch -p1 /tmp/allow_nostrip_for_1.76.1-1.diff
$ DEB_BUILD_OPTIONS=noopt nostrip debuild -us -uc
$ sudo dpkg -i ../oolite*.deb
There is no need to test both strip/nostrip versions, they should
produce the same assembly code.
diff --git a/debian/control b/debian/control
index 0e27861..6893d75 100644
--- a/debian/control
+++ b/debian/control
@@ -7,10 +7,9 @@ Standards-Version: 3.9.3
Build-Depends: dpkg-dev (= 1.16.1), debhelper (= 9),
libsdl1.2-dev, libsdl-mixer1.2-dev,
libgnustep-base-dev, gnustep-core-devel,
- libnspr4-dev, libmozjs185-dev,
- libpng-dev, mesa-common-dev, gobjc, libffi-dev
-# Work-around: Oolite does not Build-Depend on libffi-dev, but
-# libmozjs185-dev does (reported as #).
+ libnspr4-dev, libmozjs-dev (= 2.0~),
+ libpng-dev, mesa-common-dev,
+gobjc
Homepage: http://www.oolite.org
Vcs-Git: git://git.debian.org/pkg-games/oolite.git
Vcs-Browser: http://git.debian.org/?p=pkg-games/oolite.git
diff --git a/debian/patches/debian_version_of_libmozjs.diff b/debian/patches/debian_version_of_libmozjs.diff
index a442105..40d7c38 100644
--- a/debian/patches/debian_version_of_libmozjs.diff
+++ b/debian/patches/debian_version_of_libmozjs.diff
@@ -1,24 +1,33 @@
Description: use Debian/unstable version of libmozjs
Upstream downloads libmozjs v4 from a private URL at build time.
.
- We adapt the source to use 1.8.5 packaged in Debian.
- This part of the work has been forwarded upstream
- but changes have been necessary since.
+ We adapt the source to use the version available in Debian.
+ This part of the work is forwarded upstream.
.
JSOPTION_ANONFUNFIX has been removed in mozjs, see
https://bugzilla.mozilla.org/show_bug.cgi?id=665835
.
- The main API difference is that older JSScript memory allocation
- is hidden inside the associated JSObject.
+ jsxdrapi.h does not provide C compatibility anymore.
Author: Nicolas Boulenguez nicolas.bouleng...@free.fr
Forwarded: Michael Werle mi...@michaelwerle.com
Index: b/src/Core/Scripting/OOJSScript.m
===
a/src/Core/Scripting/OOJSScript.m 2012-06-25 09:36:25.0 +0200
-+++ b/src/Core/Scripting/OOJSScript.m 2012-06-25 09:37:49.0 +0200
-@@ -58,11 +58,11 @@
+--- a/src/Core/Scripting/OOJSScript.m 2012-05-12 21:53:26.0 +0200
b/src/Core/Scripting/OOJSScript.m 2012-05-30 16:45:05.0 +0200
+@@ -22,6 +22,10 @@
+
+ */
+
++/* Work-around because jsxdrapi.h does not provide */
++/* (Objective) C compatibility anymore. */
++#define OO_CACHE_JS_SCRIPTS 0
++
+ #ifndef OO_CACHE_JS_SCRIPTS
+ #define OO_CACHE_JS_SCRIPTS 1
+ #endif
+@@ -58,11 +62,11 @@
static void AddStackToArrayReversed(NSMutableArray *array, RunningStack *stack);
@@ -33,7 +42,7 @@ Index: b/src/Core/Scripting/OOJSScript.m
#endif
static NSString *StrippedName(NSString *string);
-@@ -111,8 +111,7 @@
+@@ -111,8 +115,7 @@
{
JSContext*context = NULL;
NSString*problem = nil; // Acts as error flag.
@@ -43,7 +52,7 @@ Index: b/src/Core/Scripting/OOJSScript.m
jsval returnValue = JSVAL_VOID;
NSEnumerator *keyEnum = nil;
NSString*key = nil;
-@@ -142,7 +141,7 @@
+@@ -142,7 +145,7 @@
problem = @could not add JavaScript root object;
}
@@ -52,7 +61,7 @@ Index: b/src/Core/Scripting/OOJSScript.m
{
problem = @could not add JavaScript root object;
}
-@@ -168,7 +167,7 @@
+@@ -168,7 +171,7 @@
if (!problem)
{
OOLog(@script.javaScript.willLoad, @About to load JavaScript %@, path);
@@ -61,10 +70,12 @@ Index: b/src/Core/Scripting/OOJSScript.m
}
OOLogIndentIf(@script.javaScript.willLoad);
-@@ -205,10 +204,9 @@
+@@ -203,12 +206,9 @@
+ problem = @could not run script;
+ }
OOJSStopTimeLimiter();
-
- // We don't need the script any more - the event handlers hang around as long as the JS object exists.
+-
+- // We don't need the script any more - the event handlers hang around as long as the JS object exists.
- JS_DestroyScript(context, script);
}
@@ -73,7 +84,7 @@ Index: b/src/Core/Scripting/OOJSScript.m
sRunningStack = stackElement.back;
-@@ -620,16 +618,16 @@
+@@ -620,16 +620,16 @@
}
@@ -93,17 +104,17 @@ Index: b/src/Core/Scripting/OOJSScript.m
*outErrorMessage = nil;
#if