aboutsummaryrefslogtreecommitdiffstats
path: root/math/ntl/Makefile
blob: 17abb844564b58a8a2dfa9b433dd414943477be2 (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
# Created by: bauerm
# $FreeBSD$

PORTNAME=   ntl
PORTVERSION=    11.3.1
CATEGORIES= math
MASTER_SITES=   http://www.shoup.net/ntl/

MAINTAINER= ndowens@yahoo.com
COMMENT=    Victor Shoup's Number Theory Library

LICENSE=    LGPL21+
LICENSE_FILE=   ${WRKSRC}/../doc/copying.txt

USES=       compiler:c11 libtool perl5
USE_LDCONFIG=   yes
USE_PERL5=  build

HAS_CONFIGURE=  yes
CONFIGURE_ARGS+=AR="${AR}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
        DEF_PREFIX="${LOCALBASE}" LDFLAGS="${LDFLAGS}" \
        PREFIX="${PREFIX}" RANLIB="${RANLIB}" SHARED=on

CFLAGS+=    -fPIC
WRKSRC=     ${WRKDIR}/${DISTNAME}/src
MAKEFILE=   makefile

OPTIONS_DEFINE=     DOCS GMP
OPTIONS_DEFAULT=    GMP

GMP_DESC=       Arbitrary precision arithmetic(Faster)
GMP_LIB_DEPENDS=    libgmp.so:math/gmp
GMP_CONFIGURE_OFF=  NTL_GMP_LIP=off

NTLDOCSDIR=     share/doc/NTL
PLIST_SUB=      NTLDOCS=${NTLDOCSDIR}

do-install-DOCS-on:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/../doc/* ${STAGEDIR}${DOCSDIR}

post-install:
    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libntl.so.*

test: build
    @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} \
        ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)

.include <bsd.port.mk>