From 9b81f2ae65b03382dd34d9a0eaf3a3775a53a01a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 13 Feb 2008 10:36:53 +0000 Subject: [PATCH] * Firefox 3 beta 3. svn path=/nixpkgs/trunk/; revision=10656 --- .../{firefox3b1 => firefox-3}/binary.nix | 0 .../{firefox3b1 => firefox-3}/builder.sh | 0 .../networking/browsers/firefox-3/default.nix | 64 +++++++++++++++++++ .../networking/browsers/firefox3b1/3b2.nix | 57 ----------------- .../browsers/firefox3b1/default.nix | 58 ----------------- .../browsers/firefox3b1/writable-copies.patch | 23 ------- .../browsers/firefox3b1/xlibs.patch | 10 --- pkgs/top-level/all-packages.nix | 15 +---- 8 files changed, 67 insertions(+), 160 deletions(-) rename pkgs/applications/networking/browsers/{firefox3b1 => firefox-3}/binary.nix (100%) rename pkgs/applications/networking/browsers/{firefox3b1 => firefox-3}/builder.sh (100%) create mode 100644 pkgs/applications/networking/browsers/firefox-3/default.nix delete mode 100644 pkgs/applications/networking/browsers/firefox3b1/3b2.nix delete mode 100644 pkgs/applications/networking/browsers/firefox3b1/default.nix delete mode 100644 pkgs/applications/networking/browsers/firefox3b1/writable-copies.patch delete mode 100644 pkgs/applications/networking/browsers/firefox3b1/xlibs.patch diff --git a/pkgs/applications/networking/browsers/firefox3b1/binary.nix b/pkgs/applications/networking/browsers/firefox-3/binary.nix similarity index 100% rename from pkgs/applications/networking/browsers/firefox3b1/binary.nix rename to pkgs/applications/networking/browsers/firefox-3/binary.nix diff --git a/pkgs/applications/networking/browsers/firefox3b1/builder.sh b/pkgs/applications/networking/browsers/firefox-3/builder.sh similarity index 100% rename from pkgs/applications/networking/browsers/firefox3b1/builder.sh rename to pkgs/applications/networking/browsers/firefox-3/builder.sh diff --git a/pkgs/applications/networking/browsers/firefox-3/default.nix b/pkgs/applications/networking/browsers/firefox-3/default.nix new file mode 100644 index 000000000000..88315aa0c31b --- /dev/null +++ b/pkgs/applications/networking/browsers/firefox-3/default.nix @@ -0,0 +1,64 @@ +args: with args; + +stdenv.mkDerivation { + name = "firefox-3.0-beta-3"; + + src = fetchurl { + url = ftp://ftp.mozilla.org/pub/firefox/releases/3.0b3/source/firefox-3.0b3-source.tar.bz2; + sha1 = "142f28a41077e77d61423a5ca6585a45737ff999"; + }; + + buildInputs = [ + pkgconfig gtk perl zip libIDL libXi libjpeg libpng zlib cairo + python curl coreutils dbus dbus_glib pango freetype fontconfig + libX11 libXrender libXft libXt + ]; + + configureFlags = [ + "--enable-application=browser" + "--enable-optimize" + "--disable-debug" + "--enable-strip" + "--with-system-jpeg" + "--with-system-zlib" + #"--with-system-png" <-- "--with-system-png won't work because the system's libpng doesn't have APNG support" + #"--enable-system-cairo" <-- disabled for now because Firefox needs a alpha version of Cairo + ]; + + postInstall = '' + export dontPatchELF=1; + + # Strip some more stuff + strip -S $out/lib/*/* || true + + # Fix some references to /bin paths in the Firefox shell script. + substituteInPlace $out/bin/firefox \ + --replace /bin/pwd "$(type -tP pwd)" \ + --replace /bin/ls "$(type -tP ls)" + + # 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. + libDir=$(cd $out/lib && ls -d firefox-[0-9]*) + test -n "$libDir" + cd $out/bin + mv firefox ../lib/$libDir/ + ln -s ../lib/$libDir/firefox . + + # Register extensions etc. + echo "running firefox -register..." + (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./firefox-bin -register) || false + + # Put the Firefox icon in the right place. + ensureDir $out/lib/$libDir/chrome/icons/default + ln -s ../../../icons/default.xpm $out/lib/$libDir/chrome/icons/default/ + ''; # */ + + meta = { + description = "Mozilla Firefox - the browser, reloaded"; + homepage = http://www.mozilla.com/en-US/firefox/; + }; + + passthru = {inherit gtk;}; +} + diff --git a/pkgs/applications/networking/browsers/firefox3b1/3b2.nix b/pkgs/applications/networking/browsers/firefox3b1/3b2.nix deleted file mode 100644 index 29ea90d9d893..000000000000 --- a/pkgs/applications/networking/browsers/firefox3b1/3b2.nix +++ /dev/null @@ -1,57 +0,0 @@ -args: with args; - -stdenv.mkDerivation { - name = "firefox-3b2"; - - src = - fetchurl { - url = ftp://ftp.mozilla.org/pub/firefox/releases/3.0b2/source/firefox-3.0b2-source.tar.bz2; - sha256 = "0mszad8j35wvzi67dp3j9sznqkgb9b3in22c5790g9b9pv6xk8jp"; - }; - - buildInputs = [ - pkgconfig gtk perl zip libIDL libXi libjpeg libpng zlib cairo - python curl coreutils dbus dbus_glib pango freetype fontconfig - libX11 libXrender libXft libXt - ]; - - configureFlags = [ - "--enable-application=browser" - "--enable-optimize" - "--disable-debug" - "--enable-xft" - "--disable-freetype2" - "--enable-svg" - "--enable-canvas" - "--enable-strip" - "--enable-default-toolkit=cairo-gtk2" - "--with-system-jpeg" - "--with-system-zlib" -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* "--enable-system-cairo" -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - ] -; - - postInstall = " - export dontPatchELF=1; - sed -e 's@moz_libdir=.*@&\\nexport PATH=\$PATH:${coreutils}/bin@' -i \$out/bin/firefox - sed -e 's@`/bin/pwd@`${coreutils}/bin/pwd@' -i \$out/bin/firefox - sed -e 's@`/bin/ls@`${coreutils}/bin/ls@' -i \$out/bin/firefox - - strip -S \$out/lib/*/* || true - - libDir=\$(cd \$out/lib && ls -d firefox-[0-9]*) - test -n \"\$libDir\" - - echo \"running firefox -register...\" - (cd \$out/lib/\$libDir && LD_LIBRARY_PATH=. ./firefox-bin -register) || false - "; - - meta = { - description = "Mozilla Firefox - the browser, reloaded"; - }; - - passthru = {inherit gtk;}; -} - diff --git a/pkgs/applications/networking/browsers/firefox3b1/default.nix b/pkgs/applications/networking/browsers/firefox3b1/default.nix deleted file mode 100644 index 675f2935d2f9..000000000000 --- a/pkgs/applications/networking/browsers/firefox3b1/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -args: with args; - -stdenv.mkDerivation { - name = "firefox-3b1"; - - src = - fetchurl { - url = ftp://ftp.mozilla.org/pub/firefox/releases/3.0b1/source/firefox-3.0b1-source.tar.bz2; - sha256 = "02mh87aidr33gp33fasq9xx23jqf7lm7yfsb2a36ijnd3bpnssn9"; - }; - - buildInputs = [ - pkgconfig gtk perl zip libIDL libXi libjpeg libpng zlib cairo - python curl coreutils - ]; - - configureFlags = [ - "--enable-application=browser" - "--enable-optimize" - "--disable-debug" - "--enable-xft" - "--disable-freetype2" - "--enable-svg" - "--enable-canvas" - "--enable-strip" - "--enable-default-toolkit=cairo-gtk2" - "--with-system-jpeg" - "--with-system-zlib" - /*"--enable-system-cairo"*/ - ] -; - - postConfigure = " - cp -r . /tmp/ff3b1-build - "; - - postInstall = " - sed -e 's@moz_libdir=.*@&\\nexport PATH=\$PATH:${coreutils}/bin@' -i \$out/bin/firefox - sed -e 's@`/bin/pwd@`${coreutils}/bin/pwd@' -i \$out/bin/firefox - sed -e 's@`/bin/ls@`${coreutils}/bin/ls@' -i \$out/bin/firefox - - strip -S \$out/lib/*/* || true - - libDir=\$(cd \$out/lib && ls -d firefox-[0-9]*) - test -n \"\$libDir\" - - echo \"running firefox -register...\" - (cd \$out/lib/\$libDir && LD_LIBRARY_PATH=. ./firefox-bin -register) || false - "; - - meta = { - description = "Mozilla Firefox - the browser, reloaded"; - homepage = http://www.mozilla.com/en-US/firefox/; - }; - - passthru = {inherit gtk;}; -} - diff --git a/pkgs/applications/networking/browsers/firefox3b1/writable-copies.patch b/pkgs/applications/networking/browsers/firefox3b1/writable-copies.patch deleted file mode 100644 index e3c7752c0310..000000000000 --- a/pkgs/applications/networking/browsers/firefox3b1/writable-copies.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -rc mozilla-orig/xpcom/io/nsLocalFileUnix.cpp mozilla/xpcom/io/nsLocalFileUnix.cpp -*** mozilla-orig/xpcom/io/nsLocalFileUnix.cpp 2004-04-03 01:48:18.000000000 +0200 ---- mozilla/xpcom/io/nsLocalFileUnix.cpp 2004-10-05 19:48:04.000000000 +0200 -*************** -*** 634,639 **** ---- 634,640 ---- - // get the dirs old permissions - if (NS_FAILED(rv = GetPermissions(&oldPerms))) - return rv; -+ oldPerms |= 0200; - if (NS_FAILED(rv = newParent->Create(DIRECTORY_TYPE, oldPerms))) - return rv; - } else { // dir exists lets try to use leaf -*************** -*** 758,763 **** ---- 759,765 ---- - // get the old permissions - PRUint32 myPerms; - GetPermissions(&myPerms); -+ myPerms |= 0200; - - // Create the new file with the old file's permissions, even if write - // permission is missing. We can't create with write permission and diff --git a/pkgs/applications/networking/browsers/firefox3b1/xlibs.patch b/pkgs/applications/networking/browsers/firefox3b1/xlibs.patch deleted file mode 100644 index a656fbf9beb4..000000000000 --- a/pkgs/applications/networking/browsers/firefox3b1/xlibs.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- mozilla/layout/build/Makefile.in.orig 2007-01-13 14:23:19.000000000 -0200 -+++ mozilla/layout/build/Makefile.in 2007-01-13 14:24:55.000000000 -0200 -@@ -282,5 +282,6 @@ LDFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=50 - endif - endif - -+LDFLAGS += -lX11 -lXrender - - export:: $(BUILD_DATE) - \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f2b9fe3630c1..c2b426388f20 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4705,18 +4705,9 @@ rec { firefoxWrapper = wrapFirefox firefox ""; - firefox3b1 = lowPrio (import ../applications/networking/browsers/firefox3b1 { + firefox3 = lowPrio (import ../applications/networking/browsers/firefox-3 { inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo - python curl coreutils; - inherit (gtkLibs) gtk; - inherit (gnome) libIDL; - inherit (xlibs) libXi; - #enableOfficialBranding = true; - }); - - firefox3b2 = lowPrio (import ../applications/networking/browsers/firefox3b1/3b2.nix { - inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo - python curl coreutils dbus dbus_glib freetype fontconfig; + python curl coreutils dbus dbus_glib freetype fontconfig; inherit (gtkLibs) gtk pango; inherit (gnome) libIDL; inherit (xlibs) libXi libX11 libXrender libXft libXt; @@ -4731,7 +4722,7 @@ rec { inherit (xlibs) libXi libX11 libXrender libXft libXt; }); - firefox3b1Wrapper = lowPrio (wrapFirefox firefox3b1 ""); + firefox3Wrapper = lowPrio (wrapFirefox firefox3 ""); firefox3b1BinWrapper = lowPrio (wrapFirefox firefox3b1Bin ""); flacAlts = import ../applications/audio/flac {