From 4e34ea65c2067ff564282165c627e2b3495ed12f Mon Sep 17 00:00:00 2001 From: Arthur Taylor Date: Tue, 23 Apr 2024 22:59:51 -0700 Subject: [PATCH 1/2] build-sys: If X11 is found set HAVE_X11 for client-only builds. Fix an issue where HAVE_X11 was only set for builds including the daemon. This in effect disabled all X11 code from being used while still building it and linking to X11 libraries. --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 1aec95adc..530c24bdb 100644 --- a/meson.build +++ b/meson.build @@ -621,6 +621,11 @@ if libsystemd_dep.found() endif x11_dep = dependency('x11-xcb', required : get_option('x11')) +if x11_dep.found() + # Base X11 dependencies + xcb_dep = dependency('xcb', required : true, version : '>= 1.6') + cdata.set('HAVE_X11', 1) +endif # OSS support if cc.has_header('sys/soundcard.h', required: get_option('oss-output')) @@ -751,11 +756,10 @@ if get_option('daemon') endif if x11_dep.found() - xcb_dep = dependency('xcb', required : true, version : '>= 1.6') + # Additional X11 dependencies required by x11-modules ice_dep = dependency('ice', required : true) sm_dep = dependency('sm', required : true) xtst_dep = dependency('xtst', required : true) - cdata.set('HAVE_X11', 1) if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep) cdata.set('HAVE_XSETIOERROREXITHANDLER', 1) endif From 1c5007eb285ee7eeb510fdf4a6c90ed1d4d4f09a Mon Sep 17 00:00:00 2001 From: Arthur Taylor Date: Tue, 23 Apr 2024 23:02:54 -0700 Subject: [PATCH 2/2] man: Don't install man page for start-pulseaudio-x11 if X11 is disabled. Fixes https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/444 --- man/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/man/meson.build b/man/meson.build index d72b3cf96..635e47e46 100644 --- a/man/meson.build +++ b/man/meson.build @@ -10,8 +10,13 @@ if get_option('daemon') ['pulse-cli-syntax', '5'], ['pulse-daemon.conf', '5'], ['pulseaudio', '1'], - ['start-pulseaudio-x11', '1'], ] + + if x11_dep.found() + manpages += [ + ['start-pulseaudio-x11', '1'], + ] + endif endif if get_option('client')