commit:     9ea1afe1759197dc1d1e34e91b0da48e4a08e4f8
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 11 20:24:41 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jul 12 22:51:00 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=9ea1afe1

kde-apps/kig: Bypass upstream's FindBoostPython module w/ CMake's

Old patch was broken by upstream commit 1fdeff25f5f113f4567ab100da9df3f0f24c3ce8
and follow-ups.

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kig/files/kig-20.08.70-cmake-boostpython.patch | 91 ++++++++++++++++++++++
 kde-apps/kig/files/kig-4.12.0-boostpython.patch    | 18 -----
 kde-apps/kig/kig-20.08.49.9999.ebuild              |  7 +-
 kde-apps/kig/kig-9999.ebuild                       |  7 +-
 4 files changed, 99 insertions(+), 24 deletions(-)

diff --git a/kde-apps/kig/files/kig-20.08.70-cmake-boostpython.patch 
b/kde-apps/kig/files/kig-20.08.70-cmake-boostpython.patch
new file mode 100644
index 0000000000..bd0c13ad37
--- /dev/null
+++ b/kde-apps/kig/files/kig-20.08.70-cmake-boostpython.patch
@@ -0,0 +1,91 @@
+From 39bf05d48f899612dffa07c73ac276f52820a7c9 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Mon, 13 Jul 2020 00:41:25 +0200
+Subject: [PATCH] Use CMake's own FindBoost module to detect Boost Python
+
+Introduces BOOSTPYTHON_VERSION_MAJOR_MINOR for packaging.
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ CMakeLists.txt | 26 ++++++++++++--------------
+ 1 file changed, 12 insertions(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e65585fb..e07a4dc6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -51,7 +51,8 @@ endif()
+ 
+ include(KigConfigureChecks.cmake)
+ 
+-find_package(BoostPython)
++set(BOOSTPYTHON_VERSION_MAJOR_MINOR python37 CACHE STRING "Version of 
BoostPython to feed CMake's FindBoost")
++find_package(Boost 1.70 COMPONENTS ${BOOSTPYTHON_VERSION_MAJOR_MINOR})
+ 
+ add_subdirectory( doc )
+ add_subdirectory( icons )
+@@ -61,15 +62,15 @@ add_subdirectory( macros )
+ add_subdirectory( data )
+ add_subdirectory( pykig )
+ 
+-if(BoostPython_FOUND)
++if(Boost_FOUND)
++  find_package(PythonLibs 3 REQUIRED)
++  include_directories(${PYTHON_INCLUDE_DIRS})
+   add_subdirectory( scripting )
+   add_definitions(-DKIG_ENABLE_PYTHON_SCRIPTING)
+-endif(BoostPython_FOUND)
++endif()
+ 
+ set_package_properties(
+-   BoostPython PROPERTIES
+-   DESCRIPTION "Python scripting support in Boost"
+-   URL "https://www.boost.org/";
++   Boost PROPERTIES
+    TYPE OPTIONAL
+    PURPOSE "Kig can optionally use Boost.Python for Python scripting"
+ )
+@@ -85,9 +86,6 @@ 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)
+ 
+ # kigpart
+ 
+@@ -225,7 +223,7 @@ ki18n_wrap_ui(kigpart_PART_SRCS
+    misc/kigcoordinateprecisiondialog.ui
+ )
+ 
+-if(BoostPython_FOUND)
++if(Boost_FOUND)
+   set(kigpart_PART_SRCS ${kigpart_PART_SRCS}
+      modes/popup/scriptactionsprovider.cc
+      scripting/newscriptwizard.cc
+@@ -236,7 +234,7 @@ if(BoostPython_FOUND)
+   )
+ 
+   kde_source_files_enable_exceptions(scripting/python_scripter.cc)
+-endif(BoostPython_FOUND)
++endif()
+ 
+ 
+ add_library(kigpart MODULE ${kigpart_PART_SRCS})
+@@ -256,9 +254,9 @@ target_link_libraries(kigpart
+   ${KDE5_KUTILS_LIBS}
+ )
+ 
+-if(BoostPython_FOUND)
+-  target_link_libraries(kigpart ${BoostPython_LIBRARIES} 
${KDE5_KTEXTEDITOR_LIBS})
+-endif(BoostPython_FOUND)
++if(Boost_FOUND)
++  target_link_libraries(kigpart Boost::${BOOSTPYTHON_VERSION_MAJOR_MINOR} 
${PYTHON_LIBRARIES})
++endif()
+ 
+ if (Qt5XmlPatterns_FOUND)
+   target_link_libraries(kigpart Qt5::XmlPatterns)
+-- 
+2.27.0
+

diff --git a/kde-apps/kig/files/kig-4.12.0-boostpython.patch 
b/kde-apps/kig/files/kig-4.12.0-boostpython.patch
deleted file mode 100644
index 5173ba2cd7..0000000000
--- a/kde-apps/kig/files/kig-4.12.0-boostpython.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/cmake/modules/FindBoostPython.cmake 
b/cmake/modules/FindBoostPython.cmake
-index 2ccc161..02d9bf6 100644
---- a/cmake/modules/FindBoostPython.cmake
-+++ b/cmake/modules/FindBoostPython.cmake
-@@ -74,10 +74,10 @@ if(HAVE_BOOST_SHARED_PTR_HPP AND Boost_PYTHON_FOUND)
-     # Second try: try pkg-config way
-     find_package(PkgConfig)
-     if(PKG_CONFIG_FOUND)
--      set(PYTHON_VERSIONS 
"python;python2.7;python2.6;python2.5;python2.4;python2.3;python2.2")
-+      execute_process(COMMAND python -c "import sys; 
sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" 
OUTPUT_VARIABLE PYTHON_VERSIONS)
-       foreach(_pyver ${PYTHON_VERSIONS})
-         if(NOT BoostPython_INCLUDES OR NOT BoostPython_LIBS)
--          pkg_check_modules(${_pyver} QUIET ${_pyver})
-+          pkg_check_modules(_python python-${_pyver})
-           if(${_pyver}_FOUND)
-             cmake_push_check_state()
-             set(CMAKE_REQUIRED_INCLUDES  ${CMAKE_REQUIRED_INCLUDES}  
${${_pyver}_INCLUDE_DIRS})
-

diff --git a/kde-apps/kig/kig-20.08.49.9999.ebuild 
b/kde-apps/kig/kig-20.08.49.9999.ebuild
index c5cd0e7cfc..5c7ea7a80f 100644
--- a/kde-apps/kig/kig-20.08.49.9999.ebuild
+++ b/kde-apps/kig/kig-20.08.49.9999.ebuild
@@ -42,7 +42,7 @@ RDEPEND="${PYTHON_DEPS}
        geogebra? ( >=dev-qt/qtxmlpatterns-${QTMIN}:5 )
        scripting? (
                $(python_gen_cond_dep '
-                       >=dev-libs/boost-1.48:=[python,${PYTHON_MULTI_USEDEP}]
+                       >=dev-libs/boost-1.70:=[python,${PYTHON_MULTI_USEDEP}]
                ')
        )
 "
@@ -50,7 +50,7 @@ DEPEND="${RDEPEND}
        >=kde-frameworks/ktexteditor-${KFMIN}:5
 "
 
-PATCHES=( "${FILESDIR}"/${PN}-4.12.0-boostpython.patch )
+PATCHES=( "${FILESDIR}"/${PN}-20.08.70-cmake-boostpython.patch )
 
 pkg_setup() {
        python-single-r1_pkg_setup
@@ -64,8 +64,9 @@ src_prepare() {
 
 src_configure() {
        local mycmakeargs=(
+               -DBOOSTPYTHON_VERSION_MAJOR_MINOR=${EPYTHON}
                $(cmake_use_find_package geogebra Qt5XmlPatterns)
-               $(cmake_use_find_package scripting BoostPython)
+               $(cmake_use_find_package scripting Boost)
        )
 
        ecm_src_configure

diff --git a/kde-apps/kig/kig-9999.ebuild b/kde-apps/kig/kig-9999.ebuild
index c5cd0e7cfc..5c7ea7a80f 100644
--- a/kde-apps/kig/kig-9999.ebuild
+++ b/kde-apps/kig/kig-9999.ebuild
@@ -42,7 +42,7 @@ RDEPEND="${PYTHON_DEPS}
        geogebra? ( >=dev-qt/qtxmlpatterns-${QTMIN}:5 )
        scripting? (
                $(python_gen_cond_dep '
-                       >=dev-libs/boost-1.48:=[python,${PYTHON_MULTI_USEDEP}]
+                       >=dev-libs/boost-1.70:=[python,${PYTHON_MULTI_USEDEP}]
                ')
        )
 "
@@ -50,7 +50,7 @@ DEPEND="${RDEPEND}
        >=kde-frameworks/ktexteditor-${KFMIN}:5
 "
 
-PATCHES=( "${FILESDIR}"/${PN}-4.12.0-boostpython.patch )
+PATCHES=( "${FILESDIR}"/${PN}-20.08.70-cmake-boostpython.patch )
 
 pkg_setup() {
        python-single-r1_pkg_setup
@@ -64,8 +64,9 @@ src_prepare() {
 
 src_configure() {
        local mycmakeargs=(
+               -DBOOSTPYTHON_VERSION_MAJOR_MINOR=${EPYTHON}
                $(cmake_use_find_package geogebra Qt5XmlPatterns)
-               $(cmake_use_find_package scripting BoostPython)
+               $(cmake_use_find_package scripting Boost)
        )
 
        ecm_src_configure

Reply via email to