[Lunar-commits] <moonbase> firefox: fix print-preview crash

Paul Bredbury brebs at lunar-linux.org
Wed Jan 12 12:24:43 CET 2011


commit 6f7f25b98e3aba035018feeaca2c491fa7340835
Author: Paul Bredbury <brebs at lunar-linux.org>
Date:   Wed Jan 12 18:24:43 2011 +0700

    firefox: fix print-preview crash
    
    And error-handling chain in BUILD.
---
 web/firefox/BUILD   |   77 ++++++++++++++++++++++++++------------------------
 web/firefox/DETAILS |    6 +++-
 2 files changed, 45 insertions(+), 38 deletions(-)

diff --git a/web/firefox/BUILD b/web/firefox/BUILD
index 9f207f7..480853d 100644
--- a/web/firefox/BUILD
+++ b/web/firefox/BUILD
@@ -1,90 +1,93 @@
 (
 
- MOZILLA_DIR=mozilla-1.9.2
+  MOZILLA_DIR=mozilla-1.9.2 &&
 
   if module_is_expired $MODULE && [ "$VERSION" != "`installed_version $MODULE`" ]; then
         set_module_config OLD_VER "`installed_version $MODULE`"
-  fi  &&
+  fi &&
 
-  export MOZILLA_HOME=/usr/lib/$MODULE-$VERSION
-  export MOZ_CO_PROJECT=browser
-  export MOZILLA_OFFICIAL=1
-  export BUILD_OFFICIAL=1
+  export MOZILLA_HOME=/usr/lib/$MODULE-$VERSION &&
+  export MOZ_CO_PROJECT=browser &&
+  export MOZILLA_OFFICIAL=1 &&
+  export BUILD_OFFICIAL=1 &&
 
   # This should always be just a link
-  rm -rf $MOZILLA_HOME/plugins  &&
+  rm -rf $MOZILLA_HOME/plugins &&
 
-  cp $SCRIPT_DIRECTORY/mozconfig $MOZILLA_DIR/  &&
+  cp $SCRIPT_DIRECTORY/mozconfig $MOZILLA_DIR/ &&
 
-  export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla"
-  mkdir -p ${MOZ_OBJDIR}  &&
+  export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla" &&
+  mkdir -p ${MOZ_OBJDIR} &&
 
-  cd $MOZILLA_DIR  &&
+  cd $MOZILLA_DIR &&
+  # Print Preview in firefox instantly crashes - http://bugs.gentoo.org/325469
+  patch_it $SOURCE_CACHE/$SOURCE2 2 &&
 
-  echo "ac_add_options --disable-necko-wifi" >> mozconfig
-  echo "ac_add_options --disable-system-sqlite" >> mozconfig
+  echo "ac_add_options --disable-necko-wifi" >> mozconfig &&
+  echo "ac_add_options --disable-system-sqlite" >> mozconfig &&
 
   #Add DEPENDS options
 
   if in_depends $MODULE "xulrunner" ; then
-    XUL=`module_version xulrunner`
+    XUL=`module_version xulrunner` &&
     echo "ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-$XUL" >> mozconfig
-  fi  &&
+  fi &&
 
   if in_depends $MODULE gnome-vfs ; then
     echo "ac_add_options --enable-gnomevfs" >> mozconfig
   else
     echo "ac_add_options --disable-gnomevfs" >> mozconfig
-  fi  &&
+  fi &&
 
   if in_depends $MODULE sun-jdk ; then
-    echo "ac_add_options --with-java-include-path=/usr/java/include" >> mozconfig
-    echo "ac_add_options --with-java-bin-path=/usr/java/bin" >> mozconfig
+    echo "ac_add_options --with-java-include-path=/usr/java/include" >> mozconfig &&
+    echo "ac_add_options --with-java-bin-path=/usr/java/bin" >> mozconfig &&
     echo "ac_add_options --enable-javaxpcom" >> mozconfig
-  fi  &&
+  fi &&
 
   #Add CONFIGURE options
 
   if [ "$SAFE" == "y" ] ; then
     echo "ac_add_options --enable-safe-browsing" >> mozconfig
-  fi  &&
+  fi &&
 
   setterm -bfreq -blength &&
 
   #Finally, the build!
   if [ "$PGO" == "y" ] ; then
     #CCache breaks the pgo build
-    export CCACHE_DISABLE=1
-    echo "ac_add_options --enable-profile-guided-optimization" >> mozconfig  &&
-    echo "mk_add_options PROFILE_GEN_SCRIPT='python $MOZ_OBJDIR/_profile/pgo/profileserver.py'" >> mozconfig  &&
+    export CCACHE_DISABLE=1 &&
+    echo "ac_add_options --enable-profile-guided-optimization" >> mozconfig &&
+    echo "mk_add_options PROFILE_GEN_SCRIPT='python $MOZ_OBJDIR/_profile/pgo/profileserver.py'" >> mozconfig &&
     make -f client.mk build &&
     make -f client.mk profiledbuild
   else
     make -f client.mk build
-  fi  &&
+  fi &&
 
-  cd ${MOZ_OBJDIR}  &&
-  prepare_install   &&
-  make install      &&
+  cd ${MOZ_OBJDIR} &&
+  prepare_install  &&
+  make install      || exit 1
+  # Using "exit 1" above, because the "for" loop below will break the error-handling chain
 
   # Put some important headers in place
-  mkdir -p /usr/include/firefox-$VERSION/nss  &&
-  cp -Lf dist/private/nss/*.h dist/public/nss/*.h /usr/include/firefox-$VERSION/nss  &&
+  mkdir -p /usr/include/firefox-$VERSION/nss &&
+  cp -Lf dist/private/nss/*.h dist/public/nss/*.h /usr/include/firefox-$VERSION/nss &&
 
   # Install the plugins in the right directories
-  mkdir -p /opt/lunar/plugins  &&
+  mkdir -p /opt/lunar/plugins &&
   for plugin in `ls $MOZILLA_HOME/plugins`; do
-       `install -m755 $MOZILLA_HOME/plugins/$plugin /opt/lunar/plugins`; done  &&
+       `install -m755 $MOZILLA_HOME/plugins/$plugin /opt/lunar/plugins`; done &&
 
-  rm -rf $MOZILLA_HOME/plugins  &&
-  ln -snf /opt/lunar/plugins $MOZILLA_HOME/plugins  &&
+  rm -rf $MOZILLA_HOME/plugins &&
+  ln -snf /opt/lunar/plugins $MOZILLA_HOME/plugins &&
 
   # Now the .desktop file and the icon
-  mkdir -p /usr/share/applications /usr/share/pixmaps  &&
-  install -m644 $SCRIPT_DIRECTORY/firefox.desktop /usr/share/applications  &&
+  mkdir -p /usr/share/applications /usr/share/pixmaps &&
+  install -m644 $SCRIPT_DIRECTORY/firefox.desktop /usr/share/applications &&
   # please, dont just let the lin fail because /usr/share/pixmaps/firefox48.png is an existing symlink...
-  rm -f /usr/share/pixmaps/firefox48.png  &&
-  install -m644 $MOZILLA_HOME/chrome/icons/default/default48.png /usr/share/pixmaps/firefox48.png  &&
+  rm -f /usr/share/pixmaps/firefox48.png &&
+  install -m644 $MOZILLA_HOME/chrome/icons/default/default48.png /usr/share/pixmaps/firefox48.png || exit 1
 
   # Make firefox use its own icon
   for icon in `ls $MOZILLA_HOME/icons`; do
diff --git a/web/firefox/DETAILS b/web/firefox/DETAILS
index b682511..715d992 100644
--- a/web/firefox/DETAILS
+++ b/web/firefox/DETAILS
@@ -1,16 +1,20 @@
           MODULE=firefox
          VERSION=3.6.13
           SOURCE=${MODULE}-${VERSION}.source.tar.bz2
+         SOURCE2=firefox-3.6.13-cups-1.4.4-fixup.patch
    SOURCE_URL[0]=ftp://ftp.uni-erlangen.de/pub/mozilla.org/firefox/releases/$VERSION/source
    SOURCE_URL[1]=ftp://mozilla.isc.org/pub/mozilla.org/firefox/releases/$VERSION/source
    SOURCE_URL[2]=ftp://ftp.mozilla.org/pub/firefox/releases/$VERSION/source
+     SOURCE2_URL=$PATCH_URL
       SOURCE_VFY=sha1:1d1bc70d651bce4006687f5762638563c0494267
+     SOURCE2_VFY=sha1:4716505f4dc7c427ab5768cf7d3c481174dc7ad9
         WEB_SITE=http://www.mozilla.org/projects/firefox
          ENTERED=20030810
-         UPDATED=20101209
+         UPDATED=20110102
       MAINTAINER="tchan at lunar-linux.org"
            PSAFE=no
            SHORT="A speedy, full-featured web browser"
+
 cat << EOF
 Mozilla Firefox is the successor of Mozilla Firebird.
 


More information about the Lunar-commits mailing list