From 803f369435c9eedeed2d16827842df22f042b837 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 2 Jun 2007 20:32:24 +0000 Subject: [PATCH] * Thunderbird 2.0.0.0. svn path=/nixpkgs/trunk/; revision=8820 --- .../mailreaders/thunderbird-2.x/builder.sh | 30 +++++++++++ .../mailreaders/thunderbird-2.x/default.nix | 54 +++++++++++++++++++ .../mailreaders/thunderbird-2.x/xlibs.patch | 10 ++++ pkgs/top-level/all-packages.nix | 8 +++ 4 files changed, 102 insertions(+) create mode 100644 pkgs/applications/networking/mailreaders/thunderbird-2.x/builder.sh create mode 100644 pkgs/applications/networking/mailreaders/thunderbird-2.x/default.nix create mode 100644 pkgs/applications/networking/mailreaders/thunderbird-2.x/xlibs.patch diff --git a/pkgs/applications/networking/mailreaders/thunderbird-2.x/builder.sh b/pkgs/applications/networking/mailreaders/thunderbird-2.x/builder.sh new file mode 100644 index 00000000000..7635910ae9f --- /dev/null +++ b/pkgs/applications/networking/mailreaders/thunderbird-2.x/builder.sh @@ -0,0 +1,30 @@ +source $stdenv/setup + +postInstall=postInstall +postInstall() { + + # Strip some more stuff + strip -S $out/lib/*/* || true + + # This fixes starting Thunderbird when there already is a running + # instance. The `thunderbird' wrapper script actually expects to + # be in the same directory as `run-mozilla.sh', apparently. + libDir=$(cd $out/lib && ls -d thunderbird-*) + test -n "$libDir" + cd $out/bin + mv thunderbird ../lib/$libDir/ + ln -s ../lib/$libDir/thunderbird . + + # Register extensions etc. + echo "running thunderbird -register..." + (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./thunderbird-bin -register) || false + + echo "running regxpcom..." + (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./regxpcom) || false + + # Put the Thunderbird icon in the right place. + ensureDir $out/lib/$libDir/chrome/icons/default + ln -s ../../../icons/default.xpm $out/lib/$libDir/chrome/icons/default/ +} + +genericBuild diff --git a/pkgs/applications/networking/mailreaders/thunderbird-2.x/default.nix b/pkgs/applications/networking/mailreaders/thunderbird-2.x/default.nix new file mode 100644 index 00000000000..de7ef931c22 --- /dev/null +++ b/pkgs/applications/networking/mailreaders/thunderbird-2.x/default.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchurl, pkgconfig, gtk, perl, zip, libIDL, libXi +, libjpeg, libpng, zlib, cairo + +, # If you want the resulting program to call itself "Thunderbird" + # instead of "Mail", 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 = "thunderbird-2.0.0.0"; + + builder = ./builder.sh; + src = fetchurl { + url = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/2.0.0.0/source/thunderbird-2.0.0.0-source.tar.bz2; + sha1 = "1c49eb40d289a67f56bfa573e743ced6c149dd16"; + }; + + buildInputs = [ + pkgconfig gtk perl zip libIDL libXi libjpeg libpng zlib cairo + ]; + + patches = [ + # Ugh, inexplicable problem since GTK+ 2.10. Probably a Firefox + # bug, but I don't know. See + # http://lists.gobolinux.org/pipermail/gobolinux-users/2007-January/004344.html + ./xlibs.patch + ]; + + configureFlags = [ + "--enable-application=mail" + "--enable-optimize" + "--disable-debug" + "--enable-xft" + "--disable-freetype2" + "--enable-svg" + "--enable-canvas" + "--enable-strip" + "--enable-default-toolkit=gtk2" + "--with-system-jpeg" + "--with-system-png" + "--with-system-zlib" + "--enable-system-cairo" + "--enable-extensions=default" + ] + ++ (if enableOfficialBranding then ["--enable-official-branding"] else []); + + meta = { + description = "Mozilla Thunderbird, a full-featured email client"; + }; +} diff --git a/pkgs/applications/networking/mailreaders/thunderbird-2.x/xlibs.patch b/pkgs/applications/networking/mailreaders/thunderbird-2.x/xlibs.patch new file mode 100644 index 00000000000..a656fbf9beb --- /dev/null +++ b/pkgs/applications/networking/mailreaders/thunderbird-2.x/xlibs.patch @@ -0,0 +1,10 @@ +--- 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 f24cd42cb03..25d06bfe593 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2992,6 +2992,14 @@ rec { #enableOfficialBranding = true; }; + thunderbird2 = import ../applications/networking/mailreaders/thunderbird-2.x { + inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo; + inherit (gtkLibs) gtk; + inherit (gnome) libIDL; + inherit (xlibs) libXi; + #enableOfficialBranding = true; + }; + valknut = import ../applications/networking/p2p/valknut { inherit fetchurl stdenv perl x11 libxml2 libjpeg libpng openssl dclib; qt = qt3;