diff options
-rw-r--r-- | graphics/librsvg2/Makefile | 3 | ||||
-rw-r--r-- | graphics/librsvg2/files/patch-gdk-pixbuf-loader_io-svg.c | 49 |
2 files changed, 51 insertions, 1 deletions
diff --git a/graphics/librsvg2/Makefile b/graphics/librsvg2/Makefile index 3314b02e8..f7d849ad0 100644 --- a/graphics/librsvg2/Makefile +++ b/graphics/librsvg2/Makefile @@ -3,11 +3,12 @@ # Whom: Ade Lovett <ade@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/graphics/librsvg2/Makefile,v 1.59 2005/08/26 05:59:43 mezz Exp $ +# $MCom: ports/graphics/librsvg2/Makefile,v 1.60 2005/08/26 06:06:36 marcus Exp $ # PORTNAME= librsvg2 PORTVERSION= 2.11.0 +PORTREVISION= 1 CATEGORIES= graphics gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.11 diff --git a/graphics/librsvg2/files/patch-gdk-pixbuf-loader_io-svg.c b/graphics/librsvg2/files/patch-gdk-pixbuf-loader_io-svg.c new file mode 100644 index 000000000..c96a594fd --- /dev/null +++ b/graphics/librsvg2/files/patch-gdk-pixbuf-loader_io-svg.c @@ -0,0 +1,49 @@ +=================================================================== +RCS file: /cvs/gnome/librsvg/gdk-pixbuf-loader/io-svg.c,v +retrieving revision 1.26 +retrieving revision 1.26.2.1 +diff -u -r1.26 -r1.26.2.1 +--- gdk-pixbuf-loader/io-svg.c 2005/06/24 12:14:56 1.26 ++++ gdk-pixbuf-loader/io-svg.c 2005/08/27 03:31:44 1.26.2.1 +@@ -191,12 +191,25 @@ + #define GDK_PIXBUF_FORMAT_THREADSAFE (1 << 2) + #endif + ++#ifndef GDK_PIXBUF_CHECK_VERSION ++#define GDK_PIXBUF_CHECK_VERSION(major,minor,micro) \ ++ (GDK_PIXBUF_MAJOR > (major) || \ ++ (GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR > (minor)) || \ ++ (GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR == (minor) && \ ++ GDK_PIXBUF_MICRO >= (micro))) ++#endif ++ + void + fill_info (GdkPixbufFormat *info) + { +- static GdkPixbufModulePattern signature[] = { +- { "<svg", NULL, 100 }, +- { "<!DOCTYPE svg", NULL, 100 }, ++ static GdkPixbufModulePattern signature_old[] = { ++ { (unsigned char*) "<svg", NULL, 100 }, ++ { (unsigned char*) "<!DOCTYPE svg", NULL, 100 }, ++ { NULL, NULL, 0 } ++ }; ++ static GdkPixbufModulePattern signature_new[] = { ++ { (unsigned char*) " <svg", (unsigned char*) "* ", 100 }, ++ { (unsigned char*) " <!DOCTYPE svg", (unsigned char*) "* ", 100 }, + { NULL, NULL, 0 } + }; + static gchar *mime_types[] = { /* yes folks, i actually have run into all of these in the wild... */ +@@ -215,7 +228,11 @@ + }; + + info->name = "svg"; +- info->signature = signature; ++ if (GDK_PIXBUF_CHECK_VERSION (2, 7, 4)) { ++ info->signature = signature_new; ++ } else { ++ info->signature = signature_old; ++ } + info->description = _("Scalable Vector Graphics"); + info->mime_types = mime_types; + info->extensions = extensions; |