dd9d4a1979
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
107 lines
3.4 KiB
Diff
107 lines
3.4 KiB
Diff
From 71dd9ed8fac3bb0ffba029271f1576256519397f Mon Sep 17 00:00:00 2001
|
|
From: John Zimmermann <johnz@posteo.net>
|
|
Date: Sun, 23 Dec 2018 13:25:58 +0100
|
|
Subject: [PATCH] fix boost python bindung with boost 1.67+
|
|
|
|
---
|
|
CMakeLists.txt | 37 +++++++---
|
|
cmake/modules/COPYING-CMAKE-SCRIPTS | 22 ------
|
|
cmake/modules/FindBoostPython.cmake | 110 ----------------------------
|
|
3 files changed, 25 insertions(+), 144 deletions(-)
|
|
delete mode 100644 cmake/modules/COPYING-CMAKE-SCRIPTS
|
|
delete mode 100644 cmake/modules/FindBoostPython.cmake
|
|
|
|
diff --git CMakeLists.txt CMakeLists.txt
|
|
index 229d2723..f0138bf4 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -18,7 +18,7 @@ find_package(KF5XmlGui 5.1 REQUIRED)
|
|
find_package(KF5Crash 5.15 REQUIRED)
|
|
find_package(KF5CoreAddons REQUIRED)
|
|
|
|
-set(CMAKE_MODULE_PATH ${kig_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
|
|
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
|
|
|
set (KDE5_ICON_DIR ${CMAKE_INSTALL_PREFIX}/share/icons)
|
|
|
|
@@ -40,7 +40,18 @@ endif()
|
|
|
|
include(KigConfigureChecks.cmake)
|
|
|
|
-find_package(BoostPython)
|
|
+find_package(Boost)
|
|
+find_package(PythonLibs 3.9)
|
|
+
|
|
+if(Boost_FOUND AND PYTHONLIBS_FOUND)
|
|
+ if(${Boost_VERSION} GREATER 106699)
|
|
+ message("Searching for python boost")
|
|
+ find_package(Boost COMPONENTS python39 REQUIRED)
|
|
+ set(Boost_PYTHON_LIBRARY ${Boost_PYTHON38_LIBRARY})
|
|
+ else()
|
|
+ find_package(Boost COMPONENTS python)
|
|
+ endif()
|
|
+endif(Boost_FOUND AND PYTHONLIBS_FOUND)
|
|
|
|
add_subdirectory( doc )
|
|
add_subdirectory( icons )
|
|
@@ -52,10 +63,10 @@ add_subdirectory( macros )
|
|
add_subdirectory( data )
|
|
add_subdirectory( pykig )
|
|
|
|
-if(BoostPython_FOUND)
|
|
+if(Boost_PYTHON38_FOUND AND PYTHONLIBS_FOUND)
|
|
add_subdirectory( scripting )
|
|
add_definitions(-DKIG_ENABLE_PYTHON_SCRIPTING)
|
|
-endif(BoostPython_FOUND)
|
|
+endif(Boost_PYTHON38_FOUND AND PYTHONLIBS_FOUND)
|
|
|
|
set_package_properties(
|
|
BoostPython PROPERTIES
|
|
@@ -76,9 +87,10 @@ set_package_properties(
|
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
|
|
include_directories( ${CMAKE_SOURCE_DIR}/modes )
|
|
-if(BoostPython_FOUND)
|
|
- include_directories(${BoostPython_INCLUDE_DIRS})
|
|
-endif(BoostPython_FOUND)
|
|
+if(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND)
|
|
+ include_directories(${Boost_INCLUDE_DIRS})
|
|
+ include_directories(${PYTHON_INCLUDE_PATH})
|
|
+endif(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND)
|
|
|
|
# kigpart
|
|
|
|
@@ -216,7 +228,7 @@ ki18n_wrap_ui(kigpart_PART_SRCS
|
|
misc/kigcoordinateprecisiondialog.ui
|
|
)
|
|
|
|
-if(BoostPython_FOUND)
|
|
+if(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND)
|
|
set(kigpart_PART_SRCS ${kigpart_PART_SRCS}
|
|
modes/popup/scriptactionsprovider.cc
|
|
scripting/newscriptwizard.cc
|
|
@@ -227,7 +239,7 @@ if(BoostPython_FOUND)
|
|
)
|
|
|
|
kde_source_files_enable_exceptions(scripting/python_scripter.cc)
|
|
-endif(BoostPython_FOUND)
|
|
+endif(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND)
|
|
|
|
|
|
add_library(kigpart MODULE ${kigpart_PART_SRCS})
|
|
@@ -247,9 +259,10 @@ target_link_libraries(kigpart
|
|
${KDE5_KUTILS_LIBS}
|
|
)
|
|
|
|
-if(BoostPython_FOUND)
|
|
- target_link_libraries(kigpart ${BoostPython_LIBRARIES} ${KDE5_KTEXTEDITOR_LIBS})
|
|
-endif(BoostPython_FOUND)
|
|
+if(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND)
|
|
+ message("testing")
|
|
+ target_link_libraries(kigpart ${PYTHON_LIBRARIES} ${Boost_PYTHON_LIBRARY} ${KDE5_KTEXTEDITOR_LIBS})
|
|
+endif(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND)
|
|
|
|
if (Qt5XmlPatterns_FOUND)
|
|
target_link_libraries(kigpart Qt5::XmlPatterns)
|
|
2.20.1
|
|
|