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@emersion.fr>
This commit is contained in:
Simon Ser 2023-01-27 15:57:14 +01:00 committed by Olivier Fourdan
parent 0c93394d72
commit c06ba33280
2 changed files with 23 additions and 35 deletions

View File

@ -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(

View File

@ -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