aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2007-01-16 10:18:27 +0800
committermaho <maho@FreeBSD.org>2007-01-16 10:18:27 +0800
commitd1609149f3f192c0ae31751bb4e3ad7a5d4871fa (patch)
tree97899870e46c4e133ace6c5204a4a8870d0f1e81
parenta2e2016fc67f0e2960bd6097a83bddc30b03268c (diff)
downloadfreebsd-ports-gnome-d1609149f3f192c0ae31751bb4e3ad7a5d4871fa.tar.gz
freebsd-ports-gnome-d1609149f3f192c0ae31751bb4e3ad7a5d4871fa.tar.zst
freebsd-ports-gnome-d1609149f3f192c0ae31751bb4e3ad7a5d4871fa.zip
* Use only gfortran42. not gcc42.
* Correct autodetection of blas/atlas * Bump portrevision
-rw-r--r--science/elmer-fem/Makefile43
-rw-r--r--science/elmer-fem/files/patch-acx_elmer.m413
2 files changed, 35 insertions, 21 deletions
diff --git a/science/elmer-fem/Makefile b/science/elmer-fem/Makefile
index a9babdb45559..1f7cfde9e600 100644
--- a/science/elmer-fem/Makefile
+++ b/science/elmer-fem/Makefile
@@ -7,7 +7,7 @@
PORTNAME= fem
PORTVERSION= 5.2.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= science tk84
MASTER_SITES= ftp://ftp.funet.fi/pub/sci/physics/elmer/
PKGNAMEPREFIX= elmer-
@@ -16,27 +16,17 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= FEM solver for use in the ELMER FEM package
BUILD_DEPENDS= ${LOCALBASE}/lib/libmatc.a:${PORTSDIR}/science/elmer-matc \
- ${LOCALBASE}/lib/libeiof.a:${PORTSDIR}/science/elmer-eio \
- ${LOCALBASE}/lib/libhuti.a:${PORTSDIR}/science/elmer-hutiter
+ ${LOCALBASE}/lib/libeiof.a:${PORTSDIR}/science/elmer-eio \
+ ${LOCALBASE}/lib/libhuti.a:${PORTSDIR}/science/elmer-hutiter \
+ ${LOCALBASE}/lib/libumfpack_elmer.a:${PORTSDIR}/math/elmer-umfpack
+
RUN_DEPENDS= ElmerGrid:${PORTSDIR}/science/elmergrid \
Mesh2D:${PORTSDIR}/science/elmer-meshgen2d
-LIB_DEPENDS= umfpack.1:${PORTSDIR}/math/suitesparse
-.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+= lapack.4:${PORTSDIR}/math/lapack
-LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
-BLAS= -lblas
-LAPACK= -llapack
-.endif
-WANT_FORTRAN= yes
-USE_GCC=4.2+
+WANT_FORTRAN=yes #dummy but future use
+BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
+FC= gfortran42
+F77= gfortran42
.ifdef WITH_OPTIMIZED_FLAGS
FCFLAGS+= -O3 -ffast-math
@@ -54,12 +44,27 @@ PLIST_SUB= ARCH=${MACHINE_ARCH}
.include <bsd.port.pre.mk>
+.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+= lapack.4:${PORTSDIR}/math/lapack
+LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
+BLAS= -lblas
+LAPACK= -llapack
+.endif
+
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
CFLAGS+= -fPIC
FCFLAGS+= -fPIC
FFLAGS+= -fPIC ${FCFLAGS}
.endif
CONFIGURE_ENV+= FC="${FC}" F77="${F77}" FCFLAGS="${FCFLAGS}"
+CONFIGURE_ARGS+= --with-umfpack="-L${LOCALBASE} -lumfpack_elmer"
pre-configure:
${REINPLACE_CMD} -e 's|make|${GMAKE}|g' ${WRKSRC}/tests/runtests.in
diff --git a/science/elmer-fem/files/patch-acx_elmer.m4 b/science/elmer-fem/files/patch-acx_elmer.m4
index af022f9aa159..7115b9a58d25 100644
--- a/science/elmer-fem/files/patch-acx_elmer.m4
+++ b/science/elmer-fem/files/patch-acx_elmer.m4
@@ -1,5 +1,14 @@
---- acx_elmer.m4.orig Sun Feb 5 18:29:13 2006
-+++ acx_elmer.m4 Sun Feb 5 18:31:24 2006
+--- acx_elmer.m4.orig Thu Mar 30 17:27:42 2006
++++ acx_elmer.m4 Tue Jan 16 11:00:48 2007
+@@ -597,7 +597,7 @@
+
+ # Generic UMFPACK library?
+ if test $acx_umfpack_ok = no; then
+- AC_CHECK_LIB(umfpack, $umf4def, [acx_umfpack_ok=yes; UMFPACK_LIBS="-lumfpack -lamd"],,[-lamd])
++ AC_CHECK_LIB(umfpack_elmer, $umf4def, [acx_umfpack_ok=yes; UMFPACK_LIBS="-lumfpack_elmer -lamd_elmer"],,[-lamd_elmer])
+ fi
+
+ AC_SUBST(UMFPACK_LIBS)
@@ -1384,7 +1384,7 @@
;;
*-*-freebsd*)