From f9de24a2b001643264ae3011f9077574c89a1f1bea2d9c6c383c8d57c33218c0 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Thu, 9 Jan 2025 18:34:26 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/scribus?expand=0&rev=96 --- scribus.spec | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/scribus.spec b/scribus.spec index 813a590..f4ec846 100644 --- a/scribus.spec +++ b/scribus.spec @@ -19,6 +19,14 @@ %bcond_without podofo %bcond_without released + +%{?sle15_python_module_pythons} +%if 0%{?suse_version} > 1500 +%define pyver python3 +%else +%define pyver python311 +%endif + Name: scribus Version: 1.6.3 Release: 0 @@ -54,7 +62,7 @@ BuildRequires: libwpd-devel BuildRequires: libwpg-devel BuildRequires: libzmf-devel BuildRequires: pkgconfig -BuildRequires: python3-devel +BuildRequires: %{pyver}-devel BuildRequires: cmake(Qt5Core) >= 5.14.0 BuildRequires: cmake(Qt5Gui) BuildRequires: cmake(Qt5LinguistTools) @@ -80,8 +88,8 @@ BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(poppler) > 21.03.0 BuildRequires: pkgconfig(zlib) Requires: hicolor-icon-theme -Recommends: python3-Pillow -Recommends: python3-tk +Recommends: %{pyver}-Pillow +Recommends: %{pyver}-tk Recommends: scribus-doc # Not packaged anymore Provides: scribus-devel = %{version} @@ -112,7 +120,11 @@ find . -type f \( -iname \*.py -o -iname \*.cpp -o -iname \*.h \) -exec dos2unix # Unused test file still using QQC1 rm scribus/ui/qml/qtq_test1.qml +%if 0%{?suse_version} > 1500 find . \( -name "*.py" -o -name "*.html" \) -exec sed -i 's#/usr/bin/env python.*#/usr/bin/python3#' {} \; +%else +find . \( -name "*.py" -o -name "*.html" \) -exec sed -i 's#/usr/bin/env python.*#/usr/bin/python3.11#' {} \; +%endif %build # Don't use the %%cmake macro, it causes crashes when starting scribus