From b15d3df83b8754853716694e7fbe7741d4927383 Mon Sep 17 00:00:00 2001 From: thierry Date: Wed, 21 Jun 2006 21:36:29 +0000 Subject: Don't link with Atlas, but with Blas + Lapack, unless WITH_ATLAS is set or Atlas libraries have already been installed. --- math/blocksolve95/Makefile | 19 ++++++++++++++++--- .../files/patch-bmake::freebsd::freebsd.site | 8 ++++---- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'math/blocksolve95') diff --git a/math/blocksolve95/Makefile b/math/blocksolve95/Makefile index 513db1960492..20f18b6ffb5b 100644 --- a/math/blocksolve95/Makefile +++ b/math/blocksolve95/Makefile @@ -17,14 +17,14 @@ DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Sofware for the efficient solution of large, sparse linear systems -LIB_DEPENDS= f77blas.1:${PORTSDIR}/math/atlas BUILD_DEPENDS= ${MPIDIR}/lib/libmpich.a:${PORTSDIR}/net/mpich RUN_DEPENDS= ${MPIDIR}/bin/mpirun:${PORTSDIR}/net/mpich USE_XLIB= yes USE_GMAKE= yes MAKEFILE= makefile -MAKE_ARGS= GMAKE=${GMAKE} PETSC_ARCH=${PETSC_ARCH} BOPT=${BOPT} +MAKE_ARGS= GMAKE=${GMAKE} PETSC_ARCH=${PETSC_ARCH} BOPT=${BOPT} \ + BLAS_LIB=${BLAS_LIB} LAPACK_LIB=${LAPACK_LIB} MPIDIR= ${LOCALBASE}/mpich PETSC_ARCH= freebsd @@ -37,6 +37,19 @@ PORTDOCS= manual.ps .include +.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS) +WITH_ATLAS= yes +.endif +.if defined(WITH_ATLAS) +LIB_DEPENDS+= f77blas.1:${PORTSDIR}/math/atlas +BLAS_LIB= "-lf77blas -lcblas -latlas -lg2c -lm" +LAPACK_LIB= "-L${LOCALBASE}/lib -lalapack" +.else +LIB_DEPENDS+= lapack.3:${PORTSDIR}/math/lapack +BLAS_LIB= "-lblas -lm" +LAPACK_LIB= "-L${LOCALBASE}/lib -llapack" +.endif + do-install: ${INSTALL_DATA} ${WRKSRC}/lib/lib${BOPT}/${PETSC_ARCH}/libBS95.a \ ${PREFIX}/lib @@ -51,7 +64,7 @@ do-install: .endif .if defined(MAINTAINER_MODE) -test: build +regression-test: build @(cd ${BUILD_WRKSRC}/examples; \ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} bsrunexamples clean) .endif diff --git a/math/blocksolve95/files/patch-bmake::freebsd::freebsd.site b/math/blocksolve95/files/patch-bmake::freebsd::freebsd.site index abf2fceb9cba..d903cf2aa95e 100644 --- a/math/blocksolve95/files/patch-bmake::freebsd::freebsd.site +++ b/math/blocksolve95/files/patch-bmake::freebsd::freebsd.site @@ -1,13 +1,13 @@ ---- ./bmake/freebsd/freebsd.site.orig Thu Feb 15 22:53:34 1996 -+++ ./bmake/freebsd/freebsd.site Sun Oct 3 20:40:47 2004 +--- bmake/freebsd/freebsd.site.orig Thu Feb 15 22:53:34 1996 ++++ bmake/freebsd/freebsd.site Wed Jun 21 23:11:51 2006 @@ -15,24 +15,24 @@ # Location of BLAS and LAPACK. These libraries are available via Netlib, # or see $(BS_DIR)/readme for information on retrieving a subset. # -BLAS_LIB = /home/bsmith/lapack/blas_freebsd.a $(FC_LIB) -LAPACK_LIB = /home/bsmith/lapack/lapack_freebsd.a -+BLAS_LIB = -lf77blas -lcblas -latlas -lg2c -lm -+LAPACK_LIB = -L$(LOCALBASE)/lib -lalapack ++#BLAS_LIB = -lf77blas -lcblas -latlas -lg2c -lm ++#LAPACK_LIB = -L$(LOCALBASE)/lib -lalapack # # Location of X-windows software # -- cgit