summaryrefslogtreecommitdiff
path: root/dev-libs/kopeninghours
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /dev-libs/kopeninghours
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'dev-libs/kopeninghours')
-rw-r--r--dev-libs/kopeninghours/Manifest4
-rw-r--r--dev-libs/kopeninghours/files/kopeninghours-21.03.90-boostpython.patch79
-rw-r--r--dev-libs/kopeninghours/kopeninghours-21.04.0.ebuild64
-rw-r--r--dev-libs/kopeninghours/metadata.xml8
4 files changed, 155 insertions, 0 deletions
diff --git a/dev-libs/kopeninghours/Manifest b/dev-libs/kopeninghours/Manifest
new file mode 100644
index 000000000000..5969f007c5a5
--- /dev/null
+++ b/dev-libs/kopeninghours/Manifest
@@ -0,0 +1,4 @@
+AUX kopeninghours-21.03.90-boostpython.patch 3513 BLAKE2B 165e1bc5770aee4d7990f06da47354104fafdf1993feee4d57f7580450b3d8e367f326555256026ed4859854e3ed4d30634ac07ea48099946693db19d0ca0002 SHA512 5cb98a4ca4dab9a33f63f4b77d391d21e2e017256a1ee011f30e509160288eb9cfb21938617b542e57f210848ebdc31f45d52fe4b6d7667c0c7f72ed889edf68
+DIST kopeninghours-21.04.0.tar.xz 62144 BLAKE2B ae90c941716f30bf36cdf46bf0d2d28eb17793b7c9b81773ec6694561e1254bad40dea64481f871ea2dc9f91765cf18a174c77d07113844d3088a1dad8b85550 SHA512 a074c5920439fcc18a4078dbb0df410555725f20d06bc8d9fb4f9c97613a55ae74077c600b77260d7b699e50badbdd0c086e43500e182ce25b1466ce00135b96
+EBUILD kopeninghours-21.04.0.ebuild 1272 BLAKE2B 83c420614611a1f731fc709f3bbf9af4686850eb7ee2f6f0ff5501a3232ba96522a1d97ca3ca3c303ebed32c19eb963408f630d1eaf5b930cf9315f03f1ba4c3 SHA512 804adeee1a7b2d6372086661ef79a3b85cbaa73f539425990296d5d07c8d7819a5f58e4c4f3062dae86fb071be46bf166ce6f4659fc21439dcd6c75b7c0dbb56
+MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3
diff --git a/dev-libs/kopeninghours/files/kopeninghours-21.03.90-boostpython.patch b/dev-libs/kopeninghours/files/kopeninghours-21.03.90-boostpython.patch
new file mode 100644
index 000000000000..939bcbcd9e37
--- /dev/null
+++ b/dev-libs/kopeninghours/files/kopeninghours-21.03.90-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 "21")
+@@ -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 ${PYTHON_INCLUDE_DIRS})
++target_link_libraries(PyKOpeningHours PUBLIC Boost::${BOOSTPYTHON_VERSION_MAJOR_MINOR} ${Python3_LIBRARIES} KOpeningHours)
++target_include_directories(PyKOpeningHours PRIVATE ${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-21.04.0.ebuild b/dev-libs/kopeninghours/kopeninghours-21.04.0.ebuild
new file mode 100644
index 000000000000..405678cd3d3d
--- /dev/null
+++ b/dev-libs/kopeninghours/kopeninghours-21.04.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_TEST="true"
+KDE_GEAR="true"
+PVCUT=$(ver_cut 1-3)
+KFMIN=5.80.0
+QTMIN=5.15.2
+PYTHON_COMPAT=( python3_{7,8,9} )
+inherit ecm kde.org python-single-r1
+
+DESCRIPTION="Library for parsing and evaluating OSM opening hours expressions"
+HOMEPAGE="https://api.kde.org/kopeninghours/html/index.html
+https://invent.kde.org/libraries/kopeninghours"
+
+LICENSE="LGPL-2+"
+SLOT="5"
+KEYWORDS="~amd64"
+IUSE="python"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ >=dev-libs/kpublictransport-${PVCUT}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=kde-frameworks/kholidays-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ sys-libs/zlib
+ python? (
+ $(python_gen_cond_dep '
+ >=dev-libs/boost-1.70:=[python,${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+"
+RDEPEND="${DEPEND}
+ ${PYTHON_DEPS}
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-21.03.90-boostpython.patch )
+
+pkg_setup() {
+ ecm_pkg_setup
+ python_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBOOSTPYTHON_VERSION_MAJOR_MINOR=${EPYTHON}
+ $(cmake_use_find_package python Boost)
+ )
+ ecm_src_configure
+}
+
+src_install() {
+ ecm_src_install
+ python_optimize
+}
diff --git a/dev-libs/kopeninghours/metadata.xml b/dev-libs/kopeninghours/metadata.xml
new file mode 100644
index 000000000000..2fdbf33d963d
--- /dev/null
+++ b/dev-libs/kopeninghours/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+ </maintainer>
+</pkgmetadata>