summaryrefslogtreecommitdiff
path: root/sci-libs/symengine/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sci-libs/symengine/files
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sci-libs/symengine/files')
-rw-r--r--sci-libs/symengine/files/symengine-0.7.0-boost-1.77.patch19
-rw-r--r--sci-libs/symengine/files/symengine-0.8.1-fix_llvm.patch68
-rw-r--r--sci-libs/symengine/files/symengine-0.9.0-pthread-cmake.patch63
3 files changed, 131 insertions, 19 deletions
diff --git a/sci-libs/symengine/files/symengine-0.7.0-boost-1.77.patch b/sci-libs/symengine/files/symengine-0.7.0-boost-1.77.patch
deleted file mode 100644
index c4d6dc28e8f8..000000000000
--- a/sci-libs/symengine/files/symengine-0.7.0-boost-1.77.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-https://github.com/symengine/symengine/commit/ceae675dccd593f119f3010d46e133de74fc01bc
-https://bugs.gentoo.org/808057
-
-From: Liam Keegan <liam@keegan.ch>
-Date: Mon, 31 May 2021 21:31:02 +0200
-Subject: [PATCH] use list initialization for int parameter since type depends
- on boost version
-
---- a/symengine/mp_boost.cpp
-+++ b/symengine/mp_boost.cpp
-@@ -279,7 +279,7 @@ unsigned long mp_scan1(const integer_class &i)
- if (i == 0) {
- return ULONG_MAX;
- }
-- return find_lsb(i, int_<0>());
-+ return find_lsb(i, {});
- }
-
- // define simple 2x2 matrix with exponentiation by repeated squaring
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
new file mode 100644
index 000000000000..810e2ac766d7
--- /dev/null
+++ b/sci-libs/symengine/files/symengine-0.8.1-fix_llvm.patch
@@ -0,0 +1,68 @@
+From: Matthias Maier <tamiko@43-1.org>
+Date: Sat, 11 Jun 2022 01:44:54 -0500
+Subject: [PATCH] Fix cmake configure for shared LLVM libraries
+
+Gentoo builds LLVM into a combined shared library. The CMake
+configuration shipped with LLVM is evidently broken in this case, see
+
+ https://github.com/llvm/llvm-project/issues/34593
+ https://bugs.gentoo.org/745915
+
+We work around this issue by simply linking against the monolithic
+"LLVM" target.
+---
+ CMakeLists.txt | 23 +----------------------
+ 1 file changed, 1 insertion(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cf5ab3b..dfa6605 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -402,28 +402,7 @@ if (WITH_LLVM)
+ endforeach()
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
+
+- llvm_map_components_to_libnames(llvm_libs_direct ${SYMENGINE_LLVM_COMPONENTS})
+- llvm_expand_dependencies(llvm_libs ${llvm_libs_direct})
+-
+- if (BUILD_SHARED_LIBS)
+- set(SYMENGINE_LLVM_LINK_DOWNSTREAM_DEFAULT False)
+- foreach(LLVM_LIB ${llvm_libs})
+- get_target_property(${LLVM_LIB}_IMPORT_LOCATION ${LLVM_LIB} LOCATION)
+- if (NOT "${${LLVM_LIB}_IMPORT_LOCATION}" MATCHES "NOTFOUND")
+- if (NOT "${${LLVM_LIB}_IMPORT_LOCATION}" MATCHES ".a$|.lib$")
+- set(SYMENGINE_LLVM_LINK_DOWNSTREAM_DEFAULT True)
+- endif()
+- endif()
+- endforeach()
+- else()
+- set(SYMENGINE_LLVM_LINK_DOWNSTREAM_DEFAULT True)
+- endif()
+- set(SYMENGINE_LLVM_LINK_DOWNSTREAM ${SYMENGINE_LLVM_LINK_DOWNSTREAM_DEFAULT}
+- CACHE INTERNAL "Link to llvm in SymEngineConfig.cmake")
+- if (NOT SYMENGINE_LLVM_LINK_DOWNSTREAM)
+- unset(SYMENGINE_LLVM_COMPONENTS)
+- endif ()
+- set(LIBS ${LIBS} ${llvm_libs})
++ set(LIBS ${LIBS} LLVM)
+ 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/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)
+