aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-09-14 03:30:34 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-09-14 04:41:14 +0000
commit53b98b0ec570c3edfd845aa1a2018acd2d2e49ee (patch)
tree49a67a2eb63d0c0c9e64db1872ad7e801658af84
parent11f31e1c0e9848e62366ade84b8e58ed394a11a8 (diff)
downloadports-53b98b0ec570c3edfd845aa1a2018acd2d2e49ee.tar.gz
ports-53b98b0ec570c3edfd845aa1a2018acd2d2e49ee.zip
math/py-clingo: New port: Grounder and solver for logic programs
-rw-r--r--math/Makefile1
-rw-r--r--math/py-clingo/Makefile27
-rw-r--r--math/py-clingo/distinfo3
-rw-r--r--math/py-clingo/pkg-descr3
4 files changed, 34 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 680ec066b5c8..35492690f529 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -848,6 +848,7 @@
SUBDIR += py-brial
SUBDIR += py-chaospy
SUBDIR += py-claripy
+ SUBDIR += py-clingo
SUBDIR += py-cma
SUBDIR += py-cmaes
SUBDIR += py-cmyt
diff --git a/math/py-clingo/Makefile b/math/py-clingo/Makefile
new file mode 100644
index 000000000000..7cbc09ee893c
--- /dev/null
+++ b/math/py-clingo/Makefile
@@ -0,0 +1,27 @@
+PORTNAME= clingo
+PORTVERSION= 5.6.0
+CATEGORIES= math python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Grounder and solver for logic programs
+WWW= https://potassco.org/clingo/
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+BUILD_DEPENDS= cmake:devel/cmake \
+ ${PYTHON_PKGNAMEPREFIX}cffi>0:devel/py-cffi@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}scikit-build>0:devel/py-scikit-build@${PY_FLAVOR}
+
+USES= compiler:c++14-lang python:3.6+
+USE_PYTHON= distutils autoplist unittest # some tests break, see https://github.com/potassco/clingo/issues/390
+
+TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_WRKSRC= ${WRKSRC}/libpyclingo/clingo/tests
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/clingo/_clingo.cpython-${PYTHON_SUFFIX}.so
+
+.include <bsd.port.mk>
diff --git a/math/py-clingo/distinfo b/math/py-clingo/distinfo
new file mode 100644
index 000000000000..edb541b0a2a4
--- /dev/null
+++ b/math/py-clingo/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1663123343
+SHA256 (clingo-5.6.0.tar.gz) = 89cb294f0d6e1a00ad97616dd79ede9b261c43edadd43efd1127ddd370ecbcde
+SIZE (clingo-5.6.0.tar.gz) = 1805591
diff --git a/math/py-clingo/pkg-descr b/math/py-clingo/pkg-descr
new file mode 100644
index 000000000000..6184ff12ad52
--- /dev/null
+++ b/math/py-clingo/pkg-descr
@@ -0,0 +1,3 @@
+Answer Set Programming (ASP) offers a simple and powerful modeling language to
+solve combinatorial problems. With these tools users can concentrate on an
+actual problem, rather than a smart way of implementing it.