2013-04-22 14:53:58 +02:00
# Created by: Michael Haro <mharo@FreeBSD.org>
2001-09-11 12:23:36 +02:00
# $FreeBSD$
PORTNAME = Math-Pari
2017-01-24 17:37:13 +01:00
PORTVERSION = 2.01080900
2001-09-11 12:23:36 +02:00
CATEGORIES = math perl5
2017-01-24 17:37:13 +01:00
MASTER_SITES = CPAN \
2017-01-26 20:26:56 +01:00
http://pari.math.u-bordeaux.fr/pub/pari/unix/OLD/2.3/:pari \
2017-01-24 17:37:13 +01:00
http://mirrors.rit.edu/zi/:pari
2001-09-11 12:23:36 +02:00
PKGNAMEPREFIX = p5-
2017-01-24 17:37:13 +01:00
DISTFILES = ${ DISTNAME } .zip \
pari-2.3.5.tar.gz:pari
2001-09-11 12:23:36 +02:00
2013-04-22 14:53:58 +02:00
MAINTAINER = perl@FreeBSD.org
2020-05-28 15:13:25 +02:00
COMMENT = Numerical/scientific/number-theoretic calculations
2001-09-11 12:23:36 +02:00
2018-06-11 11:04:30 +02:00
LICENSE = ART10 GPLv1+
LICENSE_COMB = dual
2019-09-14 14:22:21 +02:00
.if ${/usr/bin/ld : L :tA } == /usr /bin /ld .lld
BROKEN_i386 = ld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment; recompile object files with -fPIC or pass ' -Wl,-z,notext' to allow text relocations in the output
. e n d i f
2018-06-22 03:15:19 +02:00
2017-01-24 17:37:13 +01:00
LIB_DEPENDS = libgmp.so:math/gmp
2001-09-11 12:23:36 +02:00
2017-01-24 17:37:13 +01:00
USES = perl5
2013-08-02 20:52:07 +02:00
USE_PERL5 = configure
2001-09-11 12:23:36 +02:00
2017-01-24 17:37:13 +01:00
PARI_WRKSRC = ${ WRKDIR } /pari-2.3.5
CFLAGS += -I${ PARI_WRKSRC } /src/headers -I${ PARI_WRKSRC } /build
2020-06-10 19:47:51 +02:00
CFLAGS_aarch64 = -fPIC
2020-03-31 15:17:53 +02:00
CFLAGS_powerpc = -fPIC
CFLAGS_powerpc64 = -fPIC
2017-01-24 17:37:13 +01:00
CONFIGURE_ARGS = parilib = " -L ${ PARI_WRKSRC } /build -lpari " \
paridir = ${ PARI_WRKSRC }
MAKE_ARGS = LDLOADLIBS = " -lm -L ${ PARI_WRKSRC } /build -Wl,-rpath= ${ SITE_ARCH } /auto/Math/Pari -lpari "
2003-08-21 15:16:11 +02:00
2020-06-10 19:46:30 +02:00
. i n c l u d e < b s d . p o r t . o p t i o n s . m k >
2006-11-10 17:32:07 +01:00
post-patch :
2015-03-07 08:30:26 +01:00
@${ REINPLACE_CMD } -e 's|2001007|2003000|' ${ WRKSRC } /Makefile.PL
2017-01-24 17:37:13 +01:00
@${ REINPLACE_CMD } -E '/^list=/s/(ld|ranlib|perl|emacs)//g' \
${ PARI_WRKSRC } /Configure
@${ REINPLACE_CMD } -e '/^CFLAGS=/s/\$$cflags//' \
${ PARI_WRKSRC } /config/get_cc
2020-06-10 19:46:30 +02:00
. i f ${ARCH} = = "i386"
${ REINPLACE_CMD } -e 's|-Wl|-Wl,-znotext|' ${ PARI_WRKSRC } /config/ldflags
. e n d i f
2017-01-24 17:37:13 +01:00
pre-configure :
cd ${ PARI_WRKSRC } && ${ SETENV } CC = " ${ CC } " CPP = " ${ CPP } " CXX = " ${ CXX } " \
CFLAGS = " ${ CFLAGS } " CPPFLAGS = " ${ CPPFLAGS } " CXXFLAGS = " ${ CXXFLAGS } " \
LDFLAGS = " ${ LDFLAGS } " LIBS = " ${ LIBS } " \
INSTALL = "/usr/bin/install -c" \
INSTALL_DATA = " ${ INSTALL_DATA } " \
INSTALL_LIB = " ${ INSTALL_LIB } " \
INSTALL_PROGRAM = " ${ INSTALL_PROGRAM } " \
INSTALL_SCRIPT = " ${ INSTALL_SCRIPT } " \
ld = " ${ LD } " perl = " ${ PERL } " ranlib = " ${ RANLIB } " \
./Configure --mandir= ${ MANPREFIX } /man/man1 \
--prefix= ${ PREFIX } \
--share-prefix= ${ PREFIX } /share \
--with-gmp= ${ LOCALBASE }
pre-build :
cd ${ PARI_WRKSRC } && ${ DO_MAKE_BUILD : N -j* } gp
cd ${ PARI_WRKSRC } && ln -s $$ ( dirname $$ ( readlink gp) ) build
post-install :
${ INSTALL_LIB } ${ PARI_WRKSRC } /build/libpari-gmp.so.2.3.5 ${ STAGEDIR } ${ SITE_ARCH } /auto/Math/Pari
${ LN } -s libpari-gmp.so.2.3.5 ${ STAGEDIR } ${ SITE_ARCH } /auto/Math/Pari/libpari-gmp.so.2
2003-08-21 15:16:11 +02:00
2006-11-10 17:32:07 +01:00
. i n c l u d e < b s d . p o r t . m k >