summaryrefslogtreecommitdiff
path: root/science
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2007-01-11 00:45:46 +0000
committerMaho Nakata <maho@FreeBSD.org>2007-01-11 00:45:46 +0000
commit745de369bb13476d2d8c3b112131435a3b0a2a0b (patch)
tree28d2a69a9cbe7aa29be414056dd5a02a41a74453 /science
parentMove NO_LATEST_LINK to wxgtk2 2.6. (diff)
* Migrate to gfortran.
* Use gfortran compiled atlas/blas/lapack.
Notes
Notes: svn path=/head/; revision=182043
Diffstat (limited to 'science')
-rw-r--r--science/oof/Makefile24
1 files changed, 13 insertions, 11 deletions
diff --git a/science/oof/Makefile b/science/oof/Makefile
index 5130ea323a8a..931c80f51167 100644
--- a/science/oof/Makefile
+++ b/science/oof/Makefile
@@ -14,33 +14,35 @@ DISTNAME= ${PORTNAME}-dist${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Finite Element Analysis of Real Material Microstructures
-LIB_DEPENDS= forms.1:${PORTSDIR}/x11-toolkits/xforms
-.ifdef WITH_ATLAS
-LIB_DEPENDS+= atlas.1:${PORTSDIR}/math/atlas
-.else
-LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas
+LIB_DEPENDS+= forms.1:${PORTSDIR}/x11-toolkits/xforms
+.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS)
+WITH_ATLAS= yes
.endif
-
-.ifdef WITH_ATLAS
+.if defined(WITH_ATLAS)
+LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
BLAS_LIBS= -lf77blas -latlas
.else
-BLAS_LIBS?= -lblas
+LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
+BLAS_LIBS= -lblas
.endif
+BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
+FORTRANLIBDIR= `${DIRNAME} \`gfortran42 -print-libgcc-file-name\``
+FORTRANLIBDIR2= `${DIRNAME} \`gfortran42 -print-libgcc-file-name\``/../../../
+FORTRANLIBS= -lgfortranbegin -lgfortran
+
CXXFLAGS+= -DDONT_HAVE_STRSTREAM_H -DNEED_FDSTREAM
.ifdef WITH_THERMAL
CXXFLAGS+= -DTHERMAL
.endif
CXXFLAGS+= -Wno-deprecated
-
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-cxxflags='${CXXFLAGS}' \
--with-libdirs=-L${LOCALBASE}/lib \
- --with-blas="-L${LOCALBASE}/lib ${BLAS_LIBS} -lg2c" \
+ --with-blas="-L${LOCALBASE}/lib ${BLAS_LIBS} -L/usr/local/lib -L${FORTRANLIBDIR} -L${FORTRANLIBDIR2} ${FORTRANLIBS}" \
--x-includes=${X11BASE}/include \
--x-libraries=${X11BASE}/lib
USE_GCC= 3.2+
-
ALL_TARGET= all
PLIST_FILES= bin/oof bin/ppm2oof