summaryrefslogtreecommitdiff
path: root/math/metis-edf
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2007-01-11 08:28:54 +0000
committerMaho Nakata <maho@FreeBSD.org>2007-01-11 08:28:54 +0000
commit28fce7b147255aec826de9fc732a89affa615b86 (patch)
treeb0bf2953d4eec325357c7280753c915eb168bfd9 /math/metis-edf
parentMigrated to gfortran42. (diff)
* Migrate to gfortran.
* Bump port revision.
Notes
Notes: svn path=/head/; revision=182076
Diffstat (limited to 'math/metis-edf')
-rw-r--r--math/metis-edf/Makefile16
-rw-r--r--math/metis-edf/files/patch-Programs::Makefile2
2 files changed, 11 insertions, 7 deletions
diff --git a/math/metis-edf/Makefile b/math/metis-edf/Makefile
index be4ebe312cef..4399049bd4fe 100644
--- a/math/metis-edf/Makefile
+++ b/math/metis-edf/Makefile
@@ -7,6 +7,7 @@
PORTNAME= metis-edf
DISTVERSION= 4.0-3
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= http://www.code-aster.org/FICHIERS/
DISTNAME= ${PORTNAME}-${DISTVERSION}.noarch
@@ -20,21 +21,22 @@ ALL_TARGET= default
MAKE_ENV+= CC="${CC}" AR="${AR}" F77="${F77}" FFLAGS="${FFLAGS}"
REINPLACE_ARGS= -i ""
-F77?= f77
-FFLAGS?= -O2
+WANT_FORTRAN=yes #dummy but future use
+BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
+FC= gfortran42
+F77= gfortran42
+FFLAGS+= -O2
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
PROGS= kmetis onmetis.exe pmetis
MACHINEARCH= ${ARCH}
+FORTRANLIBS= -lgfortranbegin -lgfortran
+GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../..
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 700000
-WITH_FORTRAN= yes
-.endif
-
pre-configure:
.if ${MACHINEARCH} != "i386"
@${FIND} ${WRKSRC} -type f -name "*.c" -o -name "*.h" | ${XARGS} \
@@ -44,6 +46,8 @@ pre-configure:
-e "s|\(%[[:digit:]]\.[[:digit:]]\)le|\1e|g" \
-e "s|%ld|%d|g"
.endif
+ @${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
+ @${REINPLACE_CMD} -e 's|%%FORTRANLIBS%%|${FORTRANLIBS}|g' -e 's|%%GCCLIBDIR%%|${GCCLIBDIR}|g' ${WRKSRC}/Programs/Makefile
do-install:
@${CP} ${WRKSRC}/CONFIG/onmetis.in ${WRKSRC}/onmetis
diff --git a/math/metis-edf/files/patch-Programs::Makefile b/math/metis-edf/files/patch-Programs::Makefile
index ed1ddc472c82..1ca20dcd839a 100644
--- a/math/metis-edf/files/patch-Programs::Makefile
+++ b/math/metis-edf/files/patch-Programs::Makefile
@@ -5,7 +5,7 @@
CFLAGS = $(COPTIONS) $(INCLUDES)
FFLAGS = $(FOPTIONS) $(INCLUDES)
-LIBS = -lmetis -lm
-+LIBS = -lmetis -lm -lg2c
++LIBS = -lmetis -lm %%FORTRANLIBS%% %%GCCLIBDIR%%
METISLIB = ../libmetis.a