summaryrefslogtreecommitdiff
path: root/extra/lpsolve
diff options
context:
space:
mode:
Diffstat (limited to 'extra/lpsolve')
-rw-r--r--extra/lpsolve/PKGBUILD36
-rw-r--r--extra/lpsolve/cflags.patch25
2 files changed, 61 insertions, 0 deletions
diff --git a/extra/lpsolve/PKGBUILD b/extra/lpsolve/PKGBUILD
new file mode 100644
index 000000000..d956a516f
--- /dev/null
+++ b/extra/lpsolve/PKGBUILD
@@ -0,0 +1,36 @@
+ # $Id: PKGBUILD 51162 2009-09-05 13:45:34Z andyrtr $
+# Maintainer: AndyRTR <andyrtr@archlinux.org>
+
+pkgname=lpsolve
+_origname=lp_solve
+pkgver=5.5.2.0
+_mainver=5.5
+pkgrel=1
+pkgdesc="a Mixed Integer Linear Programming (MILP) solver"
+arch=('i686' 'x86_64')
+url="http://lpsolve.sourceforge.net/"
+license=('GPL')
+depends=('glibc')
+source=(http://downloads.sourceforge.net/project/lpsolve/lpsolve/${pkgver}/lp_solve_${pkgver}_source.tar.gz
+ cflags.patch)
+md5sums=('167c0fb4ab178e0b7ab50bf0a635a836'
+ '7403f745d06619f59f52800b655d8751')
+
+build() {
+ cd "${srcdir}/${_origname}_${_mainver}"
+ patch -Np1 -i $srcdir/cflags.patch || return 1
+
+ # taken from Fedora spec
+ cd lpsolve55
+ sh -x ccc
+ rm bin/ux*/liblpsolve55.a
+ cd ../lp_solve
+ sh -x ccc
+ cd ..
+
+ # install
+ install -d ${pkgdir}/usr/{bin,lib,include/lpsolve}
+ install -m 755 lp_solve/bin/ux*/lp_solve ${pkgdir}/usr/bin/
+ install -m 755 lpsolve55/bin/ux*/liblpsolve55.so ${pkgdir}/usr/lib/
+ install -m 644 lp*.h ${pkgdir}/usr/include/lpsolve/
+}
diff --git a/extra/lpsolve/cflags.patch b/extra/lpsolve/cflags.patch
new file mode 100644
index 000000000..8e8804cb8
--- /dev/null
+++ b/extra/lpsolve/cflags.patch
@@ -0,0 +1,25 @@
+diff -ru lp_solve_5.5.orig/lp_solve/ccc lp_solve_5.5/lp_solve/ccc
+--- lp_solve_5.5.orig/lp_solve/ccc 2009-02-23 16:31:18.000000000 +0000
++++ lp_solve_5.5/lp_solve/ccc 2009-02-23 16:31:29.000000000 +0000
+@@ -28,7 +28,7 @@
+ fi
+ rm /tmp/isnan.c /tmp/isnan >/dev/null 2>&1
+
+-opts='-O3'
++opts=$CFLAGS
+
+ def=
+ if [ "$PLATFORM" = "SCO_UNIX" ]
+diff -ru lp_solve_5.5.orig/lpsolve55/ccc lp_solve_5.5/lpsolve55/ccc
+--- lp_solve_5.5.orig/lpsolve55/ccc 2009-02-23 16:31:18.000000000 +0000
++++ lp_solve_5.5/lpsolve55/ccc 2009-02-23 16:31:29.000000000 +0000
+@@ -35,7 +35,7 @@
+ so=y
+ fi
+
+-opts='-O3'
++opts=$CFLAGS
+
+ $c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
+ ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
+