kig: update to 21.12.0.

This commit is contained in:
Piotr Wójcik 2021-12-30 01:50:08 +01:00
parent 396a6295cf
commit 69b2541681
2 changed files with 27 additions and 39 deletions

View file

@ -1,42 +1,29 @@
From 71dd9ed8fac3bb0ffba029271f1576256519397f Mon Sep 17 00:00:00 2001 From 1e8c1476d55d6d3d5651b4ac060960c68f53899e Mon Sep 17 00:00:00 2001
From: John Zimmermann <johnz@posteo.net> From: John Zimmermann <johnz@posteo.net>
Date: Sun, 23 Dec 2018 13:25:58 +0100 Date: Wed, 29 Dec 2021 12:54:31 +0100
Subject: [PATCH] fix boost python bindung with boost 1.67+ Subject: [PATCH] fix boost python bindung with boost 1.67+
--- ---
CMakeLists.txt | 37 +++++++--- CMakeLists.txt | 35 ++++++++++++++++++++++++-----------
cmake/modules/COPYING-CMAKE-SCRIPTS | 22 ------ 1 file changed, 24 insertions(+), 11 deletions(-)
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 diff --git a/CMakeLists.txt b/CMakeLists.txt
index 229d2723..f0138bf4 100644 index beed7bbb..ed94d104 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ find_package(KF5XmlGui 5.1 REQUIRED) @@ -51,7 +51,18 @@ endif()
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) include(KigConfigureChecks.cmake)
-find_package(BoostPython) -find_package(BoostPython)
+find_package(Boost) +find_package(Boost)
+find_package(PythonLibs 3.9) +find_package(PythonLibs 3.10)
+ +
+if(Boost_FOUND AND PYTHONLIBS_FOUND) +if(Boost_FOUND AND PYTHONLIBS_FOUND)
+ if(${Boost_VERSION} GREATER 106699) + if(${Boost_VERSION} GREATER 106699)
+ message("Searching for python boost") + message("Searching for python boost")
+ find_package(Boost COMPONENTS python39 REQUIRED) + find_package(Boost COMPONENTS python310 REQUIRED)
+ set(Boost_PYTHON_LIBRARY ${Boost_PYTHON38_LIBRARY}) + set(Boost_PYTHON_LIBRARY ${Boost_PYTHON310_LIBRARY})
+ else() + else()
+ find_package(Boost COMPONENTS python) + find_package(Boost COMPONENTS python)
+ endif() + endif()
@ -44,64 +31,65 @@ index 229d2723..f0138bf4 100644
add_subdirectory( doc ) add_subdirectory( doc )
add_subdirectory( icons ) add_subdirectory( icons )
@@ -52,10 +63,10 @@ add_subdirectory( macros ) @@ -61,10 +72,10 @@ add_subdirectory( macros )
add_subdirectory( data ) add_subdirectory( data )
add_subdirectory( pykig ) add_subdirectory( pykig )
-if(BoostPython_FOUND) -if(BoostPython_FOUND)
+if(Boost_PYTHON38_FOUND AND PYTHONLIBS_FOUND) +if(Boost_PYTHON310_FOUND AND PYTHONLIBS_FOUND)
add_subdirectory( scripting ) add_subdirectory( scripting )
add_definitions(-DKIG_ENABLE_PYTHON_SCRIPTING) add_definitions(-DKIG_ENABLE_PYTHON_SCRIPTING)
-endif(BoostPython_FOUND) -endif(BoostPython_FOUND)
+endif(Boost_PYTHON38_FOUND AND PYTHONLIBS_FOUND) +endif(Boost_PYTHON310_FOUND AND PYTHONLIBS_FOUND)
set_package_properties( set_package_properties(
BoostPython PROPERTIES BoostPython PROPERTIES
@@ -76,9 +87,10 @@ set_package_properties( @@ -85,9 +96,10 @@ set_package_properties(
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
include_directories( ${CMAKE_SOURCE_DIR}/modes ) include_directories( ${CMAKE_SOURCE_DIR}/modes )
-if(BoostPython_FOUND) -if(BoostPython_FOUND)
- include_directories(${BoostPython_INCLUDE_DIRS}) - include_directories(${BoostPython_INCLUDE_DIRS})
-endif(BoostPython_FOUND) -endif(BoostPython_FOUND)
+if(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND) +if(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
+ include_directories(${Boost_INCLUDE_DIRS}) + include_directories(${Boost_INCLUDE_DIRS})
+ include_directories(${PYTHON_INCLUDE_PATH}) + include_directories(${PYTHON_INCLUDE_PATH})
+endif(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND) +endif(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
# kigpart # kigpart
@@ -216,7 +228,7 @@ ki18n_wrap_ui(kigpart_PART_SRCS @@ -225,7 +237,7 @@ ki18n_wrap_ui(kigpart_PART_SRCS
misc/kigcoordinateprecisiondialog.ui misc/kigcoordinateprecisiondialog.ui
) )
-if(BoostPython_FOUND) -if(BoostPython_FOUND)
+if(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND) +if(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
set(kigpart_PART_SRCS ${kigpart_PART_SRCS} set(kigpart_PART_SRCS ${kigpart_PART_SRCS}
modes/popup/scriptactionsprovider.cc modes/popup/scriptactionsprovider.cc
scripting/newscriptwizard.cc scripting/newscriptwizard.cc
@@ -227,7 +239,7 @@ if(BoostPython_FOUND) @@ -236,7 +248,7 @@ if(BoostPython_FOUND)
) )
kde_source_files_enable_exceptions(scripting/python_scripter.cc) kde_source_files_enable_exceptions(scripting/python_scripter.cc)
-endif(BoostPython_FOUND) -endif(BoostPython_FOUND)
+endif(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND) +endif(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
add_library(kigpart MODULE ${kigpart_PART_SRCS}) add_library(kigpart MODULE ${kigpart_PART_SRCS})
@@ -247,9 +259,10 @@ target_link_libraries(kigpart @@ -258,9 +270,10 @@ target_link_libraries(kigpart
${KDE5_KUTILS_LIBS} ${KDE5_KUTILS_LIBS}
) )
-if(BoostPython_FOUND) -if(BoostPython_FOUND)
- target_link_libraries(kigpart ${BoostPython_LIBRARIES} ${KDE5_KTEXTEDITOR_LIBS}) - target_link_libraries(kigpart ${BoostPython_LIBRARIES} ${KDE5_KTEXTEDITOR_LIBS})
-endif(BoostPython_FOUND) -endif(BoostPython_FOUND)
+if(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND) +if(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
+ message("testing") + message("testing")
+ target_link_libraries(kigpart ${PYTHON_LIBRARIES} ${Boost_PYTHON_LIBRARY} ${KDE5_KTEXTEDITOR_LIBS}) + target_link_libraries(kigpart ${PYTHON_LIBRARIES} ${Boost_PYTHON_LIBRARY} ${KDE5_KTEXTEDITOR_LIBS})
+endif(Boost_PYTHON38_FOUND OR Boost_PYTHON_FOUND) +endif(Boost_PYTHON310_FOUND OR Boost_PYTHON_FOUND)
if (Qt5XmlPatterns_FOUND) if (Qt5XmlPatterns_FOUND)
target_link_libraries(kigpart Qt5::XmlPatterns) target_link_libraries(kigpart Qt5::XmlPatterns)
2.20.1 --
2.34.1

View file

@ -1,6 +1,6 @@
# Template file for 'kig' # Template file for 'kig'
pkgname=kig pkgname=kig
version=21.08.0 version=21.12.0
revision=1 revision=1
build_style=cmake build_style=cmake
hostmakedepends="extra-cmake-modules kcoreaddons kdoctools gettext hostmakedepends="extra-cmake-modules kcoreaddons kdoctools gettext
@ -11,4 +11,4 @@ maintainer="Piotr Wójcik <chocimier@tlen.pl>"
license="GPL-2.0-only" license="GPL-2.0-only"
homepage="https://www.kde.org/applications/education/kig/" homepage="https://www.kde.org/applications/education/kig/"
distfiles="${KDE_SITE}/release-service/${version}/src/kig-${version}.tar.xz" distfiles="${KDE_SITE}/release-service/${version}/src/kig-${version}.tar.xz"
checksum=495129efbbd53e1d54c8562398f5d50d658474bcf05388060902957d59e85cd4 checksum=8c763c66348ef8f3b1e99ff06df38210e21ba1eddb3cb19a80c63dcdd2b32702