1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00
freebsd-ports/math/py-pynleq2/Makefile
2021-02-14 18:12:28 +00:00

39 lines
1.0 KiB
Makefile

# $FreeBSD$
PORTNAME= pynleq2
DISTVERSION= 0.0.2
PORTREVISION= 7
CATEGORIES= math python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Python binding for NLEQ2 algorithm's fortran implementation
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYNUMPY}
USES= fortran python:3.6+
USE_PYTHON= distutils autoplist
USE_GITHUB= nodefault
GH_TUPLE= PySCeS:pysces:0.9.8:fortran
FORTRAN_FILES= linalg_nleq2.f nleq2.f wnorm.f zibconst.f zibmon.f zibsec.f
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/setup.py
pre-build: # compile fortran files into a static library because distutils fails while doing this
@${MKDIR} ${WRKDIR}/.fbuild && \
cd ${WRKDIR}/.fbuild && \
${FC} -c ${CFLAGS} -fPIC ${FORTRAN_FILES:C,^,${WRKSRC_fortran}/pysces/nleq2/,} && \
${AR} -qc libff.a ${FORTRAN_FILES:S/.f/.o/}
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}/nleq2*.so
.include <bsd.port.mk>