summaryrefslogtreecommitdiff
path: root/math/lapack
diff options
context:
space:
mode:
authordmcmahill <dmcmahill@pkgsrc.org>2010-03-17 21:47:11 +0000
committerdmcmahill <dmcmahill@pkgsrc.org>2010-03-17 21:47:11 +0000
commit66e94048d9f0443eff24555afa1d26a3dfbad07c (patch)
tree8ed55104fd202467a8b6d6e2825459ac7ddb6ea2 /math/lapack
parentb0c6cc093fea2eb8cb0e3725d4b958a486ea66c6 (diff)
downloadpkgsrc-66e94048d9f0443eff24555afa1d26a3dfbad07c.tar.gz
Detect if the fortran compiler/libs have etime as an intrinsic or not instead
of hard coding it. This package builds with both f2c and gfortran now.
Diffstat (limited to 'math/lapack')
-rw-r--r--math/lapack/Makefile17
-rw-r--r--math/lapack/distinfo4
-rw-r--r--math/lapack/files/etime_test.f27
-rw-r--r--math/lapack/patches/patch-ac5
4 files changed, 46 insertions, 7 deletions
diff --git a/math/lapack/Makefile b/math/lapack/Makefile
index d210764c723..e010fea4bc4 100644
--- a/math/lapack/Makefile
+++ b/math/lapack/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.30 2010/01/30 16:28:00 heinz Exp $
+# $NetBSD: Makefile,v 1.31 2010/03/17 21:47:11 dmcmahill Exp $
DISTNAME= lapack-lite-3.1.1
PKGNAME= lapack-3.1.1
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_NETLIB:=lapack/}
EXTRACT_SUFX= .tgz
@@ -21,6 +21,19 @@ BUILD_TARGET= lapacklib
INSTALLATION_DIRS= lib
+FFLAGS+= -ffloat-store
+
+# With f2c-20090411nb4, libf2c-20090201nb3, we need EXT_ETIME but gcc44-4.4.1nb3
+# needs INT_ETIME. Rather than trying to enumerate all possible fortran compilers,
+# just do a test for it.
+do-configure:
+ @${ECHO_N} "Checking if your fortran compiler has etime() as an intrinsic... "
+ @cd ${WRKDIR} && ${FC} -o etime_test ${FILESDIR}/etime_test.f >${WRKDIR}/etime_test.log 2>&1; \
+ if test $$? -eq 0 ; then \
+ ${ECHO} "TIMER=INT_ETIME" >> ${WRKSRC}/make.inc ; echo "YES" ; else \
+ ${ECHO} "TIMER=EXT_ETIME" >> ${WRKSRC}/make.inc ; echo "NO" ; fi
+ @${ECHO} "See ${WRKDIR}/etime_test.log for details on the test"
+
do-install:
${LIBTOOL} --mode=install ${INSTALL_DATA} ${WRKSRC}/liblapack.la \
${DESTDIR}${PREFIX}/lib
diff --git a/math/lapack/distinfo b/math/lapack/distinfo
index 1d104b6321d..438b7dcb91c 100644
--- a/math/lapack/distinfo
+++ b/math/lapack/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.12 2009/10/20 14:00:23 tnn Exp $
+$NetBSD: distinfo,v 1.13 2010/03/17 21:47:11 dmcmahill Exp $
SHA1 (lapack-lite-3.1.1.tgz) = 1ec4ef90b544cf82bc7b4f770cee6fb46da457c5
RMD160 (lapack-lite-3.1.1.tgz) = d81baafd1f0f9859d9f75ac9b658f743544b5f5b
Size (lapack-lite-3.1.1.tgz) = 5332509 bytes
SHA1 (patch-aa) = 75671f2cc3233241f03ecab5a5d79cb505eece15
SHA1 (patch-ab) = fd5989eaafc622f29284759f538ccc0f11dfe624
-SHA1 (patch-ac) = 649f7e40142936af49c8c9dbec376bdd1a11b05a
+SHA1 (patch-ac) = 594736353b377c72bd41969e2ef62ef1871ae2ca
SHA1 (patch-ad) = eb9cdf3d47cef03e2c679b0eda8d8120c572a2c0
diff --git a/math/lapack/files/etime_test.f b/math/lapack/files/etime_test.f
new file mode 100644
index 00000000000..32c313467e9
--- /dev/null
+++ b/math/lapack/files/etime_test.f
@@ -0,0 +1,27 @@
+ program main
+
+c
+c $NetBSD: etime_test.f,v 1.1 2010/03/17 21:47:11 dmcmahill Exp $
+c
+c Simple program to check if the etime function is available
+c
+ implicit none
+
+ real cpu
+ real etime
+ intrinsic etime
+ real t_array(2)
+
+ cpu = etime ( t_array )
+
+ write ( *, '(a)' ) ' '
+ write ( *, '(a)' ) ' ETIME reports:'
+ write ( *, '(a,g14.6)' )
+ & ' The current CPU time is ', cpu
+ write ( *, '(a,g14.6)' )
+ & ' TARRAY(1) = ', t_array(1)
+ write ( *, '(a,g14.6)' )
+ & ' TARRAY(2) = ', t_array(2)
+
+ stop
+ end
diff --git a/math/lapack/patches/patch-ac b/math/lapack/patches/patch-ac
index 1da198289aa..4fd4d00c1ed 100644
--- a/math/lapack/patches/patch-ac
+++ b/math/lapack/patches/patch-ac
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.1 2007/12/10 17:50:31 adam Exp $
+$NetBSD: patch-ac,v 1.2 2010/03/17 21:47:11 dmcmahill Exp $
--- /dev/null 2007-11-22 18:29:57.000000000 +0100
+++ make.inc
-@@ -0,0 +1,10 @@
+@@ -0,0 +1,9 @@
+SHELL= /bin/sh
+PLAT= _${MACHINE}
+FORTRAN= ${FC}
@@ -11,5 +11,4 @@ $NetBSD: patch-ac,v 1.1 2007/12/10 17:50:31 adam Exp $
+NOOPT=
+LOADER= ${FC}
+LOADOPTS=
-+TIMER= EXT_ETIME
+LAPACKLIB= liblapack.la