From ea9f1aeb61bcedb3a466ad662faa9b515bd6ce67f3b2aa5fe2e3c91e8be4ca19 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 17 Jul 2022 21:50:57 +0000 Subject: [PATCH] - Build with Qt 6 on openSUSE Leap 15.4 and higher OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/strawberry?expand=0&rev=112 --- strawberry.changes | 5 +++++ strawberry.spec | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/strawberry.changes b/strawberry.changes index 8499be8..4a2927c 100644 --- a/strawberry.changes +++ b/strawberry.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jul 17 21:49:21 UTC 2022 - Jonas Kvinge + +- Build with Qt 6 on openSUSE Leap 15.4 and higher + ------------------------------------------------------------------- Sun Jul 17 21:43:35 UTC 2022 - Jonas Kvinge diff --git a/strawberry.spec b/strawberry.spec index ff5cf39..1cecb70 100644 --- a/strawberry.spec +++ b/strawberry.spec @@ -28,7 +28,11 @@ Source: https://files.strawberrymusicplayer.org/%{name}-%{version}.tar.x BuildRequires: appstream-glib BuildRequires: cmake BuildRequires: desktop-file-utils +%if 0%{?sle_version} == 150400 +BuildRequires: gcc11-c++ +%else BuildRequires: gcc-c++ +%endif BuildRequires: gettext BuildRequires: git BuildRequires: hicolor-icon-theme @@ -36,7 +40,7 @@ BuildRequires: libboost_headers-devel BuildRequires: make BuildRequires: pkgconfig BuildRequires: update-desktop-files -%if 0%{?suse_version} > 1530 +%if 0%{?sle_version} >= 150400 BuildRequires: cmake(Qt6Concurrent) BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6DBus) @@ -82,7 +86,7 @@ BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(sqlite3) >= 3.9 BuildRequires: pkgconfig(taglib) >= 1.11.1 -%if 0%{?suse_version} > 1530 +%if 0%{?sle_version} >= 150400 Requires: qt6-sql-sqlite %else Requires: libQt5Sql5-sqlite @@ -115,10 +119,14 @@ Features: %setup -q %build +%if 0%{?sle_version} == 150400 +export CC="gcc-11" +export CXX="g++-11" +%endif export CFLAGS="%{optflags} -fno-strict-aliasing" export CXXFLAGS="$CFLAGS" %cmake -DBUILD_WERROR=OFF \ -%if 0%{?suse_version} > 1530 +%if 0%{?sle_version} >= 150400 -DQT_MAJOR_VERSION=6 %else -DQT_MAJOR_VERSION=5