[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] build-sys: meson: Make module-console-kit optional

PulseAudio Marge Bot (@pulseaudio-merge-bot) gitlab at gitlab.freedesktop.org
Mon Jun 13 21:36:36 UTC 2022



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
823e46fb by Igor V. Kovalenko at 2022-06-13T21:33:29+00:00
build-sys: meson: Make module-console-kit optional

Default build configuration would fail to run on a system without systemd-logind
(or elogind) and without ConsoleKit daemon responding on dbus interface. Here,
module-console-kit would fail to initialize, preventing daemon from starting.

Make module-console-kit an optional build feature to allow opt-out.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/719>

- - - - -


3 changed files:

- meson.build
- meson_options.txt
- src/modules/meson.build


Changes:

=====================================
meson.build
=====================================
@@ -732,6 +732,10 @@ if get_option('daemon')
     cdata.set('HAVE_SYSTEMD_LOGIN', 1)
   endif
 
+  if get_option('consolekit').enabled()
+    assert(dbus_dep.found(), 'ConsoleKit requires D-Bus support')
+  endif
+
   tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
   if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
     cdata.set('HAVE_LIBWRAP', 1)
@@ -1001,6 +1005,7 @@ summary += [
   '  Enable HAL->udev compat:     @0@'.format(get_option('hal-compat')),
   'Enable systemd units:          @0@'.format(systemd_dep.found()),
   'Enable elogind:                @0@'.format(libelogind_dep.found()),
+  'Enable ConsoleKit:             @0@'.format(not get_option('consolekit').disabled() and dbus_dep.found()),
   'Enable TCP Wrappers:           @0@'.format(tcpwrap_dep.found()),
   'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
   'Database:                      @0@'.format(get_option('database')),


=====================================
meson_options.txt
=====================================
@@ -99,6 +99,9 @@ option('bluez5-native-headset',
 option('bluez5-ofono-headset',
        type : 'boolean',
        description : 'Optional oFono headset backend support (BlueZ 5)')
+option('consolekit',
+       type : 'feature', value : 'auto',
+       description : 'Optional ConsoleKit support')
 option('dbus',
        type : 'feature', value : 'auto',
        description : 'Optional D-Bus support')


=====================================
src/modules/meson.build
=====================================
@@ -130,7 +130,6 @@ endif
 
 if dbus_dep.found()
   all_modules += [
-    [ 'module-console-kit', 'module-console-kit.c', [], [], [dbus_dep] ],
     [ 'module-dbus-protocol',
       [ 'dbus/iface-card.c', 'dbus/iface-card.h',
 	'dbus/iface-card-profile.c', 'dbus/iface-card-profile.h',
@@ -147,6 +146,12 @@ if dbus_dep.found()
       [], [], [dbus_dep] ],
     [ 'module-rygel-media-server', 'module-rygel-media-server.c', [], [], [dbus_dep], libprotocol_http ],
   ]
+
+  if not get_option('consolekit').disabled()
+    all_modules += [
+      [ 'module-console-kit', 'module-console-kit.c', [], [], [dbus_dep] ],
+    ]
+  endif
 endif
 
 if fftw_dep.found()



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/823e46fba0742605f557b68cd591f61624b93966

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/823e46fba0742605f557b68cd591f61624b93966
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20220613/c3c7ecc1/attachment-0001.htm>


More information about the pulseaudio-commits mailing list