-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-PACKAGE=${1}
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-FIREFOX_BUILD_DIR="${1}-build"
-FIREFOX_PKG_VERSION="firefox-$(get_pkg_ver ${PACKAGE})"
-
-cd ${LFS_TMP}/${PACKAGE}
-cat > .mozconfig << "EOF"
-# This file contains the options used in the Firefox build.
-
-# Use the default settings specified in the source tree
+#!/bin/bash
+
+hvbuild()
+{
+ FIREFOX_BUILD_DIR="${PACKAGE}-build"
+ FIREFOX_PKG_VERSION="firefox-$(get_pkg_ver ${PACKAGE})"
+
+ # This file contains the options used in the Firefox build.
+ cd ${LFS_TMP}/${PACKAGE}
+ cat > .mozconfig << "EOF"
+# Use the default settings specified in the source tree.
+# This includes the option --enable-application=browser
. $topsrcdir/browser/config/mozconfig
-# build the browser
-ac_add_options --enable-application=browser
-
# Create an object directory and specify to build the package in that
# directory. If desired, modify the location of the object directory
# to a directory inside the source tree by removing '../' from the
# the source tree code which may not be the most recent versions.
ac_add_options --with-system-zlib
ac_add_options --with-system-jpeg
+ac_add_options --with-system-png
+
ac_add_options --enable-system-cairo
ac_add_options --enable-system-lcms
ac_add_options --enable-system-sqlite
-# comment this if you have not installed png with the apng patch
-ac_add_options --with-system-png
+ac_add_options --enable-startup-notification
-# This option is used to enable support for rendering SVG files in the
-# Firefox browser. Comment out the line to disable the option.
ac_add_options --enable-svg
# These two options enable support for building Firefox with
#ac_add_options --with-system-nspr
#ac_add_options --with-system-nss
+ac_add_options --disable-gnomevfs
+
# uncomment this if you did not build curl
ac_add_options --disable-crashreporter
# The updater is not useful if you build from source.
ac_add_options --disable-updater
-# This option is used to disable the a11y support in the Firefox
-# binaries. Comment out this option if you require a11y support.
+# Disable the a11y support in the Firefox binaries.
ac_add_options --disable-accessibility
# This option is added so that test libraries and programs are not
# Point to the xulrunner libraries - comment this for a standalone browser
#ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-1.9.0.7
-
EOF
-sed -i -e "s!_FIREFOX_BUILD_DIR_!${FIREFOX_BUILD_DIR}!g" .mozconfig
-
-make -f client.mk build
-make -f client.mk install
-
-# Many applications look for netscape when they need to open a browser...
-ln -v -sf firefox /usr/bin/netscape
-
-# Remove old links
-rm -f /usr/lib/mozilla
-rm -f /usr/lib/firefox
-rm -f /usr/lib/${FIREFOX_PKG_VERSION}/plugins/libjavaplugin_oji.so
-
-ln -v -sf ${FIREFOX_PKG_VERSION} /usr/lib/mozilla
-ln -v -sf ${FIREFOX_PKG_VERSION} /usr/lib/firefox
-# To use the installed Java plugin.
-ln -v -s ${JAVA_HOME}/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/${FIREFOX_PKG_VERSION}/plugins
+ sed -i -e "s!_FIREFOX_BUILD_DIR_!${FIREFOX_BUILD_DIR}!g" .mozconfig
+ if [ -z "${WIFI_SUPPORT}" ]; then
+ echo "ac_add_options --disable-necko-wifi" >> .mozconfig
+ fi
-# Addition to /etc/ld.so.conf
-# This is necessary for shared library libmozjs.so (needed by gxine)
-string_add "/usr/lib/${FIREFOX_PKG_VERSION}" /etc/ld.so.conf
+ make -f client.mk build
+ make -f client.mk install
-ldconfig
+ # Remove old links and create new ones
+ rm -f /usr/lib/mozilla
+ ln -v -sf ${FIREFOX_PKG_VERSION} /usr/lib/mozilla
+ rm -f /usr/lib/firefox
+ ln -v -sf ${FIREFOX_PKG_VERSION} /usr/lib/firefox
-exit $?
+ # Addition to /etc/ld.so.conf
+ # This is necessary for shared library libmozjs.so (needed by gxine)
+ string_add "/usr/lib/${FIREFOX_PKG_VERSION}" /etc/ld.so.conf
+}