aboutsummaryrefslogtreecommitdiff
path: root/math/zn_poly
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2020-05-04 20:47:51 +0000
committerThierry Thomas <thierry@FreeBSD.org>2020-05-04 20:47:51 +0000
commitd892e083448c9a90eab8c53d668f7e0d4f039204 (patch)
tree1f9726e1df2633b8485a70fbbbb40daf9d158c78 /math/zn_poly
parentbafae82ff9408e7d578f01b6499e44f1d08a2115 (diff)
downloadports-d892e083448c9a90eab8c53d668f7e0d4f039204.tar.gz
ports-d892e083448c9a90eab8c53d668f7e0d4f039204.zip
Adding zn_poly, a C library for polynomial arithmetic.
To be used by SageMath.
Notes
Notes: svn path=/head/; revision=533987
Diffstat (limited to 'math/zn_poly')
-rw-r--r--math/zn_poly/Makefile51
-rw-r--r--math/zn_poly/distinfo3
-rw-r--r--math/zn_poly/pkg-descr5
-rw-r--r--math/zn_poly/pkg-plist6
4 files changed, 65 insertions, 0 deletions
diff --git a/math/zn_poly/Makefile b/math/zn_poly/Makefile
new file mode 100644
index 000000000000..1c7a39aa0308
--- /dev/null
+++ b/math/zn_poly/Makefile
@@ -0,0 +1,51 @@
+# Created by: thierry@pompo.net
+# $FreeBSD$
+
+PORTNAME= zn_poly
+PORTVERSION= 0.9.2
+CATEGORIES= math
+MASTER_SITES= https://gitlab.com/sagemath/${PORTNAME}/-/archive/${PORTVERSION}/
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= C library for polynomial arithmetic
+
+LICENSE= GPLv2 GPLv3
+LICENSE_COMB= dual
+LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING
+LICENSE_FILE_GPLv3= ${WRKSRC}/COPYING
+
+LIB_DEPENDS= libgmp.so:math/gmp
+
+USES= gmake python:build tar:bz2
+
+OPTIONS_DEFINE= DOCS
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --prefix="${STAGEDIR}${PREFIX}" \
+ --cppflags="${CPPFLAGS}" \
+ --cflags="${CFLAGS} -fPIC" \
+ --cxxflags="${CXXFLAGS}" \
+ --ldflags="${LDFLAGS}" \
+ --gmp-prefix="${LOCALBASE}"
+MAKEFILE= makefile
+ALL_TARGET= all libzn_poly.so
+USE_LDCONFIG= yes
+TEST_TARGET= check
+
+.if defined(PACKAGE_BUILDING)
+CONFIGURE_ARGS+=--disable-tuning
+.endif
+
+pre-configure:
+ ${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' \
+ ${WRKSRC}/${CONFIGURE_SCRIPT}
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/libzn_poly-${PORTVERSION}.so \
+ ${STAGEDIR}${PREFIX}/lib/libzn_poly-${PORTVERSION}.so.0.0.0
+ ${RLN} ${STAGEDIR}${PREFIX}/lib/libzn_poly-${PORTVERSION}.so.0.0.0 \
+ ${STAGEDIR}${PREFIX}/lib/libzn_poly-${PORTVERSION:R}.so.0
+ ${RLN} ${STAGEDIR}${PREFIX}/lib/libzn_poly-${PORTVERSION}.so.0.0.0 \
+ ${STAGEDIR}${PREFIX}/lib/libzn_poly-${PORTVERSION:R}.so
+
+.include <bsd.port.mk>
diff --git a/math/zn_poly/distinfo b/math/zn_poly/distinfo
new file mode 100644
index 000000000000..4a3cc099591e
--- /dev/null
+++ b/math/zn_poly/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1588608790
+SHA256 (zn_poly-0.9.2.tar.bz2) = 29d88ce19939f53e920adf118d8cd6c8c9594bc8cb71a992a6137bd86f6fb7f5
+SIZE (zn_poly-0.9.2.tar.bz2) = 94785
diff --git a/math/zn_poly/pkg-descr b/math/zn_poly/pkg-descr
new file mode 100644
index 000000000000..251f46ca7954
--- /dev/null
+++ b/math/zn_poly/pkg-descr
@@ -0,0 +1,5 @@
+zn_poly is a C library for polynomial arithmetic in Z/nZ[x], where n is any
+modulus that fits into an unsigned long.
+
+WWW: https://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/
+WWW: https://gitlab.com/sagemath/zn_poly/
diff --git a/math/zn_poly/pkg-plist b/math/zn_poly/pkg-plist
new file mode 100644
index 000000000000..69423aabfd35
--- /dev/null
+++ b/math/zn_poly/pkg-plist
@@ -0,0 +1,6 @@
+include/zn_poly/wide_arith.h
+include/zn_poly/zn_poly.h
+lib/libzn_poly-0.9.2.so.0.0.0
+lib/libzn_poly-0.9.so
+lib/libzn_poly-0.9.so.0
+lib/libzn_poly.a