Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- mozilla-firefox.SlackBuild 2012-07-17 22:51:41.000000000 +0200
- +++ mozilla-firefox.SlackBuild.new 2012-12-30 09:49:50.423661000 +0100
- @@ -25,21 +25,28 @@
- VERSION=$(basename $(ls firefox-*.tar.bz2 | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
- RELEASEVER=$(echo $VERSION | cut -f 1 -d r | cut -f 1 -d b)
- +# With esr releases we need to fix this
- +if [ "${RELEASEVER}r" = "$VERSION" ]; then
- + RELEASEVER=$(echo $RELEASEVER | cut -f 1 -d e)
- + RELEASEVERMAJ=$(echo $RELEASEVER | cut -f 1 -d .)
- +fi
- BUILD=${BUILD:-1}
- CWD=$(pwd)
- TMP=${TMP:-/tmp}
- PKG=$TMP/package-mozilla-firefox
- -# Figure out if this is a beta, or a release:
- +# If not specified, figure out if this is a beta, an esr
- +# or a release (we start assuming this last):
- +MOZVERS=${MOZVERS:-release}
- if echo $VERSION | grep -q b ; then # we think it is a beta
- - if bzgrep -q mozilla-beta/ $CWD/firefox-$VERSION.source.tar.bz2 ; then
- - MOZVERS=${MOZVERS:-beta}
- - else # blindly assume it is a release
- - MOZVERS=${MOZVERS:-release}
- + if bzgrep -q ^mozilla-beta/ $CWD/firefox-$VERSION.source.tar.bz2 ; then
- + MOZVERS=beta
- + fi
- +elif echo $VERSION | grep -q esr ; then # we think it is an esr
- + if bzgrep -q ^mozilla-esr$RELEASEVERMAJ/ $CWD/firefox-$VERSION.source.tar.bz2 ; then
- + MOZVERS=esr$RELEASEVERMAJ
- fi
- -else # release, no "b" in the tarball version:
- - MOZVERS=${MOZVERS:-release}
- fi
- # Automatically determine the architecture we're building on:
- @@ -111,18 +118,8 @@
- sed -i 's# ""##' browser/base/Makefile.in
- fi
- -# Mozilla devs enforce using an objdir for building
- -# and launching configure with the absolute path
- -# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
- -mkdir obj
- -cd obj
- -export MOZILLA_OFFICIAL="1" &&
- -export BUILD_OFFICIAL="1" &&
- -export MOZ_PHOENIX="1" &&
- -export CFLAGS="$SLKCFLAGS" &&
- -export CXXFLAGS="$SLKCFLAGS" &&
- -export MOZ_MAKE_FLAGS="$NUMJOBS" &&
- -$TMP/mozilla-$MOZVERS/configure \
- +# Our building options, in a configure-like display ;)
- +OPTIONS="\
- --enable-official-branding \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- @@ -143,6 +140,7 @@
- --enable-strip \
- --enable-cpp-rtti \
- --enable-single-profile \
- + --disable-gnomevfs \
- --disable-ldap \
- --disable-accessibility \
- --disable-crashreporter \
- @@ -152,20 +150,53 @@
- --disable-installer \
- --disable-mailnews \
- --disable-composer \
- - --disable-profilesharing
- - # Complains about missing APNG support in Slackware's libpng:
- - #--with-system-png \
- -
- + --disable-profilesharing"
- +# Complains about missing APNG support in Slackware's libpng:
- +# --with-system-png \
- # This option breaks mozilla-12.0:
- # --enable-system-cairo \
- -#
- -#make -f client.mk build MOZ_MAKE_FLAGS="$NUMJOBS" || exit 1
- -make MOZ_MAKE_FLAGS="$NUMJOBS" $NUMJOBS || exit 1
- -make install DESTDIR=$PKG || exit 1
- +export MOZILLA_OFFICIAL="1"
- +export BUILD_OFFICIAL="1"
- +export MOZ_PHOENIX="1"
- +export CFLAGS="$SLKCFLAGS"
- +export CXXFLAGS="$SLKCFLAGS"
- +export MOZ_MAKE_FLAGS="$NUMJOBS"
- +
- +# Clear some variables that could break the build
- +unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
- + XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
- +
- +# Assemble our .mozconfig, we use this method for building, seems
- +# needed for PGO.
- +echo ". \$topsrcdir/browser/config/mozconfig" > .mozconfig
- +
- +# Mozilla devs enforce using an objdir for building
- +# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
- +mkdir obj
- +echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj" >> .mozconfig
- +
- +# Write in it the options above
- +for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
- +
- +# https://developer.mozilla.org/en-US/docs/Building_with_Profile-Guided_Optimization
- +# Thanks to ArchLinux and Gentoo for the additional hints.
- +if [ "${PGO:-no}" = "yes" ]; then
- + # Do a PGO build, double time and disk space but worth it.
- + export MOZ_PGO=1
- + echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(MOZ_OBJDIR)/_profile/pgo/profileserver.py 10'" >> .mozconfig
- + export DISPLAY=:99
- + # Launch Xvfb to let the profile scripts run in a X session.
- + # Ugly note: if the build breaks you may want to do a "killall Xvfb".
- + Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 $DISPLAY &
- + dbus-launch --exit-with-session make -f client.mk build
- + kill $! || true
- +else
- + # Do a normal build
- + make -f client.mk build
- +fi
- -# Exit obj directory:
- -cd ..
- +make -f client.mk install DESTDIR=$PKG
- # We don't need these (just symlinks anyway):
- rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/firefox-devel-$RELEASEVER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement