Package: libjavascript-perl Version: 1.06-1 Severity: important Tags: patch
Please apply the patch attached to this email so that a simple binNMU will be enough when time will come for libmozjs-dev currently in experimental to go in unstable, with the goal to reach Lenny. While for the moment, there is a problem in jsfun.h in the experimental package preventing libjavascript-perl to be built against it, I can guarantee this builds fine with a version containing a fixed jsfun.h. Speaking of which, I built a package built against experimental libmozjs, available at the following address: http://people.debian.org/~glandium/mozjs-1.9/libjavascript-perl_1.06-1.1_amd64.changes Note the build dependency was changed only so that my pbuilder does its thing alone. It would be helpful if you could validate this works properly (though the testsuite seems to indicate so) so that we get confident about the future transition. If you need to build the package on i386 or another for testing purpose, please take the experimental libmozjs-dev package and apply the patch in [1] to /usr/include/mozjs/jsfun.h. Feedback about proper or broken functioning would be appreciated ;) Thanks Mike 1. https://bugzilla.mozilla.org/show_bug.cgi?id=430955 -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-rc8-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash
--- libjavascript-perl-1.06.orig/JavaScript.xs +++ libjavascript-perl-1.06/JavaScript.xs @@ -266,7 +266,7 @@ tmp = SvIV((SV*)SvRV(PJS_call_perl_method("content", function, NULL))); func = INT2PTR(JSFunction *, tmp); - if (PJS_call_javascript_function(cx, (jsval) (func->object), args, &rval) == JS_FALSE) { + if (PJS_call_javascript_function(cx, (jsval) FUN_OBJECT(func), args, &rval) == JS_FALSE) { /* Exception was thrown */ XSRETURN_UNDEF; } --- libjavascript-perl-1.06.orig/JavaScript.h +++ libjavascript-perl-1.06/JavaScript.h @@ -29,6 +29,10 @@ #include "PJS_TypeConversion.h" #include "PJS_Common.h" +#ifndef FUN_OBJECT +#define FUN_OBJECT(func) func->object +#endif + #ifdef __cplusplus } #endif