Merge pull request #15214 from taku0/lp_solve_isnan

lp_solve: fixed build error due to defining isnan
This commit is contained in:
Joachim Fasting 2016-05-04 20:55:51 +02:00
commit 35efc53274
2 changed files with 21 additions and 3 deletions

@ -6,14 +6,20 @@ stdenv.mkDerivation rec {
version = "5.5.2.0";
src = fetchurl {
url = "http://sourceforge.net/projects/lpsolve/files/lpsolve/${version}/lp_solve_${version}_source.tar.gz";
url = "mirror://sourceforge/project/lpsolve/lpsolve/${version}/lp_solve_${version}_source.tar.gz";
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
@ -32,12 +38,11 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
description = "lp_solve is a Mixed Integer Linear Programming (MILP) solver";
description = "A Mixed Integer Linear Programming (MILP) solver";
homepage = "http://lpsolve.sourceforge.net";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ smironov ];
platforms = platforms.unix;
broken = true;
};
}

@ -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)