diff --git a/Fix-linking-of-cadabra-module.patch b/Fix-linking-of-cadabra-module.patch index 88b47dd..cd3c25c 100644 --- a/Fix-linking-of-cadabra-module.patch +++ b/Fix-linking-of-cadabra-module.patch @@ -1,23 +1,26 @@ -From 71a406f32a654d2037b1d011f44af3fce4d9b50d Mon Sep 17 00:00:00 2001 +From 4df3e7cba29a9bb25a70badbc9de8aeef3693933 Mon Sep 17 00:00:00 2001 From: Kasper Peeters -Date: Fri, 13 Dec 2019 18:02:59 +0000 -Subject: [PATCH] Fix linking of cadabra module. +Date: Fri, 28 Aug 2020 21:12:58 +0100 +Subject: [PATCH] Link cadabra2.so to libpython.so if system requires it. --- - cmake/version.cmake | 2 +- - core/CMakeLists.txt | 7 +++++-- - 2 files changed, 6 insertions(+), 3 deletions(-) + core/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) -Index: cadabra2-2.3.0/core/CMakeLists.txt -=================================================================== ---- cadabra2-2.3.0.orig/core/CMakeLists.txt -+++ cadabra2-2.3.0/core/CMakeLists.txt -@@ -294,7 +294,7 @@ target_link_libraries(cadabra2 PRIVATE - ${GMPXX_LIBRARIES} - ${GMP_LIBRARIES} - ${Boost_LIBRARIES} --# ${PYTHON_LIBRARIES} -+ ${PYTHON_LIBRARIES} - # ${GLIBMM3_LIBRARIES} - ) +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index 1d4c9851da..71570db28f 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -305,6 +305,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set_target_properties(cadabra2 PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + target_link_libraries(cadabra2 PRIVATE ${PYTHON_LIBRARIES}) ++elseif(CMAKE_SHARED_LINKER_FLAGS MATCHES ".*-Wl,--no-undefined.*") ++ # Exception for systems that require no undefined symbols present ++ # in shared libraries (e.g. openSUSE). ++ message("-- Linking cadabra2.so to libpython.so because of default linker flags.") ++ target_link_libraries(cadabra2 PRIVATE ${PYTHON_LIBRARIES}) + endif() + if(ENABLE_SYSTEM_JSONCPP) + diff --git a/cadabra2.changes b/cadabra2.changes index 1bbc4c5..557d6ce 100644 --- a/cadabra2.changes +++ b/cadabra2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 28 20:52:48 UTC 2020 - Atri Bhattacharya + +- Refresh Fix-linking-of-cadabra-module.patch with fix for same + issue committed upstream [gh#kpeeters/cadabra2#202]. + ------------------------------------------------------------------- Thu Jul 9 22:19:27 UTC 2020 - Atri Bhattacharya diff --git a/cadabra2.spec b/cadabra2.spec index c5c93ac..9830afe 100644 --- a/cadabra2.spec +++ b/cadabra2.spec @@ -25,7 +25,7 @@ Group: Productivity/Scientific/Math URL: https://cadabra.science/ Source0: https://github.com/kpeeters/cadabra2/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: %{name}-gtk.appdata.xml -# PATCH-FIX-UPSTREAM -- https://github.com/kpeeters/cadabra2/commit/71a406f32a654d2037b1d011f44af3fce4d9b50d.patch (gh#kpeeters/cadabra2#202) +# PATCH-FIX-UPSTREAM -- https://github.com/kpeeters/cadabra2/commit/4df3e7cba29a9bb25a70badbc9de8aeef3693933 (gh#kpeeters/cadabra2#202) Patch2: Fix-linking-of-cadabra-module.patch # PATCH-FIX-UPSTREAM cadabra2-python-modules-location.patch gh#kpeeters/cadabra2#203 badshah400@gmail.com -- Move python modules to standard python modules path Patch3: cadabra2-python-modules-location.patch