[Lunar-commits] <moonbase> firefox: add ability to do a pgo build, and more
Zachary McGrew
zmcgrew at lunar-linux.org
Mon Mar 9 06:56:49 CET 2009
commit 39d502705ba265ab06d0c912bc543ed7afdce0f4
Author: Zachary McGrew <zmcgrew at lunar-linux.org>
Date: Sun Mar 8 22:56:49 2009 -0700
firefox: add ability to do a pgo build, and more
---
web/firefox/BUILD | 141 +++++++++++++++++++++++--------------------------
web/firefox/CONFIGURE | 3 +
web/firefox/DEPENDS | 22 +++++---
web/firefox/mozconfig | 39 ++++++++++++++
4 files changed, 121 insertions(+), 84 deletions(-)
diff --git a/web/firefox/BUILD b/web/firefox/BUILD
index 193492a..ea3a841 100644
--- a/web/firefox/BUILD
+++ b/web/firefox/BUILD
@@ -1,103 +1,94 @@
(
if module_is_expired $MODULE && [ "$VERSION" != "`installed_version $MODULE`" ]; then
set_module_config OLD_VER "`installed_version $MODULE`"
- fi &&
+ fi &&
# This should always be just a link
- rm -rf /usr/lib/firefox-$VERSION/plugins &&
+ rm -rf /usr/lib/firefox-$VERSION/plugins &&
- MOZILLA_HOME=/usr/lib/$MODULE-$VERSION
+ export MOZILLA_HOME=/usr/lib/$MODULE-$VERSION
+ export MOZ_CO_PROJECT=browser
+ export MOZILLA_OFFICIAL=1
+ export BUILD_OFFICIAL=1
- MOZ_EXTENSIONS="default,xforms"
+ cp $SCRIPT_DIRECTORY/mozconfig mozilla/ &&
- if in_depends $MODULE heimdal ; then
- MOZ_EXTENSIONS="${MOZ_EXTENSIONS},auth"
- else
- MOZ_EXTENSIONS="${MOZ_EXTENSIONS},-auth"
- fi &&
+ export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla"
+ mkdir -p ${MOZ_OBJDIR} &&
+
+ cd mozilla &&
+
+ #Add DEPENDS options
- if in_depends $MODULE gnome-vfs2 ; then
- MOZ_EXTENSIONS="${MOZ_EXTENSIONS},gnomevfs"
+ if in_depends $MODULE dbus ; then
+ echo "ac_add_options --enable-dbus" >> mozconfig
else
- MOZ_EXTENSIONS="${MOZ_EXTENSIONS},-gnomevfs"
- fi &&
+ echo "ac_add_options --disable-dbus" >> mozconfig
+ fi &&
- export MOZ_CO_PROJECT=browser
- export MOZILLA_OFFICIAL=1
- export BUILD_OFFICIAL=1
+ if in_depends $MODULE sqlite ; then
+ echo "ac_add_options --enable-system-sqlite" >> mozconfig
+ fi &&
- export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla"
- mkdir -p ${MOZ_OBJDIR} &&
-
- cd ${MOZ_OBJDIR} &&
-
- ../mozilla/configure \
- --prefix=/usr \
- --with-x \
- --with-pthreads \
- --with-default-mozilla-five-home=$MOZILLA_HOME \
- --with-user-appdir=".firefox" \
- --with-system-zlib \
- --with-system-jpeg \
- --enable-extensions=${MOZ_EXTENSIONS} \
- --enable-single-profile \
- --enable-storage \
- --enable-places \
- --enable-places_bookmarks \
- --enable-application=browser \
- --enable-optimize="$CFLAGS" \
- --enable-reorder \
- --enable-cpp-rtti \
- --enable-cpp-exceptions \
- --enable-crypto \
- --enable-strip \
- --enable-strip-libs \
- --enable-canvas \
- --enable-svg \
- --enable-svg-renderer=cairo \
- --enable-system-cairo \
- --enable-xterm-updates \
- --enable-libxul \
- --enable-official-branding \
- --disable-debug \
- --disable-freetype2 \
- --disable-tests \
- --disable-mochitest \
- --disable-installer \
- --disable-pedantic \
- --disable-mailnews \
- --disable-logging \
- --disable-accessibility \
- --disable-ldap \
- --disable-profilesharing \
- --disable-mathml \
- $OPTS &&
-
- default_make &&
+ if in_depends $MODULE heimdal ; then
+ echo "ac_add_options --with-gssapi=/usr/include/heimdal" >> mozconfig
+ else
+ echo "ac_add_options --without-gssapi" >> mozconfig
+ fi &&
+
+ if in_depends $MODULE "xulrunner" ; then
+ XUL=`module_version xulrunner`
+ echo "ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-$XUL" >> mozconfig
+ fi &&
+
+ #Add CONFIGURE options
+
+ if [ "$SAFE" == "y" ] ; then
+ echo "ac_add_options --enable-safe-browsing" >> mozconfig
+ fi &&
+
+ if [ "$WEBSERVICES" == "y" ] ; then
+ echo "ac_add_options --enable-webservices" >> mozconfig
+ fi &&
+
+ #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 profiledbuild
+ else
+ make -f client.mk
+ 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 &&
+ 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 /usr/lib/firefox-$VERSION/plugins`; do
`install -m755 /usr/lib/firefox-$VERSION/plugins/$plugin /opt/lunar/plugins`; done &&
- rm -rf /usr/lib/firefox-$VERSION/plugins &&
- ln -snf /opt/lunar/plugins /usr/lib/firefox-$VERSION/plugins &&
+ rm -rf /usr/lib/firefox-$VERSION/plugins &&
+ ln -snf /opt/lunar/plugins /usr/lib/firefox-$VERSION/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/firefox.xpm is an existing symlink...
- rm -f /usr/share/pixmaps/firefox.xpm &&
- install -m644 $MOZILLA_HOME/icons/mozicon50.xpm /usr/share/pixmaps/firefox.xpm &&
+ rm -f /usr/share/pixmaps/firefox.xpm &&
+ install -m644 $MOZILLA_HOME/icons/mozicon50.xpm /usr/share/pixmaps/firefox.xpm &&
# Make firefox use its own icon
- rm -rf /usr/lib/firefox-$VERSION/chrome/icons &&
- mkdir -p /usr/lib/firefox-$VERSION/chrome/icons/default &&
+ rm -rf /usr/lib/firefox-$VERSION/chrome/icons &&
+ mkdir -p /usr/lib/firefox-$VERSION/chrome/icons/default &&
for icon in 16 32 48; do
ln -sf /usr/lib/firefox-$VERSION/icons/mozicon128.png \
diff --git a/web/firefox/CONFIGURE b/web/firefox/CONFIGURE
new file mode 100644
index 0000000..7343b8e
--- /dev/null
+++ b/web/firefox/CONFIGURE
@@ -0,0 +1,3 @@
+mquery PGO "Build with Profile Guided Optimization?" y "--enable-profile-guided-optimization" ""
+mquery SAFE "Enable safe browsing (anti-phishing)?" y "--enable-safe-browsing" ""
+mquery WEBSERVICES "Enable webservices support?" y "--enable-webservices" ""
diff --git a/web/firefox/DEPENDS b/web/firefox/DEPENDS
index 4cf40da..31920ae 100644
--- a/web/firefox/DEPENDS
+++ b/web/firefox/DEPENDS
@@ -6,13 +6,17 @@ depends gtk+-2
depends nss
depends curl
-optional_depends "sqlite" \
- "--enable-system-sqlite" \
- "--disable-system-sqlite" \
- "use sqlite for firefox storage"
-optional_depends "%FLASH" "" "" "to enable Shockwave Flash"
-optional_depends "gnome-vfs" "" "--disable-gnomevfs" "for Gnome VFS support"
-optional_depends "heimdal" \
- "--with-gssapi=/usr/include/heimdal" \
- "--without-gssapi" \
+optional_depends "sqlite" "" "" \
+ "Use system sqlite"
+
+optional_depends "%FLASH" "" "" \
+ "To enable Flash plugin"
+
+optional_depends "gnome-vfs" "" "" \
+ "For Gnome VFS support"
+
+optional_depends "heimdal" "" "" \
"Heimdal GSSAPI Support"
+
+optional_depends "Python" "" "" \
+ "Needed to do a Profile Guided Optimization build"
diff --git a/web/firefox/mozconfig b/web/firefox/mozconfig
new file mode 100644
index 0000000..78f4133
--- /dev/null
+++ b/web/firefox/mozconfig
@@ -0,0 +1,39 @@
+ac_add_options --prefix=/usr
+ac_add_options --with-x
+ac_add_options --with-pthreads
+ac_add_options --with-default-mozilla-five-home=$MOZILLA_HOME
+ac_add_options --with-user-appdir=".firefox"
+ac_add_options --with-system-zlib
+ac_add_options --with-system-jpeg
+ac_add_options --enable-single-profile
+ac_add_options --enable-storage
+ac_add_options --enable-places
+ac_add_options --enable-places_bookmarks
+ac_add_options --enable-application=browser
+ac_add_options --enable-optimize="$CFLAGS"
+ac_add_options --enable-reorder
+ac_add_options --enable-cpp-rtti
+ac_add_options --enable-cpp-exceptions
+ac_add_options --enable-crypto
+ac_add_options --enable-strip
+ac_add_options --enable-strip-libs
+ac_add_options --enable-canvas
+ac_add_options --enable-svg
+ac_add_options --enable-svg-renderer=cairo
+ac_add_options --enable-system-cairo
+ac_add_options --enable-xterm-updates
+ac_add_options --enable-libxul
+ac_add_options --enable-official-branding
+ac_add_options --disable-debug
+ac_add_options --disable-freetype2
+ac_add_options --disable-tests
+ac_add_options --disable-mochitest
+ac_add_options --disable-installer
+ac_add_options --disable-pedantic
+ac_add_options --disable-mailnews
+ac_add_options --disable-logging
+ac_add_options --disable-accessibility
+ac_add_options --disable-ldap
+ac_add_options --disable-profilesharing
+ac_add_options --enable-mathml
+
More information about the Lunar-commits
mailing list