summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/Makefile1
-rw-r--r--math/py-CyLP/Makefile37
-rw-r--r--math/py-CyLP/distinfo3
-rw-r--r--math/py-CyLP/files/patch-setup.py11
-rw-r--r--math/py-CyLP/pkg-descr7
5 files changed, 59 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index b269b2403ea2..f3e60b9e72bd 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -658,6 +658,7 @@
SUBDIR += pspp
SUBDIR += pure-mpfr
SUBDIR += pure-rational
+ SUBDIR += py-CyLP
SUBDIR += py-Diofant
SUBDIR += py-GridDataFormats
SUBDIR += py-PuLP
diff --git a/math/py-CyLP/Makefile b/math/py-CyLP/Makefile
new file mode 100644
index 000000000000..1a81629ad17c
--- /dev/null
+++ b/math/py-CyLP/Makefile
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+PORTNAME= cylp
+DISTVERSION= 0.7.2-30
+DISTVERSIONSUFFIX= -g65a985b
+CATEGORIES= math python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Python interface to CLP, CBC, and CGL to solve LPs and MIPs
+
+LICENSE= CPL10
+LICENSE_NAME= Common Public License Version 1.0
+LICENSE_FILE= ${WRKSRC}/LICENSE
+LICENSE_PERMS= auto-accept dist-mirror dist-sell pkg-mirror pkg-sell
+
+BUILD_DEPENDS= ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}scipy>=0.10.0:science/py-scipy@${FLAVOR}
+LIB_DEPENDS= libblas.so:math/blas \
+ libCbc.so:math/cbc \
+ libCgl.so:math/cgl \
+ libClp.so:math/clp \
+ liblapack.so:math/lapack
+RUN_DEPENDS:= ${BUILD_DEPENDS}
+
+USES= python:2.7 # 3.X support is still in the pull request: https://github.com/coin-or/CyLP/pull/28
+USE_GITHUB= yes
+GH_ACCOUNT= coin-or
+GH_PROJECT= CyLP
+USE_PYTHON= distutils cython autoplist
+
+MAKE_ENV= COIN_INSTALL_DIR=${LOCALBASE}
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cylp/cy/Cy*.so
+
+.include <bsd.port.mk>
diff --git a/math/py-CyLP/distinfo b/math/py-CyLP/distinfo
new file mode 100644
index 000000000000..8a17a538a021
--- /dev/null
+++ b/math/py-CyLP/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1537731308
+SHA256 (coin-or-CyLP-0.7.2-30-g65a985b_GH0.tar.gz) = 9a611fe5e530b61ac4d9c496d7cae88f25491bb571cb3ce3c37ebcb785ee1870
+SIZE (coin-or-CyLP-0.7.2-30-g65a985b_GH0.tar.gz) = 10514134
diff --git a/math/py-CyLP/files/patch-setup.py b/math/py-CyLP/files/patch-setup.py
new file mode 100644
index 000000000000..f2607cf7e063
--- /dev/null
+++ b/math/py-CyLP/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig 2014-02-14 17:25:06 UTC
++++ setup.py
+@@ -108,7 +108,7 @@ ext_modules = []
+
+ if operatingSystem == 'mac':
+ extra_link_args = ['-Wl,-framework', '-Wl,Accelerate', '-headerpad_max_install_names']
+-elif operatingSystem == 'linux':
++elif operatingSystem == 'linux' or operatingSystem.startswith('freebsd'):
+ extra_link_args = ['-lrt']
+ else:
+ # Assuming Windows
diff --git a/math/py-CyLP/pkg-descr b/math/py-CyLP/pkg-descr
new file mode 100644
index 000000000000..7c8a40505c64
--- /dev/null
+++ b/math/py-CyLP/pkg-descr
@@ -0,0 +1,7 @@
+CyLP is a Python interface to COIN-OR's Linear and mixed-integer program solvers
+(CLP, CBC, and CGL). CyLP's unique feature is that you can use it to alter the
+solution process of the solvers from within Python. For example, you may define
+cut generators, branch-and-bound strategies, and primal/dual Simplex pivot rules
+completely in Python.
+
+WWW: https://github.com/coin-or/CyLP