BDW-GC: Default to the current CVS version.

svn path=/nixpkgs/trunk/; revision=25669
This commit is contained in:
Ludovic Courtès 2011-01-22 21:34:18 +00:00
parent 3593d48524
commit 04bd33d520
2 changed files with 40 additions and 9 deletions

View File

@ -1,17 +1,32 @@
{stdenv, fetchurl}:
{ stdenv, fetchurl, cvsVersion ? true, fetchcvs ? null
, autoconf ? null, automake ? null, libtool ? null }:
let
version = if stdenv.isMips then "7.2alpha4" else "7.1";
cvs = cvsVersion;
version = if !cvs then "7.1" else "7.2pre20110122";
in
stdenv.mkDerivation ({
name = "boehm-gc-${version}";
src = fetchurl {
url = "http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-${version}.tar.gz";
sha256 = (if version == "7.1" then "0c5zrsdw0rsli06lahcqwwz0prgah340fhfg7ggfgvz3iw1gdkp3"
else if version == "7.2alpha4" then "1ya9hr1wbx0hrx29q5zy2k51ml71k9mhqzqs7f505qr9s6jsfh0b"
else throw "Version unknown");
};
src =
if version == "7.1"
then fetchurl {
url = "http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-${version}.tar.gz";
sha256 = "0c5zrsdw0rsli06lahcqwwz0prgah340fhfg7ggfgvz3iw1gdkp3";
/* else if version == "7.2alpha4" then
"1ya9hr1wbx0hrx29q5zy2k51ml71k9mhqzqs7f505qr9s6jsfh0b" */
}
/* Use the CVS version for now since it contains many, many fixes
compared to 7.1 and even 7.2alpha4 (e.g., interception of
`pthread_exit', dated 2010-08-14, which fixes possible deadlocks
on GNU/Linux.) */
else fetchcvs {
cvsRoot = ":pserver:anonymous@bdwgc.cvs.sourceforge.net:/cvsroot/bdwgc";
module = "bdwgc";
date = "20110121";
sha256 = "00f7aed82fa02211db93692c24b74e15010aff545f97691c5e362432a7ae283a";
};
patches = stdenv.lib.optional (stdenv.system == "i686-cygwin")
./cygwin-pthread-dl.patch;
@ -50,6 +65,15 @@ stdenv.mkDerivation ({
//
(if cvs
then {
buildInputs = [ autoconf automake libtool ];
preConfigure = "autoreconf -vfi";
}
else { })
//
(if stdenv.system == "x86_64-darwin"
# Fix "#error ucontext routines are deprecated, and require _XOPEN_SOURCE to be defined".
then { configureFlags = "CPPFLAGS=-D_XOPEN_SOURCE"; }

View File

@ -2769,7 +2769,14 @@ let
beecrypt = callPackage ../development/libraries/beecrypt { };
boehmgc = callPackage ../development/libraries/boehm-gc { };
boehmgc_7_1 = callPackage ../development/libraries/boehm-gc {
cvsVersion = false;
};
boehmgc_cvs = callPackage ../development/libraries/boehm-gc { };
# There are good reasons to use CVS instead of 7.1 or 7.2alpha4.
boehmgc = boehmgc_cvs;
boolstuff = callPackage ../development/libraries/boolstuff { };