rpms/libgsf/devel libgsf.gnomeXXXXX.gdk-pixbuf.patch, NONE, 1.1 libgsf.spec, 1.72, 1.73
Caolan McNamara
caolanm at fedoraproject.org
Mon Sep 7 09:58:37 UTC 2009
- Previous message (by thread): rpms/cluttermm/devel cluttermm-0.9.4-wrapinit.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 cluttermm.spec, 1.8, 1.9 sources, 1.6, 1.7
- Next message (by thread): rpms/libgsf/devel libgsf.gnome594359.gdk-pixbuf.patch, NONE, 1.1 libgsf.spec, 1.73, 1.74 libgsf.gnomeXXXXX.gdk-pixbuf.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: caolanm
Update of /cvs/pkgs/rpms/libgsf/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv796
Modified Files:
libgsf.spec
Added Files:
libgsf.gnomeXXXXX.gdk-pixbuf.patch
Log Message:
Resolves: rhbz#521513 try gdk-pixbuf before ImageMagick convert
libgsf.gnomeXXXXX.gdk-pixbuf.patch:
configure.in | 22 ++++++++++++++++++++++
gsf-config.h.in | 3 +++
thumbnailer/Makefile.am | 4 ++--
thumbnailer/main.c | 19 +++++++++++++++++++
4 files changed, 46 insertions(+), 2 deletions(-)
--- NEW FILE libgsf.gnomeXXXXX.gdk-pixbuf.patch ---
diff -ru libgsf-1.14.15.ori/configure.in libgsf-1.14.15/configure.in
--- libgsf-1.14.15.ori/configure.in 2009-09-07 09:24:35.000000000 +0100
+++ libgsf-1.14.15/configure.in 2009-09-07 10:30:22.000000000 +0100
@@ -468,6 +468,28 @@
fi
AC_SUBST(BONOBO_REQ)
+want_gdk_pixbuf=no
+dnl check for gdk_pixbuf
+AC_ARG_WITH(gdk_pixbuf,
+ AC_HELP_STRING([--without-gdk-pixbuf],[disable the use of gdk-pixbuf]),
+ [case "${withval}" in
+ yes) want_gdk_pixbuf=yes ;;
+ no) want_gdk_pixbuf=no ;;
+ *) AC_MSG_ERROR(bad value ${withval} for --with-gdk-pixbuf) ;;
+ esac],
+ [want_gdk_pixbuf=auto]) dnl Default value
+
+if test $want_gdk_pixbuf = no ; then
+ AC_MSG_WARN([gdk-pixbuf support disabled, as requested (Use --with-gdk-pixbuf to enable)])
+else
+ PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0,
+ [AC_DEFINE(HAVE_GDK_PIXBUF, 1, [Define if gdk-pixbuf is available])],
+ [if test $want_gdk_pixbuf = yes; then
+ AC_MSG_ERROR([gdk-pixbuf support requested, but not available.])
+ else
+ AC_MSG_WARN([gdk-pixbuf support disabled, unable to find required version])
+ fi])
+fi
have_gnome=no
if test $want_gnome = no ; then
diff -ru libgsf-1.14.15.ori/gsf-config.h.in libgsf-1.14.15/gsf-config.h.in
--- libgsf-1.14.15.ori/gsf-config.h.in 2009-09-07 09:24:35.000000000 +0100
+++ libgsf-1.14.15/gsf-config.h.in 2009-09-07 10:32:10.000000000 +0100
@@ -30,6 +30,9 @@
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
+/* Define if gdk-pixbuf is available */
+#undef HAVE_GDK_PIXBUF
+
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
diff -ru libgsf-1.14.15.ori/thumbnailer/main.c libgsf-1.14.15/thumbnailer/main.c
--- libgsf-1.14.15.ori/thumbnailer/main.c 2009-09-07 09:24:35.000000000 +0100
+++ libgsf-1.14.15/thumbnailer/main.c 2009-09-07 10:33:13.000000000 +0100
@@ -32,6 +32,11 @@
#include <stdlib.h>
#include <unistd.h>
#include <glib.h>
+#include <gsf-config.h>
+
+#ifdef HAVE_GDK_PIXBUF
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
#ifdef HAVE_SETRLIMI
#include <sys/resource.h>
@@ -62,6 +67,20 @@
GError *error;
gint exit_status;
+#ifdef HAVE_GDK_PIXBUF
+ GdkPixbuf* pixbuf;
+
+ pixbuf = gdk_pixbuf_new_from_file_at_scale (in_filename, thumb_size, thumb_size,
+ TRUE, NULL);
+ if (pixbuf)
+ {
+ gboolean success = gdk_pixbuf_save (pixbuf, out_filename, "png", NULL, NULL);
+ g_object_unref (pixbuf);
+ if (success)
+ return;
+ }
+#endif
+
in_quote = g_shell_quote (in_filename);
out_quote = g_shell_quote (out_filename);
cmd_line = g_strdup_printf ("convert %s +matte -thumbnail %dx%d png:%s",
diff -ru libgsf-1.14.15.ori/thumbnailer/Makefile.am libgsf-1.14.15/thumbnailer/Makefile.am
--- libgsf-1.14.15.ori/thumbnailer/Makefile.am 2009-09-07 09:24:35.000000000 +0100
+++ libgsf-1.14.15/thumbnailer/Makefile.am 2009-09-07 10:33:39.000000000 +0100
@@ -1,7 +1,7 @@
@INTLTOOL_SCHEMAS_RULE@
-AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(LIBXML_CFLAGS)
-LDADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS)
+AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) $(GDK_PIXBUF_CFLAGS) $(LIBXML_CFLAGS)
+LDADD = $(top_builddir)/gsf/libgsf-1.la $(LIBGSF_LIBS) $(GDK_PIXBUF_LIBS)
bin_PROGRAMS = gsf-office-thumbnailer
Index: libgsf.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libgsf/devel/libgsf.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- libgsf.spec 25 Jul 2009 05:50:15 -0000 1.72
+++ libgsf.spec 7 Sep 2009 09:58:37 -0000 1.73
@@ -4,15 +4,16 @@
Summary: GNOME Structured File library
Name: libgsf
Version: 1.14.15
-Release: 3%{?dist}
+Release: 4%{?dist}
Group: System Environment/Libraries
License: LGPLv2
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.14/%{name}-%{version}.tar.bz2
URL: http://www.gnome.org/projects/libgsf/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: glib2-devel, perl-XML-Parser
+BuildRequires: glib2-devel, perl-XML-Parser, autoconf
BuildRequires: libtool, libxml2-devel, glib2-devel, bzip2-devel, gettext
BuildRequires: libbonobo-devel, pygtk2-devel, intltool, gnome-vfs2-devel
+Patch0: libgsf.gnomeXXXXX.gdk-pixbuf.patch
Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2
@@ -58,8 +59,10 @@ Python bindings for libgsf
%prep
%setup -q
+%patch0 -p1 -b .gnomeXXXXX.gdk-pixbuf
%build
+autoreconf
%configure --disable-gtk-doc --disable-static
make %{?_smp_mflags}
@@ -133,6 +136,9 @@ fi
rm -r $RPM_BUILD_ROOT
%changelog
+* Mon Sep 07 2009 Caolán McNamara <caolanm at redhat.com> 1.14.15-4
+- Resolves: rhbz#521513 try gdk-pixbuf before ImageMagick convert
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.14.15-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
- Previous message (by thread): rpms/cluttermm/devel cluttermm-0.9.4-wrapinit.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 cluttermm.spec, 1.8, 1.9 sources, 1.6, 1.7
- Next message (by thread): rpms/libgsf/devel libgsf.gnome594359.gdk-pixbuf.patch, NONE, 1.1 libgsf.spec, 1.73, 1.74 libgsf.gnomeXXXXX.gdk-pixbuf.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list