mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
9d9c7ce4ef
Python packages installs .egg-info metadata directories when --single-version-externally managed is specified, as the Python ports framework does currently for all ports when USE_PYDISTUTILS is defined. In this case the py-numpy port does *not* currently define PYDISTUTILS_AUTOPLIST nor INSTALLS_EGGINFO, which precludes the contents of the add-plist-egginfo: target from being executed. This results in an .egg-info metadata directory being built, and staged, but not installed. Correctly specify INSTALLS_EGGINFO to compensate. Additionally add an "Open" Goal Wiki entry [1] to look at automatically detecting the presence of .egg-info metadata directories, since all ports leveraging USE_PYDISTUTILS also use the --record mechanism for generating installed file lists, and potentially deprecating INSTALLS_EGGINFO and related variables. [1] https://wiki.freebsd.org/Python#Goals PR: 191865 Submitted by: John W. O'Brien <john at saltant dot com>
86 lines
2.7 KiB
Makefile
86 lines
2.7 KiB
Makefile
# Created by: Tony Maher
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= numpy
|
|
PORTVERSION= 1.8.1
|
|
PORTREVISION= 1
|
|
PORTEPOCH= 1
|
|
CATEGORIES= math python
|
|
MASTER_SITES= http://docs.scipy.org/doc/${PORTNAME}/:doc \
|
|
SF/${PORTNAME}/NumPy/${PORTVERSION}:source
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
DISTFILES= numpy-${PORTVERSION:S/r/rc/}${EXTRACT_SUFX}:source \
|
|
numpy-ref-${PORTVERSION}.pdf:doc \
|
|
numpy-user-${PORTVERSION}.pdf:doc
|
|
EXTRACT_ONLY= numpy-${PORTVERSION:S/r/rc/}${EXTRACT_SUFX}
|
|
|
|
MAINTAINER= python@FreeBSD.org
|
|
COMMENT= The New Numeric Extension to Python
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
|
|
RUN_DEPENDS= nosetests:${PORTSDIR}/devel/py-nose
|
|
|
|
OPTIONS_DEFINE= ATLAS SUITESPARSE
|
|
OPTIONS_DEFAULT= SUITESPARSE
|
|
ATLAS_DESC= Use optimized blas library
|
|
SUITESPARSE_DESC= Use AMD and UMFPACK in SuiteSparse
|
|
|
|
USES= fortran
|
|
USE_PYTHON= yes
|
|
USE_PYDISTUTILS= yes
|
|
PYDISTUTILS_CONFIGUREARGS+= --fcompiler=gnu95
|
|
PYDISTUTILS_BUILDARGS+= --fcompiler=gnu95
|
|
PYTHON_PY3K_PLIST_HACK= yes
|
|
INSTALLS_EGGINFO= yes
|
|
|
|
PORTDOCS= *
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:S/r/rc/}
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PORT_OPTIONS:MATLAS}
|
|
LIB_DEPENDS+= libatlas.so:${PORTSDIR}/math/atlas
|
|
.else
|
|
LIB_DEPENDS+= liblapack.so:${PORTSDIR}/math/lapack \
|
|
libblas.so:${PORTSDIR}/math/blas
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MSUITESPARSE}
|
|
LIB_DEPENDS+= libumfpack.so:${PORTSDIR}/math/suitesparse
|
|
.endif
|
|
|
|
post-extract:
|
|
@${CP} ${DISTDIR}/numpy-ref-${PORTVERSION}.pdf ${WRKDIR}
|
|
@${CP} ${DISTDIR}/numpy-user-${PORTVERSION}.pdf ${WRKDIR}
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e "s+%%FC%%+${FC}+" ${WRKSRC}/numpy/distutils/fcompiler/gnu.py
|
|
@${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg
|
|
# ignore LDFLAGS from env, as it overrides internal flags (e.g. -shared) for some reason
|
|
@${REINPLACE_CMD} -e "s|'LDFLAGS'|None|" ${WRKSRC}/numpy/distutils/fcompiler/__init__.py
|
|
|
|
GCCLIBDIR_CMDS= ${FC} -print-file-name=libgfortran.so|${SED} -e s/libgfortran.so//
|
|
|
|
pre-configure:
|
|
.if ${PORT_OPTIONS:MATLAS}
|
|
@${REINPLACE_CMD} -e "s+%%ATLASLIBS%%+alapack, f77blas, cblas, atlas+" ${WRKSRC}/site.cfg
|
|
.else
|
|
@${REINPLACE_CMD} -e "s+%%ATLASLIBS%%+lapack, blas+" ${WRKSRC}/site.cfg
|
|
.endif
|
|
.if !${PORT_OPTIONS:MSUITESPARSE}
|
|
@${REINPLACE_CMD} -e "s+:%%LOCALBASE%%/include/suitesparse++" ${WRKSRC}/site.cfg
|
|
.endif
|
|
@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+$$(${GCCLIBDIR_CMDS})+" \
|
|
-e "s+%%LOCALBASE%%+${LOCALBASE}+g" \
|
|
${WRKSRC}/site.cfg
|
|
@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+$$(${GCCLIBDIR_CMDS})+" ${WRKSRC}/numpy/distutils/system_info.py
|
|
|
|
post-install:
|
|
${INSTALL_MAN} ${WRKSRC}/numpy/f2py/f2py.1 ${STAGEDIR}${MANPREFIX}/man/man1
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKDIR}/numpy-ref-${PORTVERSION}.pdf ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKDIR}/numpy-user-${PORTVERSION}.pdf ${STAGEDIR}${DOCSDIR}
|
|
|
|
.include <bsd.port.post.mk>
|