summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-05-09 02:22:44 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-05-09 02:25:52 +0200
commit187f24f2693e9b097caa749ea8f019109bf69db9 (patch)
treee45550a4926b987dff30055a7054d04d7ebe7556 /dev-libs/kopeninghours
parentmedia-gfx/digikam: Fix build with kde-apps/akonadi-22.04.0 (diff)
downloadgentoo-187f24f2693e9b097caa749ea8f019109bf69db9.tar.gz
gentoo-187f24f2693e9b097caa749ea8f019109bf69db9.tar.bz2
gentoo-187f24f2693e9b097caa749ea8f019109bf69db9.zip
dev-libs/kopeninghours: Rebase cmake patch on top of HEAD
Closes: https://bugs.gentoo.org/840002 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-libs/kopeninghours')
-rw-r--r--dev-libs/kopeninghours/files/kopeninghours-22.04.0-boostpython.patch79
-rw-r--r--dev-libs/kopeninghours/kopeninghours-22.04.0.ebuild2
2 files changed, 80 insertions, 1 deletions
diff --git a/dev-libs/kopeninghours/files/kopeninghours-22.04.0-boostpython.patch b/dev-libs/kopeninghours/files/kopeninghours-22.04.0-boostpython.patch
new file mode 100644
index 000000000000..d51fb7d45ff8
--- /dev/null
+++ b/dev-libs/kopeninghours/files/kopeninghours-22.04.0-boostpython.patch
@@ -0,0 +1,79 @@
+From fd7c2e1f3797c1a67dc6346dfcb192f042cb19e8 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sun, 11 Apr 2021 14:33:48 +0200
+Subject: [PATCH] Use FindPython3 w/ Python3_SITELIB, add
+ BOOSTPYTHON_VERSION_MAJOR_MINOR
+
+- Use BOOSTPYTHON_VERSION_MAJOR_MINOR to inject desired python target
+- Drop deprecated PythonLibs
+- Use FindPython3 with Python3_SITELIB for correct install location
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 16 +++++-----------
+ PyKOpeningHours/CMakeLists.txt | 10 ++++------
+ 2 files changed, 9 insertions(+), 17 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c50b40..a9a9328 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ # SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
+ # SPDX-License-Identifier: BSD-3-Clause
+
+-cmake_minimum_required(VERSION 3.5)
++cmake_minimum_required(VERSION 3.12)
+
+ # KDE Application Version, managed by release script
+ set (RELEASE_SERVICE_VERSION_MAJOR "22")
+@@ -56,22 +56,16 @@ set_package_properties(FLEX PROPERTIES PURPOSE "Lexer generator for parsing open
+ find_package(BISON REQUIRED)
+ set_package_properties(BISON PROPERTIES PURPOSE "Grammar generator for parsing opening hours expressions")
+
+-find_package(PythonLibs 3.6 MODULE)
+-if (PythonLibs_FOUND)
+- # Extract major/minor python version
+- string(REPLACE "." ";" VERSION_LIST ${PYTHONLIBS_VERSION_STRING})
+- list(GET VERSION_LIST 0 PYTHONLIBS_VERSION_MAJOR)
+- list(GET VERSION_LIST 1 PYTHONLIBS_VERSION_MINOR)
+-
+- # boost-python requires exact version number
+- find_package(Boost COMPONENTS python${PYTHONLIBS_VERSION_MAJOR}${PYTHONLIBS_VERSION_MINOR} MODULE)
+-endif()
++set(BOOSTPYTHON_VERSION_MAJOR_MINOR python36 CACHE STRING "Version of BoostPython to feed CMake's FindBoost")
++# boost-python requires exact version number
++find_package(Boost 1.70 COMPONENTS ${BOOSTPYTHON_VERSION_MAJOR_MINOR} MODULE)
+
+ add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
+ add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054400)
+ add_definitions(-DQT_NO_FOREACH)
+ add_subdirectory(src)
+ if (Boost_FOUND)
++ find_package(Python3 3.6 COMPONENTS Development)
+ add_subdirectory(PyKOpeningHours)
+ endif()
+
+diff --git a/PyKOpeningHours/CMakeLists.txt b/PyKOpeningHours/CMakeLists.txt
+index 771cedf..e755ea7 100644
+--- a/PyKOpeningHours/CMakeLists.txt
++++ b/PyKOpeningHours/CMakeLists.txt
+@@ -21,11 +21,9 @@ kde_target_enable_exceptions(PyKOpeningHours PRIVATE)
+ target_compile_definitions(PyKOpeningHours PRIVATE KOPENINGHOURS_VALIDATOR_ONLY)
+
+ # Set up the libraries and header search paths for this target
+-target_link_libraries(PyKOpeningHours PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} KOpeningHours)
+-target_include_directories(PyKOpeningHours PRIVATE ${Boost_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS})
++target_link_libraries(PyKOpeningHours PUBLIC Boost::${BOOSTPYTHON_VERSION_MAJOR_MINOR} ${Python3_LIBRARIES} KOpeningHours)
++target_include_directories(PyKOpeningHours PRIVATE ${Boost_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
+
+-set(_install_dir lib/python${PYTHONLIBS_VERSION_MAJOR}.${PYTHONLIBS_VERSION_MINOR}/site-packages)
+-
+-install(TARGETS PyKOpeningHours DESTINATION ${_install_dir}/PyKOpeningHours)
+-install(FILES PyKOpeningHours.pyi __init__.py DESTINATION ${_install_dir}/PyKOpeningHours)
++install(TARGETS PyKOpeningHours DESTINATION ${Python3_SITELIB}/PyKOpeningHours)
++install(FILES PyKOpeningHours.pyi __init__.py DESTINATION ${Python3_SITELIB}/PyKOpeningHours)
+
+--
+2.31.1
+
diff --git a/dev-libs/kopeninghours/kopeninghours-22.04.0.ebuild b/dev-libs/kopeninghours/kopeninghours-22.04.0.ebuild
index d773a36bdba2..627bb806459e 100644
--- a/dev-libs/kopeninghours/kopeninghours-22.04.0.ebuild
+++ b/dev-libs/kopeninghours/kopeninghours-22.04.0.ebuild
@@ -44,7 +44,7 @@ BDEPEND="
sys-devel/flex
"
-PATCHES=( "${FILESDIR}"/${PN}-21.03.90-boostpython.patch )
+PATCHES=( "${FILESDIR}"/${P}-boostpython.patch )
pkg_setup() {
ecm_pkg_setup