svn commit: r382547 - in head/math/py-numpy: . files
Dmitry Sivachenko
demon at FreeBSD.org
Sat Mar 28 19:41:44 UTC 2015
Author: demon
Date: Sat Mar 28 19:41:43 2015
New Revision: 382547
URL: https://svnweb.freebsd.org/changeset/ports/382547
QAT: https://qat.redports.org/buildarchive/r382547/
Log:
Allow to use OpenBLAS implementation of BLAS.
Based on the work done by Eijiro Shibusawa <phd_kimberlite at yahoo.co.jp>,
OpenBLAS port maintainer.
Hide py-nose dependency under new TESTS option.
Convert to USES=blaslapack.
Differential Revision: D2060
Reviewed by: koobs, thierry
Modified:
head/math/py-numpy/Makefile
head/math/py-numpy/files/site.cfg
Modified: head/math/py-numpy/Makefile
==============================================================================
--- head/math/py-numpy/Makefile Sat Mar 28 19:37:02 2015 (r382546)
+++ head/math/py-numpy/Makefile Sat Mar 28 19:41:43 2015 (r382547)
@@ -18,16 +18,16 @@ COMMENT= The New Numeric Extension to Py
LICENSE= BSD3CLAUSE
-RUN_DEPENDS= nosetests:${PORTSDIR}/devel/py-nose
-
USES= fortran python
USE_PYTHON= concurrent distutils py3kplist
LDFLAGS+= -shared
-OPTIONS_DEFINE= ATLAS SUITESPARSE DOCS
-OPTIONS_DEFAULT= SUITESPARSE
-ATLAS_DESC= Use optimized blas library
+OPTIONS_DEFINE= DOCS SUITESPARSE TESTS
+OPTIONS_SINGLE= BLASLIB
+OPTIONS_DEFAULT= NETLIB SUITESPARSE
+OPTIONS_SINGLE_BLASLIB= ATLAS NETLIB OPENBLAS
SUITESPARSE_DESC= Use AMD and UMFPACK in SuiteSparse
+TESTS_DESC= Install test suite requirements
PYDISTUTILS_CONFIGUREARGS+= --fcompiler=gnu95
PYDISTUTILS_BUILDARGS+= --fcompiler=gnu95
@@ -36,10 +36,11 @@ PORTDOCS= *
WRKSRC= ${WRKDIR}/${DISTNAME:S/r/rc/}
DOCVERSION= 1.9.1
-ATLAS_LIB_DEPENDS= libatlas.so:${PORTSDIR}/math/atlas
-ATLAS_LIB_DEPENDS_OFF= libblas.so:${PORTSDIR}/math/blas \
- liblapack.so:${PORTSDIR}/math/lapack
+ATLAS_USES= blaslapack:atlas
+NETLIB_USES= blaslapack:netlib
+OPENBLAS_USES= blaslapack:openblas
SUITESPARSE_LIB_DEPENDS=libumfpack.so:${PORTSDIR}/math/suitesparse
+TESTS_RUN_DEPENDS= nosetests:${PORTSDIR}/devel/py-nose
.include <bsd.port.pre.mk>
@@ -55,10 +56,25 @@ post-patch:
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
+.if ${PORT_OPTIONS:MOPENBLAS}
+ @${REINPLACE_CMD} -e "s+%%BLASNAME%%+openblas+" \
+ -e "s+%%LIBRARIES%%+libraries+" \
+ -e "s+%%LAPACKLIBS%%+%%BLASLIBS%%+" \
+ -e "s+%%BLASLIBS%%+openblasp, gfortran+" \
+ ${WRKSRC}/site.cfg
+.elif ${PORT_OPTIONS:MATLAS}
+ @${REINPLACE_CMD} -e "s+%%BLASNAME%%+atlas+" \
+ -e "s+%%LIBRARIES%%+atlas_libs+" \
+ -e "s+%%BLASLIBS%%+%%ATLASLIBS%%+" \
+ -e "s+%%LAPACKLIBS%%+alapack+" \
+ -e "s+%%ATLASLIBS%%+ptf77blas, ptcblas+" \
+ ${WRKSRC}/site.cfg
.else
- @${REINPLACE_CMD} -e "s+%%ATLASLIBS%%+lapack, blas+" ${WRKSRC}/site.cfg
+ @${REINPLACE_CMD} -e "s+%%BLASNAME%%+atlas+" \
+ -e "s+%%LIBRARIES%%+atlas_libs+" \
+ -e "s+%%BLASLIBS%%+blas+" \
+ -e "s+%%LAPACKLIBS%%+lapack+" \
+ ${WRKSRC}/site.cfg
.endif
.if !${PORT_OPTIONS:MSUITESPARSE}
@${REINPLACE_CMD} -e "s+:%%LOCALBASE%%/include/suitesparse++" ${WRKSRC}/site.cfg
Modified: head/math/py-numpy/files/site.cfg
==============================================================================
--- head/math/py-numpy/files/site.cfg Sat Mar 28 19:37:02 2015 (r382546)
+++ head/math/py-numpy/files/site.cfg Sat Mar 28 19:41:43 2015 (r382547)
@@ -1,10 +1,10 @@
[DEFAULT]
-lapack_type=atlas
library_dirs = /usr/lib:%%LOCALBASE%%/lib:%%GCCLIBDIR%%
include_dirs = /usr/include:%%LOCALBASE%%/include:%%LOCALBASE%%/include/suitesparse
src_dirs = %%LOCALBASE%%/src
# search static libraries (.a) in preference to shared ones (.so)
search_static_first = 0
-[atlas]
-library_dirs = %%LOCALBASE%%/lib:%%GCCLIBDIR%%
-atlas_libs = %%ATLASLIBS%%
+
+[%%BLASNAME%%]
+%%LIBRARIES%% = %%BLASLIBS%%
+lapack_libs = %%LAPACKLIBS%%
More information about the svn-ports-all
mailing list