summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2022-06-11 02:12:50 -0500
committerMatthias Maier <tamiko@gentoo.org>2022-06-11 02:12:50 -0500
commit56e069d09f091b00433c8f47680789b7aa297522 (patch)
tree6df3c67dc087a8ce40e4a779da150f559021781e /sci-libs
parentsci-libs/symengine: add USE=llvm patches to remaining ebuilds (diff)
downloadgentoo-56e069d09f091b00433c8f47680789b7aa297522.tar.gz
gentoo-56e069d09f091b00433c8f47680789b7aa297522.tar.bz2
gentoo-56e069d09f091b00433c8f47680789b7aa297522.zip
sci-libs/symengine: als fix user configuration for USE=llvm
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/symengine/files/symengine-0.8.1-fix_llvm.patch15
-rw-r--r--sci-libs/symengine/symengine-0.8.1-r2.ebuild (renamed from sci-libs/symengine/symengine-0.8.1-r1.ebuild)0
-rw-r--r--sci-libs/symengine/symengine-0.9.0-r2.ebuild (renamed from sci-libs/symengine/symengine-0.9.0-r1.ebuild)2
-rw-r--r--sci-libs/symengine/symengine-0.9.0.ebuild99
4 files changed, 16 insertions, 100 deletions
diff --git a/sci-libs/symengine/files/symengine-0.8.1-fix_llvm.patch b/sci-libs/symengine/files/symengine-0.8.1-fix_llvm.patch
index 3e39a9eda500..810e2ac766d7 100644
--- a/sci-libs/symengine/files/symengine-0.8.1-fix_llvm.patch
+++ b/sci-libs/symengine/files/symengine-0.8.1-fix_llvm.patch
@@ -48,6 +48,21 @@ index cf5ab3b..dfa6605 100644
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
set(HAVE_SYMENGINE_LLVM yes)
set(PKGS ${PKGS} "LLVM")
+diff --git a/cmake/SymEngineConfig.cmake.in b/cmake/SymEngineConfig.cmake.in
+index b01ef9b..6d82c10 100644
+--- a/cmake/SymEngineConfig.cmake.in
++++ b/cmake/SymEngineConfig.cmake.in
+@@ -67,9 +67,7 @@ set(SYMENGINE_LLVM_COMPONENTS @SYMENGINE_LLVM_COMPONENTS@)
+
+ if (NOT "${SYMENGINE_LLVM_COMPONENTS}" STREQUAL "")
+ find_package(LLVM REQUIRED ${SYMENGINE_LLVM_COMPONENTS} HINTS @LLVM_DIR@)
+- llvm_map_components_to_libnames(llvm_libs_direct ${SYMENGINE_LLVM_COMPONENTS})
+- llvm_expand_dependencies(llvm_libs ${llvm_libs_direct})
+- set(SYMENGINE_LIBRARIES ${SYMENGINE_LIBRARIES} ${llvm_libs})
++ set(SYMENGINE_LIBRARIES ${SYMENGINE_LIBRARIES} LLVM)
+ else()
+ set(SYMENGINE_LLVM_INCLUDE_DIRS)
+ endif()
--
2.35.1
diff --git a/sci-libs/symengine/symengine-0.8.1-r1.ebuild b/sci-libs/symengine/symengine-0.8.1-r2.ebuild
index 93bc13fbc646..93bc13fbc646 100644
--- a/sci-libs/symengine/symengine-0.8.1-r1.ebuild
+++ b/sci-libs/symengine/symengine-0.8.1-r2.ebuild
diff --git a/sci-libs/symengine/symengine-0.9.0-r1.ebuild b/sci-libs/symengine/symengine-0.9.0-r2.ebuild
index ea34c5e94099..52ecab72e67c 100644
--- a/sci-libs/symengine/symengine-0.9.0-r1.ebuild
+++ b/sci-libs/symengine/symengine-0.9.0-r2.ebuild
@@ -12,7 +12,7 @@ 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 ~riscv x86"
+KEYWORDS="amd64 ~arm ~arm64 ~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 )"
diff --git a/sci-libs/symengine/symengine-0.9.0.ebuild b/sci-libs/symengine/symengine-0.9.0.ebuild
deleted file mode 100644
index ea34c5e94099..000000000000
--- a/sci-libs/symengine/symengine-0.9.0.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_MAX_SLOT=13
-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 ~riscv x86"
-# 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:= )
- 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
- "${FILESDIR}"/${PN}-0.9.0-pthread-cmake.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
-}