diff -u chmsee-1.0.0/debian/patches/00list chmsee-1.0.0/debian/patches/00list --- chmsee-1.0.0/debian/patches/00list +++ chmsee-1.0.0/debian/patches/00list @@ -2,0 +3,2 @@ +04_xulrunner1.9_glue +99_autoregen diff -u chmsee-1.0.0/debian/rules chmsee-1.0.0/debian/rules --- chmsee-1.0.0/debian/rules +++ chmsee-1.0.0/debian/rules @@ -7,9 +7,9 @@ include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/rules/dpatch.mk -DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS=" -Wl,--as-needed,-rpath,/usr/lib/xulrunner-1.9b3" - INSTROOT = $(CURDIR)/debian/chmsee +DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS=" -Wl,--as-needed" +DEB_CONFIGURE_EXTRA_FLAGS += --with-gecko=libxul install/chmsee:: install -m755 cs2w/cs2w.py ${INSTROOT}/usr/bin/cs2w diff -u chmsee-1.0.0/debian/changelog chmsee-1.0.0/debian/changelog --- chmsee-1.0.0/debian/changelog +++ chmsee-1.0.0/debian/changelog @@ -1,3 +1,17 @@ +chmsee (1.0.0-1ubuntu1.8.04.1) hardy-proposed; urgency=low + + * Fix xulrunner 1.9 compatibility (LP: #232402) + - debian/rules: Drop static "-rpath,/usr/lib/xulrunner-1.9b3" + and use a clean xulrunner standalone glue instead + "--with-gecko=libxul". + - debian/patches/04_xulrunner1.9_glue.dpatch: Apply standalone + glue to src to fix FTBFS and crash caused by incorrect + xulrunner libraries paths. + - debian/patches/99_autoregen.dpatch: Update makefiles to + build correctly. + + -- Saïvann Carignan Wed, 02 Jul 2008 19:00:47 -0400 + chmsee (1.0.0-1ubuntu1) hardy; urgency=low * debian/control: VCS and Homepage transition. only in patch2: unchanged: --- chmsee-1.0.0.orig/debian/patches/04_xulrunner1.9_glue.dpatch +++ chmsee-1.0.0/debian/patches/04_xulrunner1.9_glue.dpatch @@ -0,0 +1,247 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_xulrunner1.9_glue.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix to use xulrunner 1.9 standalone glue. + +@DPATCH@ +diff -urNad chmsee-1.0.0~/configure.ac chmsee-1.0.0/configure.ac +--- chmsee-1.0.0~/configure.ac 2007-07-11 02:05:43.000000000 -0400 ++++ chmsee-1.0.0/configure.ac 2008-07-03 00:34:08.000000000 -0400 +@@ -35,53 +35,30 @@ + + # Check for Gecko + +-AC_ARG_ENABLE(gecko, +- AS_HELP_STRING([--disable-gecko],[don't compile the Gecko backend]), +- , +- enable_gecko=yes) +-AC_ARG_ENABLE(gecko, +- AS_HELP_STRING([--enable-gecko=ARG],[specify which Gecko provider to use ("mozilla", "firefox", "seamonkey" or "xulrunner")]), +- , +- enable_gecko=yes) ++AC_ARG_WITH(gecko, ++ AS_HELP_STRING([--with-gecko=ARG],[specify which Gecko provider to use ("mozilla", "firefox", "seamonkey", "xulrunner" or "libxul"), default is firefox]), ++ , ++ [with_gecko=firefox]) + +-if test "x$enable_gecko" = "xyes" -o "x$enable_gecko" = "xmozilla" ; then +- gecko_provider=mozilla +- AC_MSG_CHECKING([$gecko_provider: ]) +- PKG_CHECK_MODULES(GECKO, $gecko_provider-gtkmozembed, enbale_gecko=yes, enbale_gecko=no) +-fi +-if test "x$enbale_gecko" != "xyes" -a \( "x$enable_gecko" = "xyes" -o "x$enable_gecko" = "xfirefox" \) ; then +- gecko_provider=firefox +- AC_MSG_CHECKING([$gecko_provider: ]) +- PKG_CHECK_MODULES(GECKO, $gecko_provider-gtkmozembed, enbale_gecko=yes, enbale_gecko=no) +-fi +-if test "x$enbale_gecko" != "xyes" -a \( "x$enable_gecko" = "xyes" -o "x$enable_gecko" = "xseamonkey" \) ; then +- gecko_provider=seamonkey +- AC_MSG_CHECKING([$gecko_provider: ]) +- PKG_CHECK_MODULES(GECKO, $gecko_provider-gtkmozembed, enbale_gecko=yes, enbale_gecko=no) +-fi +-if test "x$enbale_gecko" != "xyes" -a \( "x$enable_gecko" = "xyes" -o "x$enable_gecko" = "xulrunner" \) ; then +- gecko_provider=xulrunner +- AC_MSG_CHECKING([$gecko_provider: ]) +- PKG_CHECK_MODULES(GECKO, $gecko_provider-gtkmozembed, enbale_gecko=yes, enbale_gecko=no) ++# Package maintainer should change this to proper value ++if test "x$with_gecko" = "xlibxul"; then ++ gecko_provider=libxul-embedding-unstable ++else ++ gecko_provider=$with_gecko-gtkmozembed + fi + +-AM_CONDITIONAL(WITH_GECKO, test "x$enbale_gecko" = "xyes") ++PKG_CHECK_MODULES(GECKO, $gecko_provider, enable_gecko=yes, enable_gecko=no) + +-if test "x$enbale_gecko" = "xyes" ; then ++AM_CONDITIONAL(WITH_GECKO, test "x$enable_gecko" = "xyes") + +- dnl Note: with the infos from mozilla-gtkmozembed.pc +- dnl we got all includes and libraries for the C interface +- dnl to Mozilla, but not the XPCOM headers we also need. +- dnl Galeon's configure.in uses several hundred lines +- dnl of macros to come around this. Which I would like to +- dnl avoid. So this might be not very portable... +- +- GECKO_INCLUDE_ROOT=`$PKG_CONFIG --cflags-only-I $gecko_provider-gtkmozembed | awk '{print $1}' | sed "s/^-I//"` +- GECKO_INCLUDE_ROOT=`dirname $GECKO_INCLUDE_ROOT` +- GECKO_LIB_ROOT=`$PKG_CONFIG --libs-only-L $gecko_provider-gtkmozembed | awk '{print $1}' | cut -c 3-` +- GECKO_FLAVOUR=$gecko_provider ++if test "x$enable_gecko" != "xno" ; then + +- GECKO_CFLAGS="$GECKO_CFLAGS \ ++ GECKO_INCLUDE_ROOT=`$PKG_CONFIG --cflags-only-I $gecko_provider | awk '{print $1}' | sed "s/^-I//"` ++ GECKO_LIB_ROOT=`$PKG_CONFIG --libs-only-L $gecko_provider | awk '{print $1}' | cut -c 3-` ++ GECKO_INCLUDE_ROOT=`dirname $GECKO_INCLUDE_ROOT` ++ GECKO_FLAVOUR=$with_gecko ++ ++ GECKO_CFLAGS="$GECKO_CFLAGS \ + -I$GECKO_INCLUDE_ROOT \ + -I$GECKO_INCLUDE_ROOT/commandhandler \ + -I$GECKO_INCLUDE_ROOT/content \ +@@ -96,15 +73,14 @@ + -I$GECKO_INCLUDE_ROOT/xpcom \ + -I$GECKO_INCLUDE_ROOT/xpconnect" + +- AC_SUBST(GECKO_CFLAGS) +- AC_SUBST(GECKO_LIBS) +- AC_SUBST(GECKO_LIB_ROOT) +- AC_SUBST(GECKO_FLAVOUR) +- AC_DEFINE_UNQUOTED([GECKO_LIB_ROOT], ["${GECKO_LIB_ROOT}"], [Gecko component path]) ++ AC_SUBST(GECKO_CFLAGS) ++ AC_SUBST(GECKO_LIBS) ++ AC_SUBST(GECKO_LIB_ROOT) ++ AC_SUBST(GECKO_FLAVOUR) ++ AC_DEFINE_UNQUOTED([GECKO_LIB_ROOT], ["${GECKO_LIB_ROOT}"], [Gecko component path]) + else +- enbale_gecko=no + +- AC_MSG_ERROR([ ++ AC_MSG_ERROR([ + *** You must have either the Mozilla, Firefox, Seamonkey or XulRunner + *** development libraries installed in order to build ChmSee! + ]) +@@ -167,7 +143,7 @@ + ChmSee build options: + ==================================================================== + +- Target $target +- Enable debug $enable_debug +- Gecko version $gecko_provider +-]) +\ No newline at end of file ++ Target $target ++ Enable debug $enable_debug ++ Gecko provider $with_gecko ++]) +diff -urNad chmsee-1.0.0~/src/Makefile.am chmsee-1.0.0/src/Makefile.am +--- chmsee-1.0.0~/src/Makefile.am 2007-04-02 10:03:18.000000000 -0400 ++++ chmsee-1.0.0/src/Makefile.am 2008-07-03 01:01:30.000000000 -0400 +@@ -64,7 +64,8 @@ + default-prefs-mozilla.js \ + default-prefs-firefox.js \ + default-prefs-seamonkey.js \ +- default-prefs-xulrunner.js ++ default-prefs-xulrunner.js \ ++ default-prefs-libxul.js + + default-prefs.js: $(default_prefs_files) + cat default-prefs-common.js default-prefs-@GECKO_FLAVOUR@.js > $@ +diff -urNad chmsee-1.0.0~/src/default-prefs-libxul.js chmsee-1.0.0/src/default-prefs-libxul.js +--- chmsee-1.0.0~/src/default-prefs-libxul.js 1969-12-31 19:00:00.000000000 -0500 ++++ chmsee-1.0.0/src/default-prefs-libxul.js 2008-07-03 01:01:30.000000000 -0400 +@@ -0,0 +1,2 @@ ++pref("browser.display.use_document_colors", false); ++ +diff -urNad chmsee-1.0.0~/src/default-prefs-xulrunner.js chmsee-1.0.0/src/default-prefs-xulrunner.js +--- chmsee-1.0.0~/src/default-prefs-xulrunner.js 2007-03-19 05:59:58.000000000 -0400 ++++ chmsee-1.0.0/src/default-prefs-xulrunner.js 2008-07-03 01:01:30.000000000 -0400 +@@ -0,0 +1,3 @@ ++// use system colours ++pref("browser.display.use_system_colors", true); ++ +diff -urNad chmsee-1.0.0~/src/gecko_utils.cpp chmsee-1.0.0/src/gecko_utils.cpp +--- chmsee-1.0.0~/src/gecko_utils.cpp 2007-03-30 07:21:19.000000000 -0400 ++++ chmsee-1.0.0/src/gecko_utils.cpp 2008-07-03 01:01:30.000000000 -0400 +@@ -41,6 +41,10 @@ + #include + #include + ++#ifdef XPCOM_GLUE ++#include ++#endif ++ + #include + #include + +@@ -59,7 +63,9 @@ + #include + #include + #include ++#include + #include ++#include + + #include "gecko_utils.h" + #include "utils.h" +@@ -192,9 +198,51 @@ + if (!g_thread_supported()) + g_thread_init(NULL); + +-#ifdef HAVE_GECKO_1_9 ++ nsresult rv; ++ ++#ifdef XPCOM_GLUE + NS_LogInit(); +- gtk_moz_embed_set_path(GECKO_LIB_ROOT); ++ ++ static const GREVersionRange greVersion = { ++ "1.9a", PR_TRUE, ++ "1.9.*", PR_TRUE ++ }; ++ ++ char xpcomLocation[4096]; ++ rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, 4096); ++ if (NS_FAILED (rv)) ++ { ++ g_warning ("Could not determine locale!\n"); ++ return; ++ } ++ ++ // Startup the XPCOM Glue that links us up with XPCOM. ++ rv = XPCOMGlueStartup(xpcomLocation); ++ if (NS_FAILED (rv)) ++ { ++ g_warning ("Could not determine locale!\n"); ++ return; ++ } ++ ++ rv = GTKEmbedGlueStartup(); ++ if (NS_FAILED (rv)) ++ { ++ g_warning ("Could not startup embed glue!\n"); ++ return; ++ } ++ ++ rv = GTKEmbedGlueStartupInternal(); ++ if (NS_FAILED (rv)) ++ { ++ g_warning ("Could not startup embed glue (internal)!\n"); ++ return; ++ } ++ ++ char *lastSlash = strrchr(xpcomLocation, '/'); ++ if (lastSlash) ++ *lastSlash = '\0'; ++ ++ gtk_moz_embed_set_path(xpcomLocation); + #else + gtk_moz_embed_set_comp_path(GECKO_LIB_ROOT); + #endif +@@ -216,7 +264,7 @@ + { + gtk_moz_embed_pop_startup(); + +-#ifdef HAVE_GECKO_1_9 ++#ifdef XPCOM_GLUE + NS_LogTerm(); + #endif + } +@@ -344,6 +392,3 @@ + + domWindow->SetTextZoom(zoom); + } +- +- +-// arch-tag: 03dfb760-462d-11db-99fa-00e04c516bee +diff -urNad chmsee-1.0.0~/src/gecko_utils.h chmsee-1.0.0/src/gecko_utils.h +--- chmsee-1.0.0~/src/gecko_utils.h 2007-03-23 04:24:14.000000000 -0400 ++++ chmsee-1.0.0/src/gecko_utils.h 2008-07-03 01:01:30.000000000 -0400 +@@ -66,6 +66,3 @@ + G_END_DECLS + + #endif /* __GECKO_UTILS_H__ */ +- +-/* arch-tag: 2af11b8c-462d-11db-99fa-00e04c516bee +- (do not change this comment) */ only in patch2: unchanged: