nixpkgs-suyu/pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

101 lines
3.2 KiB
Diff
Raw Normal View History

2020-10-25 02:58:42 +02:00
--- a/meson.build
+++ b/meson.build
@@ -67,6 +67,11 @@ datadir = join_paths(prefix, get_option('datadir'))
2020-10-25 02:58:42 +02:00
localedir = join_paths(prefix, get_option('localedir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
+if get_option('sysconfdir_install') != ''
+ sysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'))
+else
+ sysconfdir_install = sysconfdir
+endif
privlibdir = join_paths(libdir, 'pulseaudio')
if host_machine.system() == 'windows'
@@ -82,6 +87,11 @@ endif
2020-10-25 02:58:42 +02:00
pkgconfigdir = join_paths(libdir, 'pkgconfig')
pulselibexecdir = join_paths(libexecdir, 'pulse')
pulsesysconfdir = join_paths(sysconfdir, 'pulse')
+if get_option('sysconfdir_install') != ''
+ pulsesysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'), 'pulse')
+else
+ pulsesysconfdir_install = pulsesysconfdir
+endif
modlibexecdir = get_option('modlibexecdir')
if modlibexecdir == ''
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -72,6 +72,9 @@ option('bashcompletiondir',
2020-10-25 02:58:42 +02:00
option('zshcompletiondir',
type : 'string',
description : 'Directory for zsh completion scripts ["no" disables]')
+option('sysconfdir_install',
+ type: 'string', value: '',
+ description: 'sysconfdir to use during installation')
# Optional features
--- a/src/daemon/meson.build
+++ b/src/daemon/meson.build
@@ -52,7 +52,7 @@ if x11_dep.found()
output : '00-pulseaudio-x11',
configuration : conf,
install : true,
- install_dir : join_paths(sysconfdir, 'xdg', 'Xwayland-session.d'),
+ install_dir : join_paths(sysconfdir_install, 'xdg', 'Xwayland-session.d'),
)
desktop_file = i18n.merge_file(
@@ -61,7 +61,7 @@ if x11_dep.found()
2020-10-25 02:58:42 +02:00
po_dir : po_dir,
type : 'desktop',
install : true,
- install_dir : join_paths(sysconfdir, 'xdg', 'autostart'),
+ install_dir : join_paths(sysconfdir_install, 'xdg', 'autostart'),
)
desktop_utils = find_program('desktop-file-validate', required: false)
@@ -93,7 +93,7 @@ custom_target('daemon.conf',
2020-10-25 02:58:42 +02:00
command : [m4, '@INPUT@'],
build_by_default : true,
install : true,
- install_dir : pulsesysconfdir,
+ install_dir : pulsesysconfdir_install,
)
default_conf = configuration_data()
@@ -117,7 +117,7 @@ custom_target('default.pa',
2020-10-25 02:58:42 +02:00
command : [m4, '@INPUT@'],
build_by_default : true,
install : true,
- install_dir : pulsesysconfdir,
+ install_dir : pulsesysconfdir_install,
)
system_conf = configuration_data()
@@ -136,12 +136,12 @@ custom_target('system.pa',
2020-10-25 02:58:42 +02:00
command : [m4, '@INPUT@'],
build_by_default : true,
install : true,
- install_dir : pulsesysconfdir,
+ install_dir : pulsesysconfdir_install,
)
if dbus_dep.found()
install_data('pulseaudio-system.conf',
- install_dir : join_paths(sysconfdir, 'dbus-1', 'system.d')
+ install_dir : join_paths(sysconfdir_install, 'dbus-1', 'system.d')
)
endif
--- a/src/pulse/meson.build
+++ b/src/pulse/meson.build
@@ -134,5 +134,5 @@ client_conf_file = configure_file(
2020-10-25 02:58:42 +02:00
input : 'client.conf.in',
output : 'client.conf',
configuration : client_conf,
- install_dir : pulsesysconfdir,
+ install_dir : pulsesysconfdir_install,
)