aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2006-06-21 13:53:05 +0800
committermaho <maho@FreeBSD.org>2006-06-21 13:53:05 +0800
commit9d929a353613a751f5186d3ba911b76d6af35062 (patch)
tree087a7c85cb2b2c172018a6653d740cc7eb5b8d99 /math
parent77e2d440280889dfd16e716ba464e7f00d90723e (diff)
downloadfreebsd-ports-gnome-9d929a353613a751f5186d3ba911b76d6af35062.tar.gz
freebsd-ports-gnome-9d929a353613a751f5186d3ba911b76d6af35062.tar.zst
freebsd-ports-gnome-9d929a353613a751f5186d3ba911b76d6af35062.zip
Use blas instead of atlas
PR: 99189 Submitted by: Pedro F. Giffuni <giffunip@asme.org>
Diffstat (limited to 'math')
-rw-r--r--math/superlu/Makefile20
-rw-r--r--math/superlu_mt/Makefile18
2 files changed, 30 insertions, 8 deletions
diff --git a/math/superlu/Makefile b/math/superlu/Makefile
index e66d32ba4cab..3048c3ba491f 100644
--- a/math/superlu/Makefile
+++ b/math/superlu/Makefile
@@ -20,19 +20,27 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= maho@FreeBSD.org
COMMENT= A library of routines for performing sparse factorization
+.ifdef WITH_ATLAS
LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas
+.else
+LIB_DEPENDS= blas.1:${PORTSDIR}/math/blas
+.endif
P_VERSION= 3.0
WRKSRC= ${WRKDIR}/SuperLU_${P_VERSION}
ALL_TARGET= superlulib
-BLAS_LIBS= ${LOCALBASE}/lib/libf77blas.a ${LOCALBASE}/lib/libatlas.a
+.ifdef WITH_ATLAS
+BLAS_LIBS= -lf77blas -latlas
+.else
+BLAS_LIBS?= -lblas
+.endif
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%%+${BLAS_LIBS}+' \
+ @${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+-L${LOCALBASE}/lib ${BLAS_LIBS}+' \
${WRKSRC}/make.inc
@${REINPLACE_CMD} -e 's+%%CC%%+${CC}+' \
${WRKSRC}/make.inc
@@ -59,4 +67,10 @@ do-install:
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/superlu_ug.ps.gz ${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
+CFLAGS+= -fPIC
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/math/superlu_mt/Makefile b/math/superlu_mt/Makefile
index d350705048d3..b04982024931 100644
--- a/math/superlu_mt/Makefile
+++ b/math/superlu_mt/Makefile
@@ -9,10 +9,10 @@ PORTNAME= superlu_mt
DISTVERSION= 1.0.20050524
CATEGORIES= math
MASTER_SITES= http://crd.lbl.gov/~xiaoye/SuperLU/ \
- http://crd.lbl.gov/~xiaoye/
+ http://crd.lbl.gov/~xiaoye/:doc
DISTNAME= ${PORTNAME}_1.0
.ifndef NOPORTDOCS
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} simax97.ps.gz
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} simax97.ps.gz:doc
.endif
DIST_SUBDIR= superlu
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
@@ -20,18 +20,26 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Routines for performing multithreaded sparse factorization
-BUILD_DEPENDS= ${LOCALBASE}/lib/libblas.a:${PORTSDIR}/math/blas
+.ifdef WITH_ATLAS
+LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas
+.else
+LIB_DEPENDS= blas.1:${PORTSDIR}/math/blas
+.endif
WRKSRC= ${WRKDIR}/SuperLU_MT
ALL_TARGET= superlulib
-BLAS_LIBS= ${LOCALBASE}/lib/libblas.a
+.ifdef WITH_ATLAS
+BLAS_LIBS= -lf77blas -latlas
+.else
+BLAS_LIBS?= -lblas
+.endif
ARCH2FIX= CBLAS/Makefile make.alpha make.exemplar TESTING/MATGEN/Makefile \
make.origin make.inc make.pthreads SRC/Makefile
post-patch:
- @${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+${BLAS_LIBS}+ ; \
+ @${REINPLACE_CMD} -e 's+%%BLAS_LIBS%%+-L${LOCALBASE}/lib ${BLAS_LIBS}+ ; \
s+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+ ; \
s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+ ' \
${WRKSRC}/make.inc