summaryrefslogtreecommitdiff
path: root/math/flint/Makefile
blob: 06888de4f74e3c839f94d60905793e05aa412531 (plain) (blame)
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
PORTNAME=	flint
DISTVERSION=	3.3.1
CATEGORIES=	math
MASTER_SITES=	http://www.flintlib.org/download/

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Fast library for number theory
WWW=		https://flintlib.org \
		https://github.com/flintlib/flint

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libgmp.so:math/gmp \
		libmpfr.so:math/mpfr \
		libopenblas.so:math/openblas

USES=		compiler:c++11-lang gmake localbase pkgconfig python:build # cmake is only intended for Widows, see https://github.com/flintlib/flint/issues/2251#issuecomment-2720292171
USE_LDCONFIG=	yes

GNU_CONFIGURE=	yes

.if !defined(WITH_DEBUG)
CONFIGURE_ARGS=	--disable-debug
.endif

TEST_TARGET=	check

OPTIONS_DEFINE=			NTL
OPTIONS_GROUP=			OPTIMIZATIONS
OPTIONS_GROUP_OPTIMIZATIONS=	AVX2 AVX512
OPTIONS_DEFAULT=		NTL

AVX2_DESC=			Enable AVX2 instructions
AVX2_CONFIGURE_ENABLE=		avx2

AVX512_DESC=			Enable AVX512 instructions
AVX512_CONFIGURE_ENABLE=	avx512

NTL_DESC=			Victor Shoup's Number Theory Library
NTL_CONFIGURE_WITH=		ntl
NTL_LIB_DEPENDS=		libntl.so:math/ntl

MAKE_ENV+=	VERBOSE=1
MAKE_ARGS+=	VERBOSE=1

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libflint.so.21.0.0

# tests as of 3.3.1: All tests passed.

.include <bsd.port.mk>