Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / pulseaudio / add-option-for-installation-sysconfdir.patch
blob920c2593d2856968e250d890189ecdbbeb52638c
1 --- a/meson.build
2 +++ b/meson.build
3 @@ -67,6 +67,11 @@ datadir = join_paths(prefix, get_option('datadir'))
4 localedir = join_paths(prefix, get_option('localedir'))
5 localstatedir = join_paths(prefix, get_option('localstatedir'))
6 sysconfdir = join_paths(prefix, get_option('sysconfdir'))
7 +if get_option('sysconfdir_install') != ''
8 + sysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'))
9 +else
10 + sysconfdir_install = sysconfdir
11 +endif
12 privlibdir = join_paths(libdir, 'pulseaudio')
14 if host_machine.system() == 'windows'
15 @@ -82,6 +87,11 @@ endif
16 pkgconfigdir = join_paths(libdir, 'pkgconfig')
17 pulselibexecdir = join_paths(libexecdir, 'pulse')
18 pulsesysconfdir = join_paths(sysconfdir, 'pulse')
19 +if get_option('sysconfdir_install') != ''
20 + pulsesysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'), 'pulse')
21 +else
22 + pulsesysconfdir_install = pulsesysconfdir
23 +endif
25 modlibexecdir = get_option('modlibexecdir')
26 if modlibexecdir == ''
27 --- a/meson_options.txt
28 +++ b/meson_options.txt
29 @@ -72,6 +72,9 @@ option('bashcompletiondir',
30 option('zshcompletiondir',
31 type : 'string',
32 description : 'Directory for zsh completion scripts ["no" disables]')
33 +option('sysconfdir_install',
34 + type: 'string', value: '',
35 + description: 'sysconfdir to use during installation')
37 # Optional features
39 --- a/src/daemon/meson.build
40 +++ b/src/daemon/meson.build
41 @@ -52,7 +52,7 @@ if x11_dep.found()
42 output : '00-pulseaudio-x11',
43 configuration : conf,
44 install : true,
45 - install_dir : join_paths(sysconfdir, 'xdg', 'Xwayland-session.d'),
46 + install_dir : join_paths(sysconfdir_install, 'xdg', 'Xwayland-session.d'),
49 desktop_file = i18n.merge_file(
50 @@ -61,7 +61,7 @@ if x11_dep.found()
51 po_dir : po_dir,
52 type : 'desktop',
53 install : true,
54 - install_dir : join_paths(sysconfdir, 'xdg', 'autostart'),
55 + install_dir : join_paths(sysconfdir_install, 'xdg', 'autostart'),
58 desktop_utils = find_program('desktop-file-validate', required: false)
59 @@ -93,7 +93,7 @@ custom_target('daemon.conf',
60 command : [m4, '@INPUT@'],
61 build_by_default : true,
62 install : true,
63 - install_dir : pulsesysconfdir,
64 + install_dir : pulsesysconfdir_install,
67 default_conf = configuration_data()
68 @@ -117,7 +117,7 @@ custom_target('default.pa',
69 command : [m4, '@INPUT@'],
70 build_by_default : true,
71 install : true,
72 - install_dir : pulsesysconfdir,
73 + install_dir : pulsesysconfdir_install,
76 system_conf = configuration_data()
77 @@ -136,6 +136,6 @@ custom_target('system.pa',
78 command : [m4, '@INPUT@'],
79 build_by_default : true,
80 install : true,
81 - install_dir : pulsesysconfdir,
82 + install_dir : pulsesysconfdir_install,
85 --- a/src/pulse/meson.build
86 +++ b/src/pulse/meson.build
87 @@ -134,5 +134,5 @@ client_conf_file = configure_file(
88 input : 'client.conf.in',
89 output : 'client.conf',
90 configuration : client_conf,
91 - install_dir : pulsesysconfdir,
92 + install_dir : pulsesysconfdir_install,