* boehm-gc: For simplicity, use a tarball containing the CVS export

instead of fetchcvs.  Then we don't need to special-case FreeBSD
  either.  Also, removed the Cygwin patch which no longer seems
  needed.

svn path=/nixpkgs/trunk/; revision=25759
This commit is contained in:
Eelco Dolstra 2011-02-02 12:17:29 +00:00
parent d23005c2f9
commit 207f3278c1
3 changed files with 10 additions and 83 deletions

View File

@ -1,24 +0,0 @@
Don't pass "-lpthread -ldl" on Cygwin. See
http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/3219
for details.
--- gc-7.1/configure 2008-05-04 02:52:50.000000000 +0200
+++ gc-7.1/configure 2009-09-18 16:23:30.000000000 +0200
@@ -4859,7 +4859,7 @@
cat >>confdefs.h <<\_ACEOF
#define THREAD_LOCAL_ALLOC 1
_ACEOF
-
+ THREADDLLIBS=""
win32_threads=true
;;
*-*-darwin*)
@@ -5934,6 +5934,7 @@
# dyld calls anyway
case "$host" in
*-*-darwin*) ;;
+ *-*-cygwin*) ;;
*)
{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }

View File

@ -1,38 +1,17 @@
{ stdenv, fetchurl, cvsVersion ? true, fetchcvs ? null
, autoconf ? null, automake ? null, libtool ? null }:
{ stdenv, fetchurl }:
let
cvs = cvsVersion;
version = if !cvs then "7.1" else "7.2pre20110122";
in
stdenv.mkDerivation ({
name = "boehm-gc-${version}";
stdenv.mkDerivation rec {
name = "boehm-gc-7.2pre20110122";
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.isCygwin && !cvs)
./cygwin-pthread-dl.patch;
src = fetchurl {
url = "http://nixos.org/tarballs/${name}.tar.bz2";
sha256 = "06nf60flq6344pgic3bz83jh6pvj4k42apm3x4xwxc4d2is457ly";
};
doCheck = true;
configureFlags = stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") "CPPFLAGS=-D_XOPEN_SOURCE";
meta = {
description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++";
@ -62,19 +41,3 @@ stdenv.mkDerivation ({
platforms = stdenv.lib.platforms.all;
};
}
//
(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"; }
else {}))

View File

@ -2774,19 +2774,7 @@ let
beecrypt = callPackage ../development/libraries/beecrypt { };
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.
# See `default.nix' for details.
boehmgc =
# XXX: `fetchcvs' doesn't work on FreeBSD ("cp: illegal option -- d").
if stdenv.system == "i686-freebsd"
then boehmgc_7_1
else boehmgc_cvs;
boehmgc = callPackage ../development/libraries/boehm-gc { };
boolstuff = callPackage ../development/libraries/boolstuff { };