diff --git a/0001-Fix-compilation-of-GTK-theme-engine-for-GTK-3.0.patch b/0001-Fix-compilation-of-GTK-theme-engine-for-GTK-3.0.patch new file mode 100644 index 0000000..6ce19d7 --- /dev/null +++ b/0001-Fix-compilation-of-GTK-theme-engine-for-GTK-3.0.patch @@ -0,0 +1,43 @@ +From 0cc1279c5033a30cb715735fab0af54813b11c45 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Fri, 11 Jun 2010 14:02:49 +0100 +Subject: [PATCH] Fix compilation of GTK+ theme engine for GTK+ 3.0 + +->draw_string() has been removed in GTK+ 3.x. +--- + gtk-engine/svg-draw.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/gtk-engine/svg-draw.c b/gtk-engine/svg-draw.c +index 3602a9b..8363546 100644 +--- a/gtk-engine/svg-draw.c ++++ b/gtk-engine/svg-draw.c +@@ -583,6 +583,7 @@ draw_diamond (GtkStyle *style, + x, y, width, height); + } + ++#if ! (GTK_CHECK_VERSION(2,90,0)) + static void + draw_string (GtkStyle * style, + GdkWindow * window, +@@ -624,6 +625,7 @@ draw_string (GtkStyle * style, + gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL); + } + } ++#endif /* ! (GTK_CHECK_VERSION(2,90,0)) */ + + static void + draw_box (GtkStyle *style, +@@ -1024,7 +1026,9 @@ rsvg_style_class_init (RsvgStyleClass *klass) + style_class->draw_shadow = draw_shadow; + style_class->draw_arrow = draw_arrow; + style_class->draw_diamond = draw_diamond; ++#if ! (GTK_CHECK_VERSION(2,90,0)) + style_class->draw_string = draw_string; ++#endif + style_class->draw_box = draw_box; + style_class->draw_flat_box = draw_flat_box; + style_class->draw_check = draw_check; +-- +1.7.0.1 + diff --git a/gtk3-port.patch b/gtk3-port.patch new file mode 100644 index 0000000..51c815e --- /dev/null +++ b/gtk3-port.patch @@ -0,0 +1,477 @@ +diff -upr librsvg-2.26.3/configure.in librsvg-2.26.3.new/configure.in +--- librsvg-2.26.3/configure.in 2010-04-29 12:28:16.000000000 +0100 ++++ librsvg-2.26.3.new/configure.in 2010-06-11 13:08:36.000000000 +0100 +@@ -1,10 +1,23 @@ +-AC_INIT(rsvg.h) ++m4_define([rsvg_major_version],[2]) ++m4_define([rsvg_minor_version],[26]) ++m4_define([rsvg_micro_version],[4]) ++m4_define([rsvg_extra_version],[]) ++m4_define([rsvg_version],[rsvg_major_version.rsvg_minor_version.rsvg_micro_version()rsvg_extra_version]) ++m4_define([rsvg_lt_version_info],m4_eval(rsvg_major_version + rsvg_minor_version):rsvg_micro_version:rsvg_minor_version) ++ ++AC_INIT([RSVG],[rsvg_version],[https://bugzilla.gnome.org/enter_bug.cgi?product=librsvg],[rsvg]) ++ ++AC_CONFIG_HEADERS([config.h]) ++AC_CONFIG_SRCDIR([rsvg.h]) ++ ++AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + ++AM_MAINTAINER_MODE([enable]) ++ + dnl =========================================================================== + + FONTCONFIG_REQUIRED=1.0.1 dnl Same as in Pango, ??? +-GDK_PIXBUF_REQUIRED=1.3.7 + GLIB_REQUIRED=2.12.0 + GIO_REQUIRED=2.15.4 + LIBXML_REQUIRED=2.4.7 +@@ -12,34 +25,50 @@ CAIRO_REQUIRED=1.2.0 + PANGOFT2_REQUIRED=1.2.0 + PANGOCAIRO_REQUIRED=1.10.0 + +-AC_SUBST(GDK_PIXBUF_REQUIRED) +-AC_SUBST(GLIB_REQUIRED) +-AC_SUBST(GIO_REQUIRED) +-AC_SUBST(CAIRO_REQUIRED) +-AC_SUBST(LIBXML_REQUIRED) +-AC_SUBST(PANGOFT2_REQUIRED) ++# =========================================================================== + +-dnl =========================================================================== ++AC_MSG_CHECKING([which gtk+ version to compile against]) ++AC_ARG_WITH([gtk], ++ [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])], ++ [case "$with_gtk" in ++ 2.0|3.0) ;; ++ *) AC_MSG_ERROR([invalid gtk version specified]) ;; ++ esac], ++ [with_gtk=2.0]) ++AC_MSG_RESULT([$with_gtk]) ++ ++case "$with_gtk" in ++ 2.0) RSVG_API_VERSION=2.0 ++ RSVG_API_MAJOR_VERSION=2 ++ GTK_API_VERSION=2.0 ++ GDK_PIXBUF_REQUIRED=1.3.7 ++ GTK_REQUIRED=2.16.0 ++ GTK_X11_REQUIRED=2.0.0 ++ ;; ++ 3.0) RSVG_API_VERSION=3.0 ++ RSVG_API_MAJOR_VERSION=3 ++ GTK_API_VERSION=3.0 ++ GDK_PIXBUF_REQUIRED=2.90.0 ++ GTK_REQUIRED=2.90.0 ++ GTK_X11_REQUIRED=2.90.0 ++ ;; ++esac + +-LIBRSVG_MAJOR_VERSION=2 +-LIBRSVG_MINOR_VERSION=26 +-LIBRSVG_MICRO_VERSION=3 +-AC_SUBST(LIBRSVG_MAJOR_VERSION) +-AC_SUBST(LIBRSVG_MINOR_VERSION) +-AC_SUBST(LIBRSVG_MICRO_VERSION) ++AC_SUBST([RSVG_API_VERSION]) ++AC_SUBST([RSVG_API_MAJOR_VERSION]) ++AC_SUBST([GTK_API_VERSION]) + +-LIBRSVG_VERSION=$LIBRSVG_MAJOR_VERSION.$LIBRSVG_MINOR_VERSION.$LIBRSVG_MICRO_VERSION ++AC_SUBST([RSVG_LT_VERSION_INFO],[rsvg_lt_version_info]) ++AC_SUBST([LIBRSVG_MAJOR_VERSION],[rsvg_major_version]) ++AC_SUBST([LIBRSVG_MINOR_VERSION],[rsvg_minor_version]) ++AC_SUBST([LIBRSVG_MICRO_VERSION],[rsvg_micro_version]) + +-VERSION_INFO=`expr $LIBRSVG_MAJOR_VERSION + $LIBRSVG_MINOR_VERSION`:$LIBRSVG_MICRO_VERSION:$LIBRSVG_MINOR_VERSION +-AC_SUBST(VERSION_INFO) ++AM_CONDITIONAL([GTK_API_VERSION_2],[test "$GTK_API_VERSION" = "2.0"]) ++AM_CONDITIONAL([GTK_API_VERSION_3],[test "$GTK_API_VERSION" = "3.0"]) + + dnl =========================================================================== + +-AM_INIT_AUTOMAKE(librsvg, $LIBRSVG_VERSION) +-AM_CONFIG_HEADER(config.h) +- +-AM_MAINTAINER_MODE +- ++AC_PROG_LN_S + AC_ISC_POSIX + AC_PROG_CC + AC_PROG_CPP +@@ -91,7 +120,7 @@ GLIB_MKENUMS=`$PKG_CONFIG --variable=gli + AC_SUBST(GLIB_MKENUMS) + + PKG_CHECK_MODULES(LIBRSVG, \ +- gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED \ ++ gdk-pixbuf-$GTK_API_VERSION >= $GDK_PIXBUF_REQUIRED \ + glib-2.0 >= $GLIB_REQUIRED \ + libxml-2.0 >= $LIBXML_REQUIRED \ + pangoft2 >= $PANGOFT2_REQUIRED \ +@@ -216,20 +245,20 @@ else + fi + + have_gtk=no +-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16.0, have_gtk=yes, ++PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED, have_gtk=yes, + have_gtk=no) + + GTK_VERSION= + if test "x$have_gtk" = "xyes"; then +- GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0` ++ GTK_BINARY_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-$GTK_API_VERSION` + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) +-AC_SUBST(GTK_VERSION) ++AC_SUBST(GTK_BINARY_VERSION) + AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = "xyes") + + have_gdk_x11=no +-PKG_CHECK_MODULES(GDK_X11, gdk-x11-2.0 >= 2.0.0, have_gdk_x11=yes, have_gdk_x11=no) ++PKG_CHECK_MODULES(GDK_X11, gdk-x11-$GTK_API_VERSION >= $GTK_X11_REQUIRED, have_gdk_x11=yes, have_gdk_x11=no) + + if test "x$have_gdk_x11" = "xyes"; then + AC_PATH_XTRA +@@ -259,14 +288,17 @@ fi + + AM_CONDITIONAL(ENABLE_GTK_ENGINE, test "x$enable_gtk_theme" = "xyes") + +-AC_PATH_PROG(QUERYLOADERS, gdk-pixbuf-query-loaders, true) ++case "$with_gtk" in ++ 2.0) AC_PATH_PROG([GDK_PIXBUF_QUERYLOADERS],[gdk-pixbuf-query-loaders],[true]) ;; ++ 3.0) AC_PATH_PROG([GDK_PIXBUF_QUERYLOADERS],[gdk-pixbuf-query-loaders-3],[true]) ;; ++esac + + AC_ARG_ENABLE(pixbuf-loader, + [ --enable-pixbuf-loader Enable a RSVG based GdkPixbuf loader [default=auto]], + enable_pixbuf_loader="$enableval", enable_pixbuf_loader=auto) + + if test "x$enable_pixbuf_loader" = xauto ; then +- if test x$QUERYLOADERS != x ; then ++ if test "x$GDK_PIXBUF_QUERYLOADERS" != x ; then + enable_pixbuf_loader=yes + else + enable_pixbuf_loader=no +@@ -325,15 +357,11 @@ AC_CONFIG_FILES([ + librsvg.spec + librsvg-features.h + Makefile +-librsvg-2.0.pc +-librsvg-2.0-uninstalled.pc + librsvg-zip +-rsvg + data/Makefile + gtk-engine/Makefile + gtk-engine/examples/Makefile + gtk-engine/examples/bubble/Makefile +-gtk-engine/examples/bubble/gtk-2.0/Makefile + gdk-pixbuf-loader/Makefile + tests/Makefile + tests/pdiff/Makefile +@@ -341,11 +369,18 @@ tools/Makefile + doc/Makefile + ]) + ++AC_CONFIG_FILES([librsvg-${RSVG_API_VERSION}.pc:librsvg.pc.in],[RSVG_API_VERSION=$RSVG_API_VERSION]) ++AC_CONFIG_FILES([librsvg-${RSVG_API_VERSION}-uninstalled.pc:librsvg-uninstalled.pc.in],[RSVG_API_VERSION=$RSVG_API_VERSION]) ++ ++if test "$with_gtk" = "2.0"; then ++ AC_CONFIG_FILES([rsvg]) ++fi ++ + AC_OUTPUT + + dnl ============================================================================================= + echo " +-librsvg-$LIBRSVG_VERSION ++librsvg-$VERSION for gtk+-$GTK_API_VERSION + + prefix: ${prefix} + compiler: ${CC} +diff -upr librsvg-2.26.3/doc/Makefile.am librsvg-2.26.3.new/doc/Makefile.am +--- librsvg-2.26.3/doc/Makefile.am 2010-04-14 04:31:39.000000000 +0100 ++++ librsvg-2.26.3.new/doc/Makefile.am 2010-06-11 13:05:42.000000000 +0100 +@@ -3,6 +3,9 @@ + # The name of the module. + DOC_MODULE=rsvg + ++# Uncomment for versioned docs and specify the version of the module, e.g. '2'. ++DOC_MODULE_VERSION = $(RSVG_API_VERSION) ++ + # The top-level SGML file. + DOC_MAIN_SGML_FILE=rsvg-docs.sgml + +@@ -57,7 +60,7 @@ extra_files= + # if $(DOC_MODULE).types is non-empty. + GTKDOC_CFLAGS = -I$(top_srcdir) $(LIBRSVG_CFLAGS) + +-GTKDOC_LIBS = $(top_builddir)/librsvg-2.la $(LIBRSVG_LIBS) ++GTKDOC_LIBS = $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la $(LIBRSVG_LIBS) + + if GTK_DOC_INSTALLED + include $(top_srcdir)/gtk-doc.make +diff -upr librsvg-2.26.3/gdk-pixbuf-loader/Makefile.am librsvg-2.26.3.new/gdk-pixbuf-loader/Makefile.am +--- librsvg-2.26.3/gdk-pixbuf-loader/Makefile.am 2010-04-14 04:31:39.000000000 +0100 ++++ librsvg-2.26.3.new/gdk-pixbuf-loader/Makefile.am 2010-06-11 13:05:42.000000000 +0100 +@@ -1,5 +1,4 @@ +- +-loaderdir = $(libdir)/gtk-2.0/$(GTK_VERSION)/loaders ++loaderdir = $(libdir)/gtk-$(GTK_API_VERSION)/$(GTK_BINARY_VERSION)/loaders + + if PLATFORM_WIN32 + no_undefined = -no-undefined +@@ -21,7 +20,7 @@ endif + svg_loader_la_SOURCES = io-svg.c + svg_loader_la_LDFLAGS = -avoid-version -module $(no_undefined) + svg_loader_la_LIBADD = \ +- $(top_builddir)/librsvg-2.la \ ++ $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la \ + $(LIBRSVG_LIBS) \ + $(LIBGSF_LIBS) $(LIBCROCO_LIBS) + +@@ -29,7 +28,7 @@ loader_LTLIBRARIES = $(target_pixbuf_loa + + install-data-hook: + if [ -z "$(DESTDIR)" ] ; then \ +- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \ +- $(QUERYLOADERS) > $(DESTDIR)$(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders ; \ ++ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-$(GTK_API_VERSION) ; \ ++ $(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(sysconfdir)/gtk-$(GTK_API_VERSION)/gdk-pixbuf.loaders ; \ + fi + +diff -upr librsvg-2.26.3/gtk-engine/examples/bubble/Makefile.am librsvg-2.26.3.new/gtk-engine/examples/bubble/Makefile.am +--- librsvg-2.26.3/gtk-engine/examples/bubble/Makefile.am 2010-03-19 00:06:24.000000000 +0000 ++++ librsvg-2.26.3.new/gtk-engine/examples/bubble/Makefile.am 2010-06-11 13:05:42.000000000 +0100 +@@ -1,4 +1,12 @@ +-SUBDIRS=gtk-2.0 ++themedir = $(datadir)/themes/bubble/gtk-$(GTK_API_VERSION) ++theme_DATA = \ ++ gtkrc \ ++ blue.svg \ ++ green.svg \ ++ orange.svg \ ++ purple.svg \ ++ red.svg + +-themedir = $(datadir)/themes/bubble +-theme_DATA = README ++EXTRA_DIST = \ ++ $(theme_DATA) \ ++ README +diff -upr librsvg-2.26.3/gtk-engine/Makefile.am librsvg-2.26.3.new/gtk-engine/Makefile.am +--- librsvg-2.26.3/gtk-engine/Makefile.am 2010-04-14 04:31:39.000000000 +0100 ++++ librsvg-2.26.3.new/gtk-engine/Makefile.am 2010-06-11 13:05:42.000000000 +0100 +@@ -6,7 +6,7 @@ endif + + INCLUDES = -I$(top_srcdir) $(GTK_CFLAGS) $(LIBGSF_CFLAGS) $(LIBCROCO_CFLAGS) $(LIBRSVG_CFLAGS) + +-enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines ++enginedir = $(libdir)/gtk-$(GTK_API_VERSION)/$(GTK_BINARY_VERSION)/engines + themedir = $(datadir)/themes + + if ENABLE_GTK_ENGINE +@@ -29,6 +29,6 @@ libsvg_la_SOURCES = \ + svg.h + + libsvg_la_LDFLAGS = -avoid-version -module $(no_undefined) +-libsvg_la_LIBADD = $(top_builddir)/librsvg-2.la $(GTK_LIBS) $(LIBRSVG_LIBS) $(LIBCROCO_LIBS) ++libsvg_la_LIBADD = $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la $(GTK_LIBS) $(LIBRSVG_LIBS) $(LIBCROCO_LIBS) + + EXTRA_DIST = $(libsvg_la_SOURCES) +diff -upr librsvg-2.26.3/Makefile.am librsvg-2.26.3.new/Makefile.am +--- librsvg-2.26.3/Makefile.am 2010-04-30 12:45:33.000000000 +0100 ++++ librsvg-2.26.3.new/Makefile.am 2010-06-11 13:05:42.000000000 +0100 +@@ -1,15 +1,11 @@ +-if HAVE_GTK +-target_rsvg_view = rsvg-view +-else +-target_rsvg_view = +-endif +- + SUBDIRS = . gdk-pixbuf-loader gtk-engine data tests tools doc + +-lib_LTLIBRARIES = librsvg-2.la +-bin_PROGRAMS = rsvg-convert $(target_rsvg_view) ++lib_LTLIBRARIES = librsvg-@RSVG_API_MAJOR_VERSION@.la + +-man_MANS = rsvg.1 ++bin_PROGRAMS = rsvg-convert-@RSVG_API_MAJOR_VERSION@ ++if HAVE_GTK ++bin_PROGRAMS += rsvg-view-@RSVG_API_MAJOR_VERSION@ ++endif + + if OS_WIN32 + else +@@ -24,7 +20,7 @@ enum_sources = \ + librsvg-enum-types.h \ + librsvg-enum-types.c + +-librsvg_2_la_SOURCES = \ ++librsvg_@RSVG_API_MAJOR_VERSION@_la_SOURCES = \ + rsvg-affine.c \ + librsvg-features.c \ + rsvg-bpath-util.c \ +@@ -68,10 +64,10 @@ librsvg_2_la_SOURCES = \ + rsvg-gobject.c \ + rsvg-file-util.c + +-librsvg_2_la_LDFLAGS = -version-info @VERSION_INFO@ -export-dynamic -no-undefined -export-symbols $(srcdir)/librsvg.def +-librsvg_2_la_LIBADD = $(LIBGSF_LIBS) $(LIBCROCO_LIBS) $(LIBRSVG_LIBS) -lm ++librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS = -version-info @RSVG_LT_VERSION_INFO@ -export-dynamic -no-undefined -export-symbols $(srcdir)/librsvg.def ++librsvg_@RSVG_API_MAJOR_VERSION@_la_LIBADD = $(LIBGSF_LIBS) $(LIBCROCO_LIBS) $(LIBRSVG_LIBS) -lm + +-librsvgincdir = $(includedir)/librsvg-2/librsvg ++librsvgincdir = $(includedir)/librsvg-$(RSVG_API_VERSION)/librsvg + librsvginc_HEADERS = \ + $(headers) \ + librsvg-features.h \ +@@ -88,26 +84,29 @@ INCLUDES = \ + -DG_LOG_DOMAIN=\"librsvg\" \ + -DLIBRSVG_DATADIR="\"$(datadir)\"" + +-DEPS = $(top_builddir)/librsvg-2.la ++DEPS = $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la + LDADDS = \ + $(LIBGSF_LIBS) \ + $(GLIB_LIBS) \ + $(LIBCROCO_LIBS) \ + $(LIBRSVG_LIBS) \ +- $(top_builddir)/librsvg-2.la ++ $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la + +-bin_SCRIPTS=rsvg ++if GTK_API_VERSION_2 ++nodist_bin_SCRIPTS = rsvg ++man_MANS = rsvg.1 ++endif + +-rsvg_convert_SOURCES=rsvg-convert.c +-rsvg_convert_LDFLAGS = +-rsvg_convert_DEPENDENCIES = $(DEPS) +-rsvg_convert_LDADD = $(LDADDS) $(libm) ++rsvg_convert_@RSVG_API_MAJOR_VERSION@_SOURCES=rsvg-convert.c ++rsvg_convert_@RSVG_API_MAJOR_VERSION@_LDFLAGS = ++rsvg_convert_@RSVG_API_MAJOR_VERSION@_DEPENDENCIES = $(DEPS) ++rsvg_convert_@RSVG_API_MAJOR_VERSION@_LDADD = $(LDADDS) $(libm) + +-rsvg_view_SOURCES = \ ++rsvg_view_@RSVG_API_MAJOR_VERSION@_SOURCES = \ + test-display.c +-rsvg_view_LDFLAGS = +-rsvg_view_DEPENDENCIES = $(DEPS) +-rsvg_view_LDADD = $(GTK_LIBS) $(GDK_X11_LIBS) $(libm) $(LDADDS) ++rsvg_view_@RSVG_API_MAJOR_VERSION@_LDFLAGS = ++rsvg_view_@RSVG_API_MAJOR_VERSION@_DEPENDENCIES = $(DEPS) ++rsvg_view_@RSVG_API_MAJOR_VERSION@_LDADD = $(GTK_LIBS) $(GDK_X11_LIBS) $(libm) $(LDADDS) + + EXTRA_DIST = \ + MAINTAINERS \ +@@ -116,13 +115,10 @@ EXTRA_DIST = \ + TODO \ + COPYING.LIB \ + librsvg.spec.in \ +- librsvg-2.0.pc.in \ +- librsvg-2.0-uninstalled.pc.in \ + librsvg-zip.in \ + rsvg.in \ + librsvg.def \ + $(man_MANS) \ +- $(rsvg_view_SOURCES) \ + gtk-doc.make + + CLEANFILES = \ +@@ -133,7 +129,7 @@ CLEANFILES = \ + ## `install-exec', not `install-data'. + + pkgconfigdir = $(libdir)/pkgconfig +-pkgconfig_DATA = librsvg-2.0.pc ++pkgconfig_DATA = librsvg-$(RSVG_API_VERSION).pc + + dist-hook: librsvg.spec + cp librsvg.spec $(distdir) +@@ -142,7 +138,7 @@ librsvg-enum-types.h: s-enum-types-h + @true + + s-enum-types-h: $(headers) Makefile +- ( cd $(srcdir) && $(GLIB_MKENUMS) \ ++ $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \ + --fhead "#ifndef __LIBRSVG_ENUM_TYPES_H__\n#define __LIBRSVG_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ + --fprod "/* enumerations from \"@filename@\" */\n" \ + --vhead "GType @enum_name@_get_type (void);\n#define RSVG_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ +@@ -156,7 +152,7 @@ librsvg-enum-types.c: s-enum-types-c lib + @true + + s-enum-types-c: $(headers) Makefile +- ( cd $(srcdir) && $(GLIB_MKENUMS) \ ++ $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \ + --fhead "#include \"librsvg-enum-types.h\"\n#include \"rsvg.h\"" \ + --fprod "\n/* enumerations from \"@filename@\" */" \ + --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ +@@ -168,3 +164,9 @@ s-enum-types-c: $(headers) Makefile + && echo timestamp > $(@F) + + DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc ++ ++if GTK_API_VERSION_2 ++install-exec-hook: ++ (cd $(DESTDIR)$(bindir) && $(LN_S) rsvg-convert-2 rsvg-convert) ++ (cd $(DESTDIR)$(bindir) && $(LN_S) rsvg-view-2 rsvg-view) ++endif +diff -upr librsvg-2.26.3/tests/Makefile.am librsvg-2.26.3.new/tests/Makefile.am +--- librsvg-2.26.3/tests/Makefile.am 2010-05-01 02:15:48.000000000 +0100 ++++ librsvg-2.26.3.new/tests/Makefile.am 2010-06-11 13:05:49.000000000 +0100 +@@ -8,7 +8,7 @@ TESTS = \ + noinst_LTLIBRARIES = \ + libtest-utils.la + +-LDADD = $(top_builddir)/librsvg-2.la \ ++LDADD = $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la \ + $(top_builddir)/tests/libtest-utils.la \ + $(top_builddir)/tests/pdiff/libpdiff.la + +diff -upr librsvg-2.26.3/tools/Makefile.am librsvg-2.26.3.new/tools/Makefile.am +--- librsvg-2.26.3/tools/Makefile.am 2010-04-29 12:28:16.000000000 +0100 ++++ librsvg-2.26.3.new/tools/Makefile.am 2010-06-11 13:06:52.000000000 +0100 +@@ -13,13 +13,13 @@ INCLUDES = \ + -DG_LOG_DOMAIN=\"librsvg\" \ + -DLIBRSVG_DATADIR="\"$(datadir)\"" + +-DEPS = $(top_builddir)/librsvg-2.la ++DEPS = $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la + LDADDS = \ + $(LIBGSF_LIBS) \ + $(GLIB_LIBS) \ + $(LIBCROCO_LIBS) \ + $(LIBRSVG_LIBS) \ +- $(top_builddir)/librsvg-2.la ++ $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la + + test_performance_SOURCES = test-performance.c + test_performance_LDFLAGS = +diff -upr a/librsvg-2.0.pc.in b/librsvg-2.0.pc.in +--- a/librsvg-2.0.pc.in 2010-04-29 12:28:16.000000000 +0100 ++++ b/librsvg-2.0.pc.in 2010-06-11 13:06:52.000000000 +0100 +@@ -9,7 +9,7 @@ css_supported=@CSS_SUPPORTED@ + Name: librsvg + Description: library that renders svg files + Version: @VERSION@ +-Requires: glib-2.0 gdk-pixbuf-2.0 cairo ++Requires: glib-2.0 gdk-pixbuf-@GTK_API_VERSION@ cairo + Requires.private: +-Libs: -L${libdir} -lrsvg-2 -lm +-Cflags: -I${includedir}/librsvg-2 ++Libs: -L${libdir} -lrsvg-@RSVG_API_MAJOR_VERSION@ -lm ++Cflags: -I${includedir}/librsvg-@RSVG_API_VERSION@ +diff --git a/librsvg-2.0-uninstalled.pc.in b/librsvg-2.0-uninstalled.pc.in +--- a/librsvg-2.0-uninstalled.pc.in ++++ b/librsvg-2.0-uninstalled.pc.in +@@ -9,6 +9,6 @@ css_supported=@CSS_SUPPORTED@ + Name: librsvg + Description: library that renders svg files + Version: @VERSION@ +-Requires: glib-2.0 gdk-pixbuf-2.0 +-Libs: ${pc_top_builddir}/${pcfiledir}/librsvg-2.la ++Requires: glib-2.0 gdk-pixbuf-@GTK_API_VERSION@ ++Libs: ${pc_top_builddir}/${pcfiledir}/librsvg-@RSVG_API_MAJOR_VERSION@.la + Cflags: -I${pc_top_builddir}/${pcfiledir} diff --git a/librsvg2.spec b/librsvg2.spec index 10d3496..23f9e77 100644 --- a/librsvg2.spec +++ b/librsvg2.spec @@ -2,6 +2,7 @@ %define libxml2_version 2.4.12 %define gtk2_version 2.9.0 +%define gtk3_version 2.90.0 %define glib2_version 2.15.4 %define freetype_version 2.0.1 %define cairo_version 1.1.2 @@ -13,7 +14,7 @@ Name: librsvg2 Summary: An SVG library based on cairo Version: 2.26.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: System Environment/Libraries @@ -40,6 +41,11 @@ BuildRequires: libgsf-devel >= %{libgsf_version} # grr, librsvg does not install api docs if --disable-gtk-doc BuildRequires: gtk-doc +# https://bugzilla.gnome.org/show_bug.cgi?id=618475 +BuildRequires: automake autoconf libtool intltool gnome-common +Patch0: gtk3-port.patch +Patch1: 0001-Fix-compilation-of-GTK-theme-engine-for-GTK-3.0.patch + %description An SVG library based on cairo. @@ -59,29 +65,83 @@ Requires: pkgconfig This package provides the necessary development libraries and include files to allow you to develop with librsvg. +%package -n librsvg3 +Summary: An SVG library based on cairo +Group: Development/Libraries +Requires: gtk3 >= %{gtk3_version} +Requires: libxml2 >= %{libxml2_version} +Requires: freetype >= %{freetype_version} +Requires: cairo >= %{cairo_version} +Requires: libgsf >= %{libgsf_version} +Requires(post): gtk3 >= %{gtk3_version} +Requires(postun): gtk3 >= %{gtk3_version} + +%description -n librsvg3 +An SVG library based on cairo. This version is linked against +libraries from the GTK+ 3.x series. + +%package -n librsvg3-devel +Summary: Libraries and include files for developing with librsvg3 +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: gtk3-devel >= %{gtk2_version} +Requires: libxml2-devel >= %{libxml2_version} +Requires: freetype-devel >= %{freetype_version} +Requires: libgsf-devel >= %{libgsf_version} +Requires: libcroco-devel >= %{libcroco_version} +Requires: pkgconfig + +%description -n librsvg3-devel +This package provides the necessary development libraries and include +files to allow you to develop with librsvg3. + %prep -%setup -q -n librsvg-%{version} +%setup -q -n librsvg-%{version} -c +pushd librsvg-%{version} +%patch0 -p1 -b .gtk3 +%patch1 -p1 -b .gtk3-build +mv librsvg-2.0.pc.in librsvg.pc.in +mv librsvg-2.0-uninstalled.pc.in librsvg-uninstalled.pc.in +popd + +cp -a librsvg-%{version} gtk3 +mv librsvg-%{version} gtk2 %build +pushd gtk2 +libtoolize -f +autoreconf -f %configure --with-svgz \ --disable-gtk-doc \ --enable-gtk-theme \ --with-croco \ + --with-gtk=2.0 -make +make %{?_smp_mflags} +popd + +pushd gtk3 +libtoolize -f +autoreconf -f +%configure --with-svgz \ + --disable-gtk-doc \ + --enable-gtk-theme \ + --with-croco \ + --with-gtk=3.0 + +make %{?_smp_mflags} +popd %install -rm -rf $RPM_BUILD_ROOT +pushd gtk3 make install DESTDIR=$RPM_BUILD_ROOT -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/engines/libsvg.a -rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/engines/libsvg.la -rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/loaders/svg_loader.a -rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/*/loaders/svg_loader.la -rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/libmozsvgdec.a -rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/libmozsvgdec.la -rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/libmozsvgdec.so +popd +pushd gtk2 +make install DESTDIR=$RPM_BUILD_ROOT +popd +rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-?.0/*/{engines,loaders}/*.{a,la} +rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/gtk-2.0/gdk-pixbuf.loaders rm -f $RPM_BUILD_ROOT%{_datadir}/pixmaps/svg-viewer.svg @@ -98,8 +158,8 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) -%doc AUTHORS COPYING COPYING.LIB NEWS README -%{_libdir}/*.so.* +%doc gtk2/AUTHORS gtk2/COPYING gtk2/COPYING.LIB gtk2/NEWS gtk2/README +%{_libdir}/librsvg-2.so.* %{_libdir}/gtk-2.0/*/engines/libsvg.so %{_libdir}/gtk-2.0/*/loaders/svg_loader.so %{_bindir}/rsvg @@ -109,12 +169,28 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-, root, root) -%{_libdir}/*.so -%{_includedir}/librsvg-2 +%{_libdir}/librsvg-2.so +%{_includedir}/librsvg-2.0 %{_libdir}/pkgconfig/librsvg-2.0.pc -%doc %{_datadir}/gtk-doc/html/rsvg +%doc %{_datadir}/gtk-doc/html/rsvg-2.0 + +%files -n librsvg3 +%defattr(-, root, root) +%{_libdir}/librsvg-3.so.* +%{_libdir}/gtk-3.0/*/engines/libsvg.so +%{_libdir}/gtk-3.0/*/loaders/svg_loader.so + +%files -n librsvg3-devel +%defattr(-, root, root) +%{_libdir}/librsvg-3.so +%{_includedir}/librsvg-3.0 +%{_libdir}/pkgconfig/librsvg-3.0.pc +%doc %{_datadir}/gtk-doc/html/rsvg-3.0 %changelog +* Fri Jun 11 2010 Bastien Nocera 2.26.3-2 +- Add GTK3 port of the libraries + * Sat May 1 2010 Matthias Clasen - 2.26.3-1 - Update to 2.26.3