summaryrefslogtreecommitdiff
path: root/math/py-fpylll/Makefile
blob: 39e11da821d7e313afc33c24654d0014c24f9c01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
PORTNAME=	fpylll
PORTVERSION=	0.5.9
CATEGORIES=	math python
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	thierry@FreeBSD.org
COMMENT=	Python interface for fplll
WWW=		https://github.com/fplll/fpylll

LICENSE=	GPLv2

BUILD_DEPENDS=	${PYNUMPY}	\
		cython:lang/cython	\
		${PYTHON_PKGNAMEPREFIX}black>0:devel/py-black@${PY_FLAVOR}	\
		${PYTHON_PKGNAMEPREFIX}pythran>0:devel/py-pythran@${PY_FLAVOR}	\
		${PYTHON_PKGNAMEPREFIX}cysignals>0:devel/py-cysignals@${PY_FLAVOR}
LIB_DEPENDS=	libfplll.so:math/fplll	\
		libgmp.so:math/gmp	\
		libmpfr.so:math/mpfr	\
		libpari.so:math/pari	\
		libqd.so:math/qd
RUN_DEPENDS=	${PYNUMPY}	\
		${PYTHON_PKGNAMEPREFIX}black>0:devel/py-black@${PY_FLAVOR}	\
		${PYTHON_PKGNAMEPREFIX}pythran>0:devel/py-pythran@${PY_FLAVOR}	\
		${PYTHON_PKGNAMEPREFIX}cysignals>0:devel/py-cysignals@${PY_FLAVOR}
TEST_DEPENDS=	py.test:devel/py-pytest@${PY_FLAVOR}

USE_GITHUB=	yes
GH_ACCOUNT=	fplll

USES=		compiler:c++11-lang python:3.6+
USE_PYTHON=	distutils
.if !defined(WITH_DEBUG)
LDFLAGS+=	-s
.endif

OPTIONS_DEFINE=		TUTO
TUTO_DESC=		Build the tutorial
OPTIONS_SUB=		Yes
TUTO_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx>=1.6,1:textproc/py-sphinx@${PY_FLAVOR}
TUTO_USES=		gmake

PLIST_SUB=	VER=${PORTVERSION:R}

do-build-TUTO-on:
	(cd ${WRKSRC}/docs && ${GMAKE} html)

post-build-TUTO-on:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${CP} -R ${WRKSRC}/docs/_build/html/* ${STAGEDIR}${DOCSDIR}

do-test: install
	(cd ${WRKSRC} && PY_IGNORE_IMPORTMISMATCH=1 py.test)

.include <bsd.port.mk>