2003-07-23 10:37:16 +02:00
|
|
|
# New ports collection makefile for: metis-edf
|
|
|
|
# Date created: Thu Jun 26 2003
|
|
|
|
# Whom: thierry@pompo.net
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= metis-edf
|
2009-01-20 19:29:59 +01:00
|
|
|
DISTVERSIONPREFIX= full-src-
|
|
|
|
DISTVERSION= 4.1-1
|
|
|
|
DISTVERSIONSUFFIX= .noarch
|
2009-09-13 02:08:01 +02:00
|
|
|
PORTREVISION= 1
|
2003-12-09 20:33:24 +01:00
|
|
|
CATEGORIES= math
|
2009-01-20 19:29:59 +01:00
|
|
|
MASTER_SITES= http://www.code-aster.org/V2/UPLOAD/DOC/Telechargement/
|
|
|
|
DISTNAME= aster-${DISTVERSIONPREFIX}${ASTER_DISTVERSION}${DISTVERSIONSUFFIX}
|
2003-07-23 10:37:16 +02:00
|
|
|
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
|
|
COMMENT= Meshes partionning tool used by Code_Aster
|
|
|
|
|
2003-07-24 23:08:11 +02:00
|
|
|
CONFLICTS= metis-[0-9]*
|
|
|
|
|
2009-01-20 19:29:59 +01:00
|
|
|
ASTER_VER= 9.4.0
|
|
|
|
ASTER_DISTVERSION= ${ASTER_VER}-2
|
|
|
|
EXTRACT_WRKSRC= ${WRKDIR}/aster-${DISTVERSIONPREFIX}${ASTER_VER}/SRC
|
|
|
|
|
2003-07-23 10:37:16 +02:00
|
|
|
ALL_TARGET= default
|
2008-07-25 14:24:09 +02:00
|
|
|
MAKE_ENV+= AR="${AR}"
|
2003-08-13 16:34:12 +02:00
|
|
|
REINPLACE_ARGS= -i ""
|
2003-07-23 10:37:16 +02:00
|
|
|
|
2007-07-14 04:21:32 +02:00
|
|
|
USE_FORTRAN= yes
|
2007-01-11 09:28:54 +01:00
|
|
|
FFLAGS+= -O2
|
2003-08-13 16:34:12 +02:00
|
|
|
|
2006-01-16 00:15:43 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
|
2003-12-11 00:09:50 +01:00
|
|
|
|
2005-01-17 22:08:20 +01:00
|
|
|
PROGS= kmetis onmetis.exe pmetis
|
2009-01-20 19:29:59 +01:00
|
|
|
DOCS= CHANGES Doc/manual.ps README_Code_Aster
|
2005-01-17 22:08:20 +01:00
|
|
|
|
|
|
|
MACHINEARCH= ${ARCH}
|
2007-01-11 09:28:54 +01:00
|
|
|
FORTRANLIBS= -lgfortranbegin -lgfortran
|
|
|
|
GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../..
|
2005-01-17 22:08:20 +01:00
|
|
|
|
2006-12-14 00:23:58 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2009-01-20 19:29:59 +01:00
|
|
|
post-extract:
|
|
|
|
(cd ${WRKDIR} && \
|
|
|
|
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_WRKSRC}/${PORTNAME}-${DISTVERSION}${DISTVERSIONSUFFIX}${EXTRACT_SUFX} ${EXTRACT_AFTER_ARGS})
|
|
|
|
|
2006-07-08 22:27:38 +02:00
|
|
|
pre-configure:
|
2005-01-17 22:08:20 +01:00
|
|
|
.if ${MACHINEARCH} != "i386"
|
2009-01-20 19:29:59 +01:00
|
|
|
${FIND} ${WRKSRC} -type f -name "*.c" -o -name "*.h" | ${XARGS} \
|
2003-08-13 16:34:12 +02:00
|
|
|
${REINPLACE_CMD} -e "s|long int|int|g" \
|
|
|
|
-e "s|long|int|g" \
|
|
|
|
-e "s|\(%[[:digit:]]\)ld|\1d|g" \
|
|
|
|
-e "s|\(%[[:digit:]]\.[[:digit:]]\)le|\1e|g" \
|
|
|
|
-e "s|%ld|%d|g"
|
|
|
|
.endif
|
2009-01-20 19:29:59 +01:00
|
|
|
${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
|
|
|
|
${REINPLACE_CMD} -e 's|%%FORTRANLIBS%%|${FORTRANLIBS}|g' -e 's|%%GCCLIBDIR%%|${GCCLIBDIR}|g'\
|
|
|
|
${WRKSRC}/Programs/Makefile
|
|
|
|
${REINPLACE_CMD} -e 's|/home01/courtois/PKG/BUILD/METIS/metis-edf-${PORTVERSION:R}|${WRKSRC}|'\
|
|
|
|
${WRKSRC}/onmetis
|
2003-07-23 10:37:16 +02:00
|
|
|
|
|
|
|
do-install:
|
2009-01-20 19:29:59 +01:00
|
|
|
${CP} ${WRKSRC}/CONFIG/onmetis.in ${WRKSRC}/onmetis
|
|
|
|
${REINPLACE_CMD} -e "s#HOME_METIS#${PREFIX}/bin#" ${WRKSRC}/onmetis
|
2003-07-23 10:37:16 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/onmetis ${PREFIX}/bin
|
2005-01-17 22:08:20 +01:00
|
|
|
${INSTALL_PROGRAM} ${PROGS:S|^|${WRKSRC}/|} ${PREFIX}/bin
|
2003-07-23 10:37:16 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/libmetis.a ${PREFIX}/lib
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
.if !defined(NOPORTDOCS)
|
2009-01-20 19:29:59 +01:00
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
. for df in ${DOCS}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${df} ${DOCSDIR}
|
|
|
|
. endfor
|
2003-07-23 10:37:16 +02:00
|
|
|
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
|
2009-01-20 19:29:59 +01:00
|
|
|
.endif
|
|
|
|
.if !defined(NOPORTEXAMPLES)
|
|
|
|
${MKDIR} ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/Test/fort.81 ${EXAMPLESDIR}
|
2003-07-23 10:37:16 +02:00
|
|
|
@${ECHO_MSG} "===> Test file installed in ${EXAMPLESDIR}."
|
|
|
|
.endif
|
|
|
|
|
2006-12-14 00:23:58 +01:00
|
|
|
.include <bsd.port.post.mk>
|