[65749] trunk/dports/math/lp_solve

ryandesign at macports.org ryandesign at macports.org
Tue Mar 30 21:30:11 PDT 2010


Revision: 65749
          http://trac.macports.org/changeset/65749
Author:   ryandesign at macports.org
Date:     2010-03-30 21:30:09 -0700 (Tue, 30 Mar 2010)
Log Message:
-----------
lp_solve: fix parallel build problem; patch will be sent upstream

Modified Paths:
--------------
    trunk/dports/math/lp_solve/Portfile

Added Paths:
-----------
    trunk/dports/math/lp_solve/files/patch-TMPDIR.diff

Modified: trunk/dports/math/lp_solve/Portfile
===================================================================
--- trunk/dports/math/lp_solve/Portfile	2010-03-31 04:14:57 UTC (rev 65748)
+++ trunk/dports/math/lp_solve/Portfile	2010-03-31 04:30:09 UTC (rev 65749)
@@ -31,6 +31,7 @@
 
 patchfiles              patch-Wno-long-double.diff \
                         patch-CC.diff \
+                        patch-TMPDIR.diff \
                         patch-install_name.diff
 
 use_configure           no

Added: trunk/dports/math/lp_solve/files/patch-TMPDIR.diff
===================================================================
--- trunk/dports/math/lp_solve/files/patch-TMPDIR.diff	                        (rev 0)
+++ trunk/dports/math/lp_solve/files/patch-TMPDIR.diff	2010-03-31 04:30:09 UTC (rev 65749)
@@ -0,0 +1,98 @@
+--- lp_solve/ccc.osx	2009-01-25 12:39:09.000000000 -0600
++++ lp_solve/ccc.osx	2010-03-30 23:06:55.000000000 -0500
+@@ -4,10 +4,16 @@
+ 
++#make temporary directory
++if [ -z "$TMPDIR" ]
++then TMPDIR=/tmp
++fi
++MYTMP=`mktemp -d "$TMPDIR/lp_solve_XXXXXXXX"`
++
+ #determine platform (32/64 bit)
+->/tmp/platform.c
+-echo '#include <stdlib.h>'>>/tmp/platform.c
+-echo '#include <stdio.h>'>>/tmp/platform.c
+-echo 'main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+-$c /tmp/platform.c -o /tmp/platform
+-PLATFORM=`/tmp/platform`
+-rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
++>"$MYTMP/platform.c"
++echo '#include <stdlib.h>'>>"$MYTMP/platform.c"
++echo '#include <stdio.h>'>>"$MYTMP/platform.c"
++echo 'main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>"$MYTMP/platform.c"
++$c "$MYTMP/platform.c" -o "$MYTMP/platform"
++PLATFORM=`"$MYTMP/platform"`
++rm "$MYTMP/platform" "$MYTMP/platform.c" >/dev/null 2>&1
+ 
+@@ -18,8 +24,8 @@
+ #check if this system has the isnan function
+->/tmp/isnan.c
+-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
+-$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
++>"$MYTMP/isnan.c"
++echo '#include <stdio.h>'>>"$MYTMP/isnan.c"
++echo '#include <stdlib.h>'>>"$MYTMP/isnan.c"
++echo '#include <math.h>'>>"$MYTMP/isnan.c"
++echo 'main(){isnan(0);}'>>"$MYTMP/isnan.c"
++$c "$MYTMP/isnan.c" -o "$MYTMP/isnan" $math >/dev/null 2>&1
+ if [ $? = 0 ]
+@@ -28,3 +34,6 @@
+ fi
+-rm /tmp/isnan.c /tmp/isnan >/dev/null 2>&1
++rm "$MYTMP/isnan.c" "$MYTMP/isnan" >/dev/null 2>&1
++
++#remove temporary directory
++rmdir "$MYTMP"
+ 
+--- lpsolve55/ccc.osx	2009-08-09 10:36:19.000000000 -0500
++++ lpsolve55/ccc.osx	2010-03-30 23:06:52.000000000 -0500
+@@ -4,10 +4,16 @@
+ 
++#make temporary directory
++if [ -z "$TMPDIR" ]
++then TMPDIR=/tmp
++fi
++MYTMP=`mktemp -d "$TMPDIR/lp_solve_XXXXXXXX"`
++
+ #determine platform (32/64 bit)
+->/tmp/platform.c
+-echo '#include <stdlib.h>'>>/tmp/platform.c
+-echo '#include <stdio.h>'>>/tmp/platform.c
+-echo 'main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+-$c /tmp/platform.c -o /tmp/platform
+-PLATFORM=`/tmp/platform`
+-rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
++>"$MYTMP/platform.c"
++echo '#include <stdlib.h>'>>"$MYTMP/platform.c"
++echo '#include <stdio.h>'>>"$MYTMP/platform.c"
++echo 'main(){printf("osx%d", (int) (sizeof(void *)*8));}'>>"$MYTMP/platform.c"
++$c "$MYTMP/platform.c" -o "$MYTMP/platform"
++PLATFORM=`"$MYTMP/platform"`
++rm "$MYTMP/platform" "$MYTMP/platform.c" >/dev/null 2>&1
+ 
+@@ -16,8 +22,8 @@
+ #check if this system has the isnan function
+->/tmp/isnan.c
+-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
+-$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
++>"$MYTMP/isnan.c"
++echo '#include <stdio.h>'>>"$MYTMP/isnan.c"
++echo '#include <stdlib.h>'>>"$MYTMP/isnan.c"
++echo '#include <math.h>'>>"$MYTMP/isnan.c"
++echo 'main(){isnan(0);}'>>"$MYTMP/isnan.c"
++$c "$MYTMP/isnan.c" -o "$MYTMP/isnan" $math >/dev/null 2>&1
+ if [ $? = 0 ]
+@@ -26,3 +32,6 @@
+ fi
+-rm /tmp/isnan.c /tmp/isnan >/dev/null 2>&1
++rm "$MYTMP/isnan.c" "$MYTMP/isnan" >/dev/null 2>&1
++
++#remove temporary directory
++rmdir "$MYTMP"
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100330/c8465b7f/attachment-0001.html>


More information about the macports-changes mailing list