2002-03-15 04:53:15 +01:00
|
|
|
# New ports collection makefile for: atlas
|
|
|
|
# Date created: 12 February 2001
|
2003-05-04 03:02:10 +02:00
|
|
|
# Whom: Nakata Maho <maho@FreeBSD.org>
|
2002-03-15 04:53:15 +01:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2002-08-19 18:20:09 +02:00
|
|
|
# NOTE: This port purposely ignores the CC and CFLAGS settings.
|
|
|
|
# Program and compiler flags are finetuned to gcc 2.95/3.1.
|
|
|
|
|
2002-03-15 04:53:15 +01:00
|
|
|
PORTNAME= atlas
|
2003-05-04 03:02:10 +02:00
|
|
|
PORTVERSION= 3.5.1
|
2002-03-15 04:53:15 +01:00
|
|
|
CATEGORIES= math
|
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
|
|
MASTER_SITE_SUBDIR= math-atlas
|
|
|
|
DISTNAME= ${PORTNAME}${PORTVERSION}
|
|
|
|
|
2003-05-04 03:02:10 +02:00
|
|
|
MAINTAINER= maho@FreeBSD.org
|
|
|
|
COMMENT= Automatically Tuned Linear Algebra Software (ATLAS)
|
2002-03-15 04:53:15 +01:00
|
|
|
|
2002-06-22 09:54:16 +02:00
|
|
|
LIB_DEPENDS= lapack:${PORTSDIR}/math/lapack
|
2002-03-15 04:53:15 +01:00
|
|
|
|
|
|
|
USE_BZIP2= yes
|
|
|
|
WRKSRC= ${WRKDIR}/ATLAS
|
2002-06-22 09:54:16 +02:00
|
|
|
INSTALLS_SHLIB= yes
|
2002-08-19 18:20:09 +02:00
|
|
|
USE_REINPLACE= yes
|
|
|
|
|
|
|
|
.if (${MACHINE_ARCH} == "alpha")
|
|
|
|
USE_GCC= 3.1
|
|
|
|
.endif
|
2002-03-15 04:53:15 +01:00
|
|
|
|
|
|
|
do-configure:
|
2002-06-22 09:54:16 +02:00
|
|
|
.if defined(BATCH) || defined(PACKAGE_BUILDING)
|
|
|
|
@(cd ${WRKSRC}; ${MAKE_ENV} ${MAKE} config < ${FILESDIR}/answer)
|
|
|
|
.else
|
2002-03-26 06:49:54 +01:00
|
|
|
@(cd ${WRKSRC}; ${MAKE_ENV} ${MAKE} config)
|
2002-06-22 09:54:16 +02:00
|
|
|
.endif
|
2002-08-19 18:20:09 +02:00
|
|
|
.if (${MACHINE_ARCH} == "alpha")
|
|
|
|
@(cd ${WRKSRC}; ${PATCH} < ${FILESDIR}/alpha-patch)
|
|
|
|
.endif
|
2002-03-15 04:53:15 +01:00
|
|
|
|
|
|
|
do-build:
|
2002-08-19 18:20:09 +02:00
|
|
|
.if (${MACHINE_ARCH} == "alpha") || defined(USE_GCC)
|
|
|
|
@${REINPLACE_CMD} -e 's|/usr/bin/gcc|${CC}|g;' ${WRKSRC}/Make.`cat ${WRKSRC}/ARCHNAME`
|
|
|
|
.endif
|
2002-03-26 06:49:54 +01:00
|
|
|
(cd ${WRKSRC}; ${MAKE_ENV} ${MAKE} install arch=`cat ${WRKSRC}/ARCHNAME`)
|
2002-08-19 18:20:09 +02:00
|
|
|
(cd ${WRKSRC}; ${MAKE_ENV} ${MAKE} sanity_test arch=`cat ${WRKSRC}/ARCHNAME`)
|
2002-03-15 04:53:15 +01:00
|
|
|
(cd ${WRKSRC}; ${MKDIR} tmp ; \
|
2002-06-22 09:54:16 +02:00
|
|
|
${CP} ${LOCALBASE}/lib/liblapack.a tmp ;\
|
|
|
|
cd tmp ;\
|
|
|
|
ar x liblapack.a ;\
|
|
|
|
ar x ../lib/`cat ${WRKSRC}/ARCHNAME`/liblapack.a ;\
|
|
|
|
ar r ../lib/`cat ${WRKSRC}/ARCHNAME`/libalapack.a *.o ;\
|
|
|
|
ranlib ../lib/`cat ${WRKSRC}/ARCHNAME`/libalapack.a )
|
|
|
|
.for i in libatlas libcblas libf77blas libtstatlas libalapack
|
|
|
|
( cd ${WRKSRC}/lib/`cat ${WRKSRC}/ARCHNAME`/ ; \
|
|
|
|
ld -Bshareable -o ${i}.so.1 -x -soname ${i}.so.1 --whole-archive ${i}.a )
|
|
|
|
.endfor
|
|
|
|
|
2002-03-15 04:53:15 +01:00
|
|
|
do-install:
|
2002-06-22 09:54:16 +02:00
|
|
|
.for i in libatlas libcblas libf77blas libtstatlas libalapack
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/lib/`cat ${WRKSRC}/ARCHNAME`/${i}.a ${PREFIX}/lib
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/lib/`cat ${WRKSRC}/ARCHNAME`/${i}.so.1 ${PREFIX}/lib
|
|
|
|
@${LN} -sf ${i}.so.1 ${PREFIX}/lib/${i}.so
|
|
|
|
.endfor
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/include/cblas.h ${PREFIX}/include
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/include/clapack.h ${PREFIX}/include
|
|
|
|
@${INSTALL_DATA} ${FILESDIR}/blas.h ${PREFIX}/include
|
|
|
|
@${INSTALL_DATA} ${FILESDIR}/lapack.h ${PREFIX}/include
|
2002-03-26 06:49:54 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
|
|
|
|
.endif
|
|
|
|
|
2002-03-15 04:53:15 +01:00
|
|
|
.include <bsd.port.mk>
|