freebsd-ports/cad/scotch/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

94 lines
2.7 KiB
Makefile

PORTNAME= scotch
DISTVERSION= 6.0.4-aster7
PORTREVISION= 3
CATEGORIES= cad science
MAINTAINER= thierry@FreeBSD.org
COMMENT= Package for graph and mesh partitioning and sparse matrix ordering
WWW= https://www.labri.fr/perso/pelegrin/scotch/
LICENSE= CeCILL_C
LICENSE_NAME= CeCILL-C
LICENSE_FILE= ${WRKSRC}/doc/CeCILL-C_V1-en.txt
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
USES= bison:alias gmake localbase
CONFLICTS_INSTALL= gbase gmap # bin/gbase bin/gmap
MAKE_JOBS_UNSAFE=yes
OPTIONS_DEFINE= DOCS EXAMPLES MPICH
OPTIONS_DEFAULT=MPICH
OPTIONS_SUB= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
BUILD_WRKSRC= ${WRKSRC}/src
INSTALL_WRKSRC= ${BUILD_WRKSRC}
TEST_WRKSRC= ${BUILD_WRKSRC}
ALL_TARGET= esmumps
TEST_TARGET= check
MAKE_ENV= prefix=${STAGEDIR}${PREFIX} mandir=${STAGEDIR}${PREFIX}/share/man \
-DSCOTCH_PTHREAD_NUMBER=2
USE_LDCONFIG= yes
DOCVER= ${PORTVERSION:R:R}
PORTDOCS= ptscotch_user${DOCVER}.pdf scotch_user${DOCVER}.pdf scotch_example.f
LIBS= esmumps scotch scotcherr scotcherrexit scotchmetis
MPICH_USES= mpi:mpich
MPICH_ALL_TARGET= ptesmumps
MPICH_TEST_TARGET= ptcheck
MPICH_LIBS+= ptesmumps ptscotch ptscotcherr ptscotcherrexit ptscotchparmetis
.include <bsd.port.options.mk>
.if ${ARCH} == "i386"
MF= i686
.else
MF= x86-64
.endif
pre-everything::
.if !defined(WITHOUT_MPICH)
@${ECHO_MSG}
@${ECHO_MSG} "Define WITHOUT_MPI if PT-Scotch is not wanted."
@${ECHO_MSG}
.endif
pre-configure:
${REINPLACE_CMD} -e 's/-lthread/-pthread/;s/-lpthread/-pthread/'\
${WRKSRC}/src/Make.inc/Makefile.inc.${MF}_pc_freebsd
${LN} -sf ${WRKSRC}/src/Make.inc/Makefile.inc.${MF}_pc_freebsd \
${WRKSRC}/src/Makefile.inc
${REINPLACE_CMD} -E -e 's|cd (.*) ; * \$$\(MAKE\)|\$$(MAKE) -C \1|' \
-e 's|\&\& \$$\(MAKE\)||' ${WRKSRC}/src/Makefile
post-stage:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* ${STAGEDIR}${PREFIX}/lib/lib*
.for l in ${LIBS}
${MV} ${STAGEDIR}${PREFIX}/lib/lib${l}.so ${STAGEDIR}${PREFIX}/lib/lib${l}.so.0
${LN} -sf lib${l}.so.0 ${STAGEDIR}${PREFIX}/lib/lib${l}.so
.endfor
do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
do-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/grf ${STAGEDIR}${EXAMPLESDIR}/tgt
${INSTALL_DATA} ${WRKSRC}/grf/* ${STAGEDIR}${EXAMPLESDIR}/grf
${INSTALL_DATA} ${WRKSRC}/tgt/* ${STAGEDIR}${EXAMPLESDIR}/tgt
.if !defined(WITHOUT_MPI)
pre-test:
. if !exists(${HOME}/.mpd.conf)
@${ECHO_CMD} "MPD_SECRETWORD=change_on_install" > ${HOME}/.mpd.conf
${CHMOD} go-r ${HOME}/.mpd.conf
@${ECHO_MSG} "${HOME}/.mpd.conf has been generated - please change the secret word!"
. endif
.endif
.include "${.CURDIR}/../../french/aster/bsd.aster.mk"
.include <bsd.port.mk>