diff options
author | maho <maho@FreeBSD.org> | 2008-06-21 07:52:29 +0800 |
---|---|---|
committer | maho <maho@FreeBSD.org> | 2008-06-21 07:52:29 +0800 |
commit | a11b2b7c20a9e6423cd3ce45d908a189ae67884f (patch) | |
tree | 76d6958551e09166f74eb6e9a2979aa21cd9f62e /math | |
parent | 3aab2bcd56fa87cd7394885dc7f9c5685038a878 (diff) | |
download | freebsd-ports-gnome-a11b2b7c20a9e6423cd3ce45d908a189ae67884f.tar.gz freebsd-ports-gnome-a11b2b7c20a9e6423cd3ce45d908a189ae67884f.tar.zst freebsd-ports-gnome-a11b2b7c20a9e6423cd3ce45d908a189ae67884f.zip |
Enhancements to math/superlu [1] add a knob for
GotoBLAS/ATLAS/reference BLAS.
PR: 124786 [1]
Submitted by: "Pedro F. Giffuni" <giffunip@tutopia.com> [1]
Diffstat (limited to 'math')
-rw-r--r-- | math/superlu/Makefile | 54 | ||||
-rw-r--r-- | math/superlu/files/patch-make.inc | 15 |
2 files changed, 38 insertions, 31 deletions
diff --git a/math/superlu/Makefile b/math/superlu/Makefile index a379ced68742..b80c3cbc9382 100644 --- a/math/superlu/Makefile +++ b/math/superlu/Makefile @@ -21,39 +21,39 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= maho@FreeBSD.org COMMENT= A library of routines for performing sparse factorization -.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS) -WITH_ATLAS= yes +USE_BLAS?= reference + +.if exists(${LOCALBASE}/lib/libgoto.so) +USE_BLAS= gotoblas +.elif exists(${LOCALBASE}/lib/libatlas_r.so) +USE_BLAS= atlas .endif -.if defined(WITH_ATLAS) -LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas -BLAS= -lf77blas -latlas -LAPACK= -lalapack -.else -LIB_DEPENDS+= lapack.4:${PORTSDIR}/math/lapack + +. if ${USE_BLAS} == reference LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas -BLAS= -lblas -LAPACK= -llapack +BLAS_LIBS= -lblas +.elif ${USE_BLAS} == gotoblas +LIB_DEPENDS+= goto:${PORTSDIR}/math/gotoblas +BLAS_LIBS= -lgotop +.elif ${USE_BLAS} == atlas +LIB_DEPENDS+= atlas:${PORTSDIR}/math/atlas +BLAS_LIBS= -lptf77blas -lptcblas -latlas_r .endif USE_FORTRAN= yes P_VERSION= 3.0 WRKSRC= ${WRKDIR}/SuperLU_${P_VERSION} -ALL_TARGET= superlulib +ALL_TARGET= lib ARCH2FIX= SRC/Makefile TESTING/MATGEN/Makefile CBLAS/Makefile make.inc \ MAKE_INC/make.alpha MAKE_INC/make.inc -post-patch: - @${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+-L${LOCALBASE}/lib ${BLAS_LIBS}+' \ - ${WRKSRC}/make.inc - @${REINPLACE_CMD} -e 's+%%CC%%+${CC}+' \ - ${WRKSRC}/make.inc - @${REINPLACE_CMD} -e 's+%%FC%%+${FC}+' \ - ${WRKSRC}/make.inc - @${REINPLACE_CMD} -e 's+%%CFLAGS%%+${CFLAGS}+' \ - ${WRKSRC}/make.inc - @${REINPLACE_CMD} -e 's+%%FFLAGS%%+${FFLAGS}+' \ +pre-build: + @${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+-L${LOCALBASE}/lib ${BLAS_LIBS}+ ; \ + s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \ + s+%%CFLAGS%%+${CFLAGS}+; \ + s+%%FFLAGS%%+${FFLAGS}+' \ ${WRKSRC}/make.inc .for fmk in ${ARCH2FIX} @${REINPLACE_CMD} -e 's|^ARCH *.= ar|ARCMD = ar| ; \ @@ -72,10 +72,8 @@ do-install: ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/superlu_ug.pdf ${DOCSDIR} .endif -.include <bsd.port.pre.mk> - -.if ${ARCH} == "amd64" || ${ARCH} == "ia64" -CFLAGS+= -fPIC -.endif - -.include <bsd.port.post.mk> +regression-test: build + @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} testing ) + @(cd ${WRKSRC}/TESTING && ${CAT} *.out ) + +.include <bsd.port.mk> diff --git a/math/superlu/files/patch-make.inc b/math/superlu/files/patch-make.inc index acdc2234e2a8..1a4a4502344a 100644 --- a/math/superlu/files/patch-make.inc +++ b/math/superlu/files/patch-make.inc @@ -1,5 +1,14 @@ ---- make.inc.orig Sun Jan 1 18:52:00 2006 -+++ make.inc Sat Feb 4 19:25:37 2006 +--- make.inc.orig 2006-01-01 18:52:00.000000000 -0500 ++++ make.inc 2008-06-19 22:08:49.000000000 -0500 +@@ -19,7 +19,7 @@ + # + TMGLIB = libtmglib.a + SUPERLULIB = libsuperlu_3.0.a +-BLASLIB = ../libblas.a ++BLASLIB = %%BLAS_LIBS%% + + # + # The archiver and the flag(s) to use when building archive (library) @@ -29,12 +29,12 @@ ARCHFLAGS = cr RANLIB = ranlib @@ -14,7 +23,7 @@ +CFLAGS = %%CFLAGS%% +FORTRAN = %%FC%% +FFLAGS = %%FFLAGS%% -+LOADER = %%CC%% ++LOADER = %%FC%% +LOADOPTS = # |