diff options
author | Sam James <sam@gentoo.org> | 2023-03-22 08:19:01 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-03-22 09:19:51 +0000 |
commit | afdcb3936820506085c1545b52c64c2ff8308688 (patch) | |
tree | 38652a91490dacc04fbcf69a2a750774afe673e1 /sci-libs/symengine | |
parent | dev-ruby/kramdown-parser-gfm: add github upstream metadata (diff) | |
download | gentoo-afdcb3936820506085c1545b52c64c2ff8308688.tar.gz gentoo-afdcb3936820506085c1545b52c64c2ff8308688.tar.bz2 gentoo-afdcb3936820506085c1545b52c64c2ff8308688.zip |
sci-libs/symengine: add 0.10.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/symengine')
-rw-r--r-- | sci-libs/symengine/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/symengine/symengine-0.10.0.ebuild | 103 |
2 files changed, 104 insertions, 0 deletions
diff --git a/sci-libs/symengine/Manifest b/sci-libs/symengine/Manifest index 7fe30a70b05c..609f7e08c10a 100644 --- a/sci-libs/symengine/Manifest +++ b/sci-libs/symengine/Manifest @@ -1 +1,2 @@ +DIST symengine-0.10.0.tar.gz 898177 BLAKE2B 5da099b48c3a8f7163b56ce1ec1c54e95d0328ac72d823df1c8c6fa413c179b91f54017f224e06d8e432891650043da105cb92ab4a2e3497f202847c817c00bc SHA512 4cf0915fa47dfc2d894f352a379d0151239f277bff3409d2badf384366251c642fc1f77ec78bdba9c92543c01bf0abf521ae81aec3ab4ebb753c0ef27bae4a96 DIST symengine-0.9.0.tar.gz 878574 BLAKE2B 32c37ca6575b3f7e37184c80c2df74ebf7bb7846537e951be6c888994b8dc049c1ed2a6f51da1c1cfb038e0a47393b18acff60cfef665c5a5e714beb9b0ecb12 SHA512 dceca49ddb6e2ac7c4f8ecb73ce19824cbaa3eff41ad0f50008e403498121184b4e9dc660628dbd8e4db979f8c16b83a709a40540f7834954ab01f9854e12caa diff --git a/sci-libs/symengine/symengine-0.10.0.ebuild b/sci-libs/symengine/symengine-0.10.0.ebuild new file mode 100644 index 000000000000..0651c8c712c7 --- /dev/null +++ b/sci-libs/symengine/symengine-0.10.0.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_MAX_SLOT=16 +inherit cmake llvm toolchain-funcs + +DESCRIPTION="Fast symbolic manipulation library, written in C++" +HOMEPAGE="https://github.com/symengine/symengine" +SRC_URI="https://github.com/symengine/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" +# BUILD_FOR_DISTRIBUTION enables threads by default so do it here +IUSE="arb benchmarks boost debug doc ecm +flint llvm +mpc +mpfr openmp test tcmalloc +threads" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/gmp:= + sys-libs/binutils-libs:= + arb? ( sci-mathematics/arb:= ) + boost? ( dev-libs/boost:= ) + ecm? ( sci-mathematics/gmp-ecm ) + flint? ( sci-mathematics/flint:= ) + mpc? ( dev-libs/mpc:= ) + mpfr? ( dev-libs/mpfr:= ) + llvm? ( <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= ) + tcmalloc? ( dev-util/google-perftools ) +" +DEPEND=" + ${RDEPEND} + dev-libs/cereal +" +BDEPEND="doc? ( app-doc/doxygen[dot] )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.7.0-cmake-build-type.patch + "${FILESDIR}"/${PN}-0.8.1-fix_llvm.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + + use llvm && llvm_pkg_setup +} + +src_prepare() { + cmake_src_prepare + + sed -e "s|DESTINATION doc| DESTINATION share/doc/${PF}/html|" \ + -e "s|/lib|/$(get_libdir)|g" \ + -e "s|lib/|$(get_libdir)/|g" \ + -e "/DESTINATION/s|lib|$(get_libdir)|g" \ + -i CMakeLists.txt symengine/CMakeLists.txt \ + symengine/utilities/teuchos/CMakeLists.txt || die +} + +src_configure() { + # not in portage yet: piranha + local int_class + + if use arb || use flint; then + int_class=flint + elif use mpfr; then + int_class=gmpxx + elif use boost; then + int_class=boostmp + else + int_class=gmp + fi + + einfo "Building with integer class: ${int_class}" + + local mycmakeargs=( + -DINTEGER_CLASS=${int_class} + -DBUILD_BENCHMARKS=$(usex benchmarks) + -DBUILD_DOXYGEN=$(usex doc) + -DBUILD_TESTS=$(usex test) + -DWITH_ARB=$(usex arb) + -DWITH_BFD=$(usex debug) + -DWITH_SYMENGINE_ASSERT=$(usex debug) + -DWITH_SYMENGINE_THREAD_SAFE=$(usex threads) + -DWITH_FLINT=$(usex flint) + -DWITH_OPENMP=$(usex openmp) + -DWITH_MPFR=$(usex mpfr) + -DWITH_MPC=$(usex mpc) + -DWITH_LLVM=$(usex llvm) + -DWITH_PTHREAD=$(usex threads) + -DWITH_TCMALLOC=$(usex tcmalloc) + -DWITH_ECM=$(usex ecm) + -DWITH_SYSTEM_CEREAL=ON + ) + + use arb && mycmakeargs+=( -DARB_INCLUDE_DIR="${ESYSROOT}"/usr/include ) + + cmake_src_configure +} |