Index: Makefile =================================================================== --- Makefile +++ Makefile @@ -24,9 +24,13 @@ USE_PYTHON= concurrent distutils py3kplist LDFLAGS+= -shared -OPTIONS_DEFINE= ATLAS SUITESPARSE DOCS -OPTIONS_DEFAULT= SUITESPARSE +OPTIONS_DEFINE= SUITESPARSE DOCS +OPTIONS_SINGLE= BLASLIB +OPTIONS_DEFAULT= BLAS SUITESPARSE +OPTIONS_SINGLE_BLASLIB= ATLAS BLAS OPENBLAS ATLAS_DESC= Use optimized blas library +BLAS_DESC= Use blas+lapack libraries +OPENBLAS_DESC= Use openblas library SUITESPARSE_DESC= Use AMD and UMFPACK in SuiteSparse PYDISTUTILS_CONFIGUREARGS+= --fcompiler=gnu95 @@ -36,9 +40,9 @@ 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 +BLAS_USES= blaslapack:netlib +OPENBLAS_USES= blaslapack:openblas SUITESPARSE_LIB_DEPENDS=libumfpack.so:${PORTSDIR}/math/suitesparse .include @@ -55,10 +59,25 @@ 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 Index: files/site.cfg =================================================================== --- files/site.cfg +++ 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%%