public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/
@ 2021-03-13  9:42 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2021-03-13  9:42 UTC (permalink / raw
  To: gentoo-commits

commit:     8a9f1302a2520b7f2dc8ec83a5546fb1a8afef0e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 13 09:13:39 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 13 09:42:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a9f1302

sci-libs/symengine: add 0.7.0

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/symengine/Manifest                        |  1 +
 .../files/symengine-0.7.0-cmake-build-type.patch   | 25 +++++++
 sci-libs/symengine/symengine-0.7.0.ebuild          | 86 ++++++++++++++++++++++
 3 files changed, 112 insertions(+)

diff --git a/sci-libs/symengine/Manifest b/sci-libs/symengine/Manifest
index bf9e0f69921..8add269cb67 100644
--- a/sci-libs/symengine/Manifest
+++ b/sci-libs/symengine/Manifest
@@ -1 +1,2 @@
 DIST symengine-0.6.0.tar.gz 763481 BLAKE2B 37fe94ad08463b31c7387ab296b201a4dda821ba59dfa548d0c42e70d23958bae24df3f035bd3fffb46cc08cc010d13a25e607a9e0644e9b3c0602fa0eb363b3 SHA512 cc6f0468534e5bcd466a810d44f9884b17858ca6c7151cdcadb3af0f7d8faf0d96697d5887ab65fc9094de80df825f8243dabc54e3f5c387be544880f49b482b
+DIST symengine-0.7.0.tar.gz 802307 BLAKE2B de207f565f179deae37479eec82dfced3d83bfb7e643b4e6969135e10130dd05c888f34aa75c76c238ff1babfd0864f3329c3deee126b84ec33c4937c11dc20c SHA512 fd3198bc4a05ca2b9b8a58039cc21af65b44457f295362a1a9b8dbf9c6e3df5186c0c84b289bc9fe85d9efd5ac1a683f6b7ba9a661fb6d913d6ceefb14ee2348

diff --git a/sci-libs/symengine/files/symengine-0.7.0-cmake-build-type.patch b/sci-libs/symengine/files/symengine-0.7.0-cmake-build-type.patch
new file mode 100644
index 00000000000..f490521f5c9
--- /dev/null
+++ b/sci-libs/symengine/files/symengine-0.7.0-cmake-build-type.patch
@@ -0,0 +1,25 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cf1d213..3067481 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,11 +17,6 @@ if (NOT CMAKE_BUILD_TYPE)
+     set(CMAKE_BUILD_TYPE Release
+         CACHE STRING "Build type (Debug, Release)" FORCE)
+ endif ()
+-if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR
+-        CMAKE_BUILD_TYPE STREQUAL "Release"))
+-    message("${CMAKE_BUILD_TYPE}")
+-    message(FATAL_ERROR "CMAKE_BUILD_TYPE must be one of: Debug, Release (current value: '${CMAKE_BUILD_TYPE}')")
+-endif ()
+ 
+ set(BUILD_FOR_DISTRIBUTION no
+     CACHE BOOL "Building SymEngine for a distribution")
+@@ -138,7 +133,7 @@ endif()
+ try_compile(HAVE_SYMENGINE_STD_TO_STRING "${CMAKE_CURRENT_BINARY_DIR}/cxx" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/checkstdtostring.cpp"
+ 	CMAKE_FLAGS "-DCOMPILE_DEFINITIONS=${CMAKE_CXX_FLAGS}")
+ 
+-if ((CMAKE_CXX_COMPILER_ID MATCHES Clang) AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
++if ((CMAKE_CXX_COMPILER_ID MATCHES Clang) AND (NOT(CMAKE_BUILD_TYPE STREQUAL "Debug")))
+     try_compile(CHECK_CLANG "${CMAKE_CURRENT_BINARY_DIR}/cxx" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/checkclang.cpp")
+     if (NOT ${CHECK_CLANG})
+         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__extern_always_inline=inline" )

diff --git a/sci-libs/symengine/symengine-0.7.0.ebuild b/sci-libs/symengine/symengine-0.7.0.ebuild
new file mode 100644
index 00000000000..5a026514ef6
--- /dev/null
+++ b/sci-libs/symengine/symengine-0.7.0.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic toolchain-funcs
+
+DESCRIPTION="Fast symbolic manipulation library, written in C++"
+HOMEPAGE="https://github.com/sympy/symengine"
+SRC_URI="https://github.com/sympy/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/0.4"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+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:= )
+	tcmalloc? ( dev-util/google-perftools )
+"
+DEPEND="${RDEPEND}
+	doc? ( app-doc/doxygen[dot] )
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-0.7.0-cmake-build-type.patch"
+)
+
+pkg_pretend() {
+	use openmp && [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp
+}
+
+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
+
+	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)"
+	)
+	use arb && mycmakeargs+=( -DARB_INCLUDE_DIR="${EPREFIX}/usr/include" )
+
+	test-flag-CXX -std=c++11 && append-cxxflags -std=c++11
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/
@ 2022-06-08  5:06 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-06-08  5:06 UTC (permalink / raw
  To: gentoo-commits

commit:     95cae20e05d591fbb744f6e4921e46f996811b40
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  8 05:05:57 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun  8 05:06:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95cae20e

sci-libs/symengine: fix pthread detection

Closes: https://bugs.gentoo.org/849803
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/symengine-0.9.0-pthread-cmake.patch      | 63 ++++++++++++++++++++++
 ...gine-0.9.0.ebuild => symengine-0.9.0-r1.ebuild} |  3 +-
 sci-libs/symengine/symengine-0.9.0.ebuild          |  1 +
 3 files changed, 66 insertions(+), 1 deletion(-)

diff --git a/sci-libs/symengine/files/symengine-0.9.0-pthread-cmake.patch b/sci-libs/symengine/files/symengine-0.9.0-pthread-cmake.patch
new file mode 100644
index 000000000000..0fa049dbf218
--- /dev/null
+++ b/sci-libs/symengine/files/symengine-0.9.0-pthread-cmake.patch
@@ -0,0 +1,63 @@
+From 6ad9620ffc578abdb920b84ea5e393c726389ac0 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 8 Jun 2022 06:02:25 +0100
+Subject: [PATCH] cmake: fix pthread detection
+
+The homebrew FindPTHREAD.cmake module was hardcoding the path to libpthread
+in the installed CMake config file which broke consumers when upgrading from
+< glibc-2.34 (e.g. glibc-2.33 -> glibc-2.34).
+
+CMake provides FindThreads which does the job fine for us. Tested with both
+glibc-2.33 (with a previously bad generated file, and then fixed) and glibc-2.35.
+
+This should be fine on musl and friends too. This brings symengine in line
+with most CMake packages.
+
+Bug: https://bugs.gentoo.org/849803
+Fixes: https://github.com/symengine/symengine/issues/1910
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -335,11 +335,10 @@ if (WITH_PIRANHA)
+ endif()
+ 
+ if (WITH_PTHREAD)
+-    find_package(PTHREAD REQUIRED)
+-    include_directories(SYSTEM ${PTHREAD_INCLUDE_DIRS})
+-    set(LIBS ${LIBS} ${PTHREAD_TARGETS})
++    find_package(Threads)
++    set(THREADS_PREFER_PTHREAD_FLAG ON)
++    set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
+     set(HAVE_SYMENGINE_PTHREAD yes)
+-    set(PKGS ${PKGS} "PTHREAD")
+ endif()
+ 
+ if (WITH_MPFR)
+@@ -761,10 +760,6 @@ if (WITH_BOOST)
+ endif()
+ 
+ message("WITH_PTHREAD: ${WITH_PTHREAD}")
+-if (WITH_PTHREAD)
+-    message("PTHREAD_INCLUDE_DIRS: ${PTHREAD_INCLUDE_DIRS}")
+-    message("PTHREAD_LIBRARIES: ${PTHREAD_LIBRARIES}")
+-endif()
+ 
+ message("WITH_MPC: ${WITH_MPC}")
+ if (WITH_MPC)
+--- a/cmake/FindPTHREAD.cmake
++++ /dev/null
+@@ -1,14 +0,0 @@
+-include(LibFindMacros)
+-
+-libfind_include(pthread.h pthread)
+-libfind_library(pthread pthread)
+-
+-set(PTHREAD_LIBRARIES ${PTHREAD_LIBRARY})
+-set(PTHREAD_INCLUDE_DIRS ${PTHREAD_INCLUDE_DIR})
+-set(PTHREAD_TARGETS pthread)
+-
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PTHREAD DEFAULT_MSG PTHREAD_LIBRARIES
+-    PTHREAD_INCLUDE_DIRS)
+-
+-mark_as_advanced(PTHREAD_INCLUDE_DIR PTHEARD_LIBRARY)
+

diff --git a/sci-libs/symengine/symengine-0.9.0.ebuild b/sci-libs/symengine/symengine-0.9.0-r1.ebuild
similarity index 96%
copy from sci-libs/symengine/symengine-0.9.0.ebuild
copy to sci-libs/symengine/symengine-0.9.0-r1.ebuild
index bf374c6ddaca..d0cb975cca8a 100644
--- a/sci-libs/symengine/symengine-0.9.0.ebuild
+++ b/sci-libs/symengine/symengine-0.9.0-r1.ebuild
@@ -31,7 +31,8 @@ DEPEND="${RDEPEND}
 BDEPEND="doc? ( app-doc/doxygen[dot] )"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-0.7.0-cmake-build-type.patch"
+	"${FILESDIR}"/${PN}-0.7.0-cmake-build-type.patch
+	"${FILESDIR}"/${PN}-0.9.0-pthread-cmake.patch
 )
 
 pkg_pretend() {

diff --git a/sci-libs/symengine/symengine-0.9.0.ebuild b/sci-libs/symengine/symengine-0.9.0.ebuild
index bf374c6ddaca..98e672759860 100644
--- a/sci-libs/symengine/symengine-0.9.0.ebuild
+++ b/sci-libs/symengine/symengine-0.9.0.ebuild
@@ -32,6 +32,7 @@ BDEPEND="doc? ( app-doc/doxygen[dot] )"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-0.7.0-cmake-build-type.patch"
+	"${FILESDIR}"/symengine-0.9.0-pthread-cmake.patch
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/
@ 2023-12-25  7:06 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2023-12-25  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     b9383d127d02605200977c760165bfb04552dbf5
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 25 07:00:16 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 07:06:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9383d12

sci-libs/symengine: Backportfix flint-3 build fix

Closes: https://bugs.gentoo.org/920645
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../symengine/files/symengine-0.11.1-flint-3.patch | 41 ++++++++++++++++++++++
 sci-libs/symengine/symengine-0.11.1.ebuild         |  2 ++
 2 files changed, 43 insertions(+)

diff --git a/sci-libs/symengine/files/symengine-0.11.1-flint-3.patch b/sci-libs/symengine/files/symengine-0.11.1-flint-3.patch
new file mode 100644
index 000000000000..662a4bc1bdc1
--- /dev/null
+++ b/sci-libs/symengine/files/symengine-0.11.1-flint-3.patch
@@ -0,0 +1,41 @@
+From 1ef98559d75b4fa5b87dad2daff0d12e7857ac8d Mon Sep 17 00:00:00 2001
+From: Isuru Fernando <isuruf@gmail.com>
+Date: Mon, 30 Oct 2023 20:25:05 -0500
+Subject: [PATCH] Fix flint headers and replace use of deprecated funcs in
+ flint2/3
+
+---
+ symengine/flint_wrapper.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/symengine/flint_wrapper.h b/symengine/flint_wrapper.h
+index 21cfcef056..ade419088f 100644
+--- a/symengine/flint_wrapper.h
++++ b/symengine/flint_wrapper.h
+@@ -6,6 +6,8 @@
+ 
+ #include <flint/fmpz.h>
+ #include <flint/fmpq.h>
++#include <flint/fmpz_poly.h>
++#include <flint/fmpz_poly_factor.h>
+ #include <flint/fmpq_poly.h>
+ 
+ namespace SymEngine
+@@ -710,13 +712,15 @@ class fmpq_poly_wrapper
+     }
+     fmpq_poly_wrapper(const mpz_t z)
+     {
++        fmpz_wrapper fz(z);
+         fmpq_poly_init(poly);
+-        fmpq_poly_set_mpz(poly, z);
++        fmpq_poly_set_fmpz(poly, fz.get_fmpz_t());
+     }
+     fmpq_poly_wrapper(const mpq_t q)
+     {
++        fmpq_wrapper fq(q);
+         fmpq_poly_init(poly);
+-        fmpq_poly_set_mpq(poly, q);
++        fmpq_poly_set_fmpq(poly, fq.get_fmpq_t());
+     }
+     fmpq_poly_wrapper(const fmpq_wrapper &q)
+     {

diff --git a/sci-libs/symengine/symengine-0.11.1.ebuild b/sci-libs/symengine/symengine-0.11.1.ebuild
index eb06f3cc27bf..63bf4d2833ef 100644
--- a/sci-libs/symengine/symengine-0.11.1.ebuild
+++ b/sci-libs/symengine/symengine-0.11.1.ebuild
@@ -38,6 +38,8 @@ BDEPEND="doc? ( app-doc/doxygen[dot] )"
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.7.0-cmake-build-type.patch
 	"${FILESDIR}"/${PN}-0.8.1-fix_llvm.patch
+	# https://github.com/symengine/symengine/pull/1985
+	"${FILESDIR}"/${PN}-0.11.1-flint-3.patch
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/
@ 2025-06-30 18:46 Andreas Sturmlechner
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2025-06-30 18:46 UTC (permalink / raw
  To: gentoo-commits

commit:     ff365c70e7af7c6f830f5d865d92143e6afdf016
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 30 17:41:18 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jun 30 18:46:04 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff365c70

sci-libs/symengine: drop 0.11.1, 0.12.0, 0.14.0

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-libs/symengine/Manifest                        |   2 -
 .../symengine/files/symengine-0.11.1-flint-3.patch |  41 --------
 sci-libs/symengine/metadata.xml                    |   4 -
 sci-libs/symengine/symengine-0.11.1.ebuild         | 105 ---------------------
 sci-libs/symengine/symengine-0.12.0.ebuild         |  99 -------------------
 sci-libs/symengine/symengine-0.14.0.ebuild         | 104 --------------------
 6 files changed, 355 deletions(-)

diff --git a/sci-libs/symengine/Manifest b/sci-libs/symengine/Manifest
index 00ef758860ea..b1b6ae8fcacb 100644
--- a/sci-libs/symengine/Manifest
+++ b/sci-libs/symengine/Manifest
@@ -1,4 +1,2 @@
-DIST symengine-0.11.1.tar.gz 898181 BLAKE2B ef14e09ceb7e9783711ca7f9f06a59362c40222e7f85de5545be834ecd79bbf41fcd34141bb3a63c106ee45067dd0b957377f937097183ffd5b93c6943976571 SHA512 076aac35428589c5b3524a46bd939a3a3a7da44b1c866b5f71487678b27b6e48b4da034029f1630881d7713a9252e905411a04b8016c9ec56a608b6de23365ac
-DIST symengine-0.12.0.tar.gz 898768 BLAKE2B 81bca3f59e864d2e37598a058cb4db97b1f9c8536ee841c10df6f01c6322fa744281ecdeb338e5bf33bf599ead66adcaaa724650535df9b3d4bd7f07e22a3ad2 SHA512 fbc73a75299c19155a09f1854888a5050150aaad5bc3df683d43e8036af8005f8152a36ae79029e00bc8422c3edd7252baaf3a0da6a21d1d754d80a44c5c68bf
 DIST symengine-0.13.0.gh.tar.gz 942757 BLAKE2B 9c7e1a067fd2baff0c6fc360b1512f04ee0c77c1f408180c2384b29aac1feecc56bcd0453afce402c6963c2fc638202f623592eb5c0bcdf0a1715056e8fec425 SHA512 3d64149b507be586daabad4b9a99436b0d329b16b89db756c9a72812b37049199c0be1ed77b18d55063a6445d04bf44120e7afd90a961aebbc89df815e52ed5d
 DIST symengine-0.14.0.gh.tar.gz 944589 BLAKE2B f5c52080153f548e866aa98afee6296888b020b633b7738109fa839b7fd70cda5059c079ba119604571060639b33d46692818d99d8c7b9a371a59efd14eb9dce SHA512 2b6012ed65064ff81c8828032c5a3148340582274e3604db2a43797ddbaa191520ed97da41efc2e842ba4a25326f53becc51f1e98935e8c34625bc5eaac8397f

diff --git a/sci-libs/symengine/files/symengine-0.11.1-flint-3.patch b/sci-libs/symengine/files/symengine-0.11.1-flint-3.patch
deleted file mode 100644
index 662a4bc1bdc1..000000000000
--- a/sci-libs/symengine/files/symengine-0.11.1-flint-3.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 1ef98559d75b4fa5b87dad2daff0d12e7857ac8d Mon Sep 17 00:00:00 2001
-From: Isuru Fernando <isuruf@gmail.com>
-Date: Mon, 30 Oct 2023 20:25:05 -0500
-Subject: [PATCH] Fix flint headers and replace use of deprecated funcs in
- flint2/3
-
----
- symengine/flint_wrapper.h | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/symengine/flint_wrapper.h b/symengine/flint_wrapper.h
-index 21cfcef056..ade419088f 100644
---- a/symengine/flint_wrapper.h
-+++ b/symengine/flint_wrapper.h
-@@ -6,6 +6,8 @@
- 
- #include <flint/fmpz.h>
- #include <flint/fmpq.h>
-+#include <flint/fmpz_poly.h>
-+#include <flint/fmpz_poly_factor.h>
- #include <flint/fmpq_poly.h>
- 
- namespace SymEngine
-@@ -710,13 +712,15 @@ class fmpq_poly_wrapper
-     }
-     fmpq_poly_wrapper(const mpz_t z)
-     {
-+        fmpz_wrapper fz(z);
-         fmpq_poly_init(poly);
--        fmpq_poly_set_mpz(poly, z);
-+        fmpq_poly_set_fmpz(poly, fz.get_fmpz_t());
-     }
-     fmpq_poly_wrapper(const mpq_t q)
-     {
-+        fmpq_wrapper fq(q);
-         fmpq_poly_init(poly);
--        fmpq_poly_set_mpq(poly, q);
-+        fmpq_poly_set_fmpq(poly, fq.get_fmpq_t());
-     }
-     fmpq_poly_wrapper(const fmpq_wrapper &q)
-     {

diff --git a/sci-libs/symengine/metadata.xml b/sci-libs/symengine/metadata.xml
index fd0371e31c3d..4f0f4a98c03a 100644
--- a/sci-libs/symengine/metadata.xml
+++ b/sci-libs/symengine/metadata.xml
@@ -14,10 +14,6 @@
 		<remote-id type="github">symengine/symengine</remote-id>
 	</upstream>
 	<use>
-		<flag name="arb">
-			Add support for arb (<pkg>sci-mathematics/arb</pkg>)
-		</flag>
-		<flag name="benchmarks">Build benchmarks</flag>
 		<flag name="boost">
 			Add support for boost integers (<pkg>dev-libs/boost</pkg>)
 		</flag>

diff --git a/sci-libs/symengine/symengine-0.11.1.ebuild b/sci-libs/symengine/symengine-0.11.1.ebuild
deleted file mode 100644
index 5d03e6c71d71..000000000000
--- a/sci-libs/symengine/symengine-0.11.1.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2024 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 ~loong ~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? ( <llvm-core/llvm-$((${LLVM_MAX_SLOT} + 1)):= )
-	tcmalloc? ( dev-util/google-perftools )
-"
-DEPEND="
-	${RDEPEND}
-	dev-libs/cereal
-"
-BDEPEND="doc? ( app-text/doxygen[dot] )"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-0.7.0-cmake-build-type.patch
-	"${FILESDIR}"/${PN}-0.8.1-fix_llvm.patch
-	# https://github.com/symengine/symengine/pull/1985
-	"${FILESDIR}"/${PN}-0.11.1-flint-3.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
-}

diff --git a/sci-libs/symengine/symengine-0.12.0.ebuild b/sci-libs/symengine/symengine-0.12.0.ebuild
deleted file mode 100644
index ed537d29d76b..000000000000
--- a/sci-libs/symengine/symengine-0.12.0.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_MAX_SLOT=18
-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 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
-# BUILD_FOR_DISTRIBUTION enables threads by default so do it here
-IUSE="benchmarks boost debug doc ecm +flint llvm +mpc +mpfr openmp test tcmalloc +threads"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	dev-libs/gmp:=
-	sys-libs/binutils-libs:=
-	boost? ( dev-libs/boost:= )
-	ecm? ( sci-mathematics/gmp-ecm )
-	flint? ( sci-mathematics/flint:= )
-	mpc? ( dev-libs/mpc:= )
-	mpfr? ( dev-libs/mpfr:= )
-	llvm? ( <llvm-core/llvm-$((${LLVM_MAX_SLOT} + 1)):= )
-	tcmalloc? ( dev-util/google-perftools )
-"
-DEPEND="
-	${RDEPEND}
-	dev-libs/cereal
-"
-BDEPEND="doc? ( app-text/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 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_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
-	)
-
-	cmake_src_configure
-}

diff --git a/sci-libs/symengine/symengine-0.14.0.ebuild b/sci-libs/symengine/symengine-0.14.0.ebuild
deleted file mode 100644
index c7202d2be584..000000000000
--- a/sci-libs/symengine/symengine-0.14.0.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LLVM_COMPAT=( {18..20} )
-LLVM_OPTIONAL=1
-
-inherit cmake llvm-r2 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}.gh.tar.gz
-"
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv ~x86"
-IUSE="
-	boost debug ecm +flint llvm +mpc +mpfr openmp primesieve tcmalloc
-	test
-"
-REQUIRED_USE="
-	boost? ( !flint !mpc !mpfr )
-	llvm? ( ${LLVM_REQUIRED_USE} )
-	mpc? ( mpfr )
-"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	boost? ( dev-libs/boost:= )
-	!boost? ( dev-libs/gmp:= )
-	debug? ( sys-libs/binutils-libs:= )
-	ecm? ( sci-mathematics/gmp-ecm:= )
-	flint? ( sci-mathematics/flint:= )
-	mpc? ( dev-libs/mpc:= )
-	mpfr? ( dev-libs/mpfr:= )
-	llvm? ( $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}=') )
-	primesieve? ( sci-mathematics/primesieve:= )
-	tcmalloc? ( dev-util/google-perftools )
-"
-DEPEND="
-	${RDEPEND}
-	dev-libs/cereal
-"
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-}
-
-src_configure() {
-	local int_class
-
-	if 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=(
-		-DINSTALL_CMAKE_DIR="${EPREFIX}/usr/$(get_libdir)/cmake/symengine"
-		-DINTEGER_CLASS=${int_class}
-		# not installed
-		-DBUILD_BENCHMARKS=OFF
-		# broken with out-of-tree builds
-		-DBUILD_DOXYGEN=OFF
-		-DBUILD_TESTS=$(usex test)
-		# -DWITH_ARB provided by flint >= 2
-		-DWITH_BFD=$(usex debug)
-		-DWITH_ECM=$(usex ecm)
-		-DWITH_FLINT=$(usex flint)
-		-DWITH_LLVM=$(usex llvm)
-		-DWITH_MPC=$(usex mpc)
-		-DWITH_MPFR=$(usex mpfr)
-		-DWITH_OPENMP=$(usex openmp)
-		-DWITH_PRIMESIEVE=$(usex primesieve)
-		-DWITH_PTHREAD=ON
-		-DWITH_SYMENGINE_ASSERT=$(usex debug)
-		-DWITH_SYMENGINE_THREAD_SAFE=ON
-		-DWITH_SYSTEM_CEREAL=ON
-		# TODO: package it
-		# -DWITH_SYSTEM_FASTFLOAT=ON
-		-DWITH_TCMALLOC=$(usex tcmalloc)
-	)
-	if use llvm; then
-		mycmakeargs+=(
-			-DLLVM_ROOT="$(get_llvm_prefix -d)"
-		)
-	fi
-
-	cmake_src_configure
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/
@ 2025-07-20 16:48 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2025-07-20 16:48 UTC (permalink / raw
  To: gentoo-commits

commit:     ab0bf9f6ffce10948bc5d0a9a90da24c85f9e00d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 20 16:48:17 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 20 16:48:54 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab0bf9f6

sci-libs/symengine: Backport upstream LLVM fixes

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../symengine/files/symengine-0.14.0-llvm.patch    | 108 ++++++++++++++++++++
 sci-libs/symengine/symengine-0.14.0-r2.ebuild      | 111 +++++++++++++++++++++
 2 files changed, 219 insertions(+)

diff --git a/sci-libs/symengine/files/symengine-0.14.0-llvm.patch b/sci-libs/symengine/files/symengine-0.14.0-llvm.patch
new file mode 100644
index 000000000000..3697088f9f9a
--- /dev/null
+++ b/sci-libs/symengine/files/symengine-0.14.0-llvm.patch
@@ -0,0 +1,108 @@
+From de7305e5e2fee97d80c25164a8f8c9f7ecfc9953 Mon Sep 17 00:00:00 2001
+From: Liam Keegan <liam@keegan.ch>
+Date: Thu, 26 Jun 2025 14:51:50 +0200
+Subject: [PATCH] Fix issues when compiled against LLVM 20 built with
+ assertions enabled
+
+- `Assertion `Level != OptimizationLevel::O0 && "Must request optimizations!"'`
+  - skip simplification pipeline for O0
+  - copied from https://github.com/symengine/symengine/issues/2076#issue-2764070679
+- `Assertion `GV->hasName() && "Global must have name."'`
+  - give the function a name
+- `getDeclaration` is deprecated in llvm 20 and will be removed in next version
+  - use replacement `getOrInsertDeclaration` for llvm >= 20
+- resolves #2076
+---
+ symengine/llvm_double.cpp | 34 +++++++++++++++++++++-------------
+ 1 file changed, 21 insertions(+), 13 deletions(-)
+
+diff --git a/symengine/llvm_double.cpp b/symengine/llvm_double.cpp
+index fe06ebcc7..8ae3b4adf 100644
+--- a/symengine/llvm_double.cpp
++++ b/symengine/llvm_double.cpp
+@@ -52,6 +52,12 @@ using CodeGenOptLevel = llvm::CodeGenOpt::Level;
+ using CodeGenOptLevel = llvm::CodeGenOptLevel;
+ #endif
+ 
++#if (LLVM_VERSION_MAJOR < 20)
++const auto &GetDeclaration = llvm::Intrinsic::getDeclaration;
++#else
++const auto &GetDeclaration = llvm::Intrinsic::getOrInsertDeclaration;
++#endif
++
+ #if (LLVM_VERSION_MAJOR >= 21)
+ #define AddNoCapture(A) A.addCapturesAttr(llvm::CaptureInfo::none())
+ #else
+@@ -85,8 +91,8 @@ llvm::Function *LLVMVisitor::get_function_type(llvm::LLVMContext *context)
+     }
+     llvm::FunctionType *function_type = llvm::FunctionType::get(
+         llvm::Type::getVoidTy(*context), inp, /*isVarArgs=*/false);
+-    auto F = llvm::Function::Create(function_type,
+-                                    llvm::Function::InternalLinkage, "", mod);
++    auto F = llvm::Function::Create(
++        function_type, llvm::Function::InternalLinkage, "symengine_func", mod);
+     F->setCallingConv(llvm::CallingConv::C);
+ #if (LLVM_VERSION_MAJOR < 5)
+     {
+@@ -265,16 +271,19 @@ void LLVMVisitor::init(const vec_basic &inputs, const vec_basic &outputs,
+     } else if (opt_level == 2) {
+         pb_opt_level = OptimizationLevel::O2;
+     }
++
++    if (opt_level != 0) {
+ #if (LLVM_VERSION_MAJOR < 6)
+-    FPM = PB.buildFunctionSimplificationPipeline(pb_opt_level);
++        FPM = PB.buildFunctionSimplificationPipeline(pb_opt_level);
+ #elif (LLVM_VERSION_MAJOR < 12)
+-    FPM = PB.buildFunctionSimplificationPipeline(
+-        pb_opt_level, llvm::PassBuilder::ThinLTOPhase::None);
++        FPM = PB.buildFunctionSimplificationPipeline(
++            pb_opt_level, llvm::PassBuilder::ThinLTOPhase::None);
+ #else
+-    FPM = PB.buildFunctionSimplificationPipeline(
+-        pb_opt_level, llvm::ThinOrFullLTOPhase::None);
++        FPM = PB.buildFunctionSimplificationPipeline(
++            pb_opt_level, llvm::ThinOrFullLTOPhase::None);
+ #endif
+-    FPM.run(*F, FAM);
++        FPM.run(*F, FAM);
++    }
+ 
+     // std::cout << "Optimized LLVM IR" << std::endl;
+     // module->print(llvm::errs(), nullptr);
+@@ -293,7 +302,7 @@ void LLVMVisitor::init(const vec_basic &inputs, const vec_basic &outputs,
+     {
+     public:
+         std::string &ss_;
+-        MemoryBufferRefCallback(std::string &ss) : ss_(ss) {}
++        explicit MemoryBufferRefCallback(std::string &ss) : ss_(ss) {}
+ 
+         void notifyObjectCompiled(const llvm::Module *M,
+                                   llvm::MemoryBufferRef obj) override
+@@ -306,7 +315,7 @@ void LLVMVisitor::init(const vec_basic &inputs, const vec_basic &outputs,
+         std::unique_ptr<llvm::MemoryBuffer>
+         getObject(const llvm::Module *M) override
+         {
+-            return NULL;
++            return nullptr;
+         }
+     };
+ 
+@@ -492,15 +501,14 @@ llvm::Function *LLVMVisitor::get_powi()
+ #if (LLVM_VERSION_MAJOR > 12)
+     arg_type.push_back(llvm::Type::getInt32Ty(mod->getContext()));
+ #endif
+-    return llvm::Intrinsic::getDeclaration(mod, llvm::Intrinsic::powi,
+-                                           arg_type);
++    return GetDeclaration(mod, llvm::Intrinsic::powi, arg_type);
+ }
+ 
+ llvm::Function *get_float_intrinsic(llvm::Type *type, llvm::Intrinsic::ID id,
+                                     unsigned n, llvm::Module *mod)
+ {
+     std::vector<llvm::Type *> arg_type(n, type);
+-    return llvm::Intrinsic::getDeclaration(mod, id, arg_type);
++    return GetDeclaration(mod, id, arg_type);
+ }
+ 
+ void LLVMVisitor::bvisit(const Pow &x)

diff --git a/sci-libs/symengine/symengine-0.14.0-r2.ebuild b/sci-libs/symengine/symengine-0.14.0-r2.ebuild
new file mode 100644
index 000000000000..0b194f2965d3
--- /dev/null
+++ b/sci-libs/symengine/symengine-0.14.0-r2.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( {18..20} )
+LLVM_OPTIONAL=1
+
+inherit cmake llvm-r2 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}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="
+	boost debug ecm +flint llvm +mpc +mpfr openmp primesieve tcmalloc
+	test
+"
+REQUIRED_USE="
+	boost? ( !flint !mpc !mpfr )
+	llvm? ( ${LLVM_REQUIRED_USE} )
+	mpc? ( mpfr )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	boost? ( dev-libs/boost:= )
+	!boost? ( dev-libs/gmp:= )
+	debug? ( sys-libs/binutils-libs:= )
+	ecm? ( sci-mathematics/gmp-ecm:= )
+	flint? ( sci-mathematics/flint:= )
+	mpc? ( dev-libs/mpc:= )
+	mpfr? ( dev-libs/mpfr:= )
+	llvm? ( $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}=') )
+	primesieve? ( sci-mathematics/primesieve:= )
+	tcmalloc? ( dev-util/google-perftools )
+"
+DEPEND="
+	${RDEPEND}
+	dev-libs/cereal
+"
+
+PATCHES=(
+	# bug 957803, in git master
+	"${FILESDIR}/${P}-cmake4.patch"
+	# https://github.com/symengine/symengine/pull/2103
+	"${FILESDIR}/${P}-llvm.patch"
+)
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+	local int_class
+
+	if 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=(
+		-DINSTALL_CMAKE_DIR="${EPREFIX}/usr/$(get_libdir)/cmake/symengine"
+		-DINTEGER_CLASS=${int_class}
+		# not installed
+		-DBUILD_BENCHMARKS=OFF
+		# broken with out-of-tree builds
+		-DBUILD_DOXYGEN=OFF
+		-DBUILD_TESTS=$(usex test)
+		# -DWITH_ARB provided by flint >= 2
+		-DWITH_BFD=$(usex debug)
+		-DWITH_ECM=$(usex ecm)
+		-DWITH_FLINT=$(usex flint)
+		-DWITH_LLVM=$(usex llvm)
+		-DWITH_MPC=$(usex mpc)
+		-DWITH_MPFR=$(usex mpfr)
+		-DWITH_OPENMP=$(usex openmp)
+		-DWITH_PRIMESIEVE=$(usex primesieve)
+		-DWITH_PTHREAD=ON
+		-DWITH_SYMENGINE_ASSERT=$(usex debug)
+		-DWITH_SYMENGINE_THREAD_SAFE=ON
+		-DWITH_SYSTEM_CEREAL=ON
+		# TODO: package it
+		# -DWITH_SYSTEM_FASTFLOAT=ON
+		-DWITH_TCMALLOC=$(usex tcmalloc)
+	)
+	if use llvm; then
+		mycmakeargs+=(
+			-DLLVM_ROOT="$(get_llvm_prefix -d)"
+		)
+	fi
+
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/
@ 2025-07-20 17:11 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2025-07-20 17:11 UTC (permalink / raw
  To: gentoo-commits

commit:     b36910a5cad1e93e078fa512c1c4356212be0fca
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 20 17:05:54 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 20 17:11:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b36910a5

sci-libs/symengine: Fix LLVM dylib support in installed LLVM config

Closes: https://bugs.gentoo.org/960472
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../symengine/files/symengine-0.14.0-llvm.patch    | 41 ++++++++++++++++++++++
 ...0.14.0-r2.ebuild => symengine-0.14.0-r3.ebuild} |  1 +
 2 files changed, 42 insertions(+)

diff --git a/sci-libs/symengine/files/symengine-0.14.0-llvm.patch b/sci-libs/symengine/files/symengine-0.14.0-llvm.patch
index 3697088f9f9a..a18b9fe109b4 100644
--- a/sci-libs/symengine/files/symengine-0.14.0-llvm.patch
+++ b/sci-libs/symengine/files/symengine-0.14.0-llvm.patch
@@ -106,3 +106,44 @@ index fe06ebcc7..8ae3b4adf 100644
  }
  
  void LLVMVisitor::bvisit(const Pow &x)
+From 899a130e071768e76da8f749341b5303ca1ab6e9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 20 Jul 2025 19:02:16 +0200
+Subject: [PATCH] Fix LLVM dylib use in installed CMake config
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is a followup to #2075 that fixes linking against LLVM dylib
+in reverse dependencies of SymEngine (e.g. the Python package).
+Unfortunately, my original patch missed this second occurrence.
+
+Given that we permit overriding the dylib use via a cache variable
+and it is unlikely for a dylib install to suddenly become non-dylib
+let's store the value in the config file.
+
+Signed-off-by: Michał Górny <mgorny@gentoo.org>
+---
+ cmake/SymEngineConfig.cmake.in | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/SymEngineConfig.cmake.in b/cmake/SymEngineConfig.cmake.in
+index 8465298a7..45e46ed75 100644
+--- a/cmake/SymEngineConfig.cmake.in
++++ b/cmake/SymEngineConfig.cmake.in
+@@ -84,8 +84,13 @@ 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_LINKED_LLVM_DYLIB @WITH_LLVM_DYLIB@)
++    if (SYMENGINE_LINKED_LLVM_DYLIB)
++        set(llvm_libs LLVM)
++    else()
++        llvm_map_components_to_libnames(llvm_libs_direct ${SYMENGINE_LLVM_COMPONENTS})
++        llvm_expand_dependencies(llvm_libs ${llvm_libs_direct})
++    endif()
+     set(SYMENGINE_LIBRARIES ${SYMENGINE_LIBRARIES} ${llvm_libs})
+ else()
+     set(SYMENGINE_LLVM_INCLUDE_DIRS)

diff --git a/sci-libs/symengine/symengine-0.14.0-r2.ebuild b/sci-libs/symengine/symengine-0.14.0-r3.ebuild
similarity index 97%
rename from sci-libs/symengine/symengine-0.14.0-r2.ebuild
rename to sci-libs/symengine/symengine-0.14.0-r3.ebuild
index 0b194f2965d3..b766a9c73065 100644
--- a/sci-libs/symengine/symengine-0.14.0-r2.ebuild
+++ b/sci-libs/symengine/symengine-0.14.0-r3.ebuild
@@ -50,6 +50,7 @@ PATCHES=(
 	# bug 957803, in git master
 	"${FILESDIR}/${P}-cmake4.patch"
 	# https://github.com/symengine/symengine/pull/2103
+	# https://github.com/symengine/symengine/pull/2119
 	"${FILESDIR}/${P}-llvm.patch"
 )
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-07-20 17:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08  5:06 [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2025-07-20 17:11 Michał Górny
2025-07-20 16:48 Michał Górny
2025-06-30 18:46 Andreas Sturmlechner
2023-12-25  7:06 Michał Górny
2021-03-13  9:42 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox