* Make the Firefox build more like xulrunner (e.g., don't using

.mozconfig).
* Optionally build Firefox with official branding (so that it calls
  itself "Firefox" instead of "Deer Park").  This should not be turned
  on for the channel!

svn path=/nixpkgs/trunk/; revision=4817
This commit is contained in:
Eelco Dolstra 2006-02-15 17:04:11 +00:00
parent 5c9484028f
commit 9012efbaef
3 changed files with 26 additions and 31 deletions

View File

@ -1,34 +1,11 @@
source $stdenv/setup
preConfigure=preConfigure
preConfigure() {
cat > .mozconfig <<EOF
source \$topsrcdir/browser/config/mozconfig
ac_add_options --prefix=$out
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-xft
ac_add_options --disable-freetype2
#ac_add_options --enable-swg
ac_add_options --enable-strip
ac_add_options --enable-default-toolkit=gtk2
#ac_add_options --disable-shared
#ac_add_options --enable-static
#ac_add_options --with-system-jpeg
#ac_add_options --with-system-png
#ac_add_options --with-system-zlib
EOF
}
postInstall=postInstall
postInstall() {
# Strip some more stuff
strip -S $out/lib/*/* || true
# We don't need this (do we?)
# rm -rf $out/include
# This fixes starting Firefox when there already is a running
# instance. The `firefox' wrapper script actually expects to be
# in the same directory as `run-mozilla.sh', apparently.
@ -36,18 +13,13 @@ postInstall() {
mv firefox ../lib/firefox-*/
ln -s ../lib/firefox-*/firefox .
# Register extension etc.
# Register extensions etc.
echo "running firefox -register..."
(cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./firefox-bin -register) || false
echo "running regxpcom..."
(cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./regxpcom) || false
# echo "running regchrome..."
# (cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./regchrome) || false
}
makeFlags="-f client.mk build"
genericBuild

View File

@ -1,6 +1,12 @@
{stdenv, fetchurl, pkgconfig, gtk, perl, zip, libIDL, libXi}:
{ stdenv, fetchurl, pkgconfig, gtk, perl, zip, libIDL, libXi
# !!! assert libIDL.glib == gtk.glib;
, # If you want the resulting program to call itself "Firefox" instead
# of "Deer Park", enable this option. However, those binaries may
# not be distributed without permission from the Mozilla Foundation,
# see http://www.mozilla.org/foundation/trademarks/.
enableOfficialBranding ? false
}:
stdenv.mkDerivation {
name = "firefox-1.5.0.1";
@ -15,4 +21,20 @@ stdenv.mkDerivation {
inherit gtk;
patches = [./writable-copies.patch];
configureFlags = [
"--enable-application=browser"
"--enable-optimize"
"--disable-debug"
"--enable-xft"
"--disable-freetype2"
"--enable-swg"
"--enable-strip"
"--enable-default-toolkit=gtk2"
"--with-system-jpeg"
"--with-system-png"
"--with-system-zlib"
]
++ (if enableOfficialBranding then ["--enable-official-branding"] else []);
}

View File

@ -1840,6 +1840,7 @@ rec {
inherit (gtkLibs) gtk;
inherit (gnome) libIDL;
inherit (xlibs) libXi;
#enableOfficialBranding = true;
};
xulrunner = (import ../development/interpreters/xulrunner) {