xserver: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 14 05:00:27 UTC 2023


 hw/xwayland/meson.build    |   51 +++++++++++++++++++++++++++++++--------------
 hw/xwayland/xwayland.pc.in |   20 -----------------
 2 files changed, 36 insertions(+), 35 deletions(-)

New commits:
commit 098fcedf576dc924b39861cbb4d94669426931a9
Author: Simon Ser <contact at emersion.fr>
Date:   Fri Jan 27 16:10:26 2023 +0100

    xwayland: override Meson dependency
    
    This allows developers to setup Xwayland as a subproject of a
    Wayland compositor, and have it correctly pick up the features
    advertised in the dependency variables.
    
    Signed-off-by: Simon Ser <contact at emersion.fr>

diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
index 593faaa5c..e24f39a75 100644
--- a/hw/xwayland/meson.build
+++ b/hw/xwayland/meson.build
@@ -159,6 +159,22 @@ xwayland_server = executable(
     install_dir: xwayland_path
 )
 
+xwayland_vars = [
+    'have_glamor=' + build_glamor.to_string(),
+    'have_eglstream=' + build_eglstream.to_string(),
+    'have_initfd=true',
+    'have_listenfd=true',
+    'have_verbose=true',
+    'have_terminate_delay=true',
+    'have_no_touch_pointer_emulation=true',
+    'have_force_xrandr_emulation=true',
+    'have_geometry=true',
+    'have_fullscreen=true',
+    'have_host_grab=true',
+    'have_decorate=' + have_libdecor.to_string(),
+    'have_byteswappedclients=true',
+]
+
 pkgconfig = import('pkgconfig')
 
 pkgconfig.generate(
@@ -168,20 +184,7 @@ pkgconfig.generate(
     variables: [
         'exec_prefix=${prefix}',
         'xwayland=' + xwayland_path + '/Xwayland',
-        'have_glamor=' + build_glamor.to_string(),
-        'have_eglstream=' + build_eglstream.to_string(),
-        'have_initfd=true',
-        'have_listenfd=true',
-        'have_verbose=true',
-        'have_terminate_delay=true',
-        'have_no_touch_pointer_emulation=true',
-        'have_force_xrandr_emulation=true',
-        'have_geometry=true',
-        'have_fullscreen=true',
-        'have_host_grab=true',
-        'have_decorate=' + have_libdecor.to_string(),
-        'have_byteswappedclients=true',
-    ],
+    ] + xwayland_vars,
 )
 
 xwayland_manpage = configure_file(
@@ -194,3 +197,13 @@ install_man(xwayland_manpage)
 datadir = join_paths(get_option('prefix'), get_option('datadir'))
 desktopdir = join_paths(datadir, 'applications')
 install_data('desktop/org.freedesktop.Xwayland.desktop', install_dir : desktopdir)
+
+if meson.version().version_compare('>= 0.56.0')
+    meson.override_find_program('Xwayland', xwayland_server)
+
+    meson.override_dependency('xwayland', declare_dependency(
+        variables: [
+            'xwayland=' + xwayland_server.full_path(),
+        ] + xwayland_vars,
+    ))
+endif
commit c06ba33280f0170dcba9569575062feec722a67a
Author: Simon Ser <contact at emersion.fr>
Date:   Fri Jan 27 15:57:14 2023 +0100

    xwayland: generate pkg-config file from Meson
    
    Remove the xwayland.pc.in file:
    
    - This avoids writing down each pkg-config variable twice: once in
      the Meson files to set the configuration data, once in the .pc.in
      file to print it.
    - We'll be able to re-use the same variables for use as a
      subproject.
    
    Signed-off-by: Simon Ser <contact at emersion.fr>

diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
index 6dddfd63e..593faaa5c 100644
--- a/hw/xwayland/meson.build
+++ b/hw/xwayland/meson.build
@@ -159,21 +159,29 @@ xwayland_server = executable(
     install_dir: xwayland_path
 )
 
-xwayland_data = configuration_data()
-xwayland_data.set('prefix', get_option('prefix'))
-xwayland_data.set('exec_prefix', '${prefix}')
-xwayland_data.set('PACKAGE_VERSION', meson.project_version())
-xwayland_data.set('xwayland_path', xwayland_path)
-xwayland_data.set('have_glamor', build_glamor ? 'true' : 'false')
-xwayland_data.set('have_eglstream', build_eglstream ? 'true' : 'false')
-xwayland_data.set('have_libdecor', have_libdecor ? 'true' : 'false')
-configure_file(
-    input: 'xwayland.pc.in',
-    output: 'xwayland.pc',
-    configuration: xwayland_data,
-    install_dir: join_paths(get_option('prefix'),
-                            get_option('libdir'),
-                            'pkgconfig'),
+pkgconfig = import('pkgconfig')
+
+pkgconfig.generate(
+    filebase: 'xwayland',
+    name: 'Xwayland',
+    description: 'X Server for Wayland',
+    variables: [
+        'exec_prefix=${prefix}',
+        'xwayland=' + xwayland_path + '/Xwayland',
+        'have_glamor=' + build_glamor.to_string(),
+        'have_eglstream=' + build_eglstream.to_string(),
+        'have_initfd=true',
+        'have_listenfd=true',
+        'have_verbose=true',
+        'have_terminate_delay=true',
+        'have_no_touch_pointer_emulation=true',
+        'have_force_xrandr_emulation=true',
+        'have_geometry=true',
+        'have_fullscreen=true',
+        'have_host_grab=true',
+        'have_decorate=' + have_libdecor.to_string(),
+        'have_byteswappedclients=true',
+    ],
 )
 
 xwayland_manpage = configure_file(
diff --git a/hw/xwayland/xwayland.pc.in b/hw/xwayland/xwayland.pc.in
deleted file mode 100644
index d65d52e51..000000000
--- a/hw/xwayland/xwayland.pc.in
+++ /dev/null
@@ -1,20 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-
-Name: Xwayland
-Description: X Server for Wayland
-Version: @PACKAGE_VERSION@
-xwayland=@xwayland_path@/Xwayland
-have_glamor=@have_glamor@
-have_eglstream=@have_eglstream@
-have_initfd=true
-have_listenfd=true
-have_verbose=true
-have_terminate_delay=true
-have_no_touch_pointer_emulation=true
-have_force_xrandr_emulation=true
-have_geometry=true
-have_fullscreen=true
-have_host_grab=true
-have_decorate=@have_libdecor@
-have_byteswappedclients=true


More information about the xorg-commit mailing list