diff options
Diffstat (limited to 'academic')
-rw-r--r-- | academic/lpsolve/lpsolve-5.5.2.0.defines.patch | 22 | ||||
-rw-r--r-- | academic/lpsolve/lpsolve.SlackBuild | 12 |
2 files changed, 30 insertions, 4 deletions
diff --git a/academic/lpsolve/lpsolve-5.5.2.0.defines.patch b/academic/lpsolve/lpsolve-5.5.2.0.defines.patch new file mode 100644 index 0000000000..a325c13703 --- /dev/null +++ b/academic/lpsolve/lpsolve-5.5.2.0.defines.patch @@ -0,0 +1,22 @@ +--- lp_solve_5.5/lpsolve55/ccc ++++ lp_solve_5.5/lpsolve55/ccc +@@ -18,7 +18,7 @@ + echo '#include <stdio.h>'>>/tmp/isnan.c + echo '#include <stdlib.h>'>>/tmp/isnan.c + echo '#include <math.h>'>>/tmp/isnan.c +-echo 'main(){isnan(0);}'>>/tmp/isnan.c ++echo 'main(){isnan(0.0);}'>>/tmp/isnan.c + $c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1 + if [ $? = 0 ] + then NOISNAN= +--- lp_solve_5.5/lp_solve/ccc ++++ lp_solve_5.5/lp_solve/ccc +@@ -20,7 +20,7 @@ + echo '#include <stdio.h>'>>/tmp/isnan.c + echo '#include <stdlib.h>'>>/tmp/isnan.c + echo '#include <math.h>'>>/tmp/isnan.c +-echo 'main(){isnan(0);}'>>/tmp/isnan.c ++echo 'main(){isnan(0.0);}'>>/tmp/isnan.c + $c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1 + if [ $? = 0 ] + then NOISNAN= diff --git a/academic/lpsolve/lpsolve.SlackBuild b/academic/lpsolve/lpsolve.SlackBuild index 803aee77d6..db41bbddba 100644 --- a/academic/lpsolve/lpsolve.SlackBuild +++ b/academic/lpsolve/lpsolve.SlackBuild @@ -62,14 +62,18 @@ cd $TMP rm -rf lp_solve_5.5 tar xvf $CWD/lp_solve_5.5.2.0_source.tar.gz cd lp_solve_5.5 -patch -Np1 -i $CWD/cflags.patch - chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +patch -Np1 -i $CWD/cflags.patch + +# Thanks to Fedora for the isnan fix +# http://pkgs.fedoraproject.org/cgit/rpms/lpsolve.git/commit/?h=f24 +patch -Np1 -i $CWD/lpsolve-5.5.2.0.defines.patch CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" |