aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2007-01-10 09:41:21 +0800
committermaho <maho@FreeBSD.org>2007-01-10 09:41:21 +0800
commita31c261e7399f0b06978305f8ef6bf181abc3e0a (patch)
tree75e1fcbb0774354c4b85ebbb7f3e1e02bc54b9eb /math
parente5aa93e4ebbab519b41df89b391305ad074f0610 (diff)
downloadfreebsd-ports-gnome-a31c261e7399f0b06978305f8ef6bf181abc3e0a.tar.gz
freebsd-ports-gnome-a31c261e7399f0b06978305f8ef6bf181abc3e0a.tar.zst
freebsd-ports-gnome-a31c261e7399f0b06978305f8ef6bf181abc3e0a.zip
*Bump port revision.
*Use gfortran compiled atlas/blas/lapack.
Diffstat (limited to 'math')
-rw-r--r--math/lapack95/Makefile53
-rw-r--r--math/lapack95/files/patch-make.inc17
-rw-r--r--math/lapack95/pkg-plist2
3 files changed, 59 insertions, 13 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>
diff --git a/math/lapack95/files/patch-make.inc b/math/lapack95/files/patch-make.inc
index de2ed49fc35a..e97b0712696a 100644
--- a/math/lapack95/files/patch-make.inc
+++ b/math/lapack95/files/patch-make.inc
@@ -1,5 +1,5 @@
--- make.inc.orig Thu Nov 30 22:18:37 2000
-+++ make.inc Sun Aug 29 14:46:46 2004
++++ make.inc Wed Jan 10 09:31:14 2007
@@ -3,8 +3,8 @@
# UNI-C, Denmark; Univ. of Tennessee, USA; NAG Ltd., UK
# August 5, 2000
@@ -11,12 +11,12 @@
# -dcfuns Enable recognition of non-standard double
# precision complex intrinsic functions
# -dusty Allows the compilation and execution of "legacy"
-@@ -13,14 +13,14 @@
+@@ -13,19 +13,19 @@
# -ieee=full enables all IEEE arithmetic facilities
# including non-stop arithmetic.
-OPTS0 = -u -V -dcfuns -dusty -ieee=full
-+OPTS0 = %%FFOPTFLAGS%% #-u -V -dcfuns -dusty -ieee=full
++OPTS0 = %%FFLAGS%% #-u -V -dcfuns -dusty -ieee=full
MODLIB = -I./../lapack95_modules
OPTS1 = -c $(OPTS0)
OPTS3 = $(OPTS1) $(MODLIB)
@@ -24,7 +24,14 @@
OPTLIB =
-LAPACK_PATH = /usr/local/lib/LAPACK3/
-+LAPACK_PATH = %%LOCALBASE%%/lib
++LAPACK_PATH = -L%%LOCALBASE%%/lib
LAPACK95 = ../lapack95.a
- LAPACK77 = $(LAPACK_PATH)/lapack.a
+-LAPACK77 = $(LAPACK_PATH)/lapack.a
++LAPACK77 = -llapack
+ TMG77 = $(LAPACK_PATH)/tmglib.a
+-BLAS = $(LAPACK_PATH)/blas.a
++BLAS = -lblas
+
+ LIBS = $(LAPACK95) $(TMG77) $(LAPACK77) $(BLAS)
+ SUF = f90
diff --git a/math/lapack95/pkg-plist b/math/lapack95/pkg-plist
index e78cc2041ca4..a8055e472465 100644
--- a/math/lapack95/pkg-plist
+++ b/math/lapack95/pkg-plist
@@ -1,4 +1,6 @@
lib/liblapack95.a
+lib/liblapack95.so
+lib/liblapack95.so.1
%%EXAMPLESDIR%%/make.inc
%%EXAMPLESDIR%%/EXAMPLES1/gbsv.ma
%%EXAMPLESDIR%%/EXAMPLES1/la_gesv_example.f90