freebsd-ports/math/metis-edf/Makefile

87 lines
2.6 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: metis-edf
# Date created: Thu Jun 26 2003
# Whom: thierry@pompo.net
#
# $FreeBSD$
#
PORTNAME= metis-edf
DISTVERSIONPREFIX= full-src-
2010-03-26 19:30:45 +01:00
DISTVERSION= 4.1-2
DISTVERSIONSUFFIX= .noarch
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= http://www.code-aster.org/V2/UPLOAD/DOC/Telechargement/
DISTNAME= aster-${DISTVERSIONPREFIX}${ASTER_DISTVERSION}${DISTVERSIONSUFFIX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Meshes partionning tool used by Code_Aster
CONFLICTS= metis-[0-9]*
2010-03-26 19:30:45 +01:00
ASTER_VER= 10.1.0
ASTER_DISTVERSION= ${ASTER_VER}-4
EXTRACT_WRKSRC= ${WRKDIR}/aster-${DISTVERSIONPREFIX}${ASTER_VER}/SRC
ALL_TARGET= default
MAKE_ENV+= AR="${AR}"
MAKE_JOBS_UNSAFE= yes
REINPLACE_ARGS= -i ""
USE_FORTRAN= yes
FFLAGS+= -O2
2010-03-26 19:30:45 +01:00
WRKSRC= ${WRKDIR}/${PORTNAME:C/-/_/}-${PORTVERSION:R}
2005-01-17 22:08:20 +01:00
PROGS= kmetis onmetis.exe pmetis
DOCS= CHANGES Doc/manual.ps README_Code_Aster
2005-01-17 22:08:20 +01:00
MACHINEARCH= ${ARCH}
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>
post-extract:
(cd ${WRKDIR} && \
2010-03-26 19:30:45 +01:00
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_WRKSRC}/${PORTNAME:C/-/_/}-${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"
${FIND} ${WRKSRC} -type f -name "*.c" -o -name "*.h" | ${XARGS} \
${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
${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
${REINPLACE_CMD} -e 's|%%FORTRANLIBS%%|${FORTRANLIBS}|g' -e 's|%%GCCLIBDIR%%|${GCCLIBDIR}|g'\
${WRKSRC}/Programs/Makefile
2010-03-26 19:30:45 +01:00
${REINPLACE_CMD} -e 's|$$prefix|${PREFIX}/bin|' ${WRKSRC}/CONFIG/onmetis.in
${REINPLACE_CMD} -e 's|$$prefix|${WRKSRC}|' ${WRKSRC}/onmetis
do-install:
${CP} ${WRKSRC}/CONFIG/onmetis.in ${WRKSRC}/onmetis
${REINPLACE_CMD} -e "s#HOME_METIS#${PREFIX}/bin#" ${WRKSRC}/onmetis
${INSTALL_SCRIPT} ${WRKSRC}/onmetis ${PREFIX}/bin
2010-03-26 19:30:45 +01:00
${REINPLACE_CMD} -e 's|${WRKSRC}|${PREFIX}/bin|' ${PREFIX}/bin/onmetis
2005-01-17 22:08:20 +01:00
${INSTALL_PROGRAM} ${PROGS:S|^|${WRKSRC}/|} ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/libmetis.a ${PREFIX}/lib
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
. for df in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${df} ${DOCSDIR}
. endfor
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
.endif
.if !defined(NOPORTEXAMPLES)
${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/Test/fort.81 ${EXAMPLESDIR}
@${ECHO_MSG} "===> Test file installed in ${EXAMPLESDIR}."
.endif
2006-12-14 00:23:58 +01:00
.include <bsd.port.post.mk>