[gxine/f18] Fix build.
Martin Sourada
mso at fedoraproject.org
Fri Aug 10 11:07:05 UTC 2012
commit 688c9a1a425322cd4e95877a1a23bc0827bbd88a
Author: Martin Sourada <mso at fedoraproject.org>
Date: Fri Aug 10 13:04:04 2012 +0200
Fix build.
I have no idea whether the fix is correct, as I don't know JSAPI,
but basic functionality does not seem to be broken by it. I wish
JSAPI were more stable...
gxine-0.5.907-js.patch | 103 ++++++++++++++++++++++++++++++++++++++++++++++++
gxine.spec | 7 +++-
2 files changed, 109 insertions(+), 1 deletions(-)
---
diff --git a/gxine-0.5.907-js.patch b/gxine-0.5.907-js.patch
new file mode 100644
index 0000000..54c9480
--- /dev/null
+++ b/gxine-0.5.907-js.patch
@@ -0,0 +1,103 @@
+diff -up gxine-0.5.907/src/script_engine.c.js gxine-0.5.907/src/script_engine.c
+--- gxine-0.5.907/src/script_engine.c.js 2012-01-03 01:57:58.000000000 +0100
++++ gxine-0.5.907/src/script_engine.c 2012-08-10 12:43:17.025293661 +0200
+@@ -328,7 +328,7 @@ js_callback (JSContext *cx, uintN argc,
+ se_arg_is_object (1, "callback");
+ char *str = SE_JS_ENCODE_STRING (cx, JS_ValueToString (cx, argv[0]));
+ engine_queue_push (str,
+- JS_GetPrivate (cx, argc > 1 ? JSVAL_TO_OBJECT (argv[1])
++ JS_GetPrivate (argc > 1 ? JSVAL_TO_OBJECT (argv[1])
+ : se->global),
+ NULL, NULL, NULL, _("JS callback"));
+ SE_JS_FREE_ENCODED_STRING (cx, str);
+@@ -746,7 +746,7 @@ SE_JS_PROPERTY_GETTER_DECLARE (generic_J
+ SE_JS_PROPERTY_GETTER_INIT_VARIABLES (id_val);
+ se_t *se = (se_t *) JS_GetContextPrivate(cx);
+ se_log_fncall ("generic get property");
+- se_o_t *o = JS_GetPrivate (cx, obj);
++ se_o_t *o = JS_GetPrivate (obj);
+
+ if (JSVAL_IS_STRING (id_val))
+ {
+@@ -814,7 +814,7 @@ SE_JS_PROPERTY_SETTER_DECLARE(generic_JS
+
+ se_log_fncall ("generic set property");
+
+- o = JS_GetPrivate (cx, obj);
++ o = JS_GetPrivate (obj);
+
+ if (JSVAL_IS_STRING (id_val))
+ {
+@@ -881,9 +881,9 @@ static void generic_JSDestructor (JSCont
+ }
+
+ #ifdef JSFUN_CONSTRUCTOR
+-static JSBool generic_Constructor (JSContext* cx, uintN argc, jsval* vp)
++static JSBool generic_Constructor (JSContext* cx, JSClass* cl, uintN argc, jsval* vp)
+ {
+- JSObject* obj = JS_NewObjectForConstructor (cx, vp);
++ JSObject* obj = JS_NewObjectForConstructor (cx, cl, vp);
+ if (!obj) {
+ JS_ReportError (cx, "Failed to create 'this' object");
+ return JS_FALSE;
+@@ -937,7 +937,7 @@ se_o_t *se_create_object (se_t *se, se_o
+ o->group = group;
+ o->help = help;
+
+- JS_SetPrivate (se->cx, o->obj, o);
++ JS_SetPrivate (o->obj, o);
+
+ if (parent)
+ parent->children = g_list_append (parent->children, o);
+@@ -1604,7 +1604,7 @@ se_t *se_new (void)
+ static JSClass global_class = {
+ "global", JSCLASS_HAS_PRIVATE | JSCLASS_GLOBAL_FLAGS,
+ JS_PropertyStub,JS_PropertyStub,JS_PropertyStub,JS_PropertyStub,
+- JS_EnumerateStub,JS_ResolveStub,JS_ConvertStub,JS_FinalizeStub
++ JS_EnumerateStub,JS_ResolveStub,JS_ConvertStub
+ };
+
+ /*
+diff -up gxine-0.5.907/src/script_engine.h.js gxine-0.5.907/src/script_engine.h
+--- gxine-0.5.907/src/script_engine.h.js 2012-02-20 19:29:01.000000000 +0100
++++ gxine-0.5.907/src/script_engine.h 2012-08-10 12:43:17.026293648 +0200
+@@ -36,9 +36,14 @@
+
+ // nice stable mozjs API
+ #ifndef HAVE_JSFLOAT64
+-typedef jsdouble JSFloat64;
++typedef double JSFloat64;
++typedef int32_t JSInt32;
++typedef uint uintN;
++typedef int32_t int32;
++typedef double jsdouble;
+ #endif
+
++
+ #ifndef JSFUN_FAST_NATIVE
+ // All natives are JSFastNative
+ #define JSFUN_FAST_NATIVE 0
+diff -up gxine-0.5.907/src/ui.c.js gxine-0.5.907/src/ui.c
+--- gxine-0.5.907/src/ui.c.js 2012-08-10 12:43:16.932294823 +0200
++++ gxine-0.5.907/src/ui.c 2012-08-10 12:43:17.027293635 +0200
+@@ -662,7 +662,7 @@ static int ui_prop_set_bool (void *data,
+ static JSBool ui_prop_toggle_bool (JSContext *cx, uintN argc, jsval *vp)
+ {
+ se_t *se = (se_t *) JS_GetContextPrivate(cx);
+- se_o_t *o = JS_GetPrivate (cx, JS_THIS_OBJECT (cx, vp));
++ se_o_t *o = JS_GetPrivate (JS_THIS_OBJECT (cx, vp));
+ JSBool v = !se_prop_get_bool (se, o, "v");
+ JS_SET_RVAL (cx, vp, BOOLEAN_TO_JSVAL (v));
+ se_prop_set_bool (se, o, "v", v);
+diff -up gxine-0.5.907/src/xml_widgets.c.js gxine-0.5.907/src/xml_widgets.c
+--- gxine-0.5.907/src/xml_widgets.c.js 2011-08-07 13:14:47.000000000 +0200
++++ gxine-0.5.907/src/xml_widgets.c 2012-08-10 12:45:13.649835652 +0200
+@@ -186,7 +186,7 @@ stock_toggle_cb (GtkToggleButton *button
+ ui_set_status (UI_CURRENT_STATE);
+ }
+
+-#define JS_WIDGET() ((se_o_t *)JS_GetPrivate (cx, JS_THIS_OBJECT (cx, vp)))->user_data
++#define JS_WIDGET() ((se_o_t *)JS_GetPrivate (JS_THIS_OBJECT (cx, vp)))->user_data
+
+ static JSBool
+ js_set_show (JSContext *cx, uintN argc, jsval *vp)
diff --git a/gxine.spec b/gxine.spec
index 8d6cfef..5568d93 100644
--- a/gxine.spec
+++ b/gxine.spec
@@ -1,6 +1,6 @@
Name: gxine
Version: 0.5.907
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: GTK frontend for the xine multimedia library
Group: Applications/Multimedia
@@ -14,6 +14,7 @@ Patch1: gxine-0.5.902-non-separate-toolbar.patch
Patch3: gxine-0.5.907-lirc.patch
Patch4: gxine-0.5.907-dso.patch
Patch5: gxine-0.5.907-glibc.patch
+Patch6: gxine-0.5.907-js.patch
BuildRequires: gecko-devel
BuildRequires: desktop-file-utils
@@ -59,6 +60,7 @@ This plugin allows gxine to be embedded in a web browser.
%patch3 -p1 -b .lirc
%patch4 -p1 -b .dso
%patch5 -p1 -b .glibc
+%patch6 -p1 -b .js
%{__sed} -i 's/Name=gxine/Name=GXine/' gxine.desktop.in
@@ -130,6 +132,9 @@ touch --no-create %{_datadir}/icons/hicolor || :
%{_libdir}/mozilla/plugins/gxineplugin.so
%changelog
+* Fri Aug 10 2012 Martin Sourada <mso at fedoraproject.org> - 0.5.907-6
+- Fix build
+
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.907-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list