3
0
Fork 0
forked from mirrors/nixpkgs

lp_solve: fixed build error due to defining isnan

This commit is contained in:
taku0 2016-05-04 19:57:43 +09:00
parent 5508687ec2
commit 725c85c720
2 changed files with 19 additions and 1 deletions

View file

@ -10,10 +10,16 @@ stdenv.mkDerivation rec {
sha256 = "176c7f023mb6b8bfmv4rfqnrlw88lsg422ca74zjh19i2h5s69sq";
};
patches = [ ./isnan.patch ];
buildCommand = ''
. $stdenv/setup
tar xvfz $src
(
cd lp_solve*
eval patchPhase
)
(
cd lp_solve*/lpsolve55
bash ccc
mkdir -pv $out/lib
@ -37,7 +43,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
maintainers = with maintainers; [ smironov ];
platforms = platforms.unix;
broken = true;
};
}

View file

@ -0,0 +1,13 @@
diff -u a/lp_lib.h b/lp_lib.h
--- a/lp_lib.h 2016-05-04 19:45:15.753143720 +0900
+++ b/lp_lib.h 2016-05-04 19:53:59.536920722 +0900
@@ -59,9 +59,6 @@
# if defined _WIN32 && !defined __GNUC__
# define isnan _isnan
# endif
-#if defined NOISNAN
-# define isnan(x) FALSE
-#endif
#define SETMASK(variable, mask) variable |= mask
#define CLEARMASK(variable, mask) variable &= ~(mask)