- Switch to '%patch -P'

- Build with python 3.11 on Leap

OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.15/libqt5-qtwebengine?expand=0&rev=60
This commit is contained in:
Christophe Marin 2024-02-20 18:41:16 +00:00 committed by Git OBS Bridge
parent 0ee443fd52
commit 7f1d029bd4
2 changed files with 23 additions and 19 deletions

View File

@ -1,7 +1,8 @@
-------------------------------------------------------------------
Tue Feb 20 14:42:07 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Switch to '%autopatch' and '%patch -P'
- Switch to '%patch -P'
- Build with python 3.11 on Leap
-------------------------------------------------------------------
Wed Nov 22 09:44:27 UTC 2023 - christophe@krop.fr

View File

@ -20,10 +20,12 @@
%bcond_without system_minizip
%bcond_without pipewire
# The default python version is too old on Leap 15
%if 0%{?suse_version} < 1550
%bcond_without python39
%{?sle15_python_module_pythons}
%if 0%{?suse_version} == 1500
%define pyver python311
%else
%bcond_without python3
# latest
%define pyver python3
%endif
# spellchecking dictionary directory
@ -100,16 +102,9 @@ BuildRequires: perl-JSON
BuildRequires: pipewire-devel
%endif
BuildRequires: pkgconfig
%if %{with python3}
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-xml
%endif
%if %{with python39}
BuildRequires: python39
BuildRequires: python39-devel
BuildRequires: python39-xml
%endif
BuildRequires: %{pyver}
BuildRequires: %{pyver}-devel
BuildRequires: %{pyver}-xml
BuildRequires: re2c
BuildRequires: sed
BuildRequires: snappy-devel
@ -292,8 +287,16 @@ Recommends: libqt5-qtpdf-devel
Examples for the libqt5-qtpdf module.
%prep
# Leap's rpm doesn't understand '%%autopatch -M N' nor '%%autopatch X Y Z -p1'
%setup -q -n %{tar_version}
%autopatch 0 1 2 3 4 5 6 7 -p1
%patch -P0 -p1
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
%patch -P5 -p1
%patch -P6 -p1
%patch -P7 -p1
# Replace the whole catapult folder rather than picking individual changes
pushd src/3rdparty/chromium/third_party
@ -304,7 +307,7 @@ popd
# FFmpeg 5
%if %{with system_ffmpeg}
%if %{pkg_vcmp libavcodec-devel >= 5}
%if %{pkg_vcmp pkgconfig(libavcodec) >= 5}
%patch -P50 -p1
%endif
%endif
@ -321,9 +324,9 @@ sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \
%build
rm -r src/3rdparty/chromium/third_party/openh264/src
%if %{with python39}
sed -i 's#QMAKE_PYTHON = python3#QMAKE_PYTHON = python3.9#' mkspecs/features/functions.prf
sed -i 's#python3#python3.9#' configure.pri
%if "%{pyver}" == "python311"
sed -i 's#QMAKE_PYTHON = python3#QMAKE_PYTHON = python3.11#' mkspecs/features/functions.prf
sed -i 's#python3#python3.11#' configure.pri
%endif
%ifnarch x86_64