diff --git a/sci-mathematics/lpsolve/lpsolve-5.5.2.3.recipe b/sci-mathematics/lpsolve/lpsolve-5.5.2.3.recipe new file mode 100644 index 000000000..b00f7fd9f --- /dev/null +++ b/sci-mathematics/lpsolve/lpsolve-5.5.2.3.recipe @@ -0,0 +1,65 @@ +SUMMARY="A Mixed Integer Linear Programming (MILP) solver library" +DESCRIPTION="It is a free (see LGPL for the GNU lesser general public license)\ + linear (integer) programming solver based on the revised simplex method \ +and the Branch-and-bound method for the integers. +lp_solve solves pure linear, (mixed) integer/binary, semi-continuous and \ +special ordered sets (SOS) models." +HOMEPAGE="http://sourceforge.net/projects/lpsolve/" +COPYRIGHT="2006-2016 Michael Berkelaar, Kjell Eikland, Peter Notebaert" +LICENSE="GNU LGPL v2.1" +REVISION="1" +SOURCE_URI="http://downloads.sourceforge.net/lpsolve/lpsolve/$portVersion/lp_solve_${portVersion}_source.tar.gz" +CHECKSUM_SHA256="fb43ae8ad3bb4cee617863f7fc03b26ccc0ff7946a9cc4665cb9afa04c0a1cab" +SOURCE_DIR="lp_solve_5.5" +PATCHES="lpsolve-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +PROVIDES=" + lpsolve$secondaryArchSuffix = $portVersion + cmd:lp_solve$secondaryArchSuffix + lib:liblpsolve55$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + lpsolve${secondaryArchSuffix}_devel = $portVersion + devel:liblpsolve55$secondaryArchSuffix = $portVersion + " +REQUIRES_devel=" + lpsolve$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:sed + " + +BUILD() +{ + cd lpsolve55 + sh -x ccc + cd ../lp_solve + sh -x ccc +} + +INSTALL() +{ + mkdir -p $binDir $libDir $includeDir + install lp_solve/bin/ux*/lp_solve $binDir/ + install lpsolve55/bin/ux*/liblpsolve55.so $libDir/ + install lp*.h $includeDir/ + + prepareInstalledDevelLibs liblpsolve55 + + # devel package + packageEntries devel \ + $developDir +} diff --git a/sci-mathematics/lpsolve/patches/lpsolve-5.5.2.3.patchset b/sci-mathematics/lpsolve/patches/lpsolve-5.5.2.3.patchset new file mode 100644 index 000000000..7630c9819 --- /dev/null +++ b/sci-mathematics/lpsolve/patches/lpsolve-5.5.2.3.patchset @@ -0,0 +1,44 @@ +From 480a2836a2e1245db82e0a5ba71cb0b7865c5b3b Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 8 Aug 2016 21:20:17 +0000 +Subject: Haiku patch + + +diff --git a/lp_solve/ccc b/lp_solve/ccc +index 35b89fb..944f1ed 100644 +--- a/lp_solve/ccc ++++ b/lp_solve/ccc +@@ -13,7 +13,7 @@ rm /tmp/platform /tmp/platform.c >/dev/null 2>&1 + + mkdir bin bin/$PLATFORM >/dev/null 2>&1 + +-math=-lm ++math= + + #check if this system has the isnan function + >/tmp/isnan.c +@@ -35,7 +35,7 @@ if [ "$PLATFORM" = "SCO_UNIX" ] + then opts='-O0' + def='-dy -K PIC -DLLONG=long' + dl=-ldl +-else dl=-ldl ++else dl= + fi + + $c -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/$PLATFORM/lp_solve $math $dl +diff --git a/lpsolve55/ccc b/lpsolve55/ccc +index 4afb1bf..08c9ef8 100644 +--- a/lpsolve55/ccc ++++ b/lpsolve55/ccc +@@ -44,7 +44,7 @@ ranlib bin/$PLATFORM/liblpsolve55.a + if [ "$so" != "" ] + then + $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src +- $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl ++ $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` + fi + + rm *.o 2>/dev/null +-- +2.2.2 +