X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Ffirefox;h=1035f8275ec6e939b0e1d62e2951c78945b0e948;hb=fdeecdbf2bb61fe70e4783d4c20fbebac7a8830b;hp=180865c9f4a11d4ee8492bbe2864392fec348907;hpb=d850183ab004abc65a405b3d925ab3f274e854b5;p=hvlinux.git diff --git a/stage5/pkg/firefox b/stage5/pkg/firefox index 180865c..1035f82 100644 --- a/stage5/pkg/firefox +++ b/stage5/pkg/firefox @@ -3,15 +3,21 @@ hvbuild() { FIREFOX_BUILD_DIR="${PACKAGE}-build" + FIREFOX_VERSION="$(get_pkg_ver ${PACKAGE})" 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 + echo "# This file contains the options used in the Firefox or Xulrunner build." > .mozconfig + + # Use the default settings specified in the source tree. + if [ "x${HVLABEL}" = "x${FIREFOX}-xulrunner" ]; then + echo '. $topsrcdir/xulrunner/config/mozconfig' >> .mozconfig + else + echo '. $topsrcdir/browser/config/mozconfig' >> .mozconfig + fi + + cat >> .mozconfig << "EOF" # 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 @@ -27,7 +33,7 @@ ac_add_options --prefix=/usr # Compile with a minimal level of optimization ac_add_options --enable-optimize -# These options are used so that the Firefox binaries are linked to +# These options are used so that the Firefox or Xulrunner binaries are linked to # the system-installed copies of the specified libraries instead of # the source tree code which may not be the most recent versions. ac_add_options --with-system-zlib @@ -37,6 +43,7 @@ ac_add_options --with-system-png ac_add_options --enable-system-cairo ac_add_options --enable-system-lcms ac_add_options --enable-system-sqlite +ac_add_options --with-system-libvpx ac_add_options --enable-startup-notification ac_add_options --enable-svg @@ -51,61 +58,33 @@ ac_add_options --enable-svg ac_add_options --disable-gnomevfs -# uncomment this if you did not build curl ac_add_options --disable-crashreporter - -# This option is added so that the Mozilla Installer program is not -# built or installed. The program is not required for a BLFS -# installation of Firefox. ac_add_options --disable-installer - -# The updater is not useful if you build from source. ac_add_options --disable-updater - -# 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 -# built. These would only be required for debugging purposes. ac_add_options --disable-tests - -# The mochitest is a separate test feature and has caused problems -# in the past. ac_add_options --disable-mochitest -# This option is used to enable source tree included LDAP support in -# the Firefox binaries. -################################################################### -# -# NOTE: You must uncomment this option if there is any chance of -# compiling the OpenOffice package from source code using this copy -# of Firefox for your Mozilla support. -# -################################################################### -# Removed this option to fix bug with: -# make[3]: Entering directory `/tmp/firefox-3.0.1-build/directory/c-sdk' -# make[3]: *** No targets specified and no makefile found. Stop. -######ac_add_options --enable-ldap - -# This option causes the installed binaries to have the official -# Firefox name embedded in them. Due to license restrictions, you -# may not distribute binaries created using this option. -ac_add_options --enable-official-branding - # use the anti-phishing blacklist ac_add_options --enable-safe-browsing -# This option is used so that the debugging symbols are removed from -# the installed binaries during the installation process. Comment out -# this option if you may have a need to retain the debugging symbols -# in the installed binaries. Note that this can substantially -# increase the size of the installed binaries. +# Remove the debugging symbols from the installed binaries. ac_add_options --enable-strip -# 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 +# If you enable javaxpcom, you must have a java compiler installed. +ac_add_options --disable-javaxpcom EOF + if [ "x${HVLABEL}" = "x${FIREFOX}-browser" ]; then + # Point to the xulrunner libraries. + echo "ac_add_options --with-system-libxul" >> .mozconfig + echo "ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-${FIREFOX_VERSION}" >> .mozconfig + + # This option causes the installed binaries to have the official + # Firefox name embedded in them. + echo "ac_add_options --enable-official-branding" >> .mozconfig + fi + 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 @@ -114,13 +93,23 @@ EOF make -f client.mk build make -f client.mk install - # 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 - - # 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 + if [ "x${HVLABEL}" = "x${FIREFOX}-xulrunner" ]; then + install -v -m755 -d /usr/lib/mozilla + + # Remove old links (if applicable) and create new ones + rm -f /usr/lib/mozilla/plugins + ln -sv /usr/lib/xulrunner-${FIREFOX_VERSION}/plugins /usr/lib/mozilla + chown -Rv root:root /usr/lib/xulrunner-* \ + /usr/share/idl/xulrunner-* \ + /usr/include/xulrunner-* + + # Fixes the error "run-mozilla.sh: no such file or directory" + ln -s /usr/lib/xulrunner-devel-${FIREFOX_VERSION}/sdk/bin/run-mozilla.sh /usr/lib/xulrunner-devel-${FIREFOX_VERSION}/bin + ln -s /usr/lib/xulrunner-devel-${FIREFOX_VERSION}/sdk/bin/xpcshell /usr/lib/xulrunner-devel-${FIREFOX_VERSION}/bin + else + rm /usr/bin/firefox + echo "#!/bin/bash" > /usr/bin/firefox + echo "/usr/lib/xulrunner-${FIREFOX_VERSION}/xulrunner /usr/lib/firefox-${FIREFOX_VERSION}/application.ini \"\${@}\"" >> /usr/bin/firefox + chmod 755 /usr/bin/firefox + fi }