summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2010-10-16 15:35:08 +0000
committerwiz <wiz@pkgsrc.org>2010-10-16 15:35:08 +0000
commit8c046073365d6daf16f61b4d4deb59250244e29c (patch)
tree687c5f43a4a05b4464008fe863603647e55f95db /math
parent34d36156eacfebeb074190b66021012569168f94 (diff)
downloadpkgsrc-8c046073365d6daf16f61b4d4deb59250244e29c.tar.gz
Initial import of lp_solve-5.5.2.0:
lp_solve is a Mixed Integer Linear Programming (MILP) solver. It is a free 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.
Diffstat (limited to 'math')
-rw-r--r--math/lp_solve/DESCR6
-rw-r--r--math/lp_solve/Makefile56
-rw-r--r--math/lp_solve/PLIST34
-rw-r--r--math/lp_solve/distinfo6
-rw-r--r--math/lp_solve/patches/patch-aa29
5 files changed, 131 insertions, 0 deletions
diff --git a/math/lp_solve/DESCR b/math/lp_solve/DESCR
new file mode 100644
index 00000000000..95a34cd1d00
--- /dev/null
+++ b/math/lp_solve/DESCR
@@ -0,0 +1,6 @@
+lp_solve is a Mixed Integer Linear Programming (MILP) solver.
+
+It is a free 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.
diff --git a/math/lp_solve/Makefile b/math/lp_solve/Makefile
new file mode 100644
index 00000000000..5666b0abc01
--- /dev/null
+++ b/math/lp_solve/Makefile
@@ -0,0 +1,56 @@
+# $NetBSD: Makefile,v 1.1.1.1 2010/10/16 15:35:08 wiz Exp $
+#
+
+DISTNAME= lp_solve_5.5.2.0_source
+PKGNAME= ${DISTNAME:S/_source//:S/_5/-5/}
+CATEGORIES= math devel
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lpsolve/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://lpsolve.sourceforge.net/
+COMMENT= Mixed Integer Linear Programming (MILP) solver
+#LICENSE= LGPL, unclear which version (see lp_lib.h)
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_TOOLS+= automake
+
+WRKSRC= ${WRKDIR}/lp_solve_5.5
+
+SUBST_CLASSES+= dl
+SUBST_STAGE.dl= pre-build
+SUBST_SED.dl+= -e "s,-ldl,${DL_LIBS},g"
+SUBST_SED.dl+= -e "s,^opts=.*,opts=${CFLAGS},g"
+SUBST_SED.dl+= -e "s,-fpic,-fPIC,g"
+SUBST_FILES.dl+= lp_solve/ccc
+SUBST_FILES.dl+= lpsolve55/ccc
+SUBST_FILES.dl+= demo/ccc
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${MACHINE_ARCH} == "i386"
+LPSOLVE_ARCH= ux32
+.else
+LPSOLVE_ARCH= ux64
+.endif
+
+INSTALLATION_DIRS= bin include/lpsolve lib
+
+do-build:
+ cd ${WRKSRC}/lp_solve && ${SHELL} ccc
+ cd ${WRKSRC}/lpsolve55 && ${SHELL} ccc
+ cd ${WRKSRC}/demo && ${SHELL} ccc
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/lp_solve/bin/${LPSOLVE_ARCH}/lp_solve \
+ ${DESTDIR}${PREFIX}/bin
+.for i in declare.h fortify.h ini.h lp_*.h lpkit.h lpsolve.h ufortify.h yacc_read.h
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DESTDIR}${PREFIX}/include/lpsolve
+.endfor
+.for i in liblpsolve55.a liblpsolve55.so
+ ${INSTALL_LIB} ${WRKSRC}/lpsolve55/bin/${LPSOLVE_ARCH}/${i} \
+ ${DESTDIR}${PREFIX}/lib
+.endfor
+ ${LN} -sf liblpsolve55.so ${DESTDIR}${PREFIX}/lib/liblpsolve55.so.1
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/lp_solve/PLIST b/math/lp_solve/PLIST
new file mode 100644
index 00000000000..4158bc97191
--- /dev/null
+++ b/math/lp_solve/PLIST
@@ -0,0 +1,34 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2010/10/16 15:35:08 wiz Exp $
+bin/lp_solve
+include/lpsolve/declare.h
+include/lpsolve/fortify.h
+include/lpsolve/ini.h
+include/lpsolve/lp_Hash.h
+include/lpsolve/lp_MDO.h
+include/lpsolve/lp_MPS.h
+include/lpsolve/lp_SOS.h
+include/lpsolve/lp_bit.h
+include/lpsolve/lp_crash.h
+include/lpsolve/lp_explicit.h
+include/lpsolve/lp_fortify.h
+include/lpsolve/lp_lib.h
+include/lpsolve/lp_matrix.h
+include/lpsolve/lp_mipbb.h
+include/lpsolve/lp_presolve.h
+include/lpsolve/lp_price.h
+include/lpsolve/lp_pricePSE.h
+include/lpsolve/lp_report.h
+include/lpsolve/lp_rlp.h
+include/lpsolve/lp_scale.h
+include/lpsolve/lp_simplex.h
+include/lpsolve/lp_solveDLL.h
+include/lpsolve/lp_types.h
+include/lpsolve/lp_utils.h
+include/lpsolve/lp_wlp.h
+include/lpsolve/lpkit.h
+include/lpsolve/lpsolve.h
+include/lpsolve/ufortify.h
+include/lpsolve/yacc_read.h
+lib/liblpsolve55.a
+lib/liblpsolve55.so
+lib/liblpsolve55.so.1
diff --git a/math/lp_solve/distinfo b/math/lp_solve/distinfo
new file mode 100644
index 00000000000..b1871b93f62
--- /dev/null
+++ b/math/lp_solve/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2010/10/16 15:35:08 wiz Exp $
+
+SHA1 (lp_solve_5.5.2.0_source.tar.gz) = e2830053cf079839b9ce21662cbc886ac6d31c80
+RMD160 (lp_solve_5.5.2.0_source.tar.gz) = 23a69c71062747ddf4cbc57120cd7db5f9378ac2
+Size (lp_solve_5.5.2.0_source.tar.gz) = 799623 bytes
+SHA1 (patch-aa) = 17fbc9c80e5a8c34064d426adf2fdae2ce4a7db1
diff --git a/math/lp_solve/patches/patch-aa b/math/lp_solve/patches/patch-aa
new file mode 100644
index 00000000000..14727af88b2
--- /dev/null
+++ b/math/lp_solve/patches/patch-aa
@@ -0,0 +1,29 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/10/16 15:35:08 wiz Exp $
+
+ftime() is deprecated, use gettimeofday() instead.
+
+--- shared/commonlib.c.orig 2009-02-01 19:31:59.000000000 +0000
++++ shared/commonlib.c
+@@ -6,7 +6,7 @@
+ #elif defined EnhTime
+ # include <windows.h>
+ #else
+-# include <sys/timeb.h>
++# include <sys/time.h>
+ #endif
+
+ #include <stdlib.h>
+@@ -844,10 +844,10 @@ double timeNow(void)
+ }
+ return( timeBase + (double) now.QuadPart/(double) freq.QuadPart );
+ #else
+- struct timeb buf;
++ struct timeval buf;
+
+- ftime(&buf);
+- return((double)buf.time+((double) buf.millitm)/1000.0);
++ gettimeofday(&buf, NULL);
++ return((double)buf.tv_sec+((double) buf.tv_usec)/1000000.0);
+ #endif
+ }
+