2006-02-03 22:19:54 +00:00
|
|
|
# New ports collection makefile for: scotch
|
|
|
|
# Date created: Thu 2 feb 2006
|
|
|
|
# Whom: thierry@pompo.net
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= scotch
|
2007-12-23 17:01:11 +00:00
|
|
|
PORTVERSION= 5.0.4
|
2006-02-03 22:19:54 +00:00
|
|
|
CATEGORIES= cad science
|
2007-12-23 17:01:11 +00:00
|
|
|
MASTER_SITES= http://gforge.inria.fr/frs/download.php/3720/
|
2006-02-03 22:19:54 +00: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 17:47:23 +00:00
|
|
|
.if defined(MAINTAINER_MODE)
|
|
|
|
USE_FORTRAN= yes
|
|
|
|
.endif
|
2006-02-03 22:19:54 +00:00
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:R}
|
|
|
|
BUILD_WRKSRC= ${WRKSRC}/src
|
|
|
|
INSTALL_WRKSRC= ${WRKSRC}/bin
|
2007-08-10 17:47:23 +00:00
|
|
|
ALL_TARGET= scotch
|
2006-02-03 22:19:54 +00:00
|
|
|
|
2007-08-10 17:47:23 +00:00
|
|
|
VER= ${PORTVERSION:R}
|
2006-02-03 22:19:54 +00:00
|
|
|
BINS= acpl amk_ccc amk_fft2 amk_grf amk_hy amk_m2 amk_p2 atst \
|
2007-08-10 17:47:23 +00:00
|
|
|
gbase gcv gmap gmk_hy gmk_m2 gmk_m3 gmk_msh gmk_ub2 gmtst gord\
|
2006-02-03 22:19:54 +00:00
|
|
|
gotst gout gtst mcv mmk_m2 mmk_m3 mord mtst
|
2006-02-06 06:45:27 +00:00
|
|
|
INCS= common.h scotch.h scotchf.h
|
2007-08-10 17:47:23 +00: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 22:19:54 +00:00
|
|
|
EXAMPLES= scotch_example.f
|
|
|
|
|
2007-08-10 17:47:23 +00:00
|
|
|
PKGMESSAGE= ${WRKSRC}/LICENSE_en.txt
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_MPI)
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/mpich2/bin/mpicc:${PORTSDIR}/net/mpich2
|
2007-09-22 07:21:18 +00:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/mpich2/lib/libmpich.so:${PORTSDIR}/net/mpich2
|
2007-08-10 17:47:23 +00:00
|
|
|
|
|
|
|
ALL_TARGET+= ptscotch
|
|
|
|
MAKE_ENV+= PATH=${PATH}:${LOCALBASE}/mpich2/bin
|
|
|
|
|
|
|
|
INCS+= ptscotch.h ptscotchf.h
|
|
|
|
LIBS+= libptscotch.a libptscotcherr.a
|
|
|
|
BINS+= dgord dgscat dgtst
|
|
|
|
|
|
|
|
PLIST_SUB+= MPI=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MPI="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-evrything::
|
|
|
|
.if !defined(WITHOUT_MPI)
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${ECHO_MSG} "Define WITHOUT_MPI if PT-Scotch is not wanted."
|
|
|
|
@${ECHO_MSG}
|
|
|
|
.endif
|
|
|
|
|
2006-02-03 22:19:54 +00:00
|
|
|
pre-configure:
|
2006-02-06 06:45:27 +00:00
|
|
|
${LN} -sf ${WRKSRC}/src/Make.inc/Makefile.inc.freebsd \
|
2006-02-03 22:19:54 +00:00
|
|
|
${WRKSRC}/src/Makefile.inc
|
2007-08-10 17:47:23 +00:00
|
|
|
${REINPLACE_CMD} -e 's|in subdirectory "doc"|under ${DATADIR}|' \
|
|
|
|
${WRKSRC}/LICENSE_en.txt
|
2006-02-03 22:19:54 +00: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 17:47:23 +00:00
|
|
|
${MKDIR} ${DATADIR}
|
|
|
|
${INSTALL_DATA} ${LICDOCS:S|^|${WRKSRC}/doc/|} ${DATADIR}
|
2006-02-03 22:19:54 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR} ${EXAMPLESDIR}/grf ${EXAMPLESDIR}/tgt
|
|
|
|
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR}
|
|
|
|
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
|
|
|
|
${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 17:47:23 +00:00
|
|
|
post-install:
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
@${ECHO_MSG}
|
|
|
|
|
2006-02-03 22:19:54 +00:00
|
|
|
.if defined(MAINTAINER_MODE)
|
2007-08-10 17:47:23 +00:00
|
|
|
regression-test: install
|
2006-02-03 22:19:54 +00: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 17:47:23 +00:00
|
|
|
${FC} -o scotch_test scotch_example.f \
|
2006-02-03 22:19:54 +00:00
|
|
|
-I${PREFIX}/include -L${PREFIX}/lib -lscotch -lscotcherr -lm \
|
|
|
|
&& ./scotch_test)
|
2007-08-10 17:47:23 +00:00
|
|
|
. if !defined(WITHOUT_MPI)
|
|
|
|
(${GUNZIP_CMD} -c ${EXAMPLESDIR}/grf/bump.grf.gz | dgtst)
|
|
|
|
. endif
|
2006-02-03 22:19:54 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|