From 57f482e2c30c8fb6067ac1a9578ad335e7dcfec6 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Thu, 6 Oct 2011 13:28:03 +0000
Subject: [PATCH] * Get rid of old Thunderbird versions.

svn path=/nixpkgs/trunk/; revision=29700
---
 .../mailreaders/thunderbird/2.x.nix           | 55 --------------
 .../mailreaders/thunderbird/3.x.nix           | 71 -------------------
 .../mailreaders/thunderbird/builder.sh        | 34 ---------
 .../mailreaders/thunderbird/xlibs.patch       | 10 ---
 pkgs/top-level/all-packages.nix               | 12 +---
 5 files changed, 1 insertion(+), 181 deletions(-)
 delete mode 100644 pkgs/applications/networking/mailreaders/thunderbird/2.x.nix
 delete mode 100644 pkgs/applications/networking/mailreaders/thunderbird/3.x.nix
 delete mode 100644 pkgs/applications/networking/mailreaders/thunderbird/builder.sh
 delete mode 100644 pkgs/applications/networking/mailreaders/thunderbird/xlibs.patch

diff --git a/pkgs/applications/networking/mailreaders/thunderbird/2.x.nix b/pkgs/applications/networking/mailreaders/thunderbird/2.x.nix
deleted file mode 100644
index 3604470cb0d0..000000000000
--- a/pkgs/applications/networking/mailreaders/thunderbird/2.x.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ 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.22";
-
-  builder = ./builder.sh;
-  
-  src = fetchurl {
-    url = ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/2.0.0.22/source/thunderbird-2.0.0.22-source.tar.bz2;
-    sha1 = "a9da470ff090dfd049cae6b0c3b1a4e95c3f2022";
-  };
-
-  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/3.x.nix b/pkgs/applications/networking/mailreaders/thunderbird/3.x.nix
deleted file mode 100644
index cc21a5b04006..000000000000
--- a/pkgs/applications/networking/mailreaders/thunderbird/3.x.nix
+++ /dev/null
@@ -1,71 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, gtk, perl, python, zip, libIDL
-, dbus_glib, bzip2, alsaLib, nspr
-, libnotify, cairo, pixman, fontconfig
-
-, # If you want the resulting program to call itself "Thunderbird"
-  # instead of "Shredder", 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
-    
-}:
-
-let version = "3.1.9"; in
-
-stdenv.mkDerivation {
-  name = "thunderbird-${version}";
-
-  src = fetchurl {
-    url = "http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.bz2";
-    sha1 = "22b153102939430180ae1873ce15ef52286ff08d";
-  };
-
-  buildInputs =
-    [ pkgconfig perl python zip bzip2 gtk dbus_glib alsaLib libIDL nspr libnotify
-      libnotify cairo pixman fontconfig
-    ];
-
-  NIX_LDFLAGS = "-lpixman-1";
-
-  configureFlags =
-    [ "--enable-application=mail"
-      "--enable-optimize"
-      "--disable-debug"
-      "--enable-strip"
-      "--with-system-jpeg"
-      "--with-system-zlib"
-      "--with-system-bz2"
-      "--with-system-nspr"
-      "--enable-system-cairo"
-      "--disable-crashreporter"
-      "--disable-necko-wifi"
-      "--disable-tests"
-      "--enable-static" # required by `make install'
-    ]
-    ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
-
-  # The Thunderbird Makefiles refer to the variables LIBXUL_DIST,
-  # prefix, and PREFIX in some places where they are not set.  In
-  # particular, there are some linker flags like
-  # `-rpath-link=$(LIBXUL_DIST)/bin'.  Since this expands to
-  # `-rpath-link=/bin', the build fails due to the purity checks in
-  # the ld wrapper.  So disable the purity check for now.
-  preBuild = "NIX_ENFORCE_PURITY=0";
-
-  # This doesn't work:
-  #makeFlags = "LIBXUL_DIST=$(out) prefix=$(out) PREFIX=$(out)";
-    
-  postInstall =
-    ''
-      # Fix some references to /bin paths in the Xulrunner shell script.
-      substituteInPlace $out/lib/thunderbird-*/thunderbird \
-          --replace /bin/pwd "$(type -tP pwd)" \
-          --replace /bin/ls "$(type -tP ls)"
-    '';
-
-  meta = {
-    description = "Mozilla Thunderbird, a full-featured email client";
-    homepage = http://www.mozilla.org/thunderbird/;
-  };
-}
diff --git a/pkgs/applications/networking/mailreaders/thunderbird/builder.sh b/pkgs/applications/networking/mailreaders/thunderbird/builder.sh
deleted file mode 100644
index c4b477fcec5a..000000000000
--- a/pkgs/applications/networking/mailreaders/thunderbird/builder.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-source $stdenv/setup
-
-postInstall() {
-
-    # Strip some more stuff
-    strip -S $out/lib/*/* || true
-
-    # Fix some references to /bin paths in the Thunderbird shell script.
-    substituteInPlace $out/bin/thunderbird \
-        --replace /bin/pwd "$(type -tP pwd)" \
-        --replace /bin/ls "$(type -tP ls)"
-
-    # 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/xlibs.patch b/pkgs/applications/networking/mailreaders/thunderbird/xlibs.patch
deleted file mode 100644
index a656fbf9beb4..000000000000
--- a/pkgs/applications/networking/mailreaders/thunderbird/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 ab78b6959a29..c5c4d812c8c0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7323,17 +7323,7 @@ let
 
   thinkingRock = callPackage ../applications/misc/thinking-rock { };
 
-  thunderbird = thunderbird7;
-
-  thunderbird2 = callPackage ../applications/networking/mailreaders/thunderbird/2.x.nix {
-    inherit (gnome) libIDL;
-  };
-
-  thunderbird3 = callPackage ../applications/networking/mailreaders/thunderbird/3.x.nix {
-    inherit (gnome) libIDL;
-  };
-
-  thunderbird7 = callPackage ../applications/networking/mailreaders/thunderbird/7.x.nix {
+  thunderbird = callPackage ../applications/networking/mailreaders/thunderbird/7.x.nix {
     inherit (gnome) libIDL;
   };