freebsd-ports/math/p5-Math-Pari/Makefile
John Marino 1a8ed34516 math/p5-Math-Pari: Fix fetch on older Pari source
Approved by:	Just-fix-it
2017-01-26 19:26:56 +00:00

60 lines
1.9 KiB
Makefile

# Created by: Michael Haro <mharo@FreeBSD.org>
# $FreeBSD$
PORTNAME= Math-Pari
PORTVERSION= 2.01080900
CATEGORIES= math perl5
MASTER_SITES= CPAN \
http://pari.math.u-bordeaux.fr/pub/pari/unix/OLD/2.3/:pari \
http://mirrors.rit.edu/zi/:pari
PKGNAMEPREFIX= p5-
DISTFILES= ${DISTNAME}.zip \
pari-2.3.5.tar.gz:pari
MAINTAINER= perl@FreeBSD.org
COMMENT= PARI - numerical/scientific/number-theoretic calculations
LIB_DEPENDS= libgmp.so:math/gmp
USES= perl5
USE_PERL5= configure
PARI_WRKSRC= ${WRKDIR}/pari-2.3.5
CFLAGS+= -I${PARI_WRKSRC}/src/headers -I${PARI_WRKSRC}/build
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"
post-patch:
@${REINPLACE_CMD} -e 's|2001007|2003000|' ${WRKSRC}/Makefile.PL
@${REINPLACE_CMD} -E '/^list=/s/(ld|ranlib|perl|emacs)//g' \
${PARI_WRKSRC}/Configure
@${REINPLACE_CMD} -e '/^CFLAGS=/s/\$$cflags//' \
${PARI_WRKSRC}/config/get_cc
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
.include <bsd.port.mk>