From e71f75b2be4ef113d2f7e31a07b67b34684173975c35e517e1f6837a46e94edd Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 19 Oct 2017 06:48:02 +0000 Subject: [PATCH] Accepting request 535058 from home:jayvdb:Qt5 - Allow building x11 subpackage on any distribution OBS-URL: https://build.opensuse.org/request/show/535058 OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/libxkbcommon?expand=0&rev=37 --- libxkbcommon.changes | 5 +++++ libxkbcommon.spec | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/libxkbcommon.changes b/libxkbcommon.changes index 06f392b..6df8acc 100644 --- a/libxkbcommon.changes +++ b/libxkbcommon.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 19 01:30:35 UTC 2017 - jayvdb@gmail.com + +- Allow building x11 subpackage on any distribution + ------------------------------------------------------------------- Mon Aug 7 16:29:12 UTC 2017 - jengelh@inai.de diff --git a/libxkbcommon.spec b/libxkbcommon.spec index 3819466..cd7aac7 100644 --- a/libxkbcommon.spec +++ b/libxkbcommon.spec @@ -15,6 +15,12 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%if ! 0%{?suse_version} || 0%{?suse_version} >= 1315 +%bcond_without x11 +%else +%bcond_with x11 +%endif + Name: libxkbcommon Version: 0.7.2 @@ -38,7 +44,7 @@ BuildRequires: xz BuildRequires: pkgconfig(xkeyboard-config) BuildRequires: pkgconfig(xorg-macros) >= 1.8 BuildRequires: pkgconfig(xproto) -%if 0%{?suse_version} >= 1315 +%if %{with x11} BuildRequires: pkgconfig(xcb-xkb) >= 1.10 %endif @@ -90,6 +96,7 @@ Wayland and kmscon. This package contains the development headers for the library found in libxkbcommon. +%if %{with x11} %package x11-devel Summary: Development files for the libxkbcommon-x11 library Group: Development/Libraries/C and C++ @@ -102,6 +109,7 @@ users make sense of their keyboard input. This package contains the development headers for the library found in %name-x11-0. +%endif %prep %setup -q @@ -110,7 +118,7 @@ in %name-x11-0. if [ ! -e configure ]; then NOCONFIGURE=1 ./autogen.sh; fi; -%if 0%{?suse_version} >= 1315 +%if %{with x11} extra_opts=--enable-x11 %else extra_opts=--disable-x11 @@ -137,20 +145,20 @@ rm -f "%buildroot/%_libdir"/*.la; %defattr(-,root,root) %doc LICENSE NEWS %_includedir/pkg/ -%if 0%{?suse_version} >= 1315 +%if %{with x11} %exclude %_includedir/pkg/%name/xkbcommon/xkbcommon-x11.h %endif %_libdir/libxkbcommon.so %_libdir/pkgconfig/xkbcommon.pc -%if 0%{?suse_version} >= 1315 +%if %{with x11} %files -n libxkbcommon-x11-0 %defattr(-,root,root) %doc LICENSE NEWS %_libdir/libxkbcommon-x11.so.* %endif -%if 0%{?suse_version} >= 1315 +%if %{with x11} %files x11-devel %defattr(-,root,root) %doc LICENSE NEWS