2006-02-03 23:19:54 +01:00
|
|
|
# New ports collection makefile for: scotch
|
|
|
|
# Date created: Thu 2 feb 2006
|
|
|
|
# Whom: thierry@pompo.net
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= scotch
|
2008-07-13 09:42:49 +02:00
|
|
|
PORTVERSION= 5.0.6
|
2010-02-15 21:11:14 +01:00
|
|
|
PORTREVISION= 4
|
2006-02-03 23:19:54 +01:00
|
|
|
CATEGORIES= cad science
|
2008-01-15 22:02:29 +01:00
|
|
|
MASTER_SITES= http://gforge.inria.fr/frs/download.php/3795/
|
2006-02-03 23:19:54 +01:00
|
|
|
DISTNAME= ${PORTNAME}_${PORTVERSION}
|
|
|
|
|
|
|
|
MAINTAINER= thierry@FreeBSD.org
|
|
|
|
COMMENT= A package for graph and mesh partitioning and sparse matrix ordering
|
|
|
|
|
|
|
|
USE_GMAKE= yes
|
2007-08-10 19:47:23 +02:00
|
|
|
.if defined(MAINTAINER_MODE)
|
|
|
|
USE_FORTRAN= yes
|
|
|
|
.endif
|
2006-02-03 23:19:54 +01:00
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:R}
|
|
|
|
BUILD_WRKSRC= ${WRKSRC}/src
|
|
|
|
INSTALL_WRKSRC= ${WRKSRC}/bin
|
2007-08-10 19:47:23 +02:00
|
|
|
ALL_TARGET= scotch
|
2006-02-03 23:19:54 +01:00
|
|
|
|
2007-08-10 19:47:23 +02:00
|
|
|
VER= ${PORTVERSION:R}
|
2006-02-03 23:19:54 +01:00
|
|
|
BINS= acpl amk_ccc amk_fft2 amk_grf amk_hy amk_m2 amk_p2 atst \
|
2007-08-10 19:47:23 +02:00
|
|
|
gbase gcv gmap gmk_hy gmk_m2 gmk_m3 gmk_msh gmk_ub2 gmtst gord\
|
2006-02-03 23:19:54 +01:00
|
|
|
gotst gout gtst mcv mmk_m2 mmk_m3 mord mtst
|
2006-02-06 07:45:27 +01:00
|
|
|
INCS= common.h scotch.h scotchf.h
|
2007-08-10 19:47:23 +02:00
|
|
|
LIBS= libcommon.a libscotch.a libscotcherr.a libscotcherrcom.a\
|
|
|
|
libscotchmetis.a
|
|
|
|
LICDOCS= CeCILL-C_V1-en.txt CeCILL-C_V1-fr.txt
|
|
|
|
PORTDOCS= scotch_user${VER}.pdf
|
2006-02-03 23:19:54 +01:00
|
|
|
EXAMPLES= scotch_example.f
|
|
|
|
|
2007-08-10 19:47:23 +02:00
|
|
|
PKGMESSAGE= ${WRKSRC}/LICENSE_en.txt
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_MPI)
|
2009-11-28 11:44:56 +01:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/mpicc:${PORTSDIR}/net/mpich2
|
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/lib/libmpich.so:${PORTSDIR}/net/mpich2
|
2007-08-10 19:47:23 +02:00
|
|
|
|
|
|
|
ALL_TARGET+= ptscotch
|
|
|
|
|
|
|
|
INCS+= ptscotch.h ptscotchf.h
|
|
|
|
LIBS+= libptscotch.a libptscotcherr.a
|
|
|
|
BINS+= dgord dgscat dgtst
|
|
|
|
|
|
|
|
PLIST_SUB+= MPI=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MPI="@comment "
|
|
|
|
.endif
|
|
|
|
|
2008-01-15 22:02:29 +01:00
|
|
|
pre-everything::
|
2007-08-10 19:47:23 +02:00
|
|
|
.if !defined(WITHOUT_MPI)
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${ECHO_MSG} "Define WITHOUT_MPI if PT-Scotch is not wanted."
|
|
|
|
@${ECHO_MSG}
|
|
|
|
.endif
|
|
|
|
|
2006-02-03 23:19:54 +01:00
|
|
|
pre-configure:
|
2006-02-06 07:45:27 +01:00
|
|
|
${LN} -sf ${WRKSRC}/src/Make.inc/Makefile.inc.freebsd \
|
2006-02-03 23:19:54 +01:00
|
|
|
${WRKSRC}/src/Makefile.inc
|
2007-08-10 19:47:23 +02:00
|
|
|
${REINPLACE_CMD} -e 's|in subdirectory "doc"|under ${DATADIR}|' \
|
|
|
|
${WRKSRC}/LICENSE_en.txt
|
2006-02-03 23:19:54 +01:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${BINS:S|^|${INSTALL_WRKSRC}/|} ${PREFIX}/bin
|
|
|
|
${INSTALL_DATA} ${INCS:S|^|${INSTALL_WRKSRC}/|} ${PREFIX}/include
|
|
|
|
${INSTALL_DATA} ${LIBS:S|^|${INSTALL_WRKSRC}/|} ${PREFIX}/lib
|
2007-08-10 19:47:23 +02:00
|
|
|
${MKDIR} ${DATADIR}
|
|
|
|
${INSTALL_DATA} ${LICDOCS:S|^|${WRKSRC}/doc/|} ${DATADIR}
|
2006-02-03 23:19:54 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
2008-09-02 00:00:10 +02:00
|
|
|
${MKDIR} ${DOCSDIR}
|
2006-02-03 23:19:54 +01:00
|
|
|
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR}
|
|
|
|
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
|
2008-09-02 00:00:10 +02:00
|
|
|
.endif
|
|
|
|
.if !defined(NOPORTEXAMPLES)
|
|
|
|
${MKDIR} ${EXAMPLESDIR}/grf ${EXAMPLESDIR}/tgt
|
2006-02-03 23:19:54 +01:00
|
|
|
${INSTALL_DATA} ${EXAMPLES:S|^|${WRKSRC}/doc/|} ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/grf/* ${EXAMPLESDIR}/grf
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/tgt/* ${EXAMPLESDIR}/tgt
|
|
|
|
@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
|
|
|
|
.endif
|
|
|
|
|
2007-08-10 19:47:23 +02:00
|
|
|
post-install:
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
@${ECHO_MSG}
|
|
|
|
|
2006-02-03 23:19:54 +01:00
|
|
|
.if defined(MAINTAINER_MODE)
|
2007-08-10 19:47:23 +02:00
|
|
|
regression-test: install
|
2006-02-03 23:19:54 +01:00
|
|
|
(amk_ccc 3 | acpl - ${WRKDIR}/ccc3.tgt && \
|
|
|
|
${GUNZIP_CMD} -c ${EXAMPLESDIR}/grf/bump.grf.gz | \
|
|
|
|
gmap - ${WRKDIR}/ccc3.tgt ${WRKDIR}/brol.map)
|
|
|
|
(cd ${WRKSRC}/doc && \
|
2007-08-10 19:47:23 +02:00
|
|
|
${FC} -o scotch_test scotch_example.f \
|
2006-02-03 23:19:54 +01:00
|
|
|
-I${PREFIX}/include -L${PREFIX}/lib -lscotch -lscotcherr -lm \
|
|
|
|
&& ./scotch_test)
|
2007-08-10 19:47:23 +02:00
|
|
|
. if !defined(WITHOUT_MPI)
|
|
|
|
(${GUNZIP_CMD} -c ${EXAMPLESDIR}/grf/bump.grf.gz | dgtst)
|
|
|
|
. endif
|
2006-02-03 23:19:54 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|