nixpkgs/pkgs/development/libraries/xdg-desktop-portal/installed-tests-path.patch
Bobby Rong c585543ccd xdg-desktop-portal: 1.16.0 → 1.17.0
https://github.com/flatpak/xdg-desktop-portal/compare/1.16.0...1.17.0
https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.17.0

Ported to meson. Some of the changes are highlighted in the
"Changes that might be relevant for distributors" session in
https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.18.0

Notably, desktop environments are now responsible for declaring preferred portal backends:
939f0b0fce

Specify sysconfdir so that the configs are loaded from `/etc` rather than `$out/etc`.

Changelog-reviewed-by: Bobby Rong <rjl931189261@126.com>
Changelog-reviewed-by: Jan Tojnar <jtojnar@gmail.com>
2023-11-21 08:41:43 +01:00

31 lines
1.1 KiB
Diff

diff --git a/meson.build b/meson.build
index b25f9ef..7975f85 100644
--- a/meson.build
+++ b/meson.build
@@ -40,8 +40,8 @@ if dataroot_dir == ''
dataroot_dir = datadir
endif
-installed_tests_dir = prefix / libexecdir / 'installed-tests' / meson.project_name()
-installed_tests_data_dir = prefix / datadir / 'installed-tests' / meson.project_name()
+installed_tests_dir = get_option('installed_test_prefix') / 'libexec' / 'installed-tests' / meson.project_name()
+installed_tests_data_dir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / meson.project_name()
docs_dir = datadir / 'doc' / meson.project_name()
summary({
diff --git a/meson_options.txt b/meson_options.txt
index fccada3..ca87600 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -38,6 +38,10 @@ option('installed-tests',
type: 'boolean',
value: false,
description: 'Enable installation of some test cases')
+option('installed_test_prefix',
+ type: 'string',
+ value: '',
+ description: 'Prefix for installed tests')
option('pytest',
type: 'feature',
value: 'auto',