summaryrefslogtreecommitdiff
path: root/gnome-base/gnome-settings-daemon/files/3.24.3-fix-wayland-build.patch
blob: 4a06889aaa2327a4fb1a18144f386d66bed80063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 58403ad7677d98fbb14b020dc4d15c52a695496e Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Fri, 18 Aug 2017 09:42:56 +0200
Subject: [PATCH] Fix build issue when gudev is detected in the absence of
 wayland

See https://bugs.gentoo.org/show_bug.cgi?id=627966
---
 configure.ac               | 5 +++++
 plugins/common/Makefile.am | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 908b3a3a..c89d5e2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,15 +140,20 @@ AC_ARG_ENABLE(wayland,
         AS_HELP_STRING([--disable-wayland],[Disable wayland support (default: auto)]),
         enable_wayland=$enableval, enable_wayland=auto)
 if test x$enable_wayland != xno; then
+        AS_IF([test "$have_udev" = no],
+              [AC_MSG_ERROR([udev is required for Wayland support])])
+
         PKG_CHECK_MODULES(WAYLAND, wayland-client, have_wayland=yes, have_wayland=no)
         if test x$have_wayland = xyes; then
                 AC_DEFINE(HAVE_WAYLAND, 1, [Define if libwayland-client is available])
+		GUDEV_PKG="$GUDEV_PKG gdk-wayland-3.0"
         else
                 if test x$enable_wayland = xyes; then
                         AC_MSG_ERROR([Wayland enabled but not found])
                 fi
         fi
 fi
+AM_CONDITIONAL(HAVE_WAYLAND, test x$have_wayland = xyes)
 
 dnl ================================================================
 dnl Plugins
diff --git a/plugins/common/Makefile.am b/plugins/common/Makefile.am
index 107e4d3b..760f3198 100644
--- a/plugins/common/Makefile.am
+++ b/plugins/common/Makefile.am
@@ -40,7 +40,7 @@ libcommon_la_SOURCES = \
 	gsd-shell-helper.c	\
 	gsd-shell-helper.h
 
-if HAVE_GUDEV
+if HAVE_WAYLAND
 libcommon_la_SOURCES += \
 	gsd-device-manager-udev.c \
 	gsd-device-manager-udev.h
-- 
2.14.1