diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-12-01 16:27:47 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-12-01 16:28:31 +0100 |
commit | 0893ead27549dc4163a7f86c4f333ed6e67187b5 (patch) | |
tree | ad665b360fc38cc9777a88d9ac040d11ff07ed80 /dev-lang | |
parent | app-emacs/vhdl-mode: remove unused patch (diff) | |
download | gentoo-0893ead27549dc4163a7f86c4f333ed6e67187b5.tar.gz gentoo-0893ead27549dc4163a7f86c4f333ed6e67187b5.tar.bz2 gentoo-0893ead27549dc4163a7f86c4f333ed6e67187b5.zip |
dev-lang/souffle: fix CMake threads for 918956
Closes: https://bugs.gentoo.org/918956
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/souffle/files/souffle-2.4.1-threads.patch | 34 | ||||
-rw-r--r-- | dev-lang/souffle/souffle-2.4.1.ebuild | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/dev-lang/souffle/files/souffle-2.4.1-threads.patch b/dev-lang/souffle/files/souffle-2.4.1-threads.patch new file mode 100644 index 000000000000..92e2ce79b409 --- /dev/null +++ b/dev-lang/souffle/files/souffle-2.4.1-threads.patch @@ -0,0 +1,34 @@ +Stolen from NixOS packages... later they removed the patch but looks +like this is what should fix bug https://bugs.gentoo.org/918956 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73d5c3c84..e4b0dbfd1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -104,13 +104,6 @@ option(SOUFFLE_CUSTOM_GETOPTLONG "Enable/Disable custom getopt_long implementati + cmake_dependent_option(SOUFFLE_USE_LIBCPP "Link to libc++ instead of libstdc++" ON + "CMAKE_CXX_COMPILER_ID STREQUAL Clang" OFF) + +-# Using Clang? Likely want to use `lld` too. +-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld") +- set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld") +- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld") +-endif() +- + # Add aditional modules to CMake + set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) + +@@ -247,7 +240,11 @@ endif() + # pthreads + # -------------------------------------------------- + set(THREADS_PREFER_PTHREAD_FLAG ON) +-find_package(Threads REQUIRED) ++set(CMAKE_THREAD_LIBS_INIT "-lpthread") ++set(CMAKE_HAVE_THREADS_LIBRARY 1) ++set(CMAKE_USE_WIN32_THREADS_INIT 0) ++set(CMAKE_USE_PTHREADS_INIT 1) ++set(THREADS_PREFER_PTHREAD_FLAG ON) + + # -------------------------------------------------- + # OpenMP diff --git a/dev-lang/souffle/souffle-2.4.1.ebuild b/dev-lang/souffle/souffle-2.4.1.ebuild index 5bf3f618cb58..9e2e1af841fc 100644 --- a/dev-lang/souffle/souffle-2.4.1.ebuild +++ b/dev-lang/souffle/souffle-2.4.1.ebuild @@ -52,6 +52,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}/${PN}-2.4.1-ncurses.patch" + "${FILESDIR}/${PN}-2.4.1-threads.patch" ) pkg_pretend() { |