mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
lpsolve: add recipe for version 5.5.2.3.
This commit is contained in:
65
sci-mathematics/lpsolve/lpsolve-5.5.2.3.recipe
Normal file
65
sci-mathematics/lpsolve/lpsolve-5.5.2.3.recipe
Normal file
@@ -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
|
||||
}
|
||||
44
sci-mathematics/lpsolve/patches/lpsolve-5.5.2.3.patchset
Normal file
44
sci-mathematics/lpsolve/patches/lpsolve-5.5.2.3.patchset
Normal file
@@ -0,0 +1,44 @@
|
||||
From 480a2836a2e1245db82e0a5ba71cb0b7865c5b3b Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user