Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=gnometesting.git;a=commitdiff;h=6b85d4c75242f21c0693972b194d3f5294762ed4
commit 6b85d4c75242f21c0693972b194d3f5294762ed4 Author: bouleetbil <bouleet...@frogdev.info> Date: Fri Mar 26 23:16:44 2010 +0100 gjs-0.6-1-x86_64 *version bump diff --git a/source/gnome-extra/gjs/FrugalBuild b/source/gnome-extra/gjs/FrugalBuild index 749ea2e..59c5fcb 100644 --- a/source/gnome-extra/gjs/FrugalBuild +++ b/source/gnome-extra/gjs/FrugalBuild @@ -2,16 +2,25 @@ # Maintainer: bouleetbil <bouleet...@frogdev.info> pkgname=gjs -pkgver=0.5 +pkgver=0.6 pkgrel=1 pkgdesc="Javascript Bindings for GNOME" url="http://www.gnome.org/" -depends=('xulrunner' 'gobject-introspection') +depends=('xulrunner' 'gobject-introspection' 'cairo') makedepends=('intltool' 'gnome-doc-utils' 'gnome-common') groups=('gnome-extra') archs=('i686' 'x86_64') -_F_gnome_devel="y" Finclude gnome -sha1sums=('63d09efb8d334737536cc48fb7856055cf6ce6f5') +source=($source cairo_svg.diff) +sha1sums=('b36f527c0e72051ec45a908c39a576bb7a03fbc4' \ + '30b76e819748919135075df3c29d7e4acafc99d0') + +build1() { + Fcd + Fpatchall + Fautoreconf + Fmake + Fmakeinstall +} # optimization OK diff --git a/source/gnome-extra/gjs/cairo_svg.diff b/source/gnome-extra/gjs/cairo_svg.diff new file mode 100644 index 0000000..a8414d0 --- /dev/null +++ b/source/gnome-extra/gjs/cairo_svg.diff @@ -0,0 +1,141 @@ +From 179b0c44f0402db367cae98b3085419c8ca1ce0d Mon Sep 17 00:00:00 2001 +From: Johan Dahlin <jo...@gnome.org> +Date: Fri, 26 Mar 2010 18:20:31 -0300 +Subject: [PATCH] [cairo] Make SVG/PDF/PS surfaces optional + +The conditional compilation for SVG/PDF/PS surface support were +not quite working, make sure that the gjs_cairo_surface_from_XXX +are always available even if cairo doesn't support it so a nice +exception is raised when an application tries to use a surface +which isn't supported in either cairo or gjs. + +Fixes https://bugzilla.gnome.org/show_bug.cgi?id=614055 +--- + modules/cairo-context.c | 4 ++-- + modules/cairo-pdf-surface.c | 11 ++++++++++- + modules/cairo-private.h | 6 +++--- + modules/cairo-ps-surface.c | 11 ++++++++++- + modules/cairo-svg-surface.c | 11 ++++++++++- + 5 files changed, 35 insertions(+), 8 deletions(-) + +diff --git a/modules/cairo-context.c b/modules/cairo-context.c +index 49e86e5..aff594a 100644 +--- a/modules/cairo-context.c ++++ b/modules/cairo-context.c +@@ -648,7 +648,7 @@ getTarget_func(JSContext *context, + /* surface belongs to the context, so keep the reference */ + surface_wrapper = gjs_cairo_surface_from_surface(context, surface); + if (!surface_wrapper) { +- gjs_throw(context, "failed to create surface"); ++ /* exception already set */ + return JS_FALSE; + } + +@@ -681,7 +681,7 @@ getGroupTarget_func(JSContext *context, + /* surface belongs to the context, so keep the reference */ + surface_wrapper = gjs_cairo_surface_from_surface(context, surface); + if (!surface_wrapper) { +- gjs_throw(context, "failed to create surface"); ++ /* exception already set */ + return JS_FALSE; + } + +diff --git a/modules/cairo-pdf-surface.c b/modules/cairo-pdf-surface.c +index 081c410..73df854 100644 +--- a/modules/cairo-pdf-surface.c ++++ b/modules/cairo-pdf-surface.c +@@ -101,5 +101,14 @@ gjs_cairo_pdf_surface_from_surface(JSContext *context, + + return object; + } +- ++#else ++JSObject * ++gjs_cairo_pdf_surface_from_surface(JSContext *context, ++ cairo_surface_t *surface) ++{ ++ gjs_throw(context, ++ "could not create PDF surface, recompile cairo and gjs with " ++ "PDF support."); ++ return NULL; ++} + #endif /* CAIRO_HAS_PDF_SURFACE */ +diff --git a/modules/cairo-private.h b/modules/cairo-private.h +index 2474d8a..9d5948d 100644 +--- a/modules/cairo-private.h ++++ b/modules/cairo-private.h +@@ -73,9 +73,9 @@ jsval gjs_cairo_ps_surface_create_proto (JSContext *contex + JSObject *module, + const char *proto_name, + JSObject *parent); ++#endif + JSObject * gjs_cairo_ps_surface_from_surface (JSContext *context, + cairo_surface_t *surface); +-#endif + + /* pdf surface */ + #ifdef CAIRO_HAS_PDF_SURFACE +@@ -83,9 +83,9 @@ jsval gjs_cairo_pdf_surface_create_proto (JSContext *contex + JSObject *module, + const char *proto_name, + JSObject *parent); ++#endif + JSObject * gjs_cairo_pdf_surface_from_surface (JSContext *context, + cairo_surface_t *surface); +-#endif + + /* svg surface */ + #ifdef CAIRO_HAS_SVG_SURFACE +@@ -93,9 +93,9 @@ jsval gjs_cairo_svg_surface_create_proto (JSContext *contex + JSObject *module, + const char *proto_name, + JSObject *parent); ++#endif + JSObject * gjs_cairo_svg_surface_from_surface (JSContext *context, + cairo_surface_t *surface); +-#endif + + /* pattern */ + jsval gjs_cairo_pattern_create_proto (JSContext *context, +diff --git a/modules/cairo-ps-surface.c b/modules/cairo-ps-surface.c +index 87f6301..014ddab 100644 +--- a/modules/cairo-ps-surface.c ++++ b/modules/cairo-ps-surface.c +@@ -110,5 +110,14 @@ gjs_cairo_ps_surface_from_surface(JSContext *context, + + return object; + } +- ++#else ++JSObject * ++gjs_cairo_ps_surface_from_surface(JSContext *context, ++ cairo_surface_t *surface) ++{ ++ gjs_throw(context, ++ "could not create PS surface, recompile cairo and gjs with " ++ "PS support."); ++ return NULL; ++} + #endif /* CAIRO_HAS_PS_SURFACE */ +diff --git a/modules/cairo-svg-surface.c b/modules/cairo-svg-surface.c +index 21365ca..9a96065 100644 +--- a/modules/cairo-svg-surface.c ++++ b/modules/cairo-svg-surface.c +@@ -101,5 +101,14 @@ gjs_cairo_svg_surface_from_surface(JSContext *context, + + return object; + } +- ++#else ++JSObject * ++gjs_cairo_svg_surface_from_surface(JSContext *context, ++ cairo_surface_t *surface) ++{ ++ gjs_throw(context, ++ "could not create SVG surface, recompile cairo and gjs with " ++ "SVG support."); ++ return NULL; ++} + #endif /* CAIRO_HAS_SVG_SURFACE */ +-- +1.6.6.1 _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git