From 80525e0313f88fd311a369f9e934133d9c2b438844a4880c0cd6cd699fc62cae Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Wed, 7 Feb 2024 16:19:09 +0000 Subject: [PATCH 1/2] - Build using python3 rather than python2 - Spec cleanup OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kreport?expand=0&rev=41 --- kreport.changes | 6 ++++++ kreport.spec | 20 +++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/kreport.changes b/kreport.changes index 2457040..ab7295b 100644 --- a/kreport.changes +++ b/kreport.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 7 16:18:08 UTC 2024 - Christophe Marin + +- Build using python3 rather than python2 +- Spec cleanup + ------------------------------------------------------------------- Mon Jun 28 14:47:16 UTC 2021 - Wolfgang Bauer diff --git a/kreport.spec b/kreport.spec index 96aa324..4089730 100644 --- a/kreport.spec +++ b/kreport.spec @@ -1,7 +1,7 @@ # # spec file for package kreport # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,14 +22,12 @@ Version: 3.2.0 Release: 0 Summary: Framework for creation and generation of reports License: LGPL-2.0-only -Group: Productivity/Office/Other URL: https://community.kde.org/KReport Source0: https://download.kde.org/stable/%{name}/src/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM Patch0: Fix-kexi-build-with-GCC-10.patch BuildRequires: extra-cmake-modules -BuildRequires: python-base -BuildRequires: update-desktop-files +BuildRequires: python3-base BuildRequires: cmake(KF5Config) BuildRequires: cmake(KF5CoreAddons) BuildRequires: cmake(KF5GuiAddons) @@ -42,25 +40,22 @@ BuildRequires: cmake(Qt5PrintSupport) BuildRequires: cmake(Qt5Qml) BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(Qt5Xml) -Recommends: %{name}-lang %description A framework for creation and generation of reports in multiple formats %package -n libKReport3-%{sover} Summary: The library for the Report Creation and generation Framework -Group: System/Libraries -Requires: %{name} >= %{version} +Requires: kreport >= %{version} %description -n libKReport3-%{sover} The main library for the Report creation and generation framework %package devel Summary: Development package for KReport -Group: Development/Libraries/KDE +Requires: libKReport3-%{sover} = %{version} Requires: cmake(KPropertyCore) Requires: cmake(Qt5Qml) -Requires: libKReport3-%{sover} = %{version} %description devel Development package for the Report Creation and Generation framework @@ -70,19 +65,22 @@ Development package for the Report Creation and Generation framework %prep %autosetup -p1 +sed -i 's#/usr/bin/env python$#/usr/bin/python3#' tools/sdc.py + %build %cmake_kf5 -d build + %cmake_build %install %kf5_makeinstall -C build + %find_lang %{name} %{name}.lang --all-name --with-qt # The pkgconfig files contain incorrect stuff rm %{buildroot}%{_libdir}/pkgconfig/KReport3.pc -%post -n libKReport3-%{sover} -p /sbin/ldconfig -%postun -n libKReport3-%{sover} -p /sbin/ldconfig +%ldconfig_scriptlets -n libKReport3-%{sover} %files -n libKReport3-%{sover} %license COPYING.LIB From 677a885203211449e94a22c62e91d1ab84253401c5908ae8e06ebd7920a02037 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Wed, 7 Feb 2024 16:25:02 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kreport?expand=0&rev=42 --- ...thon3-with-find_package-PythonInterp.patch | 30 +++++++++++++++++++ kreport.changes | 2 ++ kreport.spec | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 0001-Find-also-Python3-with-find_package-PythonInterp.patch diff --git a/0001-Find-also-Python3-with-find_package-PythonInterp.patch b/0001-Find-also-Python3-with-find_package-PythonInterp.patch new file mode 100644 index 0000000..3b161f0 --- /dev/null +++ b/0001-Find-also-Python3-with-find_package-PythonInterp.patch @@ -0,0 +1,30 @@ +From 792cf51f2e1f8850c425760e6aac87f68b4d6ad8 Mon Sep 17 00:00:00 2001 +From: "Friedrich W. H. Kossebau" +Date: Sun, 12 Jul 2020 15:01:04 +0200 +Subject: [PATCH] Find also Python3 with find_package(PythonInterp) + +At least with openSUSE TW searching with a version given seems to restrict +the versions accepted to the major version. +So if only python3 is available, searching for 2.6 yields no results. +Given 2.6 is stone-age old, we can assume any found version is good enough +these days +--- + cmake/modules/KDbCreateSharedDataClasses.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/modules/KDbCreateSharedDataClasses.cmake b/cmake/modules/KDbCreateSharedDataClasses.cmake +index dc5101d9..b764cb36 100644 +--- a/cmake/modules/KDbCreateSharedDataClasses.cmake ++++ b/cmake/modules/KDbCreateSharedDataClasses.cmake +@@ -23,7 +23,7 @@ macro(KDB_CREATE_SHARED_DATA_CLASSES) + list(GET _args 1 PREFIX) + list(REMOVE_AT _args 0 1) + # message(STATUS "OUTPUT_VAR: ${OUTPUT_VAR} ${_args}") +- find_package(PythonInterp 2.6) ++ find_package(PythonInterp) + set_package_properties(PythonInterp PROPERTIES DESCRIPTION "Python language interpreter" + URL "https://www.python.org" TYPE REQUIRED + PURPOSE "Required by the Shared Data Classes (SDC) tool") +-- +2.43.0 + diff --git a/kreport.changes b/kreport.changes index ab7295b..23d5bb9 100644 --- a/kreport.changes +++ b/kreport.changes @@ -3,6 +3,8 @@ Wed Feb 7 16:18:08 UTC 2024 - Christophe Marin - Build using python3 rather than python2 - Spec cleanup +- Add upstream change: + * 0001-Find-also-Python3-with-find_package-PythonInterp.patch ------------------------------------------------------------------- Mon Jun 28 14:47:16 UTC 2021 - Wolfgang Bauer diff --git a/kreport.spec b/kreport.spec index 4089730..4a54f0c 100644 --- a/kreport.spec +++ b/kreport.spec @@ -26,6 +26,8 @@ URL: https://community.kde.org/KReport Source0: https://download.kde.org/stable/%{name}/src/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM Patch0: Fix-kexi-build-with-GCC-10.patch +# PATCH-FIX-UPSTREAM -- find python3 +Patch1: 0001-Find-also-Python3-with-find_package-PythonInterp.patch BuildRequires: extra-cmake-modules BuildRequires: python3-base BuildRequires: cmake(KF5Config)