summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Perier <mrpouet@gentoo.org>2010-02-08 17:44:16 +0000
committerRomain Perier <mrpouet@gentoo.org>2010-02-08 17:44:16 +0000
commit582d6fc9f9fa192b6a9a45b606ed5b2f378f2d70 (patch)
tree07efb658c4af44ffff80bc517616dfb985d5b082 /gnome-extra/gnome-web-photo
parentAdd the 'opengl' USE flag. (diff)
downloadgentoo-2-582d6fc9f9fa192b6a9a45b606ed5b2f378f2d70.tar.gz
gentoo-2-582d6fc9f9fa192b6a9a45b606ed5b2f378f2d70.tar.bz2
gentoo-2-582d6fc9f9fa192b6a9a45b606ed5b2f378f2d70.zip
Fix compatibility with xulrunner-1.9.2, per bug #303897.
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra/gnome-web-photo')
-rw-r--r--gnome-extra/gnome-web-photo/ChangeLog9
-rw-r--r--gnome-extra/gnome-web-photo/files/gnome-web-photo-0.8-libxul-compat.patch70
-rw-r--r--gnome-extra/gnome-web-photo/gnome-web-photo-0.8-r1.ebuild37
3 files changed, 115 insertions, 1 deletions
diff --git a/gnome-extra/gnome-web-photo/ChangeLog b/gnome-extra/gnome-web-photo/ChangeLog
index 7ee54787fba7..d120a1de13ee 100644
--- a/gnome-extra/gnome-web-photo/ChangeLog
+++ b/gnome-extra/gnome-web-photo/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for gnome-extra/gnome-web-photo
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-web-photo/ChangeLog,v 1.2 2010/01/11 13:53:45 mrpouet Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-web-photo/ChangeLog,v 1.3 2010/02/08 17:44:15 mrpouet Exp $
+
+*gnome-web-photo-0.8-r1 (08 Feb 2010)
+
+ 08 Feb 2010; Romain Perier <mrpouet@gentoo.org>
+ +gnome-web-photo-0.8-r1.ebuild,
+ +files/gnome-web-photo-0.8-libxul-compat.patch:
+ Fix compatibility with xulrunner-1.9.2, per bug #303897.
11 Jan 2010; Romain Perier <mrpouet@gentoo.org>
gnome-web-photo-0.8.ebuild:
diff --git a/gnome-extra/gnome-web-photo/files/gnome-web-photo-0.8-libxul-compat.patch b/gnome-extra/gnome-web-photo/files/gnome-web-photo-0.8-libxul-compat.patch
new file mode 100644
index 000000000000..14833ac679ad
--- /dev/null
+++ b/gnome-extra/gnome-web-photo/files/gnome-web-photo-0.8-libxul-compat.patch
@@ -0,0 +1,70 @@
+From c90a9ed422d683840b59fc50c7d201e63cbd2028 Mon Sep 17 00:00:00 2001
+From: Romain Perier <mrpouet@gentoo.org>
+Date: Mon, 8 Feb 2010 18:27:29 +0100
+Subject: Fix backward compatibility with xulrunner-1.9.2
+
+1)° xulrunner-1.9.2 no longer installs libxul-unstable
+2)° Since 1.9.2 nsIPresShell has an API change (RenderDocument),
+ so we've to check LIBXUL_VERSION
+
+---
+ m4/libxul.m4 | 9 +++++++--
+ src/Makefile.am | 1 +
+ src/Writer.cpp | 8 ++++++--
+ 3 files changed, 14 insertions(+), 4 deletions(-)
+
+--- a/m4/libxul.m4
++++ b/m4/libxul.m4
+@@ -50,7 +50,7 @@ if test "$libxul_cv_have_libxul" != "yes"; then
+ AC_MSG_ERROR([libxul not found])
+ fi
+
+-libxul_cv_version="$($PKG_CONFIG --modversion $libxul_cv_libxul_pkg)"
++libxul_cv_version="$($PKG_CONFIG --modversion $libxul_cv_libxul_pkg | sed 's:\.::g')"
+ libxul_cv_prefix="$($PKG_CONFIG --variable=prefix $libxul_cv_libxul_pkg)"
+ libxul_cv_include_root="$($PKG_CONFIG --variable=includedir $libxul_cv_libxul_pkg)"
+ libxul_cv_sdkdir="$($PKG_CONFIG --variable=sdkdir $libxul_cv_libxul_pkg)"
+@@ -59,7 +59,12 @@ libxul_cv_sdkdir="$($PKG_CONFIG --variable=sdkdir $libxul_cv_libxul_pkg)"
+ # I can figure this out, do it like this:
+ libxul_cv_libdir="$($PKG_CONFIG --variable=sdkdir $libxul_cv_libxul_pkg)/bin"
+
+-libxul_cv_includes="$($PKG_CONFIG --cflags-only-I libxul-unstable libxul)"
++libxul_cv_includes="$($PKG_CONFIG --cflags-only-I libxul)"
++
++# xulrunner-1.9.2 no longer installs libxul-unstable
++if $($PKG_CONFIG --exists libxul-unstable); then
++ libxul_cv_includes+="$($PKG_CONFIG --cflags-only-I libxul-unstable)"
++fi
+
+ AC_DEFINE([HAVE_LIBXUL],[1],[Define for libxul])
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -42,6 +42,7 @@ gnome_web_photo_CPPFLAGS = \
+ -DLOCALEDIR=\"$(datadir)/locale\" \
+ -DGECKO_HOME=\"$(GECKO_HOME)\" \
+ -DGECKO_PREFIX=\"$(GECKO_PREFIX)\" \
++ -DLIBXUL_VERSION=$(LIBXUL_VERSION) \
+ -DXPCOM_GLUE_USE_NSPR \
+ -DXPCOM_GLUE \
+ $(AM_CPPFLAGS)
+--- a/src/Writer.cpp
++++ b/src/Writer.cpp
+@@ -196,9 +196,13 @@ Writer::Write()
+
+ width = NSAppUnitsToIntPixels(cutout.width, p2a);
+ height = NSAppUnitsToIntPixels(cutout.height, p2a);
+-
+- rv = presShell->RenderDocument(cutout, PR_FALSE, PR_TRUE,
++#if LIBXUL_VERSION >= 192
++ rv = presShell->RenderDocument(cutout, nsIPresShell::RENDER_IGNORE_VIEWPORT_SCROLLING,
+ NS_RGB(255, 255, 255), context);
++#else
++ rv = presShell->RenderDocument(cutout, PR_FALSE, PR_TRUE,
++ NS_RGB(255, 255, 255), context);
++#endif
+ if (NS_SUCCEEDED(rv)) {
+ imgContext->DrawSurface(surface, gfxSize(width, height));
+ }
+
+
diff --git a/gnome-extra/gnome-web-photo/gnome-web-photo-0.8-r1.ebuild b/gnome-extra/gnome-web-photo/gnome-web-photo-0.8-r1.ebuild
new file mode 100644
index 000000000000..a04fb8b3d116
--- /dev/null
+++ b/gnome-extra/gnome-web-photo/gnome-web-photo-0.8-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-web-photo/gnome-web-photo-0.8-r1.ebuild,v 1.1 2010/02/08 17:44:15 mrpouet Exp $
+
+inherit autotools gnome2
+
+DESCRIPTION="a tool to generate images and thumbnails from HTML files"
+HOMEPAGE="ftp://ftp.gnome.org/pub/gnome/sources/gnome-web-photo"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="jpeg"
+
+RDEPEND=">=dev-libs/glib-2.6.0
+ >=x11-libs/gtk+-2.6.3
+ >=dev-libs/libxml2-2.6.12
+ >=gnome-base/gnome-vfs-2.9.2
+ media-libs/libpng
+ gnome-base/gconf
+ jpeg? ( media-libs/jpeg )
+ net-libs/xulrunner"
+DEPEND="${RDEPEND}
+ >=dev-util/pkgconfig-0.19"
+
+DOCS="AUTHORS ChangeLog HACKING NEWS README TODO"
+
+pkg_setup() {
+ G2CONF="${G2CONF} $(use_enable jpeg)"
+}
+src_unpack() {
+ gnome2_src_unpack
+
+ # Compatibility with xulrunner-1.9.2, per bug #303897
+ epatch "${FILESDIR}"/${P}-libxul-compat.patch
+ eautoreconf
+}