git: 53b98b0ec570 - main - math/py-clingo: New port: Grounder and solver for logic programs

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 14 Sep 2022 04:42:14 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=53b98b0ec570c3edfd845aa1a2018acd2d2e49ee

commit 53b98b0ec570c3edfd845aa1a2018acd2d2e49ee
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-09-14 03:30:34 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-09-14 04:41:14 +0000

    math/py-clingo: New port: Grounder and solver for logic programs
---
 math/Makefile            |  1 +
 math/py-clingo/Makefile  | 27 +++++++++++++++++++++++++++
 math/py-clingo/distinfo  |  3 +++
 math/py-clingo/pkg-descr |  3 +++
 4 files changed, 34 insertions(+)

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.