Skip to content

Commit

Permalink
meson: Fix setting of D-Bus path variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsga committed Jul 1, 2024
1 parent 0db31de commit 56d5bf5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1149,12 +1149,16 @@ endif
#

dbus_daemon_path = get_option('with-dbus-daemon-path')
dbus_daemonpath = ''

if dbus_daemon_path != ''
dbus_daemonpath += dbus_daemon_path
cdata.set('DBUS_DAEMON_PATH', '"' + dbus_daemon_path + '"')
elif host_os == 'darwin'
dbus_daemonpath += bindir / 'dbus-daemon'
cdata.set('DBUS_DAEMON_PATH', '"' + bindir / 'dbus-daemon' + '"')
else
dbus_daemonpath += '/bin/dbus-daemon'
cdata.set('DBUS_DAEMON_PATH', '"/bin/dbus-daemon"')
endif

Expand All @@ -1163,13 +1167,14 @@ endif
#

dbus_sysconf_path = get_option('with-dbus-sysconf-path')
dbus_sysconfpath = ''

if dbus_sysconf_path != ''
dbus_sysconfpath += dbus_sysconf_path
cdata.set('DBUS_SYS_DIR', '"' + dbus_sysconf_path + '"')
elif host_os == 'darwin'
cdata.set('DBUS_SYS_DIR', '"' + pkgconfdir + '/dbus-1/system.d' + '"')
else
cdata.set('DBUS_SYS_DIR', '"/etc/dbus-1/system.d"')
dbus_sysconfpath += pkgconfdir / 'dbus-1/system.d'
cdata.set('DBUS_SYS_DIR', '"' + pkgconfdir + '/dbus-1/system.d' + '"')
endif

#
Expand Down Expand Up @@ -2152,8 +2157,8 @@ endif
summary(summary_info, bool_yn: true, section: ' Options:')

summary_info = {
' dbus daemon path': dbus_daemon_path,
' dbus system directory': dbus_sysconf_path,
' dbus daemon path': dbus_daemonpath,
' dbus system directory': dbus_sysconfpath,
' init directory': init_dir,
' Netatalk lockfile': lockfile,
}
Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ option(
option(
'with-dbus-sysconf-path',
type: 'string',
value: '/etc/dbus-1/system.d',
value: '',
description: 'Set path to D-Bus system bus security configuration directory',
)
option(
Expand Down

0 comments on commit 56d5bf5

Please sign in to comment.