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

89 lines
3 KiB
Makefile

PORTNAME= symengine
DISTVERSIONPREFIX= v
DISTVERSION= 0.9.0
PORTREVISION= 5
CATEGORIES= math
MAINTAINER= yuri@FreeBSD.org
COMMENT= Fast symbolic manipulation library, written in C++
WWW= https://symengine.org/
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libboost_serialization.so:devel/boost-libs \
libgmp.so:math/gmp
USES= cmake compiler:c++11-lang
USE_GITHUB= yes
USE_LDCONFIG= yes
CMAKE_ON= WITH_SYMENGINE_THREAD_SAFE BUILD_SHARED_LIBS BUILD_FOR_DISTRIBUTION
CMAKE_OFF= BUILD_BENCHMARKS WITH_COTIRE
OPTIONS_DEFINE= ARB ECM LLVM MPC TCMALLOC ASSERT
OPTIONS_SINGLE= INTCLASS
OPTIONS_SINGLE_INTCLASS= GMP GMPXX BOOSTMP FLINT PIRANHA
OPTIONS_DEFAULT= ARB ECM LLVM MPC FLINT # FLINT choice is based on best performance, TCMALLOC is broken due to memory corruption issues, see https://github.com/symengine/symengine.py/issues/412
INTCLASS_DESC= Integer class, use integers from:
ARB_DESC= Build with Arb (interval arithmetic library)
ARB_CMAKE_BOOL= WITH_ARB
ARB_LIB_DEPENDS= libarb.so:math/arb \
libflint.so:math/flint2 \
libmpfr.so:math/mpfr
ECM_DESC= Build with ECM support (Elliptic Curve Method)
ECM_CMAKE_BOOL= WITH_ECM
ECM_LIB_DEPENDS= libecm.so:math/gmp-ecm
LLVM_DESC= Build with LLVM
LLVM_CMAKE_BOOL= WITH_LLVM
LLVM_CMAKE_ON= -DLLVM_INCLUDE_DIRS:STRING=${LOCALBASE}/llvm${LLVM_VERSION}/include \
-DFREEBSD_LLVM_VERSION=${LLVM_VERSION}
LLVM_BUILD_DEPENDS= llvm${LLVM_VERSION}>0:devel/llvm${LLVM_VERSION}
MPC_DESC= Build with MPC
MPC_CMAKE_BOOL= WITH_MPC
MPC_LIB_DEPENDS= libmpc.so:math/mpc
TCMALLOC_DESC= Use tcmalloc from google-perftools (improves performance)
TCMALLOC_CMAKE_BOOL= WITH_TCMALLOC
TCMALLOC_LIB_DEPENDS= libtcmalloc.so:devel/google-perftools
TCMALLOC_BROKEN= associated with a suspected memory corruption problem, see https://github.com/symengine/symengine.py/issues/412
ASSERT_CMAKE_BOOL= WITH_SYMENGINE_ASSERT
GMP_DESC= gmp (supports arbitrary fp precision)
GMP_CMAKE_ON= -DINTEGER_CLASS:STRING=gmp
GMP_LIB_DEPENDS= libgmp.so:math/gmp \
libmpfr.so:math/mpfr
GMPXX_DESC= gmpxx
GMPXX_CMAKE_ON= -DINTEGER_CLASS:STRING=gmpxx
GMPXX_LIB_DEPENDS= libgmp.so:math/gmp
BOOSTMP_DESC= boostmp (no arbitrary fp precision)
BOOSTMP_CMAKE_ON= -DINTEGER_CLASS:STRING=boostmp
BOOSTMP_BUILD_DEPENDS= ${LOCALBASE}/include/boost/multiprecision/cpp_int.hpp:devel/boost-libs
FLINT_DESC= flint (supports arbitrary fp precision, best performance)
FLINT_CMAKE_ON= -DINTEGER_CLASS:STRING=flint
FLINT_LIB_DEPENDS= libflint.so:math/flint2 \
libgmp.so:math/gmp \
libmpfr.so:math/mpfr
PIRANHA_DESC= piranha
PIRANHA_CMAKE_ON= -DINTEGER_CLASS:STRING=piranha
PIRANHA_BUILD_DEPENDS= piranha>0:math/piranha
LLVM_VERSION= 13 # ${LLVM_DEFAULT} - llvm-90 fails for some reason
do-test: # one test fails: https://github.com/symengine/symengine/issues/1697
@cd ${BUILD_WRKSRC} && \
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DBUILD_TESTING:BOOL=ON ${CMAKE_SOURCE_PATH} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
.include <bsd.port.mk>