aboutsummaryrefslogtreecommitdiff
path: root/math/lapack95/Makefile
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2007-01-10 01:41:21 +0000
committerMaho Nakata <maho@FreeBSD.org>2007-01-10 01:41:21 +0000
commita8355d128b5a84f26be7623f8e5a4af8178c9fac (patch)
tree4c36a996d3587034ae8400c3c4efef2b5bcb87db /math/lapack95/Makefile
parent34da1e4df7b5e5757852d15a2f8c08ba97f7d610 (diff)
downloadports-a8355d128b5a84f26be7623f8e5a4af8178c9fac.tar.gz
ports-a8355d128b5a84f26be7623f8e5a4af8178c9fac.zip
Notes
Diffstat (limited to 'math/lapack95/Makefile')
-rw-r--r--math/lapack95/Makefile53
1 files changed, 45 insertions, 8 deletions
diff --git a/math/lapack95/Makefile b/math/lapack95/Makefile
index 53bfb9482b37..6df89b92c4a9 100644
--- a/math/lapack95/Makefile
+++ b/math/lapack95/Makefile
@@ -7,6 +7,7 @@
PORTNAME= lapack95
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.netlib.org/lapack95/
DISTNAME= ${PORTNAME}
@@ -16,32 +17,68 @@ DIST_SUBDIR= lapack95
MAINTAINER= maho@FreeBSD.org
COMMENT= LAPACK95, Fortran90/95 wrapper for LAPACK
-BUILD_DEPENDS= ${LOCALBASE}/intel_fc_80/bin/ifort:${PORTSDIR}/lang/ifc
-LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas
+.include <bsd.port.pre.mk>
+.if ${ARCH} == "sparc64"
+PICFLAG?= -fPIC
+.else
+PICFLAG?= -fpic
+.endif
+.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS)
+WITH_ATLAS= yes
+.endif
+.if defined(WITH_ATLAS)
+LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
+BLAS= -lf77blas -latlas
+LAPACK= -lalapack
+.else
+LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
+LIB_DEPENDS+= lapack.4:${PORTSDIR}/math/lapack
+BLAS= -lblas
+LAPACK= -llapack
+.endif
+
+WANT_FORTRAN= yes
+USE_GCC= 4.2+
WRKSRC= ${WRKDIR}/LAPACK95
-FC= ${LOCALBASE}/intel_fc_80/bin/ifort
FORTRAN_FIXED=
-FORTRAN_FREE= -free
-FFOPTFLAGS= -O3 -tpp7 -xKW -Vaxlib
+FORTRAN_FREE=# -free
+FFLAGS=# -O3 -tpp7 -xKW -Vaxlib #for ifc
post-patch:
+ @${MKDIR} ${WRKSRC}_SHARED ; ${CP} -r ${WRKSRC}/* ${WRKSRC}_SHARED
+
+pre-build:
@${REINPLACE_CMD} -e 's,%%FC%%,${FC},g ; \
s,%%FORTRAN_FIXED%%,${FORTRAN_FIXED},g ; \
s,%%FORTRAN_FREE%%,${FORTRAN_FREE},g ; \
- s,%%FFOPTFLAGS%%,${FFOPTFLAGS},g ; \
+ s,%%FFLAGS%%,${FFLAGS},g ; \
s,%%LOCALBASE%%,${LOCALBASE},g' \
${WRKSRC}/make.inc
+ @${REINPLACE_CMD} -e 's,%%FC%%,${FC},g ; \
+ s,%%FORTRAN_FIXED%%,${FORTRAN_FIXED},g ; \
+ s,%%FORTRAN_FREE%%,${FORTRAN_FREE},g ; \
+ s,%%FFLAGS%%,${FFLAGS} ${PICFLAG},g ; \
+ s,%%LOCALBASE%%,${LOCALBASE},g' \
+ ${WRKSRC}_SHARED/make.inc
do-build:
cd ${WRKSRC}/SRC; ${MAKE} single_double_complex_dcomplex
-
+ cd ${WRKSRC}_SHARED/SRC; ${MAKE} single_double_complex_dcomplex
+ cd ${WRKSRC}_SHARED ; ld -Bshareable -o liblapack95.so.1 -x -soname liblapack95.so.1 --whole-archive lapack95.a
do-install:
${INSTALL_DATA} ${WRKSRC}/lapack95.a ${PREFIX}/lib/liblapack95.a
+ ${INSTALL_DATA} ${WRKSRC}_SHARED/liblapack95.so.1 ${PREFIX}/lib
+ ${LN} -sf liblapack95.so.1 ${PREFIX}/lib/liblapack95.so
+
@${MKDIR} ${EXAMPLESDIR}
@${MKDIR} ${EXAMPLESDIR}/EXAMPLES1
@${MKDIR} ${EXAMPLESDIR}/EXAMPLES2
${CP} ${WRKSRC}/make.inc ${EXAMPLESDIR}
${TAR} cf - -C ${WRKSRC}/EXAMPLES1 . | ${TAR} xf - -C ${EXAMPLESDIR}/EXAMPLES1
${TAR} cf - -C ${WRKSRC}/EXAMPLES2 . | ${TAR} xf - -C ${EXAMPLESDIR}/EXAMPLES2
+ ${FIND} ${EXAMPLESDIR}/EXAMPLES1 | ${XARGS} ${CHOWN} ${SHAREOWN}:${SHAREGRP}
+ ${FIND} ${EXAMPLESDIR}/EXAMPLES1 -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
+ ${FIND} ${EXAMPLESDIR}/EXAMPLES2 | ${XARGS} ${CHOWN} ${SHAREOWN}:${SHAREGRP}
+ ${FIND} ${EXAMPLESDIR}/EXAMPLES2 -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>