--- gnome-web-photo-0.8.orig/src/Makefile.am +++ gnome-web-photo-0.8/src/Makefile.am @@ -61,7 +61,7 @@ $(DEPENDENCY_LIBS) \ $(JPEG_LIBS) \ $(LIBXUL_LIBS) \ - -lxpcomglue + -lxpcomglue -lnspr4 -ldl install-exec-hook: gnome-web-photo cd $(DESTDIR)$(bindir) && \ --- gnome-web-photo-0.8.orig/src/Components.cpp +++ gnome-web-photo-0.8/src/Components.cpp @@ -26,7 +26,12 @@ #include #include #include +#ifdef HAVE_GECKO_2_0 +#include +#include +#else #include +#endif #include #include #include @@ -147,6 +152,18 @@ #endif #endif /* HAVE_GECKO_1_9 */ +#ifdef HAVE_GECKO_2_0 + +typedef struct +{ + const char *mDescription; + nsCID mCID; + const char *mContractID; + mozilla::Module::ConstructorProcPtr mConstructor; +} nsModuleComponentInfo; + +#endif + static const nsModuleComponentInfo sAppComps[] = { { @@ -169,8 +186,13 @@ retval = PR_TRUE; for (PRUint32 i = 0; i < NS_ARRAY_LENGTH(sAppComps); ++i) { +#ifdef HAVE_GECKO_2_0 + nsCOMPtr componentFactory = new mozilla::GenericFactory(sAppComps[i].mConstructor); + rv = componentFactory ? NS_OK : NS_ERROR_OUT_OF_MEMORY; +#else nsCOMPtr componentFactory; rv = NS_NewGenericFactory(getter_AddRefs(componentFactory), &(sAppComps[i])); +#endif if (NS_FAILED(rv) || !componentFactory) { printf ("Failed to make a factory for %s\n", sAppComps[i].mDescription); retval = PR_FALSE; --- gnome-web-photo-0.8.orig/src/main.cpp +++ gnome-web-photo-0.8/src/main.cpp @@ -340,8 +340,16 @@ nsresult rv; static const GREVersionRange greVersion = { +#ifdef HAVE_GECKO_2_0 + "2.0b", PR_TRUE, + "2.0.0.*", PR_TRUE +#elif HAVE_GECKO_1_9_2 + "1.9.2", PR_TRUE, + "1.9.2.*", PR_TRUE +#else "1.9a", PR_TRUE, - "1.9.*", PR_TRUE + "1.9.1.*", PR_TRUE +#endif }; char xpcomLocation[4096]; rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, 4096); --- gnome-web-photo-0.8.orig/src/Writer.cpp +++ gnome-web-photo-0.8/src/Writer.cpp @@ -41,7 +41,9 @@ #include #include #include +#ifndef HAVE_GECKO_2_0 #include +#endif #include #include #include @@ -123,14 +125,18 @@ viewManager->GetDeviceContext (dc); NS_ENSURE_TRUE (dc, PR_FALSE); + nsIView* view; +#ifdef HAVE_GECKO_2_0 + viewManager->GetRootView(view); +#else nsIScrollableView* scrollableView = nsnull; viewManager->GetRootScrollableView (&scrollableView); - nsIView* view; if (scrollableView) { scrollableView->GetScrolledView (view); } else { viewManager->GetRootView(view); } +#endif PRInt32 p2a = dc->AppUnitsPerDevPixel(); @@ -178,7 +184,11 @@ nsRefPtr surface = gfxPlatform::GetPlatform()-> CreateOffscreenSurface(gfxIntSize(width, height), +#ifdef HAVE_GECKO_2_0 + gfxASurface::CONTENT_COLOR); +#else gfxASurface::ImageFormatRGB24); +#endif NS_ENSURE_TRUE(surface, PR_FALSE); nsRefPtr context = new gfxContext(surface); @@ -197,7 +207,12 @@ width = NSAppUnitsToIntPixels(cutout.width, p2a); height = NSAppUnitsToIntPixels(cutout.height, p2a); +#ifdef HAVE_GECKO_1_9_2 + rv = presShell->RenderDocument(cutout, + nsIPresShell::RENDER_IGNORE_VIEWPORT_SCROLLING, +#else rv = presShell->RenderDocument(cutout, PR_FALSE, PR_TRUE, +#endif NS_RGB(255, 255, 255), context); if (NS_SUCCEEDED(rv)) { imgContext->DrawSurface(surface, gfxSize(width, height)); --- gnome-web-photo-0.8.orig/m4/libxul.m4 +++ gnome-web-photo-0.8/m4/libxul.m4 @@ -59,7 +59,8 @@ # 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_cv_libxul_pkg)" +libxul_cv_libs="$($PKG_CONFIG --libs $libxul_cv_libxul_pkg)" AC_DEFINE([HAVE_LIBXUL],[1],[Define for libxul]) @@ -73,9 +74,7 @@ LIBXUL_CXXFLAGS= LIBXUL_LDFLAGS= -# Can't use the value from the .pc file, since it seems buggy -# Until I can figure it out, do this instead -LIBXUL_LIBS="-L${libxul_cv_sdkdir}/lib -lxpcomglue_s -L${libxul_cv_sdkdir}/bin -lxul -lxpcom" +LIBXUL_LIBS="$libxul_cv_libs" # *********************** # Check for -fshort-wchar @@ -277,6 +276,76 @@ LIBXUL_CXXFLAGS="$LIBXUL_CXXFLAGS $VISIBILITY_FLAGS" fi # g++ +# *********************** +# Check for gecko version +# *********************** + +if test "$libxul_cv_have_libxul" = "yes"; then + +AC_LANG_PUSH([C++]) + +_SAVE_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LIBXUL_INCLUDES $LIBXUL_CXXCPPFLAGS" + +AC_CACHE_CHECK([for gecko version], + [libxul_cv_libxul_version], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM([[ +#include +#include +#include +#include +#include +]],[[ +FILE *stream; +const char *version = ""; + +if (!setlocale (LC_ALL, "C")) return 127; + +stream = fopen ("conftest.data", "w"); +if (!stream) return 126; + +if (strncmp (MOZILLA_VERSION, "2.0", strlen ("2.0")) == 0) { + version = "2.0"; +} else if (strncmp (MOZILLA_VERSION, "1.9.2", strlen ("1.9.2")) == 0) { + version = "1.9.2"; +} else { + version = "1.9"; +} +fprintf (stream, "%s\n", version); +if (fclose (stream) != 0) return 125; + +return EXIT_SUCCESS; +]])], + [libxul_cv_libxul_version="$(cat conftest.data)"], + [AC_MSG_FAILURE([could not determine gecko version])], + [libxul_cv_libxul_version="1.9"]) +]) + +CPPFLAGS="$_SAVE_CPPFLAGS" + +AC_LANG_POP([C++]) + +libxul_cv_libxul_version_int="$(echo "$libxul_cv_libxul_version" | $AWK -F . '{print [$]1 * 1000000 + [$]2 * 1000 + [$]3}')" + +if test "$libxul_cv_libxul_version_int" -lt "1009000" -o "$libxul_cv_libxul_version_int" -gt "2000000"; then + AC_MSG_ERROR([Gecko version $libxul_cv_libxul_version is not supported!]) +fi + +if test "$libxul_cv_libxul_version_int" -ge "1009000"; then + AC_DEFINE([HAVE_GECKO_1_9],[1],[Define if we have gecko 1.9]) + libxul_cv_have_libxul_1_9=yes +fi +if test "$libxul_cv_libxul_version_int" -ge "1009002"; then + AC_DEFINE([HAVE_GECKO_1_9_2],[1],[Define if we have gecko 1.9.2]) + libxul_cv_have_libxul_1_9_2=yes +fi +if test "$libxul_cv_libxul_version_int" -ge "2000000"; then + AC_DEFINE([HAVE_GECKO_2_0],[1],[Define if we have gecko 2.0]) + libxul_cv_have_libxul_2_0=yes +fi +fi + # ********* # Finish up # ********* @@ -304,6 +373,9 @@ AM_CONDITIONAL([HAVE_LIBXUL],[test "$libxul_cv_have_libxul" = "yes"]) AM_CONDITIONAL([HAVE_LIBXUL_DEBUG],[test "$libxul_cv_have_debug" = "yes"]) +AM_CONDITIONAL([HAVE_GECKO_1_9],[test "$libxul_cv_have_libxul" = "yes" -a "$libxul_cv_libxul_version_int" -ge "1009000"]) +AM_CONDITIONAL([HAVE_GECKO_1_9_2],[test "$libxul_cv_have_libxul" = "yes" -a "$libxul_cv_libxul_version_int" -ge "1009002"]) +AM_CONDITIONAL([HAVE_GECKO_2_0],[test "$libxul_cv_have_libxul" = "yes" -a "$libxul_cv_libxul_version_int" -ge "2000000"]) ]) --- gnome-web-photo-0.8.orig/debian/compat +++ gnome-web-photo-0.8/debian/compat @@ -0,0 +1 @@ +5 --- gnome-web-photo-0.8.orig/debian/gnome-web-photo.install +++ gnome-web-photo-0.8/debian/gnome-web-photo.install @@ -0,0 +1 @@ +debian/scripts/gnome-web-photo usr/bin --- gnome-web-photo-0.8.orig/debian/copyright +++ gnome-web-photo-0.8/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by Daniel Holbach on +Mon, 28 Nov 2005 21:18:41 +0100. + +It was downloaded from ftp://ftp.gnome.org/pub/sources/gnome/gnome-web-photo/ + +Copyright Holder: + Christian Persch + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- gnome-web-photo-0.8.orig/debian/watch +++ gnome-web-photo-0.8/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://download.gnome.org/sources/gnome-web-photo/([\d\.]+)/gnome-web-photo-([\d\.]+).tar.gz --- gnome-web-photo-0.8.orig/debian/rules +++ gnome-web-photo-0.8/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/gnome.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/rules/autoreconf.mk + +#DEB_CONFIGURE_EXTRA_FLAGS := --with-gecko=xulrunner + +install/gnome-web-photo:: + mv $(CURDIR)/debian/gnome-web-photo/usr/bin/gnome-web-photo \ + $(CURDIR)/debian/gnome-web-photo/usr/bin/gnome-web-photo.real + +binary-predeb/gnome-web-photo:: + dh_xulrunner -pgnome-web-photo --- gnome-web-photo-0.8.orig/debian/gnome-web-photo.debhelper.log +++ gnome-web-photo-0.8/debian/gnome-web-photo.debhelper.log @@ -0,0 +1 @@ +dh_autoreconf_clean --- gnome-web-photo-0.8.orig/debian/changelog +++ gnome-web-photo-0.8/debian/changelog @@ -0,0 +1,160 @@ +gnome-web-photo (0.8-0ubuntu8) natty; urgency=low + + * Add build-depends on dh-autoreconf and gnome-common + - update debian/control + * Use wrap-and-sort on debian/control + + -- Micah Gersten Mon, 21 Feb 2011 15:15:39 -0600 + +gnome-web-photo (0.8-0ubuntu7) natty; urgency=low + + * Port to xulrunner 2.0 + + -- Chris Coulson Tue, 15 Feb 2011 19:29:40 +0000 + +gnome-web-photo (0.8-0ubuntu6) natty; urgency=low + + * Fix FTBFS with ld --no-add-needed + + -- Bhavani Shankar Wed, 29 Dec 2010 15:00:57 +0530 + +gnome-web-photo (0.8-0ubuntu5) maverick; urgency=low + + * SECURITY UPDATE: insecure library loading (LP: #650862) + - debian/scripts/gnome-web-photo: use shell expansion to set LD_LIBRARY_PATH + - CVE-2010-3349 + + -- Micah Gersten Wed, 29 Sep 2010 02:36:38 -0500 + +gnome-web-photo (0.8-0ubuntu4) maverick; urgency=low + + * fix LP: #625801 - gnome-web-photo missing required libxul.so; update + wrapper script to use the current xulrunner-1.9.2 directory instead of + any directory matching xulrunner-1.9.2* + - update debian/scripts/gnome-web-photo + * Explicitely build depend on xulrunner-1.9.2-dev due to change in wrapper + script + - update debian/control + * Drop extra '\' file that got into the diff + - drop \ + + -- Micah Gersten Mon, 30 Aug 2010 13:31:48 -0500 + +gnome-web-photo (0.8-0ubuntu3) lucid; urgency=low + + [ Micah Gersten ] + * debian/control: update to xulrunner-1.9.2 + + [ Chris Coulson ] + * Add the xulrunner binary depends using dh_xulrunner: + - update debian/control and debian/rules + * Don't add a hardcoded path to the xulrunner headers to CFLAGS, + use the output of pkg-config instead. Ideally, the upstream + build system should just be fixed so that we don't need to do + this at all. + - update debian/rules + + -- Micah Gersten Wed, 03 Mar 2010 23:53:03 -0600 + +gnome-web-photo (0.8-0ubuntu2) karmic; urgency=low + + * proper quoting in the wrapper script, so that filenames with spaces + work (LP: #355511) + * look for xulrunner 1.9.1, not 1.9.0 (LP: #423822) + * make the wrapper script a bit of a better guesser, in hopes of + preventing bugs like #423822. + * make the wrapper script a /bin/sh script, fixing the only (trivial) + bashism + + -- Ryan Niebur Sun, 06 Sep 2009 13:04:12 -0700 + +gnome-web-photo (0.8-0ubuntu1.ffox35) karmic; urgency=low + + * xulrunner-1.9.1 by default transition + + see: https://blueprints.launchpad.net/ubuntu/+spec/desktop-karmic-firefox-3.5 + - bump minimal xulrunner-dev version + + -- Alexander Sack Thu, 09 Jul 2009 02:08:10 +0200 + +gnome-web-photo (0.8-0ubuntu1) karmic; urgency=low + + [ Dennis Craven ] + * New upstream release (LP: #395576). + - Exit when xulrunner startup fails + - Build fix for xulrunner 1.9.1 + + [ Nick Ellery ] + * Update standards-version to 3.8.2, no changes necessary. + * Update debhelper build-dep to >= 5. + * Change debian/compat to 5. + + -- Nick Ellery Sun, 05 Jul 2009 13:26:51 -0700 + +gnome-web-photo (0.6-0ubuntu2) jaunty; urgency=low + + * debian/gnome-web-photo.install, debian/scripts: + - Create a launcher script so that allow it to load xulrunner. + Thanks to Emilio López . (LP: #342408). + * debian/rules: + - Rename the gnome-web-photo binary as "gnome-web-photo.real". + * debian/control: + - Add xulrunner-1.9 to the Depends. + - Remove the Homepage - it just points to an FTP site. + + -- Siegfried-Angel Gevatter Pujals Tue, 24 Mar 2009 18:54:35 +0100 + +gnome-web-photo (0.6-0ubuntu1) jaunty; urgency=low + + * New upstream release + - Don't set config.use_system_prefs to true (Vincent Untz) + - Translation updates + * debian/control: + - remove libgnomevfs2-dev b-d + - replace gconf2 b-d by libgconf2-dev + + -- Didier Roche Wed, 18 Mar 2009 21:12:33 +0100 + +gnome-web-photo (0.5-0ubuntu2) jaunty; urgency=low + + * no changes upload for nss/nspr SONAME mini-transition + + -- Alexander Sack Mon, 12 Jan 2009 16:21:56 +0100 + +gnome-web-photo (0.5-0ubuntu1) jaunty; urgency=low + + * New upstream release. + * debian/control: replace libxul-dev with xulrunner-1.9-dev. + * debian/watch: added. + + -- Daniel Holbach Tue, 25 Nov 2008 22:17:22 +0100 + +gnome-web-photo (0.3-0ubuntu2) hardy; urgency=low + + * debian/rules: --with-gecko=xulrunner. + * debian/control: replaced firefox-dev with libxul-dev. + + -- Daniel Holbach Mon, 18 Feb 2008 10:23:11 +0100 + +gnome-web-photo (0.3-0ubuntu1) feisty; urgency=low + + * New upstream release: + - Renice when thumbnailing + - Thumbnail application/xhtml+xml files + - Initialise GThread before calling any glib function + * debian/control: + - added libjpeg62-dev as Build-Depends. + + -- Daniel Holbach Tue, 30 Jan 2007 09:50:20 +0100 + +gnome-web-photo (0.2-0ubuntu1) dapper; urgency=low + + * New upstream release. + + -- Daniel Holbach Wed, 15 Feb 2006 23:32:05 +0100 + +gnome-web-photo (0.1.1-0ubuntu1) dapper; urgency=low + + * Initial release. + + -- Daniel Holbach Mon, 28 Nov 2005 21:18:41 +0100 + --- gnome-web-photo-0.8.orig/debian/control +++ gnome-web-photo-0.8/debian/control @@ -0,0 +1,24 @@ +Source: gnome-web-photo +Section: gnome +Priority: optional +XSBC-Original-Maintainer: Daniel Holbach +Maintainer: Ubuntu Developers +Build-Depends: cdbs, + debhelper (>= 5), + dh-autoreconf, + gnome-common, + libgconf2-dev, + libglib2.0-dev (>= 2.6), + libgtk2.0-dev (>= 2.6.3), + libjpeg62-dev, + libxml-parser-perl, + libxml2-dev (>= 2.6.12), + xulrunner-dev +Standards-Version: 3.8.2 + +Package: gnome-web-photo +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: tool to generate full-size image files from webpages + GNOME Web Photographer is a tool to generate full-size image + files and thumbnails from HTML files and web pages. --- gnome-web-photo-0.8.orig/debian/scripts/gnome-web-photo +++ gnome-web-photo-0.8/debian/scripts/gnome-web-photo @@ -0,0 +1,26 @@ +#!/bin/sh + +# gnome-web-photo launcher, helps the application to choose a xulrunner +# as Ubuntu doesn't include xulrunner on normal library locations + +# Author: Emilio López +# License: GPLv2 or later + +# Choose a xulrunner +MOZLIBPATH="NONE" +MOZLIBPATH=/usr/lib/xulrunner-`xulrunner-2.0 --gre-version` + +if [ "$MOZLIBPATH" = "NONE" ] ; then + # No 1.9 xulrunner, take any other + for possiblepath in /usr/lib/xulrunner-1.9.* /usr/lib/xulrunner-1.* /usr/lib/xulrunner-2.* /usr/lib/xulrunner-*; do + if [ -d $possiblepath ]; then + MOZLIBPATH=$possiblepath + break + fi + done + +fi + +# Launch gnome-web-photo +LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$MOZLIBPATH \ + /usr/bin/gnome-web-photo.real "$@"