From 5dc18c15cd7ff7190838bca412e86a62ce916851a356f1d92167f950b6c2a38b Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Wed, 21 Jul 2010 13:53:14 +0000 Subject: [PATCH 1/5] Accepting request 43393 from home:dimstar:branches:GNOME:Factory Copy from home:dimstar:branches:GNOME:Factory/gjs via accept of submit request 43393 revision 4. Request was accepted with message: thanks, see minor tweak OBS-URL: https://build.opensuse.org/request/show/43393 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gjs?expand=0&rev=14 --- gjs-0.6.tar.bz2 | 3 - gjs-0.7.tar.bz2 | 3 + gjs-bgo623775.patch | 291 ++++++++++++++++++++++++++++++++++++++++++++ gjs.changes | 29 +++++ gjs.spec | 6 +- 5 files changed, 327 insertions(+), 5 deletions(-) delete mode 100644 gjs-0.6.tar.bz2 create mode 100644 gjs-0.7.tar.bz2 create mode 100644 gjs-bgo623775.patch diff --git a/gjs-0.6.tar.bz2 b/gjs-0.6.tar.bz2 deleted file mode 100644 index 8b07801..0000000 --- a/gjs-0.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c5a54bbb819bfaea1e0e76f0508467e8d5690360ab550e1284951d905a56e5d -size 436575 diff --git a/gjs-0.7.tar.bz2 b/gjs-0.7.tar.bz2 new file mode 100644 index 0000000..87523dc --- /dev/null +++ b/gjs-0.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6eb9b3a26e98b524a455ae53f6af32599a8265bc8fc5122e4c806cbca1e91a44 +size 475023 diff --git a/gjs-bgo623775.patch b/gjs-bgo623775.patch new file mode 100644 index 0000000..19393a1 --- /dev/null +++ b/gjs-bgo623775.patch @@ -0,0 +1,291 @@ +From 324a06ee4bfc68ba13b4781d94f6f1d687c8b05c Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Wed, 07 Jul 2010 18:49:38 +0000 +Subject: Adjust for g-i change to remove machine-independent type tags + +See bug 623774. + +https://bugzilla.gnome.org/show_bug.cgi?id=623775 +--- +Index: gjs-0.7/gi/arg.c +=================================================================== +--- gjs-0.7.orig/gi/arg.c ++++ gjs-0.7/gi/arg.c +@@ -101,43 +101,23 @@ _gjs_enum_value_is_valid(JSContext *con + return found; + } + +-/* Return the proper GI int type for the size and signedness. */ ++/* The typelib used to have machine-independent types like ++ * GI_TYPE_TAG_LONG that had to be converted; now we only ++ * handle GType specially here. ++ */ + static inline GITypeTag +-type_tag_from_size(int intsize, gboolean is_signed) +-{ +- /* Constant folding should be able to reduce this to a single constant, +- * given constant inputs. */ +- switch (intsize) { +- case 1: return (is_signed) ? GI_TYPE_TAG_INT8 : GI_TYPE_TAG_UINT8; +- case 2: return (is_signed) ? GI_TYPE_TAG_INT16 : GI_TYPE_TAG_UINT16; +- case 4: return (is_signed) ? GI_TYPE_TAG_INT32 : GI_TYPE_TAG_UINT32; +- case 8: return (is_signed) ? GI_TYPE_TAG_INT64 : GI_TYPE_TAG_UINT64; +- default: g_assert_not_reached (); +- } +-} +- +-/** Convert machine-specific integer type tags such as 'int' and 'long' +- * into machine-independent explicitly-sized type tags such as 'int32'. */ +-static GITypeTag +-normalize_int_types(GITypeTag type) { +- enum { UNSIGNED=FALSE, SIGNED=TRUE }; +- switch (type) { +-#define INT_TYPE(tag, ty, sign) \ +- case GI_TYPE_TAG_##tag: return type_tag_from_size(sizeof(ty), (sign)); +- INT_TYPE(SHORT, short, SIGNED); +- INT_TYPE(USHORT, unsigned short, UNSIGNED); +- INT_TYPE(INT, int, SIGNED); +- INT_TYPE(UINT, unsigned int, UNSIGNED); +- INT_TYPE(LONG, long, SIGNED); +- INT_TYPE(ULONG, unsigned long, UNSIGNED); +- INT_TYPE(SSIZE, ssize_t, SIGNED); +- INT_TYPE(SIZE, size_t, UNSIGNED); +- INT_TYPE(TIME_T, time_t, SIGNED); /* time_t is signed */ +- INT_TYPE(GTYPE, GType, UNSIGNED); +-#undef INT_TYPE +- default: +- return type; /* not a weird int type, return untouched */ ++replace_gtype(GITypeTag type) { ++ if (type == GI_TYPE_TAG_GTYPE) { ++ /* Constant folding should handle this hopefully */ ++ switch (sizeof(GType)) { ++ case 1: GI_TYPE_TAG_UINT8; ++ case 2: GI_TYPE_TAG_UINT16; ++ case 4: GI_TYPE_TAG_UINT32; ++ case 8: GI_TYPE_TAG_UINT64; ++ default: g_assert_not_reached (); ++ } + } ++ return type; + } + + /* Check if an argument of the given needs to be released if we created it +@@ -425,7 +405,7 @@ gjs_string_to_intarray(JSContext *cont + gsize length; + + element_type = g_type_info_get_tag(param_info); +- element_type = normalize_int_types(element_type); ++ element_type = replace_gtype(element_type); + + switch (element_type) { + case GI_TYPE_TAG_INT8: +@@ -521,7 +501,7 @@ gjs_array_to_array(JSContext *context, + GITypeTag element_type; + + element_type = g_type_info_get_tag(param_info); +- element_type = normalize_int_types(element_type); ++ element_type = replace_gtype(element_type); + + switch (element_type) { + case GI_TYPE_TAG_UTF8: +@@ -588,8 +568,7 @@ gjs_value_to_g_argument(JSContext * + gboolean nullable_type; + + type_tag = g_type_info_get_tag( (GITypeInfo*) type_info); +- if (type_tag != GI_TYPE_TAG_TIME_T) // we handle time_t as a non-int type +- type_tag = normalize_int_types(type_tag); ++ type_tag = replace_gtype(type_tag); + + gjs_debug_marshal(GJS_DEBUG_GFUNCTION, + "Converting jsval to GArgument %s", +@@ -680,14 +659,6 @@ gjs_value_to_g_argument(JSContext * + } + break; + +- case GI_TYPE_TAG_TIME_T: { +- double v; +- if (!JS_ValueToNumber(context, value, &v)) +- wrong = TRUE; +- arg->v_ulong = (unsigned long) (v/1000); +- } +- break; +- + case GI_TYPE_TAG_BOOLEAN: + if (!JS_ValueToBoolean(context, value, &arg->v_boolean)) + wrong = TRUE; +@@ -1063,18 +1034,6 @@ gjs_value_to_g_argument(JSContext * + } + break; + +- case GI_TYPE_TAG_SHORT: +- case GI_TYPE_TAG_USHORT: +- case GI_TYPE_TAG_INT: +- case GI_TYPE_TAG_UINT: +- case GI_TYPE_TAG_LONG: +- case GI_TYPE_TAG_ULONG: +- case GI_TYPE_TAG_SIZE: +- case GI_TYPE_TAG_SSIZE: +- case GI_TYPE_TAG_GTYPE: +- /* these types are converted by normalize_int_types */ +- g_assert_not_reached(); +- + default: + gjs_debug(GJS_DEBUG_ERROR, + "Unhandled type %s for JavaScript to GArgument conversion", +@@ -1134,8 +1093,7 @@ gjs_g_argument_init_default(JSContext + GITypeTag type_tag; + + type_tag = g_type_info_get_tag( (GITypeInfo*) type_info); +- if (type_tag != GI_TYPE_TAG_TIME_T) // we handle time_t as a non-int type +- type_tag = normalize_int_types(type_tag); ++ type_tag = replace_gtype(type_tag); + + switch (type_tag) { + case GI_TYPE_TAG_VOID: +@@ -1173,10 +1131,6 @@ gjs_g_argument_init_default(JSContext + case GI_TYPE_TAG_UINT64: + arg->v_uint64 = 0; + +- case GI_TYPE_TAG_TIME_T: +- arg->v_ulong = 0; +- break; +- + case GI_TYPE_TAG_BOOLEAN: + arg->v_boolean = FALSE; + break; +@@ -1233,18 +1187,6 @@ gjs_g_argument_init_default(JSContext + arg->v_pointer = NULL; + break; + +- case GI_TYPE_TAG_SHORT: +- case GI_TYPE_TAG_USHORT: +- case GI_TYPE_TAG_INT: +- case GI_TYPE_TAG_UINT: +- case GI_TYPE_TAG_LONG: +- case GI_TYPE_TAG_ULONG: +- case GI_TYPE_TAG_SIZE: +- case GI_TYPE_TAG_SSIZE: +- case GI_TYPE_TAG_GTYPE: +- /* these types are converted by normalize_int_types */ +- g_assert_not_reached(); +- + default: + gjs_debug(GJS_DEBUG_ERROR, + "Unhandled type %s for default GArgument initialization", +@@ -1429,8 +1371,7 @@ gjs_value_from_g_argument (JSContext *c + GITypeTag type_tag; + + type_tag = g_type_info_get_tag( (GITypeInfo*) type_info); +- if (type_tag != GI_TYPE_TAG_TIME_T) // we handle time_t as a non-int type +- type_tag = normalize_int_types(type_tag); ++ type_tag = replace_gtype(type_tag); + + gjs_debug_marshal(GJS_DEBUG_GFUNCTION, + "Converting GArgument %s to jsval", +@@ -1477,11 +1418,6 @@ gjs_value_from_g_argument (JSContext *c + case GI_TYPE_TAG_DOUBLE: + return JS_NewDoubleValue(context, arg->v_double, value_p); + +- case GI_TYPE_TAG_TIME_T: +- *value_p = gjs_date_from_time_t(context, +- (time_t) arg->v_long); +- return JS_TRUE; +- + case GI_TYPE_TAG_FILENAME: + if (arg->v_pointer) + return gjs_string_from_filename(context, arg->v_pointer, -1, value_p); +@@ -1701,18 +1637,6 @@ gjs_value_from_g_argument (JSContext *c + } + break; + +- case GI_TYPE_TAG_SHORT: +- case GI_TYPE_TAG_USHORT: +- case GI_TYPE_TAG_INT: +- case GI_TYPE_TAG_UINT: +- case GI_TYPE_TAG_LONG: +- case GI_TYPE_TAG_ULONG: +- case GI_TYPE_TAG_SIZE: +- case GI_TYPE_TAG_SSIZE: +- case GI_TYPE_TAG_GTYPE: +- /* these types are converted by normalize_int_types */ +- g_assert_not_reached(); +- + default: + gjs_debug(GJS_DEBUG_ERROR, + "Unhandled type %s converting GArgument to JavaScript", +@@ -1782,21 +1706,12 @@ gjs_g_arg_release_internal(JSContext *c + case GI_TYPE_TAG_UINT8: + case GI_TYPE_TAG_INT16: + case GI_TYPE_TAG_UINT16: +- case GI_TYPE_TAG_SHORT: +- case GI_TYPE_TAG_USHORT: +- case GI_TYPE_TAG_INT: + case GI_TYPE_TAG_INT32: +- case GI_TYPE_TAG_UINT: + case GI_TYPE_TAG_UINT32: + case GI_TYPE_TAG_INT64: + case GI_TYPE_TAG_UINT64: +- case GI_TYPE_TAG_LONG: +- case GI_TYPE_TAG_ULONG: + case GI_TYPE_TAG_FLOAT: + case GI_TYPE_TAG_DOUBLE: +- case GI_TYPE_TAG_SSIZE: +- case GI_TYPE_TAG_SIZE: +- case GI_TYPE_TAG_TIME_T: + break; + + case GI_TYPE_TAG_FILENAME: +@@ -1902,7 +1817,7 @@ gjs_g_arg_release_internal(JSContext *c + + param_info = g_type_info_get_param_type(type_info, 0); + element_type = g_type_info_get_tag(param_info); +- element_type = normalize_int_types(element_type); ++ element_type = replace_gtype(element_type); + + switch (element_type) { + case GI_TYPE_TAG_UTF8: +Index: gjs-0.7/gi/boxed.c +=================================================================== +--- gjs-0.7.orig/gi/boxed.c ++++ gjs-0.7/gi/boxed.c +@@ -1043,19 +1043,10 @@ struct_is_simple(GIStructInfo *info) + case GI_TYPE_TAG_UINT16: + case GI_TYPE_TAG_INT32: + case GI_TYPE_TAG_UINT32: +- case GI_TYPE_TAG_SHORT: +- case GI_TYPE_TAG_USHORT: +- case GI_TYPE_TAG_INT: +- case GI_TYPE_TAG_UINT: + case GI_TYPE_TAG_INT64: + case GI_TYPE_TAG_UINT64: +- case GI_TYPE_TAG_LONG: +- case GI_TYPE_TAG_ULONG: +- case GI_TYPE_TAG_SSIZE: +- case GI_TYPE_TAG_SIZE: + case GI_TYPE_TAG_FLOAT: + case GI_TYPE_TAG_DOUBLE: +- case GI_TYPE_TAG_TIME_T: + break; + case GI_TYPE_TAG_VOID: + case GI_TYPE_TAG_GTYPE: +Index: gjs-0.7/test/js/testEverythingBasic.js +=================================================================== +--- gjs-0.7.orig/test/js/testEverythingBasic.js ++++ gjs-0.7/test/js/testEverythingBasic.js +@@ -73,13 +73,9 @@ function testLifeUniverseAndEverything() + assertEquals(42, Everything.test_double(42)); + assertEquals(-42, Everything.test_double(-42)); + +- let now = new Date(); +- let bounced = Everything.test_timet(now); +- assertEquals(now.getFullYear(), bounced.getFullYear()); +- assertEquals(now.getMonth(), bounced.getMonth()); +- assertEquals(now.getDay(), bounced.getDay()); +- assertEquals(now.getHours(), bounced.getHours()); +- assertEquals(now.getSeconds(), bounced.getSeconds()); ++ let now = Math.floor(new Date().getTime() / 1000); ++ let bounced = Math.floor(Everything.test_timet(now)); ++ assertEquals(bounced, now); + } + + function testLimits() { diff --git a/gjs.changes b/gjs.changes index a49873b..353f08f 100644 --- a/gjs.changes +++ b/gjs.changes @@ -1,3 +1,32 @@ +------------------------------------------------------------------- +Thu Jul 15 17:25:15 UTC 2010 - dimstar@opensuse.org + +- Add gjs-bgo623775.patch, from upstream git to fix build with + gobject-introspection 0.9.2. + +------------------------------------------------------------------- +Fri May 28 22:36:18 CEST 2010 - dimstar@opensuse.org + +- Update to version 0.7: + + Add support for "foreign structs" - which are structures that + are referenced from gobject-introspection, but need glue + code to actually handle them. + + Hook cairo bindings to integrate with gobject-introspected + libraries using new foreign struct support + + Start working toward thread-safety by adding + JS_BeginRequest/JS_EndRequest calls throughout the codebase + + add Tweener.setTimeScale and Tweener.getTimeScale + + Wrap cairo_copy_path, cairo_copy_path_flat, and + cairo_append_path + + Handle destroy callbacks of type other than GDestroyNotify + + Handle flag arguments not registered with GObject + + Log errors that occur in callbacks + + Code cleanup + + Build fixes + + Bugs fixed: bgo#610357, bgo#614055, bgo#614344, bgo#615078, + bgo#615222, bgo#617343, bgo#617568, bgo#617702, bgo#617972, + bgo#618190, bgo#618195, bgo#618200, bgo#618201 + ------------------------------------------------------------------- Fri Mar 26 12:58:30 CET 2010 - vuntz@opensuse.org diff --git a/gjs.spec b/gjs.spec index 26cbe33..6ea0e4b 100644 --- a/gjs.spec +++ b/gjs.spec @@ -1,5 +1,5 @@ # -# spec file for package gjs (Version 0.6) +# spec file for package gjs (Version 0.7) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -27,12 +27,13 @@ %endif Name: gjs -Version: 0.6 +Version: 0.7 Release: 1 License: MIT License (or similar) Summary: JavaScript bindings based on gobject-introspection and Mozilla Group: Development/Libraries/GNOME Source: %{name}-%{version}.tar.bz2 +Patch0: gjs-bgo623775.patch BuildRequires: cairo-devel BuildRequires: dbus-1-glib-devel BuildRequires: gcc-c++ @@ -74,6 +75,7 @@ Mozilla SpiderMonkey JavaScript engine. %prep %setup -q +%patch0 -p1 %build %configure \ From 156a0abbf4838e19cdb31196d9d5a429bf1fdf63d97ed065f4272d8d6a8061ea Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 22 Jul 2010 21:44:26 +0000 Subject: [PATCH 2/5] Accepting request 43630 from home:vuntz:branches:GNOME:Factory Copy from home:vuntz:branches:GNOME:Factory/gjs via accept of submit request 43630 revision 2. Request was accepted with message: auto-approving myself, to make it easier for the next batch of reviews OBS-URL: https://build.opensuse.org/request/show/43630 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gjs?expand=0&rev=15 --- gjs.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/gjs.spec b/gjs.spec index 6ea0e4b..3ade940 100644 --- a/gjs.spec +++ b/gjs.spec @@ -33,6 +33,7 @@ License: MIT License (or similar) Summary: JavaScript bindings based on gobject-introspection and Mozilla Group: Development/Libraries/GNOME Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM gjs-bgo623775.patch dimstar@opensuse.org -- Taken from upstream, to fix build with latest gobject-introspection Patch0: gjs-bgo623775.patch BuildRequires: cairo-devel BuildRequires: dbus-1-glib-devel From 3c5e0c8cf834a1ba5740dc3326493ac0cb7a03cd5139f2eb27900e1e1c4b5b61 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Fri, 23 Jul 2010 08:48:00 +0000 Subject: [PATCH 3/5] Accepting request 43792 from home:vuntz:branches:GNOME:Factory Copy from home:vuntz:branches:GNOME:Factory/gjs via accept of submit request 43792 revision 2. Request was accepted with message: ok OBS-URL: https://build.opensuse.org/request/show/43792 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gjs?expand=0&rev=16 --- gjs-0.7.1.tar.bz2 | 3 + gjs-0.7.tar.bz2 | 3 - gjs-bgo623775.patch | 291 -------------------------------------------- gjs.changes | 21 ++++ gjs.spec | 22 +++- gjs.stp.in | 18 +++ gjs_gi_probes.d | 4 + 7 files changed, 62 insertions(+), 300 deletions(-) create mode 100644 gjs-0.7.1.tar.bz2 delete mode 100644 gjs-0.7.tar.bz2 delete mode 100644 gjs-bgo623775.patch create mode 100644 gjs.stp.in create mode 100644 gjs_gi_probes.d diff --git a/gjs-0.7.1.tar.bz2 b/gjs-0.7.1.tar.bz2 new file mode 100644 index 0000000..a2e09e7 --- /dev/null +++ b/gjs-0.7.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cfb6825b6806ecea0c24fec4fef7ae2381f03384725d040e7296bf0606a8a98 +size 492566 diff --git a/gjs-0.7.tar.bz2 b/gjs-0.7.tar.bz2 deleted file mode 100644 index 87523dc..0000000 --- a/gjs-0.7.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6eb9b3a26e98b524a455ae53f6af32599a8265bc8fc5122e4c806cbca1e91a44 -size 475023 diff --git a/gjs-bgo623775.patch b/gjs-bgo623775.patch deleted file mode 100644 index 19393a1..0000000 --- a/gjs-bgo623775.patch +++ /dev/null @@ -1,291 +0,0 @@ -From 324a06ee4bfc68ba13b4781d94f6f1d687c8b05c Mon Sep 17 00:00:00 2001 -From: Colin Walters -Date: Wed, 07 Jul 2010 18:49:38 +0000 -Subject: Adjust for g-i change to remove machine-independent type tags - -See bug 623774. - -https://bugzilla.gnome.org/show_bug.cgi?id=623775 ---- -Index: gjs-0.7/gi/arg.c -=================================================================== ---- gjs-0.7.orig/gi/arg.c -+++ gjs-0.7/gi/arg.c -@@ -101,43 +101,23 @@ _gjs_enum_value_is_valid(JSContext *con - return found; - } - --/* Return the proper GI int type for the size and signedness. */ -+/* The typelib used to have machine-independent types like -+ * GI_TYPE_TAG_LONG that had to be converted; now we only -+ * handle GType specially here. -+ */ - static inline GITypeTag --type_tag_from_size(int intsize, gboolean is_signed) --{ -- /* Constant folding should be able to reduce this to a single constant, -- * given constant inputs. */ -- switch (intsize) { -- case 1: return (is_signed) ? GI_TYPE_TAG_INT8 : GI_TYPE_TAG_UINT8; -- case 2: return (is_signed) ? GI_TYPE_TAG_INT16 : GI_TYPE_TAG_UINT16; -- case 4: return (is_signed) ? GI_TYPE_TAG_INT32 : GI_TYPE_TAG_UINT32; -- case 8: return (is_signed) ? GI_TYPE_TAG_INT64 : GI_TYPE_TAG_UINT64; -- default: g_assert_not_reached (); -- } --} -- --/** Convert machine-specific integer type tags such as 'int' and 'long' -- * into machine-independent explicitly-sized type tags such as 'int32'. */ --static GITypeTag --normalize_int_types(GITypeTag type) { -- enum { UNSIGNED=FALSE, SIGNED=TRUE }; -- switch (type) { --#define INT_TYPE(tag, ty, sign) \ -- case GI_TYPE_TAG_##tag: return type_tag_from_size(sizeof(ty), (sign)); -- INT_TYPE(SHORT, short, SIGNED); -- INT_TYPE(USHORT, unsigned short, UNSIGNED); -- INT_TYPE(INT, int, SIGNED); -- INT_TYPE(UINT, unsigned int, UNSIGNED); -- INT_TYPE(LONG, long, SIGNED); -- INT_TYPE(ULONG, unsigned long, UNSIGNED); -- INT_TYPE(SSIZE, ssize_t, SIGNED); -- INT_TYPE(SIZE, size_t, UNSIGNED); -- INT_TYPE(TIME_T, time_t, SIGNED); /* time_t is signed */ -- INT_TYPE(GTYPE, GType, UNSIGNED); --#undef INT_TYPE -- default: -- return type; /* not a weird int type, return untouched */ -+replace_gtype(GITypeTag type) { -+ if (type == GI_TYPE_TAG_GTYPE) { -+ /* Constant folding should handle this hopefully */ -+ switch (sizeof(GType)) { -+ case 1: GI_TYPE_TAG_UINT8; -+ case 2: GI_TYPE_TAG_UINT16; -+ case 4: GI_TYPE_TAG_UINT32; -+ case 8: GI_TYPE_TAG_UINT64; -+ default: g_assert_not_reached (); -+ } - } -+ return type; - } - - /* Check if an argument of the given needs to be released if we created it -@@ -425,7 +405,7 @@ gjs_string_to_intarray(JSContext *cont - gsize length; - - element_type = g_type_info_get_tag(param_info); -- element_type = normalize_int_types(element_type); -+ element_type = replace_gtype(element_type); - - switch (element_type) { - case GI_TYPE_TAG_INT8: -@@ -521,7 +501,7 @@ gjs_array_to_array(JSContext *context, - GITypeTag element_type; - - element_type = g_type_info_get_tag(param_info); -- element_type = normalize_int_types(element_type); -+ element_type = replace_gtype(element_type); - - switch (element_type) { - case GI_TYPE_TAG_UTF8: -@@ -588,8 +568,7 @@ gjs_value_to_g_argument(JSContext * - gboolean nullable_type; - - type_tag = g_type_info_get_tag( (GITypeInfo*) type_info); -- if (type_tag != GI_TYPE_TAG_TIME_T) // we handle time_t as a non-int type -- type_tag = normalize_int_types(type_tag); -+ type_tag = replace_gtype(type_tag); - - gjs_debug_marshal(GJS_DEBUG_GFUNCTION, - "Converting jsval to GArgument %s", -@@ -680,14 +659,6 @@ gjs_value_to_g_argument(JSContext * - } - break; - -- case GI_TYPE_TAG_TIME_T: { -- double v; -- if (!JS_ValueToNumber(context, value, &v)) -- wrong = TRUE; -- arg->v_ulong = (unsigned long) (v/1000); -- } -- break; -- - case GI_TYPE_TAG_BOOLEAN: - if (!JS_ValueToBoolean(context, value, &arg->v_boolean)) - wrong = TRUE; -@@ -1063,18 +1034,6 @@ gjs_value_to_g_argument(JSContext * - } - break; - -- case GI_TYPE_TAG_SHORT: -- case GI_TYPE_TAG_USHORT: -- case GI_TYPE_TAG_INT: -- case GI_TYPE_TAG_UINT: -- case GI_TYPE_TAG_LONG: -- case GI_TYPE_TAG_ULONG: -- case GI_TYPE_TAG_SIZE: -- case GI_TYPE_TAG_SSIZE: -- case GI_TYPE_TAG_GTYPE: -- /* these types are converted by normalize_int_types */ -- g_assert_not_reached(); -- - default: - gjs_debug(GJS_DEBUG_ERROR, - "Unhandled type %s for JavaScript to GArgument conversion", -@@ -1134,8 +1093,7 @@ gjs_g_argument_init_default(JSContext - GITypeTag type_tag; - - type_tag = g_type_info_get_tag( (GITypeInfo*) type_info); -- if (type_tag != GI_TYPE_TAG_TIME_T) // we handle time_t as a non-int type -- type_tag = normalize_int_types(type_tag); -+ type_tag = replace_gtype(type_tag); - - switch (type_tag) { - case GI_TYPE_TAG_VOID: -@@ -1173,10 +1131,6 @@ gjs_g_argument_init_default(JSContext - case GI_TYPE_TAG_UINT64: - arg->v_uint64 = 0; - -- case GI_TYPE_TAG_TIME_T: -- arg->v_ulong = 0; -- break; -- - case GI_TYPE_TAG_BOOLEAN: - arg->v_boolean = FALSE; - break; -@@ -1233,18 +1187,6 @@ gjs_g_argument_init_default(JSContext - arg->v_pointer = NULL; - break; - -- case GI_TYPE_TAG_SHORT: -- case GI_TYPE_TAG_USHORT: -- case GI_TYPE_TAG_INT: -- case GI_TYPE_TAG_UINT: -- case GI_TYPE_TAG_LONG: -- case GI_TYPE_TAG_ULONG: -- case GI_TYPE_TAG_SIZE: -- case GI_TYPE_TAG_SSIZE: -- case GI_TYPE_TAG_GTYPE: -- /* these types are converted by normalize_int_types */ -- g_assert_not_reached(); -- - default: - gjs_debug(GJS_DEBUG_ERROR, - "Unhandled type %s for default GArgument initialization", -@@ -1429,8 +1371,7 @@ gjs_value_from_g_argument (JSContext *c - GITypeTag type_tag; - - type_tag = g_type_info_get_tag( (GITypeInfo*) type_info); -- if (type_tag != GI_TYPE_TAG_TIME_T) // we handle time_t as a non-int type -- type_tag = normalize_int_types(type_tag); -+ type_tag = replace_gtype(type_tag); - - gjs_debug_marshal(GJS_DEBUG_GFUNCTION, - "Converting GArgument %s to jsval", -@@ -1477,11 +1418,6 @@ gjs_value_from_g_argument (JSContext *c - case GI_TYPE_TAG_DOUBLE: - return JS_NewDoubleValue(context, arg->v_double, value_p); - -- case GI_TYPE_TAG_TIME_T: -- *value_p = gjs_date_from_time_t(context, -- (time_t) arg->v_long); -- return JS_TRUE; -- - case GI_TYPE_TAG_FILENAME: - if (arg->v_pointer) - return gjs_string_from_filename(context, arg->v_pointer, -1, value_p); -@@ -1701,18 +1637,6 @@ gjs_value_from_g_argument (JSContext *c - } - break; - -- case GI_TYPE_TAG_SHORT: -- case GI_TYPE_TAG_USHORT: -- case GI_TYPE_TAG_INT: -- case GI_TYPE_TAG_UINT: -- case GI_TYPE_TAG_LONG: -- case GI_TYPE_TAG_ULONG: -- case GI_TYPE_TAG_SIZE: -- case GI_TYPE_TAG_SSIZE: -- case GI_TYPE_TAG_GTYPE: -- /* these types are converted by normalize_int_types */ -- g_assert_not_reached(); -- - default: - gjs_debug(GJS_DEBUG_ERROR, - "Unhandled type %s converting GArgument to JavaScript", -@@ -1782,21 +1706,12 @@ gjs_g_arg_release_internal(JSContext *c - case GI_TYPE_TAG_UINT8: - case GI_TYPE_TAG_INT16: - case GI_TYPE_TAG_UINT16: -- case GI_TYPE_TAG_SHORT: -- case GI_TYPE_TAG_USHORT: -- case GI_TYPE_TAG_INT: - case GI_TYPE_TAG_INT32: -- case GI_TYPE_TAG_UINT: - case GI_TYPE_TAG_UINT32: - case GI_TYPE_TAG_INT64: - case GI_TYPE_TAG_UINT64: -- case GI_TYPE_TAG_LONG: -- case GI_TYPE_TAG_ULONG: - case GI_TYPE_TAG_FLOAT: - case GI_TYPE_TAG_DOUBLE: -- case GI_TYPE_TAG_SSIZE: -- case GI_TYPE_TAG_SIZE: -- case GI_TYPE_TAG_TIME_T: - break; - - case GI_TYPE_TAG_FILENAME: -@@ -1902,7 +1817,7 @@ gjs_g_arg_release_internal(JSContext *c - - param_info = g_type_info_get_param_type(type_info, 0); - element_type = g_type_info_get_tag(param_info); -- element_type = normalize_int_types(element_type); -+ element_type = replace_gtype(element_type); - - switch (element_type) { - case GI_TYPE_TAG_UTF8: -Index: gjs-0.7/gi/boxed.c -=================================================================== ---- gjs-0.7.orig/gi/boxed.c -+++ gjs-0.7/gi/boxed.c -@@ -1043,19 +1043,10 @@ struct_is_simple(GIStructInfo *info) - case GI_TYPE_TAG_UINT16: - case GI_TYPE_TAG_INT32: - case GI_TYPE_TAG_UINT32: -- case GI_TYPE_TAG_SHORT: -- case GI_TYPE_TAG_USHORT: -- case GI_TYPE_TAG_INT: -- case GI_TYPE_TAG_UINT: - case GI_TYPE_TAG_INT64: - case GI_TYPE_TAG_UINT64: -- case GI_TYPE_TAG_LONG: -- case GI_TYPE_TAG_ULONG: -- case GI_TYPE_TAG_SSIZE: -- case GI_TYPE_TAG_SIZE: - case GI_TYPE_TAG_FLOAT: - case GI_TYPE_TAG_DOUBLE: -- case GI_TYPE_TAG_TIME_T: - break; - case GI_TYPE_TAG_VOID: - case GI_TYPE_TAG_GTYPE: -Index: gjs-0.7/test/js/testEverythingBasic.js -=================================================================== ---- gjs-0.7.orig/test/js/testEverythingBasic.js -+++ gjs-0.7/test/js/testEverythingBasic.js -@@ -73,13 +73,9 @@ function testLifeUniverseAndEverything() - assertEquals(42, Everything.test_double(42)); - assertEquals(-42, Everything.test_double(-42)); - -- let now = new Date(); -- let bounced = Everything.test_timet(now); -- assertEquals(now.getFullYear(), bounced.getFullYear()); -- assertEquals(now.getMonth(), bounced.getMonth()); -- assertEquals(now.getDay(), bounced.getDay()); -- assertEquals(now.getHours(), bounced.getHours()); -- assertEquals(now.getSeconds(), bounced.getSeconds()); -+ let now = Math.floor(new Date().getTime() / 1000); -+ let bounced = Math.floor(Everything.test_timet(now)); -+ assertEquals(bounced, now); - } - - function testLimits() { diff --git a/gjs.changes b/gjs.changes index 353f08f..900afb7 100644 --- a/gjs.changes +++ b/gjs.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Fri Jul 23 08:51:43 CEST 2010 - vuntz@opensuse.org + +- Update to version 0.7.1: + + Add support for GArray to gjs_value_from_g_argument + + Add support for GArray to gjs_value_to_g_argument + + Add support for dtrace/SystemTap + + Add a promise module + + Handle GValues of type G_TYPE_STRV + + [gdb-check] Add a script for easier use + + Throw a better warning for GValues containing container types + + [importer] Allow native modules in gjs.so + + [gjs] Add a byteArray module. + + Adjust for g-i change to remove machine-independent type tags + + Various other fixes. +- Drop gjs-bgo623775.patch: fixed upstream. +- Enable systemtap support: add systemtap-sdt-devel BuildRequires, + pass --enable-systemtap to configure. Add gjs_gi_probes.d and + gjs.stp.in source files, which are missing from the tarball + (bgo#625090). + ------------------------------------------------------------------- Thu Jul 15 17:25:15 UTC 2010 - dimstar@opensuse.org diff --git a/gjs.spec b/gjs.spec index 3ade940..054b7a9 100644 --- a/gjs.spec +++ b/gjs.spec @@ -1,5 +1,5 @@ # -# spec file for package gjs (Version 0.7) +# spec file for package gjs (Version 0.7.1) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -27,14 +27,16 @@ %endif Name: gjs -Version: 0.7 +Version: 0.7.1 +# FIXME: find out if tapsets should really be in devel package or in main package Release: 1 License: MIT License (or similar) Summary: JavaScript bindings based on gobject-introspection and Mozilla Group: Development/Libraries/GNOME Source: %{name}-%{version}.tar.bz2 -# PATCH-FIX-UPSTREAM gjs-bgo623775.patch dimstar@opensuse.org -- Taken from upstream, to fix build with latest gobject-introspection -Patch0: gjs-bgo623775.patch +# Files missing from tarball, see bgo#625090 +Source1: gjs_gi_probes.d +Source2: gjs.stp.in BuildRequires: cairo-devel BuildRequires: dbus-1-glib-devel BuildRequires: gcc-c++ @@ -42,6 +44,7 @@ BuildRequires: gobject-introspection-devel BuildRequires: mozilla-xulrunner%{xulrunner_ver}-devel BuildRequires: python BuildRequires: readline-devel +BuildRequires: systemtap-sdt-devel Requires: libgjs-0 = %{version} Recommends: gir-repository BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -76,16 +79,22 @@ Mozilla SpiderMonkey JavaScript engine. %prep %setup -q -%patch0 -p1 +test ! -f gi/gjs_gi_probes.d +cp %{S:1} gi/gjs_gi_probes.d +test ! -f gjs/gjs.stp.in +cp %{S:2} gjs/gjs.stp.in %build %configure \ - --disable-static + --disable-static \ + --enable-systemtap %__make %{?jobs:-j%jobs} %install %makeinstall find %{buildroot} -type f -name "*.la" -delete -print +# fix installation of systemtap files +mv %{buildroot}%{buildroot}%{_datadir}/systemtap %{buildroot}%{_datadir}/systemtap %clean rm -rf %{buildroot} @@ -110,5 +119,6 @@ rm -rf %{buildroot} %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc +%{_datadir}/systemtap/tapset/*.stp %changelog diff --git a/gjs.stp.in b/gjs.stp.in new file mode 100644 index 0000000..a4db831 --- /dev/null +++ b/gjs.stp.in @@ -0,0 +1,18 @@ + +probe gjs.object_proxy_new = process("@EXPANDED_LIBDIR@/libgjs-gi.so.0.0.0").mark("object__proxy__new") +{ + proxy_address = $arg1; + gobject_address = $arg2; + gi_namespace = user_string($arg3); + gi_name = user_string($arg4); + probestr = sprintf("gjs.object_proxy_new(%p, %s, %s)", proxy_address, gi_namespace, gi_name); +} + +probe gjs.object_proxy_finalize = process("@EXPANDED_LIBDIR@/libgjs-gi.so.0.0.0").mark("object__proxy__finalize") +{ + proxy_address = $arg1; + gobject_address = $arg2; + gi_namespace = user_string($arg3); + gi_name = user_string($arg4); + probestr = sprintf("gjs.object_proxy_finalize(%p, %s, %s)", proxy_address, gi_namespace, gi_name); +} diff --git a/gjs_gi_probes.d b/gjs_gi_probes.d new file mode 100644 index 0000000..a8bcec7 --- /dev/null +++ b/gjs_gi_probes.d @@ -0,0 +1,4 @@ +provider gjs { + probe object__proxy__new(void*, void*, char *, char *); + probe object__proxy__finalize(void*, void*, char *, char *); +}; From 5f83bf2e12823aba0b6f019a6db3a6efe9611a19411cd191959bab4c9bb7bcc4 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Mon, 9 Aug 2010 22:39:15 +0000 Subject: [PATCH 4/5] Accepting request 45058 from GNOME:Factory checked in (request 45058) OBS-URL: https://build.opensuse.org/request/show/45058 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gjs?expand=0&rev=17 --- gjs-0.6.tar.bz2 | 3 +++ gjs-0.7.1.tar.bz2 | 3 --- gjs.changes | 50 ----------------------------------------------- gjs.spec | 19 +++--------------- gjs.stp.in | 18 ----------------- gjs_gi_probes.d | 4 ---- 6 files changed, 6 insertions(+), 91 deletions(-) create mode 100644 gjs-0.6.tar.bz2 delete mode 100644 gjs-0.7.1.tar.bz2 delete mode 100644 gjs.stp.in delete mode 100644 gjs_gi_probes.d diff --git a/gjs-0.6.tar.bz2 b/gjs-0.6.tar.bz2 new file mode 100644 index 0000000..8b07801 --- /dev/null +++ b/gjs-0.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c5a54bbb819bfaea1e0e76f0508467e8d5690360ab550e1284951d905a56e5d +size 436575 diff --git a/gjs-0.7.1.tar.bz2 b/gjs-0.7.1.tar.bz2 deleted file mode 100644 index a2e09e7..0000000 --- a/gjs-0.7.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3cfb6825b6806ecea0c24fec4fef7ae2381f03384725d040e7296bf0606a8a98 -size 492566 diff --git a/gjs.changes b/gjs.changes index 900afb7..a49873b 100644 --- a/gjs.changes +++ b/gjs.changes @@ -1,53 +1,3 @@ -------------------------------------------------------------------- -Fri Jul 23 08:51:43 CEST 2010 - vuntz@opensuse.org - -- Update to version 0.7.1: - + Add support for GArray to gjs_value_from_g_argument - + Add support for GArray to gjs_value_to_g_argument - + Add support for dtrace/SystemTap - + Add a promise module - + Handle GValues of type G_TYPE_STRV - + [gdb-check] Add a script for easier use - + Throw a better warning for GValues containing container types - + [importer] Allow native modules in gjs.so - + [gjs] Add a byteArray module. - + Adjust for g-i change to remove machine-independent type tags - + Various other fixes. -- Drop gjs-bgo623775.patch: fixed upstream. -- Enable systemtap support: add systemtap-sdt-devel BuildRequires, - pass --enable-systemtap to configure. Add gjs_gi_probes.d and - gjs.stp.in source files, which are missing from the tarball - (bgo#625090). - -------------------------------------------------------------------- -Thu Jul 15 17:25:15 UTC 2010 - dimstar@opensuse.org - -- Add gjs-bgo623775.patch, from upstream git to fix build with - gobject-introspection 0.9.2. - -------------------------------------------------------------------- -Fri May 28 22:36:18 CEST 2010 - dimstar@opensuse.org - -- Update to version 0.7: - + Add support for "foreign structs" - which are structures that - are referenced from gobject-introspection, but need glue - code to actually handle them. - + Hook cairo bindings to integrate with gobject-introspected - libraries using new foreign struct support - + Start working toward thread-safety by adding - JS_BeginRequest/JS_EndRequest calls throughout the codebase - + add Tweener.setTimeScale and Tweener.getTimeScale - + Wrap cairo_copy_path, cairo_copy_path_flat, and - cairo_append_path - + Handle destroy callbacks of type other than GDestroyNotify - + Handle flag arguments not registered with GObject - + Log errors that occur in callbacks - + Code cleanup - + Build fixes - + Bugs fixed: bgo#610357, bgo#614055, bgo#614344, bgo#615078, - bgo#615222, bgo#617343, bgo#617568, bgo#617702, bgo#617972, - bgo#618190, bgo#618195, bgo#618200, bgo#618201 - ------------------------------------------------------------------- Fri Mar 26 12:58:30 CET 2010 - vuntz@opensuse.org diff --git a/gjs.spec b/gjs.spec index 054b7a9..26cbe33 100644 --- a/gjs.spec +++ b/gjs.spec @@ -1,5 +1,5 @@ # -# spec file for package gjs (Version 0.7.1) +# spec file for package gjs (Version 0.6) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -27,16 +27,12 @@ %endif Name: gjs -Version: 0.7.1 -# FIXME: find out if tapsets should really be in devel package or in main package +Version: 0.6 Release: 1 License: MIT License (or similar) Summary: JavaScript bindings based on gobject-introspection and Mozilla Group: Development/Libraries/GNOME Source: %{name}-%{version}.tar.bz2 -# Files missing from tarball, see bgo#625090 -Source1: gjs_gi_probes.d -Source2: gjs.stp.in BuildRequires: cairo-devel BuildRequires: dbus-1-glib-devel BuildRequires: gcc-c++ @@ -44,7 +40,6 @@ BuildRequires: gobject-introspection-devel BuildRequires: mozilla-xulrunner%{xulrunner_ver}-devel BuildRequires: python BuildRequires: readline-devel -BuildRequires: systemtap-sdt-devel Requires: libgjs-0 = %{version} Recommends: gir-repository BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -79,22 +74,15 @@ Mozilla SpiderMonkey JavaScript engine. %prep %setup -q -test ! -f gi/gjs_gi_probes.d -cp %{S:1} gi/gjs_gi_probes.d -test ! -f gjs/gjs.stp.in -cp %{S:2} gjs/gjs.stp.in %build %configure \ - --disable-static \ - --enable-systemtap + --disable-static %__make %{?jobs:-j%jobs} %install %makeinstall find %{buildroot} -type f -name "*.la" -delete -print -# fix installation of systemtap files -mv %{buildroot}%{buildroot}%{_datadir}/systemtap %{buildroot}%{_datadir}/systemtap %clean rm -rf %{buildroot} @@ -119,6 +107,5 @@ rm -rf %{buildroot} %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -%{_datadir}/systemtap/tapset/*.stp %changelog diff --git a/gjs.stp.in b/gjs.stp.in deleted file mode 100644 index a4db831..0000000 --- a/gjs.stp.in +++ /dev/null @@ -1,18 +0,0 @@ - -probe gjs.object_proxy_new = process("@EXPANDED_LIBDIR@/libgjs-gi.so.0.0.0").mark("object__proxy__new") -{ - proxy_address = $arg1; - gobject_address = $arg2; - gi_namespace = user_string($arg3); - gi_name = user_string($arg4); - probestr = sprintf("gjs.object_proxy_new(%p, %s, %s)", proxy_address, gi_namespace, gi_name); -} - -probe gjs.object_proxy_finalize = process("@EXPANDED_LIBDIR@/libgjs-gi.so.0.0.0").mark("object__proxy__finalize") -{ - proxy_address = $arg1; - gobject_address = $arg2; - gi_namespace = user_string($arg3); - gi_name = user_string($arg4); - probestr = sprintf("gjs.object_proxy_finalize(%p, %s, %s)", proxy_address, gi_namespace, gi_name); -} diff --git a/gjs_gi_probes.d b/gjs_gi_probes.d deleted file mode 100644 index a8bcec7..0000000 --- a/gjs_gi_probes.d +++ /dev/null @@ -1,4 +0,0 @@ -provider gjs { - probe object__proxy__new(void*, void*, char *, char *); - probe object__proxy__finalize(void*, void*, char *, char *); -}; From 0817fd13b19e3ab75ae7c48549e7be59237a621e479e1e5813ffbe65c7a8359f Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Mon, 9 Aug 2010 22:39:16 +0000 Subject: [PATCH 5/5] Updating link to change in openSUSE:Factory/gjs revision 10.0 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gjs?expand=0&rev=ffcf1733a04bc74ad8478e76516ed2a7 --- gjs-0.6.tar.bz2 | 3 --- gjs-0.7.1.tar.bz2 | 3 +++ gjs.changes | 50 +++++++++++++++++++++++++++++++++++++++++++++++ gjs.spec | 19 +++++++++++++++--- gjs.stp.in | 18 +++++++++++++++++ gjs_gi_probes.d | 4 ++++ 6 files changed, 91 insertions(+), 6 deletions(-) delete mode 100644 gjs-0.6.tar.bz2 create mode 100644 gjs-0.7.1.tar.bz2 create mode 100644 gjs.stp.in create mode 100644 gjs_gi_probes.d diff --git a/gjs-0.6.tar.bz2 b/gjs-0.6.tar.bz2 deleted file mode 100644 index 8b07801..0000000 --- a/gjs-0.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c5a54bbb819bfaea1e0e76f0508467e8d5690360ab550e1284951d905a56e5d -size 436575 diff --git a/gjs-0.7.1.tar.bz2 b/gjs-0.7.1.tar.bz2 new file mode 100644 index 0000000..a2e09e7 --- /dev/null +++ b/gjs-0.7.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cfb6825b6806ecea0c24fec4fef7ae2381f03384725d040e7296bf0606a8a98 +size 492566 diff --git a/gjs.changes b/gjs.changes index a49873b..900afb7 100644 --- a/gjs.changes +++ b/gjs.changes @@ -1,3 +1,53 @@ +------------------------------------------------------------------- +Fri Jul 23 08:51:43 CEST 2010 - vuntz@opensuse.org + +- Update to version 0.7.1: + + Add support for GArray to gjs_value_from_g_argument + + Add support for GArray to gjs_value_to_g_argument + + Add support for dtrace/SystemTap + + Add a promise module + + Handle GValues of type G_TYPE_STRV + + [gdb-check] Add a script for easier use + + Throw a better warning for GValues containing container types + + [importer] Allow native modules in gjs.so + + [gjs] Add a byteArray module. + + Adjust for g-i change to remove machine-independent type tags + + Various other fixes. +- Drop gjs-bgo623775.patch: fixed upstream. +- Enable systemtap support: add systemtap-sdt-devel BuildRequires, + pass --enable-systemtap to configure. Add gjs_gi_probes.d and + gjs.stp.in source files, which are missing from the tarball + (bgo#625090). + +------------------------------------------------------------------- +Thu Jul 15 17:25:15 UTC 2010 - dimstar@opensuse.org + +- Add gjs-bgo623775.patch, from upstream git to fix build with + gobject-introspection 0.9.2. + +------------------------------------------------------------------- +Fri May 28 22:36:18 CEST 2010 - dimstar@opensuse.org + +- Update to version 0.7: + + Add support for "foreign structs" - which are structures that + are referenced from gobject-introspection, but need glue + code to actually handle them. + + Hook cairo bindings to integrate with gobject-introspected + libraries using new foreign struct support + + Start working toward thread-safety by adding + JS_BeginRequest/JS_EndRequest calls throughout the codebase + + add Tweener.setTimeScale and Tweener.getTimeScale + + Wrap cairo_copy_path, cairo_copy_path_flat, and + cairo_append_path + + Handle destroy callbacks of type other than GDestroyNotify + + Handle flag arguments not registered with GObject + + Log errors that occur in callbacks + + Code cleanup + + Build fixes + + Bugs fixed: bgo#610357, bgo#614055, bgo#614344, bgo#615078, + bgo#615222, bgo#617343, bgo#617568, bgo#617702, bgo#617972, + bgo#618190, bgo#618195, bgo#618200, bgo#618201 + ------------------------------------------------------------------- Fri Mar 26 12:58:30 CET 2010 - vuntz@opensuse.org diff --git a/gjs.spec b/gjs.spec index 26cbe33..c98b955 100644 --- a/gjs.spec +++ b/gjs.spec @@ -1,5 +1,5 @@ # -# spec file for package gjs (Version 0.6) +# spec file for package gjs (Version 0.7.1) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -27,12 +27,16 @@ %endif Name: gjs -Version: 0.6 +Version: 0.7.1 Release: 1 +# FIXME: find out if tapsets should really be in devel package or in main package License: MIT License (or similar) Summary: JavaScript bindings based on gobject-introspection and Mozilla Group: Development/Libraries/GNOME Source: %{name}-%{version}.tar.bz2 +# Files missing from tarball, see bgo#625090 +Source1: gjs_gi_probes.d +Source2: gjs.stp.in BuildRequires: cairo-devel BuildRequires: dbus-1-glib-devel BuildRequires: gcc-c++ @@ -40,6 +44,7 @@ BuildRequires: gobject-introspection-devel BuildRequires: mozilla-xulrunner%{xulrunner_ver}-devel BuildRequires: python BuildRequires: readline-devel +BuildRequires: systemtap-sdt-devel Requires: libgjs-0 = %{version} Recommends: gir-repository BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -74,15 +79,22 @@ Mozilla SpiderMonkey JavaScript engine. %prep %setup -q +test ! -f gi/gjs_gi_probes.d +cp %{S:1} gi/gjs_gi_probes.d +test ! -f gjs/gjs.stp.in +cp %{S:2} gjs/gjs.stp.in %build %configure \ - --disable-static + --disable-static \ + --enable-systemtap %__make %{?jobs:-j%jobs} %install %makeinstall find %{buildroot} -type f -name "*.la" -delete -print +# fix installation of systemtap files +mv %{buildroot}%{buildroot}%{_datadir}/systemtap %{buildroot}%{_datadir}/systemtap %clean rm -rf %{buildroot} @@ -107,5 +119,6 @@ rm -rf %{buildroot} %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc +%{_datadir}/systemtap/tapset/*.stp %changelog diff --git a/gjs.stp.in b/gjs.stp.in new file mode 100644 index 0000000..a4db831 --- /dev/null +++ b/gjs.stp.in @@ -0,0 +1,18 @@ + +probe gjs.object_proxy_new = process("@EXPANDED_LIBDIR@/libgjs-gi.so.0.0.0").mark("object__proxy__new") +{ + proxy_address = $arg1; + gobject_address = $arg2; + gi_namespace = user_string($arg3); + gi_name = user_string($arg4); + probestr = sprintf("gjs.object_proxy_new(%p, %s, %s)", proxy_address, gi_namespace, gi_name); +} + +probe gjs.object_proxy_finalize = process("@EXPANDED_LIBDIR@/libgjs-gi.so.0.0.0").mark("object__proxy__finalize") +{ + proxy_address = $arg1; + gobject_address = $arg2; + gi_namespace = user_string($arg3); + gi_name = user_string($arg4); + probestr = sprintf("gjs.object_proxy_finalize(%p, %s, %s)", proxy_address, gi_namespace, gi_name); +} diff --git a/gjs_gi_probes.d b/gjs_gi_probes.d new file mode 100644 index 0000000..a8bcec7 --- /dev/null +++ b/gjs_gi_probes.d @@ -0,0 +1,4 @@ +provider gjs { + probe object__proxy__new(void*, void*, char *, char *); + probe object__proxy__finalize(void*, void*, char *, char *); +};