1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/math/lapack/Makefile
Maho Nakata 3dec36eea1 * remove ENABLE_TESTING which does nothing.
* Use the canonical regression-test target: this is run by pointyhat so we
can ensure in the log that the library is in good shape.

Submitted by:	Pedro Giffuni
2008-06-19 02:08:21 +00:00

108 lines
3.6 KiB
Makefile

# New ports collection makefile for: lapack
# Date created: 2 July 1994
# Whom: jmz
#
# $FreeBSD$
#
PORTNAME= lapack
PORTVERSION= 3.1.1
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.netlib.org/lapack/
DISTFILES= lapack-${PORTVERSION}.tgz manpages-${PORTVERSION}.tgz
MAINTAINER= maho@FreeBSD.org
COMMENT= A library of Fortran 77 subroutines for linear algebra
LIB_DEPENDS= blas.2:${PORTSDIR}/math/blas
USE_FORTRAN= yes
DIST_SUBDIR= lapack
USE_LDCONFIG= yes
.include <bsd.port.pre.mk>
.if ${ARCH} == "sparc64" || ${ARCH} == "amd64"
FPIC= -fPIC
.else
FPIC= -fpic
.endif
.if ${ARCH} == "sparc64"
BROKEN= Fails to link
.endif
WRKSRC_SHARED=${WRKSRC}_shared
FFLAGS_SHARED=${FPIC}
WRKSRC_PROFILE=${WRKSRC}_profile
FFLAGS_PROFILE=-pg
SVERSION=4
BLAS= -L${LOCALBASE}/lib -lblas
pre-fetch:
@${ECHO} "You can override FC and FFLAGS on the command line."
.include "${FILESDIR}/manpages"
post-patch:
@${CP} ${WRKSRC}/INSTALL/make.inc.gfortran ${WRKSRC}/make.inc
@${CP} -r ${WRKSRC} ${WRKSRC_SHARED}
@${CP} -r ${WRKSRC} ${WRKSRC_PROFILE}
@${REINPLACE_CMD} -e 's,%%F77%%,${F77},g' \
-e 's,%%FFLAGS%%,${FFLAGS},g' \
-e 's,%%EXTRAFLAGS%%,,g' \
-e 's,%%BLAS%%,${BLAS},g' \
${WRKSRC}/make.inc
@${REINPLACE_CMD} -e 's,%%F77%%,${F77},g' \
-e 's,%%FFLAGS%%,${FFLAGS},g' \
-e 's,%%EXTRAFLAGS%%,${FFLAGS_SHARED},g' \
-e 's,%%BLAS%%,${BLAS},g' \
${WRKSRC_SHARED}/make.inc
@${REINPLACE_CMD} -e 's,%%F77%%,${F77},g' \
-e 's,%%FFLAGS%%,${FFLAGS},g' \
-e 's,%%EXTRAFLAGS%%,${FFLAGS_PROFILE},g' \
-e 's,%%BLAS%%,${BLAS},g' \
${WRKSRC_PROFILE}/make.inc
do-build:
@${ECHO_CMD} "Building static lapack library"
cd ${WRKSRC} ; ${MAKE} ${.MAKEFLAGS} ARCH=ar
@${ECHO_CMD} "Building shared lapack library"
cd ${WRKSRC_SHARED} ; ${MAKE} ${.MAKEFLAGS} ARCH=ar
@${ECHO_CMD} "Building profile lapack library"
cd ${WRKSRC_PROFILE} ; ${MAKE} ${.MAKEFLAGS} ARCH=ar
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
do-install:
${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
${INSTALL_MAN} ${WRKSRC}/manpages/man/manl/[a-c]*.l ${PREFIX}/man/manl
${INSTALL_MAN} ${WRKSRC}/manpages/man/manl/[d-l]*.l ${PREFIX}/man/manl
${INSTALL_MAN} ${WRKSRC}/manpages/man/manl/[m-s]*.l ${PREFIX}/man/manl
${INSTALL_MAN} ${WRKSRC}/manpages/man/manl/[t-z]*.l ${PREFIX}/man/manl
regression-test: build
@${ECHO_CMD} "Testing static lapack library"
cd ${WRKSRC}/TESTING ; ${MAKE} ${.MAKEFLAGS} ARCH=ar
.include <bsd.port.post.mk>