[packages/dax-svg] - new; a bit bitrot, so required patches for current clutter and gjs/mozjs - added pc patch (fix dox
qboosh
qboosh at pld-linux.org
Fri Nov 13 20:38:26 CET 2015
commit 26db1d88beccf545b413a44cf65dc7a1847c7af9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Nov 13 20:38:39 2015 +0100
- new; a bit bitrot, so required patches for current clutter and gjs/mozjs
- added pc patch (fix dox.cp contents)
dax-svg-clutter.patch | 375 ++++++++++++++++++++++++++++++++++++++++++++++++++
dax-svg-gjs.patch | 353 +++++++++++++++++++++++++++++++++++++++++++++++
dax-svg-pc.patch | 19 +++
dax-svg.spec | 131 ++++++++++++++++++
4 files changed, 878 insertions(+)
---
diff --git a/dax-svg.spec b/dax-svg.spec
new file mode 100644
index 0000000..0743aec
--- /dev/null
+++ b/dax-svg.spec
@@ -0,0 +1,131 @@
+#
+# Conditional build:
+%bcond_without static_libs # don't build static libraries
+#
+Summary: SVG loading and drawing library
+Summary(pl.UTF-8): Biblioteka do wczytywania i rysowania obrazów SVG
+Name: dax-svg
+Version: 0.1.0
+%define snap 20100802
+%define gitref c8dc7638977f5b09d3d709b4c0119adf892ba10c
+Release: 0.%{snap}.1
+License: LGPL v2.1
+Group: Libraries
+Source0: https://github.com/dlespiau/dax-svg/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5: a4484dc120da5babc3bf9e76c2eaf523
+Patch0: %{name}-clutter.patch
+Patch1: %{name}-gjs.patch
+Patch2: %{name}-pc.patch
+URL: https://github.com/dlespiau/dax-svg/
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake >= 1:1.10
+BuildRequires: clutter-devel >= 1.3.2
+BuildRequires: clutter-gst-devel >= 3.0
+BuildRequires: gjs-devel >= 1.0
+BuildRequires: glib2-devel >= 1:2.22
+BuildRequires: gobject-introspection-devel >= 0.6.14
+BuildRequires: libtool >= 2:2.2.6
+BuildRequires: libxml2-devel >= 2.0
+BuildRequires: mozjs24-devel
+BuildRequires: mx-devel >= 1.0
+BuildRequires: pkgconfig
+Requires: clutter >= 1.3.2
+Requires: glib2 >= 1:2.22
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+SVG loading and drawing library.
+
+%description -l pl.UTF-8
+Biblioteka do wczytywania i rysowania obrazów SVG.
+
+%package devel
+Summary: Header files for Dax library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Dax
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: clutter-devel >= 1.3.2
+Requires: clutter-gst-devel >= 3.0
+Requires: gjs-devel >= 1.0
+Requires: glib2-devel >= 1:2.22
+Requires: libxml2-devel >= 2.0
+Requires: mozjs24-devel
+Requires: mx-devel >= 1.0
+
+%description devel
+Header files for Dax library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Dax.
+
+%package static
+Summary: Static Dax library
+Summary(pl.UTF-8): Statyczna biblioteka Dax
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static Dax library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka Dax.
+
+%prep
+%setup -q -n %{name}-%{gitref}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I build/autotools
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+ --disable-silent-rules \
+ %{?with_static_libs:--enable-static}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/dax-viewer
+%attr(755,root,root) %{_libdir}/libdax-0.2.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdax-0.2.so.0
+%attr(755,root,root) %{_libdir}/libdox-0.2.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdox-0.2.so.0
+%{_libdir}/girepository-1.0/Dax-0.2.typelib
+%{_libdir}/girepository-1.0/Dox-0.2.typelib
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libdax-0.2.so
+%attr(755,root,root) %{_libdir}/libdox-0.2.so
+%{_includedir}/dax-0.2
+%{_includedir}/dox-0.2
+%{_datadir}/gir-1.0/Dax-0.2.gir
+%{_datadir}/gir-1.0/Dox-0.2.gir
+%{_pkgconfigdir}/dax-0.2.pc
+%{_pkgconfigdir}/dox-0.2.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libdax-0.2.a
+%{_libdir}/libdox-0.2.a
+%endif
diff --git a/dax-svg-clutter.patch b/dax-svg-clutter.patch
new file mode 100644
index 0000000..0bae66b
--- /dev/null
+++ b/dax-svg-clutter.patch
@@ -0,0 +1,375 @@
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/clutter-shape.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/clutter-shape.c 2015-11-10 20:30:05.597536328 +0100
+@@ -48,11 +48,11 @@ struct _ClutterShapePrivate
+ {
+ ClutterColor *color; /* NULL means no fill color */
+ ClutterColor *border_color; /* NULL means no stroke color */
+- ClutterPath2D *path;
++ ClutterPath *path;
+ CoglHandle cogl_path;
+ };
+
+-static void clutter_path_draw_cogl (const ClutterPath2DNode *node,
++static void clutter_path_draw_cogl (const ClutterPathNode *node,
+ gpointer user_data)
+ {
+ switch (node->type)
+@@ -103,7 +103,7 @@ clutter_shape_pick (ClutterActor *
+ color->green,
+ color->blue,
+ color->alpha);
+- clutter_path_2d_foreach (priv->path, clutter_path_draw_cogl, NULL);
++ clutter_path_foreach (priv->path, clutter_path_draw_cogl, NULL);
+ cogl_path_fill();
+ }
+ }
+@@ -127,7 +127,7 @@ clutter_shape_paint (ClutterActor *self)
+ ClutterColor tmp_col;
+
+ if (priv->cogl_path == COGL_INVALID_HANDLE) {
+- clutter_path_2d_foreach (priv->path, clutter_path_draw_cogl, NULL);
++ clutter_path_foreach (priv->path, clutter_path_draw_cogl, NULL);
+ priv->cogl_path = cogl_handle_ref (cogl_get_path ());
+ } else {
+ cogl_set_path (priv->cogl_path);
+@@ -276,7 +276,7 @@ clutter_shape_class_init (ClutterShapeCl
+ pspec = g_param_spec_object ("path",
+ "Path",
+ "A path describing the shape",
+- CLUTTER_TYPE_PATH_2D,
++ CLUTTER_TYPE_PATH,
+ CLUTTER_PARAM_READWRITE);
+ g_object_class_install_property (gobject_class, PROP_PATH, pspec);
+ }
+@@ -292,7 +292,7 @@ clutter_shape_init (ClutterShape *self)
+ /**
+ * clutter_shape_new:
+ *
+- * Creates a new #ClutterActor that draws a #ClutterPath2D
++ * Creates a new #ClutterActor that draws a #ClutterPath
+ *
+ * Return value: a new #ClutterActor
+ */
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-element-path.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-element-path.c 2015-11-10 19:57:52.850950771 +0100
+@@ -41,7 +41,7 @@ enum
+
+ struct _DaxElementPathPrivate
+ {
+- ClutterPath2D *path;
++ ClutterPath *path;
+ DaxMatrix *transform;
+ };
+
+@@ -121,7 +121,7 @@ dax_element_path_class_init (DaxElementP
+ pspec = g_param_spec_object ("d",
+ "Path data",
+ "", /* FIXME */
+- CLUTTER_TYPE_PATH_2D,
++ CLUTTER_TYPE_PATH,
+ DAX_GPARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_PATH, pspec);
+
+@@ -142,7 +142,7 @@ dax_element_path_new (void)
+ return g_object_new (DAX_TYPE_ELEMENT_PATH, NULL);
+ }
+
+-ClutterPath2D *
++ClutterPath *
+ dax_element_path_get_path (DaxElementPath *self)
+ {
+ g_return_val_if_fail (DAX_IS_ELEMENT_PATH (self), NULL);
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-element-path.h.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-element-path.h 2015-11-10 19:56:30.770954215 +0100
+@@ -72,7 +72,7 @@ struct _DaxElementPathClass
+ GType dax_element_path_get_type (void) G_GNUC_CONST;
+
+ DaxDomElement * dax_element_path_new (void);
+-ClutterPath2D * dax_element_path_get_path (DaxElementPath *self);
++ClutterPath * dax_element_path_get_path (DaxElementPath *self);
+ const DaxMatrix * dax_element_path_get_transform (DaxElementPath *path);
+
+ G_END_DECLS
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-traverser-clutter.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-traverser-clutter.c 2015-11-12 21:45:56.106760299 +0100
+@@ -168,7 +168,7 @@
+ DaxElement *element = DAX_ELEMENT (node);
+ const ClutterColor *fill_color, *stroke_color;
+ ClutterActor *shape;
+- ClutterPath2D *path;
++ ClutterPath *path;
+ DaxMatrix *matrix;
+
+ shape = dax_shape_new ();
+@@ -275,10 +275,10 @@
+ clutter_container_add_actor (priv->container, rectangle);
+ }
+
+-static ClutterPath2D *
++static ClutterPath *
+ clutter_path_new_from_knot_sequence (const DaxKnotSequence *seq)
+ {
+- ClutterPath2D *path;
++ ClutterPath *path;
+ const float *knots;
+ guint nb_knots, i;
+
+@@ -287,11 +287,11 @@
+ return NULL;
+ knots = dax_knot_sequence_get_array (seq);
+
+- path = clutter_path_2d_new ();
+- clutter_path_2d_add_move_to (path, knots[0], knots[1]);
++ path = clutter_path_new ();
++ clutter_path_add_move_to (path, knots[0], knots[1]);
+
+ for (i = 1; i < nb_knots; i++)
+- clutter_path_2d_add_line_to (path, knots[i * 2], knots[i * 2 + 1]);
++ clutter_path_add_line_to (path, knots[i * 2], knots[i * 2 + 1]);
+
+ return path;
+ }
+@@ -306,7 +306,7 @@
+ const ClutterColor *fill_color, *stroke_color;
+ ClutterActor *polyline;
+ const DaxKnotSequence *seq;
+- ClutterPath2D *path;
++ ClutterPath *path;
+
+ polyline = clutter_shape_new ();
+
+@@ -325,15 +325,15 @@
+ clutter_container_add_actor (priv->container, polyline);
+ }
+
+-static ClutterPath2D *
++static ClutterPath *
+ build_circle_path (DaxElementCircle *circle)
+ {
+- ClutterPath2D *path;
++ ClutterPath *path;
+ ClutterUnits *cx_u, *cy_u, *r_u;
+ gfloat cx, cy, r;
+ static gfloat k = 4 * (G_SQRT2 - 1) / 3;
+
+- /* Build the ClutterPath2D */
++ /* Build the ClutterPath */
+ cx_u = dax_element_circle_get_cx (circle);
+ cy_u = dax_element_circle_get_cy (circle);
+ r_u = dax_element_circle_get_r (circle);
+@@ -341,26 +341,26 @@
+ cy = clutter_units_to_pixels (cy_u);
+ r = clutter_units_to_pixels (r_u);
+
+- path = clutter_path_2d_new ();
++ path = clutter_path_new ();
+
+- clutter_path_2d_add_move_to (path, cx + r, cy);
+- clutter_path_2d_add_curve_to (path,
++ clutter_path_add_move_to (path, cx + r, cy);
++ clutter_path_add_curve_to (path,
+ cx + r, cy + r * k,
+ cx + r * k, cy + r,
+ cx, cy + r);
+- clutter_path_2d_add_curve_to (path,
++ clutter_path_add_curve_to (path,
+ cx - r * k , cy + r,
+ cx - r , cy + r * k,
+ cx - r, cy);
+- clutter_path_2d_add_curve_to (path,
++ clutter_path_add_curve_to (path,
+ cx - r, cy - r * k,
+ cx - r * k, cy - r,
+ cx, cy - r);
+- clutter_path_2d_add_curve_to (path,
++ clutter_path_add_curve_to (path,
+ cx + r * k, cy - r,
+ cx + r, cy - r * k,
+ cx + r, cy);
+- clutter_path_2d_add_close (path);
++ clutter_path_add_close (path);
+
+ return path;
+ }
+@@ -370,7 +370,7 @@
+ GParamSpec *pspec,
+ ClutterActor *target)
+ {
+- ClutterPath2D *path;
++ ClutterPath *path;
+
+ path = build_circle_path (circle);
+ g_object_set (target, "path", path, NULL);
+@@ -385,7 +385,7 @@
+ DaxElement *element = DAX_ELEMENT (node);
+ const ClutterColor *fill_color, *stroke_color;
+ ClutterActor *circle;
+- ClutterPath2D *path;
++ ClutterPath *path;
+
+ path = build_circle_path (node);
+
+@@ -653,12 +653,12 @@
+ }
+ }
+
+-static ClutterPath2D *
++static ClutterPath *
+ clutter_path_new_from_line (DaxElementLine *line)
+ {
+ ClutterUnits *x1_u, *y1_u, *x2_u, *y2_u;
+ gfloat x1, y1, x2, y2;
+- ClutterPath2D *path;
++ ClutterPath *path;
+
+ x1_u = dax_element_line_get_x1 (line);
+ y1_u = dax_element_line_get_y1 (line);
+@@ -670,9 +670,9 @@
+ x2 = clutter_units_to_pixels (x2_u);
+ y2 = clutter_units_to_pixels (y2_u);
+
+- path = clutter_path_2d_new ();
+- clutter_path_2d_add_move_to (path, x1, y1);
+- clutter_path_2d_add_line_to (path, x2, y2);
++ path = clutter_path_new ();
++ clutter_path_add_move_to (path, x1, y1);
++ clutter_path_add_line_to (path, x2, y2);
+
+ return path;
+ }
+@@ -686,7 +686,7 @@
+ DaxElement *element = DAX_ELEMENT (node);
+ const ClutterColor *stroke_color;
+ ClutterActor *line;
+- ClutterPath2D *path;
++ ClutterPath *path;
+
+ line = clutter_shape_new ();
+ path = clutter_path_new_from_line (node);
+@@ -828,7 +828,7 @@
+ {
+ DaxTraverserClutter *build = DAX_TRAVERSER_CLUTTER (traverser);
+ DaxTraverserClutterPrivate *priv = build->priv;
+- ClutterActor *video;
++ ClutterGstPlayback *video;
+ ClutterUnits *x_u, *y_u, *width_u, *height_u;
+ gfloat x, y, width, height;
+ const gchar *uri;
+@@ -843,14 +843,14 @@
+ width = clutter_units_to_pixels (width_u);
+ height = clutter_units_to_pixels (height_u);
+
+- video = clutter_gst_video_texture_new ();
++ video = clutter_gst_playback_new ();
+ clutter_actor_set_x (video, x);
+ clutter_actor_set_y (video, x);
+ clutter_actor_set_width (video, width);
+ clutter_actor_set_height (video, height);
+
+ uri = dax_element_video_get_uri (node);
+- clutter_media_set_uri (CLUTTER_MEDIA (video), uri);
++ clutter_gst_playback_set_uri (CLUTTER_GST_PLAYBACK (video), uri);
+ g_ptr_array_add (priv->media, video);
+
+ clutter_container_add_actor (priv->container, video);
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-utils.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-utils.c 2015-11-10 20:33:51.834193500 +0100
+@@ -214,7 +214,7 @@ _dax_utils_is_iri (const gchar *str)
+ }
+
+ static void
+-dump_path2d_node (ClutterPath2DNode *node)
++dump_path_node (ClutterPathNode *node)
+ {
+ switch (node->type)
+ {
+@@ -256,18 +256,18 @@ dump_path2d_node (ClutterPath2DNode *nod
+ }
+
+ void
+-_dax_utils_dump_path_2d (ClutterPath2D *path)
++_dax_utils_dump_path (ClutterPath *path)
+ {
+ GSList *nodes, *e;
+
+ g_message ("path %p", path);
+
+- nodes = clutter_path_2d_get_nodes (path);
++ nodes = clutter_path_get_nodes (path);
+ for (e = nodes; e; e = g_slist_next (e))
+ {
+- ClutterPath2DNode *node = e->data;
++ ClutterPathNode *node = e->data;
+
+- dump_path2d_node (node);
++ dump_path_node (node);
+ }
+
+ g_slist_free (nodes);
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-utils.h.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-utils.h 2015-11-10 20:33:22.384194736 +0100
+@@ -37,7 +37,7 @@ gboolean _dax_utils_parse_simple_floa
+ gboolean _dax_utils_parse_float (char **string,
+ gfloat *x);
+ gboolean _dax_utils_is_iri (const gchar *str);
+-void _dax_utils_dump_path_2d (ClutterPath2D *path);
++void _dax_utils_dump_path (ClutterPath *path);
+ void _dax_utils_dump_cogl_matrix (CoglMatrix *m);
+
+ typedef enum {
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/tests/test-parser.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/tests/test-parser.c 2015-11-10 20:32:40.780863149 +0100
+@@ -137,8 +137,8 @@ test_path (void)
+ {
+ DaxDomDocument *document;
+ DaxDomNode *svg, *path;
+- ClutterPath2D *clutter_path;
+- ClutterPath2DNode node;
++ ClutterPath *clutter_path;
++ ClutterPathNode node;
+
+ document = dax_dom_document_new_from_file ("08_01.svg", NULL);
+ g_assert (DAX_IS_DOM_DOCUMENT (document));
+@@ -148,20 +148,20 @@ test_path (void)
+ path = dax_dom_node_get_last_child (svg);
+ g_assert (DAX_IS_ELEMENT_PATH (path));
+ clutter_path = dax_element_path_get_path (DAX_ELEMENT_PATH (path));
+- g_assert (clutter_path_2d_get_n_nodes (clutter_path) == 4);
+- clutter_path_2d_get_node (clutter_path, 0, &node);
++ g_assert (clutter_path_get_n_nodes (clutter_path) == 4);
++ clutter_path_get_node (clutter_path, 0, &node);
+ g_assert (node.type == CLUTTER_PATH_MOVE_TO);
+ g_assert_cmpint (node.points[0].x, ==, 100);
+ g_assert_cmpint (node.points[0].y, ==, 100);
+- clutter_path_2d_get_node (clutter_path, 1, &node);
++ clutter_path_get_node (clutter_path, 1, &node);
+ g_assert (node.type == CLUTTER_PATH_LINE_TO);
+ g_assert_cmpint (node.points[0].x, ==, 300);
+ g_assert_cmpint (node.points[0].y, ==, 100);
+- clutter_path_2d_get_node (clutter_path, 2, &node);
++ clutter_path_get_node (clutter_path, 2, &node);
+ g_assert (node.type == CLUTTER_PATH_LINE_TO);
+ g_assert_cmpint (node.points[0].x, ==, 200);
+ g_assert_cmpint (node.points[0].y, ==, 300);
+- clutter_path_2d_get_node (clutter_path, 3, &node);
++ clutter_path_get_node (clutter_path, 3, &node);
+ g_assert (node.type == CLUTTER_PATH_CLOSE);
+ }
+
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-actor.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-actor.c 2015-11-12 21:41:11.306772267 +0100
+@@ -238,12 +238,12 @@
+
+ if (playing) {
+ for (i = 0; i < priv->media->len; i++)
+- clutter_media_set_playing (g_ptr_array_index (priv->media, i),
++ clutter_gst_player_set_playing (g_ptr_array_index (priv->media, i),
+ TRUE);
+ clutter_score_start (priv->score);
+ } else {
+ for (i = 0; i < priv->media->len; i++)
+- clutter_media_set_playing (g_ptr_array_index (priv->media, i),
++ clutter_gst_player_set_playing (g_ptr_array_index (priv->media, i),
+ FALSE);
+ clutter_score_pause (priv->score);
+ }
diff --git a/dax-svg-gjs.patch b/dax-svg-gjs.patch
new file mode 100644
index 0000000..ca6314d
--- /dev/null
+++ b/dax-svg-gjs.patch
@@ -0,0 +1,353 @@
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/configure.ac.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/configure.ac 2015-11-10 18:32:03.011166889 +0100
+@@ -106,7 +106,7 @@
+ AC_HEADER_STDC
+
+ # Dax requires
+-DAX_REQUIRES="gjs-gi-1.0 gjs-1.0 clutter-1.0 >= 1.3.2 clutter-gst-1.0 glib-2.0 >= 2.22 gobject-2.0 gio-2.0 mx-1.0"
++DAX_REQUIRES="gjs-1.0 mozjs-24 clutter-1.0 >= 1.3.2 clutter-gst-3.0 glib-2.0 >= 2.22 gobject-2.0 gio-2.0 mx-1.0 libxml-2.0"
+ AC_SUBST(DAX_REQUIRES)
+
+ PKG_CHECK_MODULES([DAX], [$DAX_REQUIRES])
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-element.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-element.c 2015-11-11 21:02:22.070495865 +0100
+@@ -203,7 +203,7 @@ dax_element_handle_event (DaxXmlEventLis
+ event = dax_js_context_new_object_from_xml_event (js_context, xml_event);
+
+ dax_js_context_eval (js_context, code, strlen (code), "svg", NULL, NULL);
+- dax_js_context_call_function (js_context, "__dax_handler", "o", event);
++ dax_js_context_call_function_arg_object (js_context, "__dax_handler", event);
+ }
+
+ static void
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-element-handler.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-element-handler.c 2015-11-11 21:03:12.577160411 +0100
+@@ -82,7 +82,7 @@ dax_element_handler_handle_event (DaxXml
+ event = dax_js_context_new_object_from_xml_event (js_context, xml_event);
+
+ dax_js_context_eval (js_context, code, strlen (code), "svg", NULL, NULL);
+- dax_js_context_call_function (js_context, "__dax_handler", "o", event);
++ dax_js_context_call_function_arg_object (js_context, "__dax_handler", event);
+ }
+
+ static void
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-gjs-context.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-gjs-context.c 2015-11-11 21:06:45.497151476 +0100
+@@ -22,7 +22,8 @@
+ #include <string.h>
+
+ #include <gjs/gjs.h>
+-#include <gjs/gi/object.h>
++#include <gjs/gjs-module.h>
++#include <gi/object.h>
+
+ #include "dax-js-context.h"
+
+@@ -42,7 +43,7 @@ struct _DaxJsContextPrivate
+ };
+
+ static void
+-js_xml_event_finalize (JSContext *context,
++js_xml_event_finalize (JSFreeOp *fop,
+ JSObject *obj)
+ {
+ //g_message (G_STRLOC ": not implemented");
+@@ -52,9 +53,9 @@ static struct JSClass js_xml_event_class
+ "DaxXmlEvent",
+ JSCLASS_HAS_PRIVATE,
+ JS_PropertyStub,
++ JS_DeletePropertyStub,
+ JS_PropertyStub,
+- JS_PropertyStub,
+- JS_PropertyStub,
++ JS_StrictPropertyStub,
+ JS_EnumerateStub,
+ JS_ResolveStub,
+ JS_ConvertStub,
+@@ -68,20 +69,19 @@ static JSPropertySpec js_xml_event_proto
+
+ static JSBool
+ js_xml_event_to_string (JSContext *context,
+- JSObject *obj,
+- uintN argc,
+- jsval *argv,
+- jsval *retval)
++ unsigned argc,
++ JS::Value *vp)
+ {
+ g_message (G_STRLOC ": not implemented");
+
+- *retval = JSVAL_VOID;
++ JS::CallReceiver rec = JS::CallReceiverFromVp(vp);
++ rec.rval().set(JSVAL_VOID);
+
+ return JS_TRUE;
+ }
+
+ static JSFunctionSpec js_xml_event_proto_funcs[] = {
+- { "toString", js_xml_event_to_string, 0, 0}, /* debugging purpose */
++ { "toString", JSOP_WRAPPER(js_xml_event_to_string), 0, 0, NULL}, /* debugging purpose */
+ { NULL }
+ };
+
+@@ -179,7 +179,7 @@ dax_js_context_init (DaxJsContext *self)
+ DaxJsContext *
+ dax_js_context_new (void)
+ {
+- return g_object_new (DAX_TYPE_JS_CONTEXT, NULL);
++ return (DaxJsContext *) g_object_new (DAX_TYPE_JS_CONTEXT, NULL);
+ }
+
+ void *
+@@ -267,42 +267,29 @@ dax_js_context_new_object_from_xml_event
+ */
+
+ gboolean
+-dax_js_context_call_function (DaxJsContext *context,
++dax_js_context_call_function_arg_object (DaxJsContext *context,
+ const char *name,
+- const char *format,
+- ...)
++ DaxJsObject *obj)
+ {
+ DaxJsContextPrivate *priv;
+- va_list args;
+ JSBool ok;
+- jsval *argv;
+- void *mark;
++ jsval va;
+ jsval retval;
+
+ g_return_val_if_fail (DAX_IS_JS_CONTEXT (context), FALSE);
+
+ priv = context->priv;
+
+- va_start (args, format);
+-
+- argv = JS_PushArgumentsVA (priv->js_context, &mark, format, args);
+- if (G_UNLIKELY (argv == NULL)) {
+- g_warning (G_STRLOC ": could not push arguments onto the stack");
+- va_end (args);
+- return FALSE;
+- }
++ va = OBJECT_TO_JSVAL((JSObject*)obj);
+
+ ok = JS_CallFunctionName (priv->js_context,
+ JS_GetGlobalObject (priv->js_context),
+ name,
+- strlen (format),
+- argv,
++ 1,
++ &va,
+ &retval);
+- JS_PopArguments (priv->js_context, mark);
+ if (!ok)
+- gjs_log_exception (priv->js_context, NULL);
+-
+- va_end (args);
++ gjs_log_exception (priv->js_context);
+
+ return ok;
+ }
+@@ -327,7 +314,7 @@ dax_js_context_add_global_object (DaxJsC
+ name,
+ &js_val);
+ if (!ok)
+- gjs_log_exception (priv->js_context, NULL);
++ gjs_log_exception (priv->js_context);
+
+ return ok;
+ }
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-gjs-context.h.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-gjs-context.h 2015-11-11 20:56:28.780510690 +0100
+@@ -80,10 +80,9 @@ gboolean dax_js_context_eval
+ gint *retval,
+ GError **error);
+
+-gboolean dax_js_context_call_function (DaxJsContext *context,
+- const char *name,
+- const char *nb_args,
+- ...);
++gboolean dax_js_context_call_function_arg_object (DaxJsContext *context,
++ const char *name,
++ DaxJsObject *obj);
+
+ DaxJsObject* dax_js_context_new_object_from_gobject (DaxJsContext *context,
+ GObject *object);
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-gjs-function-listener.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-gjs-function-listener.c 2015-11-11 21:54:26.690364736 +0100
+@@ -17,6 +17,7 @@
+ */
+
+ #include <gjs/gjs.h>
++#include <gjs/gjs-module.h>
+
+ #include "dax-internals.h"
+ #include "dax-debug.h"
+@@ -58,7 +59,7 @@ dax_js_function_listener_set_context (Da
+ DaxJsFunctionListenerPrivate *priv = listener->priv;
+
+ priv->js_context = context;
+- priv->native_context = dax_js_context_get_native_context (context);
++ priv->native_context = (JSContext*)dax_js_context_get_native_context (context);
+ }
+
+ static JSFunction *
+@@ -77,7 +78,7 @@ dax_js_function_listener_set_function (D
+ jsval in_function;
+ JSBool ret;
+
+- in_function = OBJECT_TO_JSVAL (function);
++ in_function = OBJECT_TO_JSVAL ((JSObject*)function);
+ ret = JS_ConvertValue (priv->native_context,
+ in_function,
+ JSTYPE_FUNCTION,
+@@ -102,7 +103,7 @@ dax_js_function_listener_handle_event (D
+ jsval argv[1], ret_val;
+ JSBool ret;
+
+- event = dax_js_context_new_object_from_xml_event (priv->js_context,
++ event = (JSObject*)dax_js_context_new_object_from_xml_event ((DaxJsContext*)priv->js_context,
+ xml_event);
+ argv[0] = OBJECT_TO_JSVAL (event);
+
+@@ -167,7 +168,7 @@ dax_js_function_listener_set_property (G
+ {
+ case PROP_CONTEXT:
+ dax_js_function_listener_set_context (listener,
+- g_value_get_pointer (value));
++ (DaxJsContext*)g_value_get_pointer (value));
+ break;
+ case PROP_FUNCTION:
+ dax_js_function_listener_set_function (listener,
+@@ -200,13 +201,13 @@ dax_js_function_listener_class_init (Dax
+ pspec = g_param_spec_pointer ("function",
+ "Function",
+ "JS callback of the listener",
+- DAX_GPARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
++ (GParamFlags)(DAX_GPARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class, PROP_FUNCTION, pspec);
+
+ pspec = g_param_spec_pointer ("context",
+ "Context",
+ "JS context to use",
+- DAX_GPARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
++ (GParamFlags)(DAX_GPARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class, PROP_CONTEXT, pspec);
+ }
+
+@@ -222,7 +223,7 @@ DaxJsFunctionListener *
+ dax_js_function_listener_new (DaxJsContext *context,
+ DaxJsFunction *function)
+ {
+- return g_object_new (DAX_TYPE_JS_FUNCTION_LISTENER,
++ return (DaxJsFunctionListener*)g_object_new (DAX_TYPE_JS_FUNCTION_LISTENER,
+ "context", context,
+ "function", function,
+ NULL);
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-gjs-udom.c.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/dax-gjs-udom.c 2015-11-12 17:48:58.090690562 +0100
+@@ -17,7 +17,8 @@
+ */
+
+ #include <gjs/gjs.h>
+-#include <gjs/gi/object.h>
++#include <gjs/gjs-module.h>
++#include <gi/object.h>
+
+ #include "dax-dom.h"
+
+@@ -29,10 +30,8 @@
+
+ static JSBool
+ add_event_listener (JSContext *cx,
+- JSObject *obj,
+- uintN argc,
+- jsval *argv,
+- jsval *rval)
++ unsigned argc,
++ JS::Value *vp)
+ {
+ DaxJsFunctionListener *listener;
+ char *type;
+@@ -43,7 +42,9 @@ add_event_listener (JSContext *cx,
+ DaxDomDocument *document;
+ DaxJsContext *js_context;
+
+- if (!JS_ConvertArguments (cx, argc, argv,
++ JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
++ JSObject *obj = JS_ComputeThis(cx, vp).toObjectOrNull();
++ if (!JS_ConvertArguments (cx, argc, args.array(),
+ "sfb", &type, &listener_func, &use_capture))
+ {
+ return JS_FALSE;
+@@ -64,23 +65,22 @@ add_event_listener (JSContext *cx,
+ }
+
+ static JSFunctionSpec timer_functions[] = {
+- JS_FS ("addEventListener", add_event_listener, 3, 0, 0),
++ JS_FS ("addEventListener", add_event_listener, 3, 0),
+ JS_FS_END
+ };
+
+ static JSBool
+ create_timer (JSContext *cx,
+- JSObject *obj,
+- uintN argc,
+- jsval *argv,
+- jsval *rval)
++ unsigned argc,
++ JS::Value *vp)
+ {
+- int32 initial_interval, repeat_interval;
++ int32_t initial_interval, repeat_interval;
+ DaxSvgTimer *timer;
+ JSObject *js_timer;
+ JSBool ret;
+
+- if (!JS_ConvertArguments (cx, argc, argv,
++ JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
++ if (!JS_ConvertArguments (cx, argc, args.array(),
+ "ii", &initial_interval, &repeat_interval))
+ {
+ return JS_FALSE;
+@@ -88,7 +88,7 @@ create_timer (JSContext *cx,
+
+ timer = dax_svg_timer_new (initial_interval, repeat_interval);
+ js_timer = gjs_object_from_g_object (cx, (GObject *) timer);
+- *rval = OBJECT_TO_JSVAL (js_timer);
++ args.rval().set(OBJECT_TO_JSVAL (js_timer));
+
+ ret = JS_DefineFunctions(cx, js_timer, timer_functions);
+ if (G_UNLIKELY (ret == JS_FALSE)) {
+@@ -100,7 +100,7 @@ create_timer (JSContext *cx,
+ }
+
+ static JSFunctionSpec svg_global_functions[] = {
+- JS_FS ("createTimer", create_timer, 2, 0, 0),
++ JS_FS ("createTimer", create_timer, 2, 0),
+ JS_FS_END
+ };
+
+@@ -133,7 +133,7 @@ _dax_js_udom_setup_document (DaxJsContex
+ }
+
+ static JSFunctionSpec svg_event_target_functions[] = {
+- JS_FS ("addEventListener", add_event_listener, 3, 0, 0),
++ JS_FS ("addEventListener", add_event_listener, 3, 0),
+ JS_FS_END
+ };
+
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/Makefile.am.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dax/Makefile.am 2015-11-12 22:05:27.110044490 +0100
+@@ -154,6 +154,10 @@
+ dax-xml-private.h \
+ $(NULL)
+
++libdax_0.2_la-dax-gjs-context.lo:: CFLAGS+=-x c++
++libdax_0.2_la-dax-gjs-function-listener.lo:: CFLAGS+=-x c++
++libdax_0.2_la-dax-gjs-udom.lo:: CFLAGS+=-x c++
++
+ lib_LTLIBRARIES = libdax- at DAX_API_VERSION@.la
+
+ daxdir = $(includedir)/dax-$(DAX_API_VERSION)/dax
diff --git a/dax-svg-pc.patch b/dax-svg-pc.patch
new file mode 100644
index 0000000..e42179a
--- /dev/null
+++ b/dax-svg-pc.patch
@@ -0,0 +1,19 @@
+--- dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dox.pc.in.orig 2010-08-01 23:19:42.000000000 +0200
++++ dax-svg-c8dc7638977f5b09d3d709b4c0119adf892ba10c/dox.pc.in 2015-11-13 18:32:25.150288367 +0100
+@@ -2,12 +2,12 @@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+-apiversion=@DEX_API_VERSION@
+-requires=@DEX_REQUIRES@
++apiversion=@DOX_API_VERSION@
++requires=@DOX_REQUIRES@
+
+ Name: Dex
+ Description: A toy navigator (support library)
+ Version: @VERSION@
+-Libs: -L${libdir} -ldex-${apiversion}
+-Cflags: -I${includedir}/dex-${apiversion}
++Libs: -L${libdir} -ldox-${apiversion}
++Cflags: -I${includedir}/dox-${apiversion}
+ Requires: ${requires}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dax-svg.git/commitdiff/26db1d88beccf545b413a44cf65dc7a1847c7af9
More information about the pld-cvs-commit
mailing list