[Lunar-commits] <moonbase-other> firefox: major cleanup
v4hn
me at v4hn.de
Mon Aug 13 15:07:40 CEST 2012
commit c2dc89a4f970586fdc7b759d4405a61798c8cce2
Author: v4hn <me at v4hn.de>
Date: Mon, 13 Aug 2012 06:07:40 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/c2dc89a4f970586fdc7b759d4405a61798c8cce2
firefox: major cleanup
installwatch now tracks everything the way it should.
Also the $OPTS logic was simply weird...
---
web/firefox/BUILD +10/-50
web/firefox/CONFIGURE +2/-2
web/firefox/DEPENDS +8/-6
web/firefox/POST_INSTALL +0/-28
web/firefox/POST_REMOVE +0/-9
web/firefox/mozconfig +7/-6
6 files changed, 27 insertions (+), 101 deletions (-)
--- a/web/firefox/BUILD
+++ b/web/firefox/BUILD
@@ -1,18 +1,7 @@
(
- # Workaround Segmentation fault at install part on precompile_cache.js
- sedit '/^GENERATE_CACHE = 1$/d' browser/installer/Makefile.in &&
-
sedit 's/@PRE_RELEASE_SUFFIX@//g' browser/base/content/browser.xul &&
- if module_is_expired $MODULE && [ "$VERSION" != "`installed_version $MODULE`" ]; then
- set_module_config OLD_VER "`installed_version $MODULE`"
- fi &&
-
- # Adds support for libvpx 1.0. Later firefox will have this fix so remove this then.
- sedit 's/VPX_CODEC_USE_INPUT_PARTITION/VPX_CODEC_USE_INPUT_FRAGMENTS/' configure &&
- sedit 's/v0\.9\.7/v1.0.0/' configure &&
-
export MOZ_CO_PROJECT=browser &&
export MOZILLA_HOME=/usr/lib/$MODULE-$VERSION &&
export MOZILLA_OFFICIAL=1 &&
@@ -25,42 +14,11 @@
export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla" &&
mkdir -p ${MOZ_OBJDIR} &&
- #Add DEPENDS options
-
- 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 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 libffi ; then
- echo "ac_add_options --enable-system-ffi" >> mozconfig
- else
- echo "ac_add_options --disable-system-ffi" >> mozconfig
- fi &&
-
- if in_depends $MODULE sun-jdk ; then
- echo "ac_add_options --with-java-bin-path=/usr/java/default/bin" >> mozconfig
- fi &&
-
- #Add CONFIGURE options
-
- if [ "$SAFE" == "y" ] ; then
- echo "ac_add_options --enable-safe-browsing" >> mozconfig
- fi &&
+ for flag in $OPTS; do
+ echo "ac_add_options $flag" >> mozconfig
+ done &&
+ # turn off this #$ bell during build
setterm -bfreq -blength &&
if [ -n "${MAKES}" ]; then
@@ -71,9 +29,8 @@
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
@@ -81,13 +38,16 @@
cd ${MOZ_OBJDIR} &&
prepare_install &&
- make install || exit 1
+ make install &&
# Now the .desktop file and icons
install -Dm 644 {"$SCRIPT_DIRECTORY",/usr/share/applications}/firefox.desktop &&
for s in 16 22 24 32 48 256 ; do
install -Dm 644 $SOURCE_DIRECTORY/browser/branding/official/default${s}.png /usr/share/icons/hicolor/${s}x${s}/apps/firefox.png
- done
+ done &&
+
+ # symlink plugins folder
+ ln -sfn /usr/lib/lunar/plugins "/usr/lib/firefox-$VERSION/plugins"
) > $C_FIFO 2>&1
--- a/web/firefox/CONFIGURE
+++ b/web/firefox/CONFIGURE
@@ -1,2 +1,2 @@
-mquery PGO "Build with Profile Guided Optimization? (Requires firefox to be compiled within a running instance of X)" y "--enable-profile-guided-optimization" ""
-mquery SAFE "Enable safe browsing (anti-phishing)?" y "--enable-safe-browsing" ""
+mquery PGO "Build with Profile Guided Optimization? (Requires firefox to be compiled within a running instance of X)" y "" ""
+mquery SAFE "Enable safe browsing (anti-phishing)?" y "--enable-safe-browsing" "--disable-safe-browsing"
--- a/web/firefox/DEPENDS
+++ b/web/firefox/DEPENDS
@@ -17,10 +17,12 @@ depends libvpx
optional_depends "Python" "" "" "Needed to do a Profile Guided Optimization build"
optional_depends "flash-plugin-11" "" "" "To enable Flash plugin"
-optional_depends "gnome-vfs" "" "" "For Gnome VFS support"
-optional_depends "hunspell" "" "" "For spelling support"
-# $OPTS is ignored in this BUILD
-optional_depends "libevent" "" "" "For event detection"
-optional_depends "dbus-glib" "" "" "For dbus support"
-optional_depends "libffi" "" "" "Use system libffi instead of compiling the one in firefox"
+optional_depends "gnome-vfs" "--enable-gnomevfs" "--disable-gnomevfs" "For Gnome VFS support"
+optional_depends "hunspell" "--enable-system-hunspell" "--disable-system-hunspell" "For spelling support"
+
+optional_depends "libevent" "--with-system-libevent" "--without-system-libevent" "For event detection"
+optional_depends "dbus-glib" "--enable-dbus" "--disable-dbus" "For dbus support"
+optional_depends "libffi" "--enable-system-ffi" "--disable-system-ffi" "Use system libffi instead of compiling the one in firefox"
+
+optional_depends "sun-jdk" "--with-java-bin-path=/usr/java/default/bin" "" "for java support"
--- a/web/firefox/POST_INSTALL
+++ /dev/null
@@ -1,28 +0,0 @@
-OLD_VER="`get_module_config OLD_VER`"
-NEW_VER="`get_module_config NEW_VER`"
-FIREFOX_HOME=/usr
-FFOX_LIBDIR=firefox-$VERSION
-
-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/include/firefox-$old_version
- rm -rf /usr/share/idl/firefox-$old_version
- done
-fi
-
-unset_module_config OLD_VER
-
-# Clean up old firefox junk
-rm -rf /usr/lib/firefox-[02-9]*
-rm -rf /usr/lib/firefox-devel-[02-9]*
-rm -rf /usr/include/firefox-[02-9]*
-rm -rf /usr/share/idl/firefox-[02-9]*
-
-export LD_LIBRARY_PATH="$FIREFOX_HOME/lib/$FFOX_LIBDIR:$FIREFOX_HOME/lib/$FFOX_LIBDIR/plugins:$FIREFOX_HOME/lib/$FFOX_LIBDIR/components"
-export MOZILLA_FIVE_HOME="$FIREFOX_HOME/lib/$FFOX_LIBDIR"
-# Add plugins
-ln -snf /usr/lib/lunar/plugins "$MOZILLA_FIVE_HOME/plugins"
-ldconfig
--- a/web/firefox/POST_REMOVE
+++ /dev/null
@@ -1,9 +0,0 @@
-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*
-rm -rf /usr/share/idl/firefox*
-rm -rf /usr/lib/firefox*
--- a/web/firefox/mozconfig
+++ b/web/firefox/mozconfig
@@ -11,14 +11,11 @@ ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-crypto
ac_add_options --enable-strip
-#firefox 12 will not build with system cairo
-#because it uses some mozilla made extensions/private functions
-#so disable it till this will work again
-#ac_add_options --enable-system-cairo
ac_add_options --enable-xterm-updates
ac_add_options --enable-official-branding
ac_add_options --enable-jemalloc
ac_add_options --disable-debug
+ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --disable-installer
ac_add_options --disable-pedantic
@@ -31,8 +28,12 @@ ac_add_options --enable-raw
ac_add_options --with-system-libvpx
ac_add_options --enable-shared-js
ac_add_options --enable-system-pixman
-#firefox 12 will not build with tree freetype
-#ac_add_options --enable-tree-freetype
+ac_add_options --enable-tree-freetype
ac_add_options --disable-crashreporter
ac_add_options --disable-necko-wifi
ac_add_options --disable-system-sqlite
+
+#firefox 14 will not build with system cairo
+#because it uses some mozilla made extensions/private functions
+#so disable it till this will work again
+#ac_add_options --enable-system-cairo
More information about the Lunar-commits
mailing list