summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2015-03-28 19:41:43 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2015-03-28 19:41:43 +0000
commit2d92e2e4e5ee2a77f49d862619bb9302d6a85118 (patch)
treeb78b50ac8a264effddf6f6dcb79e1f0fc708ed41 /math
parentUpdate to 0.22, and fix bizarre BUILD_DEPENDS assignment. (diff)
Allow to use OpenBLAS implementation of BLAS.
Based on the work done by Eijiro Shibusawa <phd_kimberlite@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
Notes
Notes: svn path=/head/; revision=382547
Diffstat (limited to 'math')
-rw-r--r--math/py-numpy/Makefile38
-rw-r--r--math/py-numpy/files/site.cfg8
2 files changed, 31 insertions, 15 deletions
diff --git a/math/py-numpy/Makefile b/math/py-numpy/Makefile
index 6bf9bbbe81ac..d75a605fa69e 100644
--- a/math/py-numpy/Makefile
+++ b/math/py-numpy/Makefile
@@ -18,16 +18,16 @@ COMMENT= The New Numeric Extension to Python
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
diff --git a/math/py-numpy/files/site.cfg b/math/py-numpy/files/site.cfg
index f3ef2fcda163..04c5da865afe 100644
--- a/math/py-numpy/files/site.cfg
+++ b/math/py-numpy/files/site.cfg
@@ -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%%