- 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
This commit is contained in:
Jonas Kvinge 2022-07-17 21:50:57 +00:00 committed by Git OBS Bridge
parent 319fc0065e
commit ea9f1aeb61
2 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Jul 17 21:49:21 UTC 2022 - Jonas Kvinge <jonaski@opensuse.org>
- Build with Qt 6 on openSUSE Leap 15.4 and higher
-------------------------------------------------------------------
Sun Jul 17 21:43:35 UTC 2022 - Jonas Kvinge <jonaski@opensuse.org>

View File

@ -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