From a53697e70e480d3452904eacd4bf5fbe1dc687ef Mon Sep 17 00:00:00 2001 From: b-aaz <85005689+b-aaz@users.noreply.github.com> Date: Sat, 20 Dec 2025 15:52:15 +0000 Subject: [PATCH] xfree86: meson: Use install_symlink function instead of a hack. This was a old hack used before Meson 0.61.0 added install_symlink, we are at the meson release 1.10.0 so it is safe to use the new proper function for this task. Also used the X server's executable name as the link target name, and as the SUID wrapper's name. Moved the minimum Meson version up to 0.61.0. Signed-off-by: b-aaz --- hw/xfree86/dixmods/meson.build | 6 +++--- hw/xfree86/drivers/input/inputtest/meson.build | 2 +- hw/xfree86/exa/meson.build | 2 +- hw/xfree86/fbdevhw/meson.build | 2 +- hw/xfree86/meson.build | 14 +++++++------- hw/xfree86/shadowfb/meson.build | 2 +- meson.build | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/xfree86/dixmods/meson.build b/hw/xfree86/dixmods/meson.build index e51e50797d..904ab6f53e 100644 --- a/hw/xfree86/dixmods/meson.build +++ b/hw/xfree86/dixmods/meson.build @@ -6,7 +6,7 @@ shared_module( c_args: [ xorg_c_args, wfb_args ], dependencies: common_dep, link_whole: libxserver_wfb, - link_with: e, + link_with: xserver_exec, install: true, install_dir: module_abi_dir, @@ -20,7 +20,7 @@ shared_module( c_args: xorg_c_args, dependencies: common_dep, link_whole: libxserver_miext_shadow, - link_with: e, + link_with: xserver_exec, install: true, install_dir: module_abi_dir, @@ -35,7 +35,7 @@ if build_glx c_args: [ xorg_c_args, glx_align64 ], dependencies: [ common_dep, dl_dep, dri_dep ], link_whole: libxserver_glx, - link_with: e, + link_with: xserver_exec, install: true, install_dir: join_paths(module_abi_dir, 'extensions') diff --git a/hw/xfree86/drivers/input/inputtest/meson.build b/hw/xfree86/drivers/input/inputtest/meson.build index 93c5184954..424c7619f2 100644 --- a/hw/xfree86/drivers/input/inputtest/meson.build +++ b/hw/xfree86/drivers/input/inputtest/meson.build @@ -14,7 +14,7 @@ shared_module( install: true, install_dir: join_paths(module_abi_dir, 'input'), - link_with: e, + link_with: xserver_exec, ) install_man(configure_file( diff --git a/hw/xfree86/exa/meson.build b/hw/xfree86/exa/meson.build index 8d54170a03..471f91dae3 100644 --- a/hw/xfree86/exa/meson.build +++ b/hw/xfree86/exa/meson.build @@ -2,7 +2,7 @@ xorg_exa = shared_module('exa', 'examodule.c', include_directories: [inc, xorg_inc], dependencies: common_dep, - link_with: [libxserver_exa, e], + link_with: [libxserver_exa, xserver_exec], c_args: xorg_c_args, install: true, install_dir: module_abi_dir, diff --git a/hw/xfree86/fbdevhw/meson.build b/hw/xfree86/fbdevhw/meson.build index f17dd94963..4efab85136 100644 --- a/hw/xfree86/fbdevhw/meson.build +++ b/hw/xfree86/fbdevhw/meson.build @@ -11,7 +11,7 @@ shared_module('fbdevhw', c_args: xorg_c_args, install: true, install_dir: module_abi_dir, - link_with: e, + link_with: xserver_exec, ) install_data('fbdevhw.h', install_dir: xorgsdkdir) diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build index e2925e6a2d..6341418bf6 100644 --- a/hw/xfree86/meson.build +++ b/hw/xfree86/meson.build @@ -108,7 +108,7 @@ else xorg_install_dir = get_option('bindir') endif -e = executable( +xserver_exec = executable( 'Xorg', srcs_xorg, include_directories: [inc, xorg_inc], @@ -141,11 +141,11 @@ endif subdir('drivers') -meson.add_install_script( - 'sh', '-c', - 'ln -fs Xorg @0@@1@'.format( - '${DESTDIR}', - join_paths(get_option('prefix'), get_option('bindir'), 'X'))) +install_symlink( + 'X', + pointing_to: xserver_exec.name(), + install_dir: join_paths(get_option('prefix'), get_option('bindir')) + ) if get_option('suid_wrapper') executable('Xorg.wrap', @@ -170,7 +170,7 @@ if get_option('suid_wrapper') xorg_sh, install_mode: 'rwxr-xr-x', install_dir: join_paths(get_option('prefix'), get_option('bindir')), - rename: ['Xorg'] + rename: [xserver_exec.name()] ) endif diff --git a/hw/xfree86/shadowfb/meson.build b/hw/xfree86/shadowfb/meson.build index 138602089c..d5ddf598c0 100644 --- a/hw/xfree86/shadowfb/meson.build +++ b/hw/xfree86/shadowfb/meson.build @@ -5,7 +5,7 @@ shared_module('shadowfb', c_args: xorg_c_args, install: true, install_dir: module_abi_dir, - link_with: e, + link_with: xserver_exec, ) install_data('shadowfb.h', install_dir: xorgsdkdir) diff --git a/meson.build b/meson.build index 016e5ebd7c..3527729181 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project('xserver', 'c', 'c_std=gnu99', ], version: '25.0.0.7', - meson_version: '>= 0.58.0', + meson_version: '>= 0.61.0', ) release_date = '2025-07-29'