]> git.pld-linux.org Git - packages/gjs.git/commitdiff
- fixed build with xulrunner 5.0 auto/th/gjs-0_7_14-4
authorMarcin Banasiak <marcin.banasiak@gmail.com>
Thu, 23 Jun 2011 15:55:35 +0000 (15:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- release 4

Changed files:
    gjs-xulrunner-5.0.patch -> 1.1
    gjs.spec -> 1.24

gjs-xulrunner-5.0.patch [new file with mode: 0644]
gjs.spec

diff --git a/gjs-xulrunner-5.0.patch b/gjs-xulrunner-5.0.patch
new file mode 100644 (file)
index 0000000..1b0cbde
--- /dev/null
@@ -0,0 +1,154 @@
+From 0f886dc29b268ad0683e1372a80044a40a981192 Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+Date: Fri, 01 Apr 2011 18:55:43 +0000
+Subject: Conditionally adapt to JS_CLASS_TRACE removal
+
+Upstream removed it in http://hg.mozilla.org/mozilla-central/rev/a7784d11c59b
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646471
+---
+diff --git a/configure.ac b/configure.ac
+index d185ba1..1c773c0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -155,11 +155,14 @@ else
+   AC_MSG_ERROR([$JS_PACKAGE >= 1.9.2 is required])
+ fi
++dnl xulrunner 2 checks
+ AC_CHECK_LIB([mozjs], [JS_GetStringBytes], AC_DEFINE([HAVE_JS_GETSTRINGBYTES], [1], [Define if we still have JS_GetStringBytes]),, [$JS_LIBS])
+ AC_CHECK_LIB([mozjs], [JS_GetFunctionName], AC_DEFINE([HAVE_JS_GETFUNCTIONNAME], [1], [Define if we still have JS_GetFunctionName]),, [$JS_LIBS])
+ AC_CHECK_LIB([mozjs], [JS_GetStringChars], AC_DEFINE([HAVE_JS_GETSTRINGCHARS], [1], [Define if we still have JS_GetStringChars]),, [$JS_LIBS])
+ AC_CHECK_LIB([mozjs], [JS_StrictPropertyStub], AC_DEFINE([HAVE_JS_STRICTPROPERTYSTUB], [1], [Define if we have JS_StrictPropertyStub]),, [$JS_LIBS])
+ AC_CHECK_LIB([mozjs], [JS_GetGlobalForScopeChain], AC_DEFINE([HAVE_JS_GETGLOBALFORSCOPECHAIN], [1], [Define if we have JS_GetGlobalForScopeChain]),, [$JS_LIBS])
++dnl xulrunner 2.2 checks
++AC_CHECK_LIB([mozjs], [JS_CLASS_TRACE], AC_DEFINE([HAVE_JS_CLASS_TRACE], [1], [Define if we still have JS_CLASS_TRACE]),, [$JS_LIBS])
+ AC_MSG_CHECKING([for mozilla-js >= 2 ])
+ if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
+diff --git a/gi/keep-alive.c b/gi/keep-alive.c
+index c7149ac..e268eaf 100644
+--- a/gi/keep-alive.c
++++ b/gi/keep-alive.c
+@@ -184,8 +184,10 @@ keep_alive_trace(JSTracer *tracer,
+  */
+ static struct JSClass gjs_keep_alive_class = {
+     "__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */
+-    JSCLASS_HAS_PRIVATE |
+-    JSCLASS_MARK_IS_TRACE, /* TraceOp not MarkOp */
++#ifdef HAVE_JS_CLASS_TRACE
++    JSCLASS_MARK_IS_TRACE | /* TraceOp not MarkOp */
++#endif
++    JSCLASS_HAS_PRIVATE,
+     JS_PropertyStub,
+     JS_PropertyStub,
+     JS_PropertyStub,
+@@ -200,7 +202,11 @@ static struct JSClass gjs_keep_alive_class = {
+     NULL,
+     NULL,
+     NULL,
++#ifdef HAVE_JS_CLASS_TRACE
+     JS_CLASS_TRACE(keep_alive_trace),
++#else
++    keep_alive_trace,
++#endif
+     NULL
+ };
+--
+cgit v0.9
+From 82a074e48610cafba0c4061b8267cccaada6be5e Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+Date: Fri, 01 Apr 2011 19:04:57 +0000
+Subject: Conditionally adapt to JS_DestroyScript removal
+
+Upstream changed the behaviour of several things about JSScripts in
+http://hg.mozilla.org/mozilla-central/rev/c919a7271ac1
+
+We now have to use a JSObject instead of a JSScript in certain circumstances,
+and we no longer have to call JS_DestroyScript which no longer exists
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646471
+---
+diff --git a/configure.ac b/configure.ac
+index 1c773c0..2e23e8e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -163,6 +163,7 @@ AC_CHECK_LIB([mozjs], [JS_StrictPropertyStub], AC_DEFINE([HAVE_JS_STRICTPROPERTY
+ AC_CHECK_LIB([mozjs], [JS_GetGlobalForScopeChain], AC_DEFINE([HAVE_JS_GETGLOBALFORSCOPECHAIN], [1], [Define if we have JS_GetGlobalForScopeChain]),, [$JS_LIBS])
+ dnl xulrunner 2.2 checks
+ AC_CHECK_LIB([mozjs], [JS_CLASS_TRACE], AC_DEFINE([HAVE_JS_CLASS_TRACE], [1], [Define if we still have JS_CLASS_TRACE]),, [$JS_LIBS])
++AC_CHECK_LIB([mozjs], [JS_DestroyScript], AC_DEFINE([HAVE_JS_DESTROYSCRIPT], [1], [Define if we still have JS_DestroyScript]),, [$JS_LIBS])
+ AC_MSG_CHECKING([for mozilla-js >= 2 ])
+ if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
+diff --git a/modules/console.c b/modules/console.c
+index ba4b5b6..35d03c1 100644
+--- a/modules/console.c
++++ b/modules/console.c
+@@ -161,7 +161,11 @@ gjs_console_interact(JSContext *context,
+ {
+     JSObject *object = JS_THIS_OBJECT(context, vp);
+     gboolean eof = FALSE;
++#ifdef HAVE_JS_DESTROYSCRIPT
+     JSScript *script = NULL;
++#else
++    JSObject *script = NULL;
++#endif
+     jsval result;
+     JSString *str;
+     GString *buffer = NULL;
+@@ -219,8 +223,10 @@ gjs_console_interact(JSContext *context,
+         }
+  next:
++#ifdef HAVE_JS_DESTROYSCRIPT
+         if (script)
+             JS_DestroyScript(context, script);
++#endif
+         g_string_free(buffer, TRUE);
+     } while (!eof);
+--
+cgit v0.9
+From 03efd168d1bfc3d3b07b26fda2c2464456df3054 Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+Date: Thu, 28 Apr 2011 23:01:03 +0000
+Subject: conditonally adapt to JS_BufferIsCompilableUnit changes
+
+Upstream added an argument to JS_BufferIsCompilableUnit in commit
+http://hg.mozilla.org/mozilla-central/rev/a773890b676f
+We now have to tell if the bytes are utf8 or not.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646471
+---
+diff --git a/configure.ac b/configure.ac
+index 2e23e8e..6fd8fb4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -164,6 +164,7 @@ AC_CHECK_LIB([mozjs], [JS_GetGlobalForScopeChain], AC_DEFINE([HAVE_JS_GETGLOBALF
+ dnl xulrunner 2.2 checks
+ AC_CHECK_LIB([mozjs], [JS_CLASS_TRACE], AC_DEFINE([HAVE_JS_CLASS_TRACE], [1], [Define if we still have JS_CLASS_TRACE]),, [$JS_LIBS])
+ AC_CHECK_LIB([mozjs], [JS_DestroyScript], AC_DEFINE([HAVE_JS_DESTROYSCRIPT], [1], [Define if we still have JS_DestroyScript]),, [$JS_LIBS])
++AC_CHECK_LIB([mozjs], [JS_DecodeUTF8], AC_DEFINE([HAVE_JS_DECODEUTF8], [1], [Define if we have JS_DecodeUTF8]),, [$JS_LIBS])
+ AC_MSG_CHECKING([for mozilla-js >= 2 ])
+ if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
+diff --git a/modules/console.c b/modules/console.c
+index 35d03c1..d87b4a7 100644
+--- a/modules/console.c
++++ b/modules/console.c
+@@ -196,7 +196,11 @@ gjs_console_interact(JSContext *context,
+             g_string_append(buffer, temp_buf);
+             g_free(temp_buf);
+             lineno++;
++#ifdef HAVE_JS_DECODEUTF8
++        } while (!JS_BufferIsCompilableUnit(context, JS_TRUE, object, buffer->str, buffer->len));
++#else
+         } while (!JS_BufferIsCompilableUnit(context, object, buffer->str, buffer->len));
++#endif
+         script = JS_CompileScript(context, object, buffer->str, buffer->len, "typein",
+                                   startline);
+--
+cgit v0.9
index 2201a7bc84da2c500f697c879fceefbe08ecc374..109be3cbde514310df5919aaddac56fedde5d375 100644 (file)
--- a/gjs.spec
+++ b/gjs.spec
@@ -2,12 +2,13 @@ Summary:      JavaScript bindings for GNOME
 Summary(pl.UTF-8):     Wiązania JavaScript dla GNOME
 Name:          gjs
 Version:       0.7.14
-Release:       3
+Release:       4
 License:       MIT and (MPL v1.1 / GPL v2+ / LGPL v2+)
 Group:         Libraries
 Source0:       http://ftp.gnome.org/pub/GNOME/sources/gjs/0.7/%{name}-%{version}.tar.bz2
 # Source0-md5: 0e1487e066df8937317da34545f7b548
 Patch0:                %{name}-rpath.patch
+Patch1:                %{name}-xulrunner-5.0.patch
 URL:           http://live.gnome.org/Gjs
 BuildRequires: autoconf >= 2.61
 BuildRequires: automake
@@ -53,6 +54,7 @@ Pliki nagłówkowe biblioteki gjs.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
This page took 0.263446 seconds and 4 git commands to generate.