aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2024-04-26 06:14:47 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2024-04-26 06:15:16 +0000
commit3d7ce432c44c9f15369c08e8be95976718fc3287 (patch)
treebcd177e2b52fbc5700decf8dbdca079d1c3e54b9
parent146f654c89d6d316c4fee3202a9e68570c3699c7 (diff)
math/py-islpy: New port: Wrapper around isl, an integer set library
-rw-r--r--math/Makefile1
-rw-r--r--math/py-islpy/Makefile46
-rw-r--r--math/py-islpy/distinfo3
-rw-r--r--math/py-islpy/files/patch-pyproject.toml13
-rw-r--r--math/py-islpy/pkg-descr17
5 files changed, 80 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 5b4e787e1534..2c05d4b0585c 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -962,6 +962,7 @@
SUBDIR += py-intspan
SUBDIR += py-iohexperimenter
SUBDIR += py-ipyopt
+ SUBDIR += py-islpy
SUBDIR += py-isosurfaces
SUBDIR += py-jacobi
SUBDIR += py-jax
diff --git a/math/py-islpy/Makefile b/math/py-islpy/Makefile
new file mode 100644
index 000000000000..318bc849e407
--- /dev/null
+++ b/math/py-islpy/Makefile
@@ -0,0 +1,46 @@
+PORTNAME= islpy
+DISTVERSION= 2023.2.5
+CATEGORIES= math
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Wrapper around isl, an integer set library
+WWW= https://documen.tician.de/islpy/
+
+LICENSE= MIT
+
+BUILD_DEPENDS= cmake:devel/cmake-core \
+ ${PYTHON_PKGNAMEPREFIX}nanobind>0:devel/py-nanobind@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pcpp>0:devel/py-pcpp@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}scikit-build>0:devel/py-scikit-build@${PY_FLAVOR} \
+ ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+LIB_DEPENDS= libbarvinok.so:math/barvinok \
+ libisl.so:devel/isl \
+ libpolylibgmp.so:math/polylib
+
+USES= llvm:15 python shebangfix # w/out llvm:* the build fails to find LLVMgold.so
+USE_PYTHON= pep517 autoplist pytest
+
+SHEBANG_FILES= configure.py
+
+xCXXFLAGS+= -I${WRKSRC}/isl/include \
+ -I${WRKSRC}/isl-supplementary
+
+TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC= ${WRKSRC}/test
+
+do-configure:
+ @cd ${WRKSRC} && \
+ ${SETENV} ${MAKE_ENV} ./configure.py \
+ --enable-shared \
+ --python-exe=${PYTHON_CMD} \
+ --isl-inc-dir=${PREFIX}/include \
+ --isl-lib-dir=${PREFIX}/lib \
+ --no-use-shipped-imath \
+ --no-use-shipped-isl \
+ --use-barvinok \
+ --prefix=${PREFIX}
+
+.include <bsd.port.mk>
diff --git a/math/py-islpy/distinfo b/math/py-islpy/distinfo
new file mode 100644
index 000000000000..460a9de74321
--- /dev/null
+++ b/math/py-islpy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1714099225
+SHA256 (islpy-2023.2.5.tar.gz) = dd74398baf36938abb7c2a9d9828cc1a2e549c6c80485cec8b06b29abfaad18f
+SIZE (islpy-2023.2.5.tar.gz) = 1136820
diff --git a/math/py-islpy/files/patch-pyproject.toml b/math/py-islpy/files/patch-pyproject.toml
new file mode 100644
index 000000000000..b3f1914a9f10
--- /dev/null
+++ b/math/py-islpy/files/patch-pyproject.toml
@@ -0,0 +1,13 @@
+--- pyproject.toml.orig 2024-04-26 04:10:10 UTC
++++ pyproject.toml
+@@ -12,10 +12,8 @@ requires = [
+ "setuptools>=64;python_version>='3.12'",
+
+ "wheel>=0.34.2",
+- "cmake>=3.18",
+ "scikit-build",
+ "nanobind",
+- "ninja",
+ "pcpp",
+ ]
+ build-backend = "setuptools.build_meta"
diff --git a/math/py-islpy/pkg-descr b/math/py-islpy/pkg-descr
new file mode 100644
index 000000000000..68201bbf6539
--- /dev/null
+++ b/math/py-islpy/pkg-descr
@@ -0,0 +1,17 @@
+islpy is a Python wrapper around Sven Verdoolaege's isl, a library for
+manipulating sets and relations of integer points bounded by linear
+constraints.
+
+Supported operations on sets include:
+* intersection, union, set difference,
+* emptiness check,
+* convex hull,
+* (integer) affine hull,
+* integer projection,
+* computing the lexicographic minimum using parametric integer programming,
+* coalescing,
+* parametric vertex enumeration.
+
+It also includes an ILP solver based on generalized basis reduction, transitive
+closures on maps (which may encode infinite graphs), dependence analysis and
+bounds on piecewise step-polynomials.