Accepting request 1245990 from KDE:Frameworks5

fix build with glibc 2.41. For staging:O

OBS-URL: https://build.opensuse.org/request/show/1245990
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kwayland?expand=0&rev=123
This commit is contained in:
Dominique Leuenberger 2025-02-16 21:37:19 +00:00 committed by Git OBS Bridge
commit 2968f901fe
3 changed files with 46 additions and 6 deletions

View File

@ -0,0 +1,36 @@
From fa0425714656919449a53e41c80ac9ad06d89193 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Sat, 1 Feb 2025 19:23:24 +0100
Subject: Only require Wayland Server component if needed
It is only required if building the server API, meaning
EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.74.0
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
CMakeLists.txt | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a177d29..6a71381 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,10 +51,11 @@ if (QT_MAJOR_VERSION STREQUAL "5")
pkg_check_modules(XKBCommon REQUIRED IMPORTED_TARGET xkbcommon)
endif()
-find_package(Wayland 1.15 COMPONENTS Client Server)
-set_package_properties(Wayland PROPERTIES
- TYPE REQUIRED
- )
+find_package(Wayland 1.15 REQUIRED COMPONENTS Client)
+
+if(EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.74.0)
+ find_package(Wayland 1.15 REQUIRED COMPONENTS Server)
+endif()
find_package(WaylandScanner)
--
2.48.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 14 15:56:01 UTC 2025 - Christophe Marin <christophe@krop.fr>
- Add patch from Gentoo (fixes build with glibc 2.41)
* kwayland-5.116.0-no-server.patch
-------------------------------------------------------------------
Mon May 6 11:33:13 UTC 2024 - Christophe Marin <christophe@krop.fr>

View File

@ -33,6 +33,8 @@ Source: %{name}-%{version}.tar.xz
Source1: %{name}-%{version}.tar.xz.sig
Source2: frameworks.keyring
%endif
# PATCH-FIX-OPENSUSE
Patch0: kwayland-5.116.0-no-server.patch
BuildRequires: extra-cmake-modules >= %{_kf5_version}
BuildRequires: fdupes
BuildRequires: libQt5Gui-private-headers-devel >= %{qt5_version}
@ -46,7 +48,6 @@ BuildRequires: cmake(Qt5WaylandClient) >= %{qt5_version}
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(wayland-client) >= 1.15.0
BuildRequires: pkgconfig(wayland-protocols)
BuildRequires: pkgconfig(wayland-server) >= 1.15.0
%requires_eq libQt5Gui5
Provides: libKF5WaylandClient5 = %{version}
Obsoletes: libKF5WaylandClient5 <= %{version}
@ -68,7 +69,8 @@ KWayland provides a Qt-style Client and Server library wrapper for the Wayland l
%autosetup -p1
%build
%cmake_kf5 -d build
%cmake_kf5 -d build -- -DEXCLUDE_DEPRECATED_BEFORE_AND_AT:STRING=5.74.0
%cmake_build
%install
@ -81,16 +83,12 @@ KWayland provides a Qt-style Client and Server library wrapper for the Wayland l
%{_kf5_debugdir}/*.categories
%{_kf5_debugdir}/*.renamecategories
%{_kf5_libdir}/libKF5WaylandClient.so.*
%{_kf5_libdir}/libKF5WaylandServer.so.*
%files devel
%{_kf5_includedir}/
%{_kf5_libdir}/cmake/KF5Wayland/
%{_kf5_libdir}/libKF5WaylandClient.so
%{_kf5_libdir}/libKF5WaylandServer.so
%{_kf5_libdir}/pkgconfig/KF5WaylandClient.pc
%{_kf5_mkspecsdir}/qt_KWaylandClient.pri
%{_kf5_mkspecsdir}/qt_KWaylandServer.pri
%{_libexecdir}/org-kde-kf5-kwayland-testserver
%changelog