xserver: Branch 'master' - 4 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 15 17:16:55 UTC 2019


 configure.ac            |    8 +++++++-
 hw/xwayland/meson.build |    2 +-
 include/meson.build     |    2 +-
 meson.build             |   34 +++++++++++++++++++++++-----------
 miext/sync/meson.build  |    2 +-
 5 files changed, 33 insertions(+), 15 deletions(-)

New commits:
commit aed62f8fbea3f618f97ee0105b2d430c8cddf8f5
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Aug 1 13:34:13 2019 +0200

    meson/xwayland: No libdrm nor epoxy without glamor
    
    When building Xwayland with neither DRI nor GLamor support enabled with
    the Meson build system, the resulting binary would still link against
    libdrm and epoxy even though those are not used/needed.
    
    Make sure we require and link against libdrm and epoxy only if needed.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/include/meson.build b/include/meson.build
index 2c1b49e06..3c72e5bbb 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -94,7 +94,7 @@ conf_data.set('NEED_DBUS', build_systemd_logind or build_hal)
 conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd')
 
 conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found())
-conf_data.set('WITH_LIBDRM', libdrm_dep.found())
+conf_data.set('WITH_LIBDRM', libdrm_required)
 conf_data.set('GLAMOR_HAS_EGL_QUERY_DMABUF',
               epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4'))
 conf_data.set('GLXEXT', build_glx)
diff --git a/meson.build b/meson.build
index be3252a71..def32e9b9 100644
--- a/meson.build
+++ b/meson.build
@@ -192,14 +192,18 @@ if (host_machine.system() != 'darwin' and
     host_machine.system() != 'windows')
     if get_option('xwayland') != 'false'
         xwayland_required = get_option('xwayland') == 'true'
+        build_glamor = glamor_option == 'true' or glamor_option == 'auto'
 
         xwayland_dep = [
             dependency('wayland-client', version: wayland_req, required: xwayland_required),
             dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required),
-            dependency('libdrm', version: libdrm_req, required: xwayland_required),
-            dependency('epoxy', required: xwayland_required),
         ]
 
+        if build_glamor
+            xwayland_dep += dependency('libdrm', version: libdrm_req, required: xwayland_required)
+            xwayland_dep += dependency('epoxy', required: xwayland_required)
+        endif
+
         build_xwayland = true
         # check for all the deps being found, to handle 'auto' mode.
         foreach d: xwayland_dep
@@ -309,7 +313,7 @@ module_dir = join_paths(get_option('libdir'), get_option('module_dir'))
 if glamor_option == 'auto'
     build_glamor = build_xorg or build_xwayland
 else
-    build_glamor = get_option('glamor') == 'true'
+    build_glamor = glamor_option == 'true'
 endif
 
 gbm_dep = dependency('', required: false)
commit e8a85ba818a82d8c5acacc53dfc4fdfff573ae90
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Aug 1 13:28:48 2019 +0200

    meson: Build miext/sync for Xwayland
    
    When using the Meson build system, miext/sync would be build only for
    dri3.
    
    As a result, when building with Meson without DRI3 enabled, Xwayland
    would fail to link because `miSyncShmScreenInit()` is nowhere to be
    found.
    
    Make sure to build miext/sync for either DRI3 or Xwayland.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/miext/sync/meson.build b/miext/sync/meson.build
index 8b7ee4dba..182a4aef4 100644
--- a/miext/sync/meson.build
+++ b/miext/sync/meson.build
@@ -10,7 +10,7 @@ hdrs_miext_sync = [
     'misyncstr.h',
 ]
 
-if build_dri3
+if build_dri3 or build_xwayland
     srcs_miext_sync += 'misyncshm.c'
 endif
 
commit c0bbc29ae59737ea0e55fd9c8b65133010d32b80
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Aug 1 09:48:59 2019 +0200

    meson: Move requirements in a single place
    
    Some modules are required in multiple places in the meson file.
    
    Move the actual requirements to the top of the file as a variable so
    that updating a version does not require changing the actual value in
    multiple places.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
index c8746e591..9e149ae7e 100644
--- a/hw/xwayland/meson.build
+++ b/hw/xwayland/meson.build
@@ -12,7 +12,7 @@ srcs = [
 scanner_dep = dependency('wayland-scanner', native: true)
 scanner = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
 
-protocols_dep = dependency('wayland-protocols', version: '>= 1.8')
+protocols_dep = dependency('wayland-protocols', version: wayland_protocols_req)
 protodir = protocols_dep.get_pkgconfig_variable('pkgdatadir')
 
 pointer_xml = join_paths(protodir, 'unstable', 'pointer-constraints', 'pointer-constraints-unstable-v1.xml')
diff --git a/meson.build b/meson.build
index 639acad8a..be3252a71 100644
--- a/meson.build
+++ b/meson.build
@@ -58,6 +58,14 @@ endforeach
 
 add_global_arguments(common_wflags, language : ['c', 'objc'])
 
+libdrm_req = '>= 2.4.89'
+libselinux_req = '>= 2.0.86'
+xext_req = '>= 1.0.99.4'
+wayland_req = '>= 1.3.0'
+wayland_protocols_req = '>= 1.10'
+gbm_req = '>= 10.2'
+xf86dgaproto_req = '>= 2.0.99.1'
+
 xproto_dep = dependency('xproto', version: '>= 7.0.31')
 randrproto_dep = dependency('randrproto', version: '>= 1.6.0')
 renderproto_dep = dependency('renderproto', version: '>= 0.11')
@@ -186,9 +194,9 @@ if (host_machine.system() != 'darwin' and
         xwayland_required = get_option('xwayland') == 'true'
 
         xwayland_dep = [
-            dependency('wayland-client', version: '>= 1.3.0', required: xwayland_required),
-            dependency('wayland-protocols', version: '>= 1.10', required: xwayland_required),
-            dependency('libdrm', version: '>= 2.4.89', required: xwayland_required),
+            dependency('wayland-client', version: wayland_req, required: xwayland_required),
+            dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required),
+            dependency('libdrm', version: libdrm_req, required: xwayland_required),
             dependency('epoxy', required: xwayland_required),
         ]
 
@@ -209,7 +217,7 @@ if (host_machine.system() != 'darwin' and
         xnest_required = get_option('xnest') == 'true'
 
         xnest_dep = [
-            dependency('xext', version: '>= 1.0.99.4', required: xnest_required),
+            dependency('xext', version: xext_req, required: xnest_required),
             dependency('x11', required: xnest_required),
             dependency('xau', required: xnest_required),
         ]
@@ -307,7 +315,7 @@ endif
 gbm_dep = dependency('', required: false)
 epoxy_dep = dependency('', required: false)
 if build_glamor
-    gbm_dep = dependency('gbm', version: '>= 10.2', required: false)
+    gbm_dep = dependency('gbm', version: gbm_req, required: false)
     epoxy_dep = dependency('epoxy', required: false)
 endif
 
@@ -345,7 +353,7 @@ if build_glx
     build_hashtable = true
 endif
 
-libdrm_dep = dependency('libdrm', version: '>= 2.4.89', required: false)
+libdrm_dep = dependency('libdrm', version: libdrm_req, required: false)
 
 if get_option('dri1') == 'auto'
     build_dri1 = xf86driproto_dep.found() and libdrm_dep.found()
@@ -430,12 +438,12 @@ endif
 build_dga = false
 xf86dgaproto_dep = dependency('', required: false)
 if get_option('dga') == 'auto'
-    xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false)
+    xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: false)
     if xf86dgaproto_dep.found()
         build_dga = true
     endif
 elif get_option('dga') == 'true'
-    xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: true)
+    xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: true)
     build_dga = true
 endif
 
@@ -526,7 +534,7 @@ inc = include_directories(
 
 build_xselinux = false
 if get_option('xselinux') != 'false'
-    dep_selinux = dependency('libselinux', version: '>= 2.0.86',
+    dep_selinux = dependency('libselinux', version: libselinux_req,
 			     required: get_option('xselinux') == 'true')
     dep_audit = dependency('audit', required: get_option('xselinux') == 'true')
     if get_option('xselinux') == 'true'
commit bf758660c9c0e20abd141a1215e2e2b1ac342097
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Aug 1 13:39:47 2019 +0200

    configure/xwayland: No libdrm nor epoxy without glamor
    
    When building Xwayland without neither DRI nor GLamor support enabled
    with the autotools build system, the resulting binary would still link
    against libdrm and epoxy even though those are not used/needed.
    
    Make sure we require and link against libdrm and epoxy only if needed.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/configure.ac b/configure.ac
index 92b593acb..8b1d3982e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2297,10 +2297,16 @@ AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes])
 
 dnl Xwayland DDX
 
-XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.10 $LIBDRM epoxy"
+XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.10"
 if test "x$XF86VIDMODE" = xyes; then
 	XWAYLANDMODULES="$XWAYLANDMODULES $VIDMODEPROTO"
 fi
+if test "x$DRM" = xyes; then
+	XWAYLANDMODULES="$XWAYLANDMODULES $LIBDRM"
+fi
+if test "x$GLAMOR" = xyes; then
+	XWAYLANDMODULES="$XWAYLANDMODULES epoxy"
+fi
 PKG_CHECK_MODULES(XWAYLANDMODULES, [$XWAYLANDMODULES], [have_xwayland=yes], [have_xwayland=no])
 AC_MSG_CHECKING([whether to build Xwayland DDX])
 if test "x$XWAYLAND" = xauto; then


More information about the xorg-commit mailing list