1996-06-07 17:39:54 +02:00
|
|
|
# New ports collection makefile for: lapack
|
|
|
|
# Date created: 2 July 1994
|
|
|
|
# Whom: jmz
|
|
|
|
#
|
1999-08-25 09:23:21 +02:00
|
|
|
# $FreeBSD$
|
1996-06-07 17:39:54 +02:00
|
|
|
#
|
|
|
|
|
2000-04-14 09:20:58 +02:00
|
|
|
PORTNAME= lapack
|
2009-05-07 02:28:35 +02:00
|
|
|
PORTVERSION= 3.2.1
|
2009-09-13 02:08:01 +02:00
|
|
|
PORTREVISION= 1
|
1996-11-18 12:44:27 +01:00
|
|
|
CATEGORIES= math
|
2009-01-07 02:55:24 +01:00
|
|
|
MASTER_SITES= ftp://ftp.netlib.org/lapack/ \
|
|
|
|
http://netlib.org/lapack/ \
|
|
|
|
http://scicomp.ewha.ac.kr/netlib/lapack/ \
|
|
|
|
http://service-spi.web.cern.ch/service-spi/external/tarFiles/
|
2009-05-07 02:28:35 +02:00
|
|
|
DISTFILES= lapack-${PORTVERSION}.tgz manpages-3.2.0.tgz
|
1996-06-07 17:39:54 +02:00
|
|
|
|
2007-01-17 00:40:38 +01:00
|
|
|
MAINTAINER= maho@FreeBSD.org
|
2003-03-07 07:14:21 +01:00
|
|
|
COMMENT= A library of Fortran 77 subroutines for linear algebra
|
1996-06-07 17:39:54 +02:00
|
|
|
|
2007-01-09 13:33:23 +01:00
|
|
|
LIB_DEPENDS= blas.2:${PORTSDIR}/math/blas
|
2007-09-29 14:53:56 +02:00
|
|
|
|
2007-07-12 09:14:14 +02:00
|
|
|
USE_FORTRAN= yes
|
1998-08-25 04:26:23 +02:00
|
|
|
DIST_SUBDIR= lapack
|
2007-01-30 11:25:34 +01:00
|
|
|
USE_LDCONFIG= yes
|
1998-08-19 19:01:37 +02:00
|
|
|
|
1998-11-14 10:43:39 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2010-06-23 05:51:48 +02:00
|
|
|
.if ${ARCH} == "sparc64"
|
2007-09-29 14:53:56 +02:00
|
|
|
FPIC= -fPIC
|
|
|
|
.else
|
|
|
|
FPIC= -fpic
|
2005-10-15 00:08:23 +02:00
|
|
|
.endif
|
|
|
|
|
2010-06-23 05:51:48 +02:00
|
|
|
MAKE_JOBS_SAFE= yes
|
2009-04-13 09:35:18 +02:00
|
|
|
MANSRC=${WRKDIR}/lapack-3.2.0
|
2007-09-29 14:53:56 +02:00
|
|
|
WRKSRC_SHARED=${WRKSRC}_shared
|
|
|
|
FFLAGS_SHARED=${FPIC}
|
|
|
|
WRKSRC_PROFILE=${WRKSRC}_profile
|
|
|
|
FFLAGS_PROFILE=-pg
|
|
|
|
|
2009-04-13 10:39:43 +02:00
|
|
|
SVERSION=4
|
2007-09-29 14:53:56 +02:00
|
|
|
BLAS= -L${LOCALBASE}/lib -lblas
|
|
|
|
|
1999-10-14 00:59:19 +02:00
|
|
|
pre-fetch:
|
2009-05-19 23:15:04 +02:00
|
|
|
@${ECHO} "You can override F77 and FFLAGS on the command line."
|
2007-09-29 14:53:56 +02:00
|
|
|
|
|
|
|
.include "${FILESDIR}/manpages"
|
1999-10-14 00:59:19 +02:00
|
|
|
|
2007-09-29 14:53:56 +02:00
|
|
|
post-patch:
|
2010-06-23 05:51:48 +02:00
|
|
|
@${MV} ${WRKSRC}/INSTALL/make.inc.gfortran ${WRKSRC}/make.inc
|
|
|
|
${REINPLACE_CMD} -Ee \
|
|
|
|
's,\( *cd ([^ ;]+) *; *\$$\(MAKE\) *([[:alnum:]]*) *\),${MAKE} -C \1 ${_MAKE_JOBS} \2,' \
|
|
|
|
${WRKSRC}/Makefile
|
|
|
|
${REINPLACE_CMD} -Ee \
|
|
|
|
's,cd ([^ ;]+) *; *\$$\(MAKE\) *([[:alnum:]]*) *,${MAKE} -C \1 ${_MAKE_JOBS} \2,' \
|
|
|
|
${WRKSRC}/TESTING/Makefile
|
2007-09-29 14:53:56 +02:00
|
|
|
@${REINPLACE_CMD} -e 's,%%F77%%,${F77},g' \
|
|
|
|
-e 's,%%FFLAGS%%,${FFLAGS},g' \
|
|
|
|
-e 's,%%BLAS%%,${BLAS},g' \
|
|
|
|
${WRKSRC}/make.inc
|
2010-06-23 05:51:48 +02:00
|
|
|
@${CP} -r ${WRKSRC} ${WRKSRC_SHARED}
|
|
|
|
@${CP} -r ${WRKSRC} ${WRKSRC_PROFILE}
|
|
|
|
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,,g' \
|
|
|
|
${WRKSRC}/make.inc
|
|
|
|
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,${FFLAGS_SHARED},g' \
|
2007-09-29 14:53:56 +02:00
|
|
|
${WRKSRC_SHARED}/make.inc
|
2010-06-23 05:51:48 +02:00
|
|
|
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,${FFLAGS_PROFILE},g' \
|
2007-09-29 14:53:56 +02:00
|
|
|
${WRKSRC_PROFILE}/make.inc
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
@${ECHO_CMD} "Building static lapack library"
|
2010-06-23 05:51:48 +02:00
|
|
|
${MAKE} -C ${WRKSRC} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH=ar
|
2007-09-29 14:53:56 +02:00
|
|
|
@${ECHO_CMD} "Building shared lapack library"
|
2010-06-23 05:51:48 +02:00
|
|
|
${MAKE} -C ${WRKSRC_SHARED} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH=ar
|
2007-09-29 14:53:56 +02:00
|
|
|
@${ECHO_CMD} "Building profile lapack library"
|
2010-06-23 05:51:48 +02:00
|
|
|
${MAKE} -C ${WRKSRC_PROFILE} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH=ar
|
2007-09-29 14:53:56 +02:00
|
|
|
|
|
|
|
post-build:
|
|
|
|
${CP} ${WRKSRC}/lapack_FREEBSD.a ${WRKSRC}/liblapack.a
|
|
|
|
${CP} ${WRKSRC}/tmglib_FREEBSD.a ${WRKSRC}/libtmglib.a
|
|
|
|
${CP} ${WRKSRC_SHARED}/lapack_FREEBSD.a ${WRKSRC_SHARED}/liblapack.a
|
|
|
|
${CP} ${WRKSRC_SHARED}/tmglib_FREEBSD.a ${WRKSRC_SHARED}/libtmglib.a
|
|
|
|
${CP} ${WRKSRC_PROFILE}/lapack_FREEBSD.a ${WRKSRC_PROFILE}/liblapack_p.a
|
|
|
|
${CP} ${WRKSRC_PROFILE}/tmglib_FREEBSD.a ${WRKSRC_PROFILE}/libtmglib_p.a
|
|
|
|
cd ${WRKSRC_SHARED} ; ld -Bshareable -o liblapack.so.${SVERSION} -x -soname liblapack.so.${SVERSION} --whole-archive liblapack.a ; ${LN} -s liblapack.so.${SVERSION} liblapack.so
|
|
|
|
cd ${WRKSRC_SHARED} ; ld -Bshareable -o libtmglib.so.${SVERSION} -x -soname libtmglib.so.${SVERSION} --whole-archive libtmglib.a ; ${LN} -s libtmglib.so.${SVERSION} libtmglib.so
|
|
|
|
|
1996-06-07 17:39:54 +02:00
|
|
|
do-install:
|
2007-09-29 14:53:56 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/liblapack.a ${PREFIX}/lib
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/libtmglib.a ${PREFIX}/lib
|
|
|
|
${INSTALL_DATA} ${WRKSRC_SHARED}/liblapack.so.${SVERSION} ${PREFIX}/lib
|
|
|
|
${INSTALL_DATA} ${WRKSRC_SHARED}/libtmglib.so.${SVERSION} ${PREFIX}/lib
|
|
|
|
${LN} -sf liblapack.so.${SVERSION} ${PREFIX}/lib/liblapack.so
|
|
|
|
${LN} -sf libtmglib.so.${SVERSION} ${PREFIX}/lib/libtmglib.so
|
|
|
|
${INSTALL_DATA} ${WRKSRC_PROFILE}/liblapack_p.a ${PREFIX}/lib
|
|
|
|
${INSTALL_DATA} ${WRKSRC_PROFILE}/libtmglib_p.a ${PREFIX}/lib
|
2009-04-13 09:35:18 +02:00
|
|
|
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[a-c]*.l ${PREFIX}/man/manl
|
|
|
|
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[d-l]*.l ${PREFIX}/man/manl
|
|
|
|
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[m-s]*.l ${PREFIX}/man/manl
|
|
|
|
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[t-z]*.l ${PREFIX}/man/manl
|
1996-06-07 17:39:54 +02:00
|
|
|
|
2010-06-23 05:51:48 +02:00
|
|
|
regression-test check test: build
|
2008-06-19 04:08:21 +02:00
|
|
|
@${ECHO_CMD} "Testing static lapack library"
|
2010-06-23 05:51:48 +02:00
|
|
|
${MAKE} -C ${WRKSRC}/TESTING ${.MAKEFLAGS} ARCH=ar
|
2008-06-19 04:08:21 +02:00
|
|
|
|
1998-11-14 10:43:39 +01:00
|
|
|
.include <bsd.port.post.mk>
|