freebsd-ports/math/cocoalib/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

115 lines
3.7 KiB
Makefile

PORTNAME= cocoalib
DISTVERSION= 0.99800
CATEGORIES= math
MASTER_SITES= https://cocoa.dima.unige.it/cocoa/cocoalib/tgz/
DISTNAME= CoCoALib-${DISTVERSION}
MAINTAINER= salvadore@FreeBSD.org
COMMENT= C++ library for doing Computations in Commutative Algebra
WWW= https://cocoa.dima.unige.it
LICENSE= GPLv3+ GFDL PD
LICENSE_COMB= multi
LICENSE_FILE_GPLv3+ = ${WRKSRC}/COPYRIGHT-full-text
LICENSE_FILE_GFDL= ${WRKSRC}/doc/COPYING
BUILD_DEPENDS= bash:shells/bash
LIB_DEPENDS= libgmp.so:math/gmp
USES= compiler:c++11-lang shebangfix tar:tgz
USE_LDCONFIG= yes
SHEBANG_GLOB= *.sh
CXXFLAGS+= -I${WRKSRC}/include \
-I${WRKSRC}/src/AlgebraicCore/TmpFactorDir \
-I${WRKSRC}/src/AlgebraicCore/TmpFactorDir/multivariate \
-I${WRKSRC}/src/AlgebraicCore/TmpFactorDir/linalg \
-I${LOCALBASE}/include \
-DCoCoA_ULONG2LONG=1 \
-DCoCoA_ULONGLONG2LONGLONG=1 \
-fPIC
LDFLAGS+= -L${LOCALBASE}/lib -L${BUILD_WRKSRC} -lcocoa -lgmp
BUILD_WRKSRC= ${WRKSRC}/src/AlgebraicCore
TEST_TARGET= all
TEST_WRKSRC= ${WRKSRC}/src/tests
PREPROCESSOR_DEFNS= ${WRKSRC}/include/CoCoA/PREPROCESSOR_DEFNS.H
OPTIONS_DEFINE= BOOST DOCS EXAMPLES FROBBY GFAN \
GSL NORMALIZ SMALLDEG TEST
FROBBY_DESC= Link with libfrobby.a
GFAN_DESC= Link with libgfan.a
GSL_DESC= Link with libgsl.a
NORMALIZ_DESC= Link with libnormaliz.a (might cause circular dependency)
SMALLDEG_DESC= Optimization for small degree polynomials
BOOST_BUILD_DEPENDS= ${LOCALBASE}/include/boost/thread.hpp:devel/boost-libs
BOOST_CXXFLAGS= -pthread
FROBBY_BUILD_DEPENDS= ${LOCALBASE}/lib/libfrobby.a:math/frobby
GFAN_BUILD_DEPENDS= ${LOCALBASE}/lib/libgfan.a:math/gfanlib
GSL_BUILD_DEPENDS= ${LOCALBASE}/lib/libgsl.a:math/gsl
NORMALIZ_BUILD_DEPENDS= ${LOCALBASE}/lib/libnormaliz.a:math/libnormaliz
SMALLDEG_EXTRA_PATCHES= ${FILESDIR}/extra-patch-include-CoCoA_config.H
pre-configure:
${REINPLACE_CMD} "s,%%DISTVERSION%%,${DISTVERSION},g" ${BUILD_WRKSRC}/Makefile
do-configure-BOOST-on:
${ECHO_CMD} "#define COCOA_WITH_BOOST" >> ${PREPROCESSOR_DEFNS}
do-configure-BOOST-off:
${ECHO_CMD} "#undef COCOA_WITH_BOOST" >> ${PREPROCESSOR_DEFNS}
do-configure-FROBBY-on:
${ECHO_CMD} "#define COCOA_WITH_FROBBY" >> ${PREPROCESSOR_DEFNS}
do-configure-FROBBY-off:
${ECHO_CMD} "#undef COCOA_WITH_FROBBY" >> ${PREPROCESSOR_DEFNS}
do-configure-GFAN-on:
${ECHO_CMD} "#define COCOA_WITH_GFAN" >> ${PREPROCESSOR_DEFNS}
do-configure-GFAN-off:
${ECHO_CMD} "#undef COCOA_WITH_GFAN" >> ${PREPROCESSOR_DEFNS}
do-configure-GSL-on:
${ECHO_CMD} "#define COCOA_WITH_GSL" >> ${PREPROCESSOR_DEFNS}
do-configure-GSL-off:
${ECHO_CMD} "#undef COCOA_WITH_GSL" >> ${PREPROCESSOR_DEFNS}
do-configure-NORMALIZ-on:
${ECHO_CMD} "#define COCOA_WITH_NORMALIZ" >> ${PREPROCESSOR_DEFNS}
do-configure-NORMALIZ-off:
${ECHO_CMD} "#undef COCOA_WITH_NORMALIZ" >> ${PREPROCESSOR_DEFNS}
pre-build:
cd ${WRKSRC}/include/CoCoA && ./MakeUnifiedHeader.sh --check
post-build-TEST-on: do-test
do-install:
${INSTALL_DATA} ${BUILD_WRKSRC}/libcocoa.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${BUILD_WRKSRC}/libcocoa.so.0 ${STAGEDIR}${PREFIX}/lib
cd ${STAGEDIR}${PREFIX}/lib && \
${LN} -sf libcocoa.so.0 ${STAGEDIR}${PREFIX}/lib/libcocoa.so
${MKDIR} ${STAGEDIR}${PREFIX}/include/CoCoA
cd ${WRKSRC}/include/CoCoA && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/CoCoA '-name *\.H -a ! -name \._*'
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR}/html
${INSTALL_MAN} ${WRKSRC}/doc/CoCoALib.pdf ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/doc/html && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/html '! -name \._*'
post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_MAN} ${WRKSRC}/examples/index.html ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} '-name ex-*\.C'
.include <bsd.port.mk>