[Lunar-commits] <moonbase> firefox4: ver 4.0rc1
Paul Bredbury
brebs at lunar-linux.org
Fri Mar 11 05:31:36 CET 2011
commit 8366be11f041b340cfdef88e1d10133f4e36cf5e
Author: Paul Bredbury <brebs at lunar-linux.org>
Date: Fri Mar 11 11:31:36 2011 +0700
firefox4: ver 4.0rc1
You must recompile cairo first, to add tee support.
Added $NEW_VER, to work around inconsistency in version (4.0rc1) vs
directory names (4.0) that firefox chooses.
Re-enabled usage of system cairo, and optional system libevent.
NSS libraries are already installed by "make install".
---
web/firefox4/BUILD | 59 +++++++++++++++----------
web/firefox4/BUILD.x86_64 | 96 ------------------------------------------
web/firefox4/DEPENDS | 12 +----
web/firefox4/DETAILS | 8 ++--
web/firefox4/POST_INSTALL | 9 ++--
web/firefox4/POST_REMOVE | 11 ++++-
web/firefox4/PRE_BUILD | 10 +++--
web/firefox4/firefox.desktop | 2 +-
web/firefox4/mozconfig | 7 +---
9 files changed, 63 insertions(+), 151 deletions(-)
diff --git a/web/firefox4/BUILD b/web/firefox4/BUILD
index 7a43ed5..ec3ecdc 100644
--- a/web/firefox4/BUILD
+++ b/web/firefox4/BUILD
@@ -1,26 +1,18 @@
(
- MOZILLA_DIR=mozilla-central &&
-
if module_is_expired $MODULE && [ "$VERSION" != "`installed_version $MODULE`" ]; then
- set_module_config OLD_VER "`installed_version $MODULE`"
+ set_module_config OLD_VER "`installed_version $MODULE`"
fi &&
- export MOZILLA_HOME=/usr/lib/firefox-$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 &&
-
- cp $SCRIPT_DIRECTORY/mozconfig $MOZILLA_DIR/ &&
+ cp $SCRIPT_DIRECTORY/mozconfig . &&
export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla" &&
mkdir -p ${MOZ_OBJDIR} &&
- cd $MOZILLA_DIR &&
-
echo "ac_add_options --disable-necko-wifi" >> mozconfig &&
echo "ac_add_options --disable-system-sqlite" >> mozconfig &&
@@ -37,6 +29,18 @@
echo "ac_add_options --disable-gnomevfs" >> mozconfig
fi &&
+ if in_depends $MODULE libevent ; then
+ echo "ac_add_options --with-system-libevent" >> mozconfig
+ else
+ echo "ac_add_options --without-system-libevent" >> mozconfig
+ fi &&
+
+ if in_depends $MODULE dbus-glib ; then
+ echo "ac_add_options --enable-dbus" >> mozconfig
+ else
+ echo "ac_add_options --disable-dbus" >> mozconfig
+ fi &&
+
if in_depends $MODULE sun-jdk ; then
echo "ac_add_options --with-java-include-path=/usr/java/default/include" >> mozconfig &&
echo "ac_add_options --with-java-bin-path=/usr/java/default/bin" >> mozconfig &&
@@ -67,9 +71,14 @@
prepare_install &&
make install || exit 1
- # 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 &&
+ MOZILLA_HOME=$(egrep ^moz_libdir= browser/app/firefox | cut -d= -f2) &&
+ LIB_VER=$(echo $MOZILLA_HOME | cut -d\- -f2) &&
+ # Sanity check
+ if [[ $MOZILLA_HOME != "/usr/lib"*"firefox"* ]] || [[ $LIB_VER != [1-9]* ]] ; then
+ message "${PROBLEM_COLOR}Sanity check on variables failed!${DEFAULT_COLOR}"
+ exit 1
+ fi &&
+ set_module_config NEW_VER "$LIB_VER" &&
# Install the plugins in the right directories
mkdir -p /opt/lunar/plugins &&
@@ -77,20 +86,22 @@
# for plugin in `ls $MOZILLA_HOME/plugins`; do
# `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 &&
- # 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 || exit 1
+ # Now the .desktop file and icons
+ install -Dm 644 {"$SCRIPT_DIRECTORY",/usr/share/applications}/firefox.desktop &&
# Make firefox use its own icon
for icon in `ls $MOZILLA_HOME/icons`; do
- ln -sf $MOZILLA_HOME/icons/$icon \
- $MOZILLA_HOME/chrome/icons/default/$icon
- done
+ ln -sf "$MOZILLA_HOME"/{icons/$icon,chrome/icons/default/$icon}
+ done &&
+
+ for s in 16 22 24 32 48 256 ; do
+ install -Dm 644 ../other-licenses/branding/firefox/default${s}.png /usr/share/icons/hicolor/${s}x${s}/apps/firefox.png
+ done &&
+ if [ -x /usr/bin/gtk-update-icon-cache ] ; then
+ gtk-update-icon-cache -f /usr/share/icons/hicolor/
+ fi
) > $C_FIFO 2>&1
diff --git a/web/firefox4/BUILD.x86_64 b/web/firefox4/BUILD.x86_64
deleted file mode 100644
index 45aafdb..0000000
--- a/web/firefox4/BUILD.x86_64
+++ /dev/null
@@ -1,96 +0,0 @@
-(
-
- MOZILLA_DIR=mozilla-central
-
- if module_is_expired $MODULE && [ "$VERSION" != "`installed_version $MODULE`" ]; then
- set_module_config OLD_VER "`installed_version $MODULE`"
- fi &&
-
- export MOZILLA_HOME=/usr/lib/firefox-$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 &&
-
- cp $SCRIPT_DIRECTORY/mozconfig $MOZILLA_DIR/ &&
-
- export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla"
- mkdir -p ${MOZ_OBJDIR} &&
-
- cd $MOZILLA_DIR &&
-
- 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`
- echo "ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-$XUL" >> mozconfig
- fi &&
-
- if in_depends $MODULE gnome-vfs ; then
- echo "ac_add_options --enable-gnomevfs" >> mozconfig
- else
- echo "ac_add_options --disable-gnomevfs" >> mozconfig
- fi &&
-
- if in_depends $MODULE sun-jdk ; then
- echo "ac_add_options --with-java-include-path=/usr/java/default/include" >> mozconfig
- echo "ac_add_options --with-java-bin-path=/usr/java/default/bin" >> mozconfig
- echo "ac_add_options --enable-javaxpcom" >> mozconfig
- fi &&
-
- #Add CONFIGURE options
-
- if [ "$SAFE" == "y" ] ; then
- echo "ac_add_options --enable-safe-browsing" >> mozconfig
- 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 &&
- make -f client.mk build &&
- make -f client.mk profiledbuild
- else
- make -f client.mk build
- fi &&
-
- cd ${MOZ_OBJDIR} &&
- prepare_install &&
- make install &&
-
- # 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 &&
-
- # Install the plugins in the right directories
- mkdir -p /opt/lunar/plugins &&
-# There is no plugins in beta8 version of the Firefox
-# for plugin in `ls $MOZILLA_HOME/plugins`; do
-# `install -m755 $MOZILLA_HOME/plugins/$plugin /opt/lunar/plugins`; done &&
-
- 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 &&
- # 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 &&
-
- # Make firefox use its own icon
- for icon in `ls $MOZILLA_HOME/icons`; do
- ln -sf $MOZILLA_HOME/icons/$icon \
- $MOZILLA_HOME/chrome/icons/default/$icon
- done
-
-) > $C_FIFO 2>&1
diff --git a/web/firefox4/DEPENDS b/web/firefox4/DEPENDS
index e0a36fb..0434070 100644
--- a/web/firefox4/DEPENDS
+++ b/web/firefox4/DEPENDS
@@ -19,12 +19,6 @@ optional_depends "flash-plugin-10" "" "" "To enable Flash plugin"
optional_depends "gnome-vfs" "" "" "For Gnome VFS support"
optional_depends "hunspell" "" "" "For spelling support"
-# Specified in mozconfig, and don't forget that $OPTS is ignored in this BUILD.
-#optional_depends "libevent" "--with-system-libevent" \
-# "--without-system-libevent" \
-# "For event detection"
-
-optional_depends "dbus-glib" \
- "--enable-dbus" \
- "--disable-dbus" \
- "for dbus support"
+# $OPTS is ignored in this BUILD
+optional_depends "libevent" "" "" "For event detection"
+optional_depends "dbus-glib" "" "" "For dbus support"
diff --git a/web/firefox4/DETAILS b/web/firefox4/DETAILS
index 27701a3..0885f24 100644
--- a/web/firefox4/DETAILS
+++ b/web/firefox4/DETAILS
@@ -1,14 +1,14 @@
MODULE=firefox4
- VERSION=4.0b12
+ VERSION=4.0rc1
SOURCE=firefox-$VERSION.source.tar.bz2
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
- SOURCE_VFY=sha1:4f867c9f7881f1e45403186de4ccede0c1b16570
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/mozilla-central
+ SOURCE_VFY=sha1:dcfb222de8f5470de9925507b6844d1e85dc0019
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/mozilla-2.0
WEB_SITE=http://www.mozilla.org/projects/firefox
ENTERED=20030810
- UPDATED=20110226
+ UPDATED=20110310
MAINTAINER="tchan at lunar-linux.org"
PSAFE=no
SHORT="A speedy, full-featured web browser"
diff --git a/web/firefox4/POST_INSTALL b/web/firefox4/POST_INSTALL
index c80ccb2..b6c3a0c 100644
--- a/web/firefox4/POST_INSTALL
+++ b/web/firefox4/POST_INSTALL
@@ -1,12 +1,13 @@
OLD_VER="`get_module_config OLD_VER`"
+NEW_VER="`get_module_config NEW_VER`"
FIREFOX_HOME=/usr
-FFOX_LIBDIR=firefox-$VERSION
+FFOX_LIBDIR=firefox-$NEW_VER
-if [ ! -z "$OLD_VER" ]; then
+if [ ! -z "$OLD_VER" ] && [ "$OLD_VER" != "$NEW_VER" ] ; then
for old_version in $OLD_VER
do
- rm -rf /usr/lib/firefox-$old_version
- rm -rf /usr/lib/firefox-devel-$old_version
+ rm -rf "/usr/lib/firefox-$old_version"
+ rm -rf "/usr/lib/firefox-devel-$old_version"
done
fi
diff --git a/web/firefox4/POST_REMOVE b/web/firefox4/POST_REMOVE
index a46a092..6917745 100644
--- a/web/firefox4/POST_REMOVE
+++ b/web/firefox4/POST_REMOVE
@@ -1,4 +1,9 @@
+NEW_VER="`get_module_config NEW_VER`"
+if [ -z "$NEW_VER" ] ; then
+ NEW_VER=$VERSION
+fi
+
rm -f /usr/share/pixmaps/firefox48.png
-rm -rf /usr/include/firefox-$VERSION
-rm -rf /usr/lib/firefox-$VERSION
-rm -rf /usr/lib/firefox-devel-$VERSION
+rm -rf "/usr/include/firefox-$NEW_VER"
+rm -rf "/usr/lib/firefox-$NEW_VER"
+rm -rf "/usr/lib/firefox-devel-$NEW_VER"
diff --git a/web/firefox4/PRE_BUILD b/web/firefox4/PRE_BUILD
index cc901d0..27e17c4 100644
--- a/web/firefox4/PRE_BUILD
+++ b/web/firefox4/PRE_BUILD
@@ -1,5 +1,7 @@
-validate_source_dir &&
-mk_source_dir &&
+if [ ! -e /usr/include/cairo/cairo-tee.h ] ; then
+ message "${PROBLEM_COLOR}Run: ${MODULE_COLOR}lin -c cairo"
+ message "${MESSAGE_COLOR}To recompile cairo with tee support, which is required by firefox4.${DEFAULT_COLOR}"
+ exit 1
+fi
-cd $SOURCE_DIRECTORY &&
-unpack $SOURCE
+default_pre_build
diff --git a/web/firefox4/firefox.desktop b/web/firefox4/firefox.desktop
index d750023..064444f 100644
--- a/web/firefox4/firefox.desktop
+++ b/web/firefox4/firefox.desktop
@@ -3,7 +3,7 @@ Encoding=UTF-8
Name=Firefox
Comment=Firefox Web Browser
Exec=firefox
-Icon=/usr/share/pixmaps/firefox48.png
+Icon=firefox
Terminal=false
Type=Application
Categories=Application;Network;
diff --git a/web/firefox4/mozconfig b/web/firefox4/mozconfig
index da71a77..94ed726 100644
--- a/web/firefox4/mozconfig
+++ b/web/firefox4/mozconfig
@@ -15,9 +15,7 @@ ac_add_options --enable-crypto
ac_add_options --enable-strip
ac_add_options --enable-canvas
ac_add_options --enable-svg
-# Firefox4b9 adds non standard extensions to cairo
-# So use the internal one till system one will get these extensions
-#ac_add_options --enable-system-cairo
+ac_add_options --enable-system-cairo
ac_add_options --enable-xterm-updates
ac_add_options --enable-libxul
ac_add_options --enable-official-branding
@@ -30,9 +28,6 @@ ac_add_options --disable-logging
ac_add_options --disable-accessibility
ac_add_options --enable-mathml
ac_add_options --disable-os2-high-mem
-# firefox4 can use its internal libevent 1.x
-# until the libevent 1 vs 2 issue is safe.
-ac_add_options --without-system-libevent
ac_add_options --enable-gio
ac_add_options --enable-raw
ac_add_options --with-system-libvpx
More information about the Lunar-commits
mailing list