1998-08-10 01:54:16 +02:00
|
|
|
# New ports collection makefile for: SuperLU
|
1999-12-23 20:30:26 +01:00
|
|
|
# Date created: 31 Oct 97
|
|
|
|
# Whom: Pedro Giffuni <giffunip@asme.org>
|
1998-08-10 01:54:16 +02:00
|
|
|
#
|
1999-08-25 09:23:21 +02:00
|
|
|
# $FreeBSD$
|
1998-08-10 01:54:16 +02:00
|
|
|
#
|
|
|
|
|
2000-04-14 09:20:58 +02:00
|
|
|
PORTNAME= superlu
|
2012-03-14 02:44:04 +01:00
|
|
|
PORTREVISION= 4
|
2006-02-13 03:33:44 +01:00
|
|
|
DISTVERSION= ${P_VERSION}.20060201
|
1998-08-10 01:54:16 +02:00
|
|
|
CATEGORIES= math
|
2006-03-15 08:08:45 +01:00
|
|
|
MASTER_SITES= http://crd.lbl.gov/~xiaoye/SuperLU/ \
|
|
|
|
http://crd.lbl.gov/~xiaoye/:doc
|
2006-02-13 03:33:44 +01:00
|
|
|
DISTNAME= ${PORTNAME}_${P_VERSION}
|
2003-06-11 01:47:18 +02:00
|
|
|
.ifndef NOPORTDOCS
|
2006-08-06 11:44:20 +02:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} superlu_ug.pdf SLU_general.ps.gz:doc simax95.ps.gz:doc
|
2003-06-11 01:47:18 +02:00
|
|
|
.endif
|
2006-02-13 03:33:44 +01:00
|
|
|
DIST_SUBDIR= ${PORTNAME}
|
2003-06-11 01:47:18 +02:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
1998-08-10 01:54:16 +02:00
|
|
|
|
2003-06-11 01:47:18 +02:00
|
|
|
MAINTAINER= maho@FreeBSD.org
|
2003-02-20 20:00:52 +01:00
|
|
|
COMMENT= A library of routines for performing sparse factorization
|
1998-08-10 01:54:16 +02:00
|
|
|
|
2010-02-16 07:18:57 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if exists(${LOCALBASE}/lib/libgoto2.so)
|
2011-11-22 12:14:10 +01:00
|
|
|
WITH_BLAS?= gotoblas
|
|
|
|
.elif exists(${LOCALBASE}/lib/libatlas.so)
|
|
|
|
WITH_BLAS?= atlas
|
|
|
|
.else
|
|
|
|
WITH_BLAS?= reference
|
2007-01-10 13:56:11 +01:00
|
|
|
.endif
|
2008-06-21 01:52:29 +02:00
|
|
|
|
2011-11-22 12:14:10 +01:00
|
|
|
. if ${WITH_BLAS} == reference
|
2007-01-10 13:56:11 +01:00
|
|
|
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
|
2010-02-16 07:18:57 +01:00
|
|
|
BLAS= -lblas
|
2011-11-22 12:14:10 +01:00
|
|
|
.elif ${WITH_BLAS} == gotoblas
|
2010-02-16 07:18:57 +01:00
|
|
|
LIB_DEPENDS+= goto2:${PORTSDIR}/math/gotoblas
|
|
|
|
BLAS= -lgoto2p
|
2011-11-22 12:14:10 +01:00
|
|
|
.elif ${WITH_BLAS} == atlas
|
2008-06-21 01:52:29 +02:00
|
|
|
LIB_DEPENDS+= atlas:${PORTSDIR}/math/atlas
|
2011-11-22 12:14:10 +01:00
|
|
|
BLAS= -lptf77blas
|
2006-06-21 07:53:05 +02:00
|
|
|
.endif
|
2005-02-28 05:38:13 +01:00
|
|
|
|
2007-07-14 04:56:36 +02:00
|
|
|
USE_FORTRAN= yes
|
2012-03-14 02:44:04 +01:00
|
|
|
USE_LDCONFIG= yes
|
2007-01-10 13:56:11 +01:00
|
|
|
|
2006-02-13 03:33:44 +01:00
|
|
|
P_VERSION= 3.0
|
|
|
|
WRKSRC= ${WRKDIR}/SuperLU_${P_VERSION}
|
2008-06-21 01:52:29 +02:00
|
|
|
ALL_TARGET= lib
|
2003-06-11 01:47:18 +02:00
|
|
|
|
2004-09-27 09:31:01 +02:00
|
|
|
ARCH2FIX= SRC/Makefile TESTING/MATGEN/Makefile CBLAS/Makefile make.inc \
|
|
|
|
MAKE_INC/make.alpha MAKE_INC/make.inc
|
2004-09-26 05:15:46 +02:00
|
|
|
|
2008-06-21 01:52:29 +02:00
|
|
|
pre-build:
|
2010-02-16 07:18:57 +01:00
|
|
|
@${REINPLACE_CMD} -e 's+%%BLAS%%+-L${LOCALBASE}/lib ${BLAS}+ ; \
|
2008-06-21 01:52:29 +02:00
|
|
|
s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \
|
|
|
|
s+%%CFLAGS%%+${CFLAGS}+; \
|
|
|
|
s+%%FFLAGS%%+${FFLAGS}+' \
|
2003-06-11 01:51:35 +02:00
|
|
|
${WRKSRC}/make.inc
|
2004-09-27 09:31:01 +02:00
|
|
|
.for fmk in ${ARCH2FIX}
|
|
|
|
@${REINPLACE_CMD} -e 's|^ARCH *.= ar|ARCMD = ar| ; \
|
|
|
|
s|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC}/${fmk}
|
|
|
|
.endfor
|
1998-08-10 01:54:16 +02:00
|
|
|
|
1999-12-23 20:30:26 +01:00
|
|
|
do-install:
|
2006-02-13 03:33:44 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/libsuperlu_${P_VERSION}.a \
|
|
|
|
${PREFIX}/lib/libsuperlu.a
|
2012-03-14 02:44:04 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/libsuperlu_${P_VERSION}.so \
|
|
|
|
${PREFIX}/lib/libsuperlu.so.${PORTREVISION}
|
2012-04-25 09:09:18 +02:00
|
|
|
${LN} -fs ${PREFIX}/lib/libsuperlu.so.${PORTREVISION} \
|
|
|
|
${PREFIX}/lib/libsuperlu_${P_VERSION}.so
|
|
|
|
${LN} -fs ${PREFIX}/lib/libsuperlu_${P_VERSION}.so \
|
2012-03-14 02:44:04 +01:00
|
|
|
${PREFIX}/lib/libsuperlu.so
|
2003-06-11 01:47:18 +02:00
|
|
|
@${MKDIR} ${PREFIX}/include/superlu
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/SRC/*.h ${PREFIX}/include/superlu
|
1998-08-10 01:54:16 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2003-06-11 01:47:18 +02:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/SLU_general.ps.gz ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/simax95.ps.gz ${DOCSDIR}
|
2006-08-06 11:44:20 +02:00
|
|
|
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/superlu_ug.pdf ${DOCSDIR}
|
1998-08-10 01:54:16 +02:00
|
|
|
.endif
|
1999-12-23 20:30:26 +01:00
|
|
|
|
2008-06-21 01:52:29 +02:00
|
|
|
regression-test: build
|
|
|
|
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} testing )
|
|
|
|
@(cd ${WRKSRC}/TESTING && ${CAT} *.out )
|
|
|
|
|
2010-02-16 07:18:57 +01:00
|
|
|
.include <bsd.port.post.mk>
|