undo #2522 merge except on darwin

It was only meant for darwin originally anyway.
See the PR for discussion.
This commit is contained in:
Vladimír Čunát 2014-06-01 20:46:33 +02:00
parent eb8a331510
commit 6bc20ea278
2 changed files with 9 additions and 4 deletions

View file

@ -1,5 +1,7 @@
{ stdenv, fetchurl, m4, cxx ? true }:
with { inherit (stdenv.lib) optional; };
stdenv.mkDerivation rec {
name = "gmp-5.1.3";
@ -14,10 +16,12 @@ stdenv.mkDerivation rec {
# Build a "fat binary", with routines for several sub-architectures
# (x86), except on Solaris where some tests crash with "Memory fault".
# See <http://hydra.nixos.org/build/2760931>, for instance.
(stdenv.lib.optional (!stdenv.isSunOS) "--enable-fat")
++ (if cxx then [ "--enable-cxx" "CPPFLAGS=-fexceptions" ]
optional (!stdenv.isSunOS) "--enable-fat"
++ (if cxx then [ "--enable-cxx" ]
else [ "--disable-cxx" ])
++ (if stdenv.is64bit then [ "--with-pic" ] else []);
++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
++ optional stdenv.is64bit "--with-pic"
;
doCheck = true;

View file

@ -13,8 +13,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ perl gnum4 ];
propagatedBuildInputs = [ gmpxx ];
configureFlags = [ "--disable-watchdog" "CPPFLAGS=-fexceptions" ] ++
configureFlags = [ "--disable-watchdog" ] ++
stdenv.lib.optionals stdenv.isDarwin [
"CPPFLAGS=-fexceptions"
"--disable-ppl_lcdd" "--disable-ppl_lpsol" "--disable-ppl_pips"
];