Debian Codegraph @

debian/patches/meson-Don-t-relay-on-Cargo.lock-fix-install-path.patch

raw symbols SCIP
1 From: Manuel Traut <[email protected]>
2 Date: Sat, 16 Nov 2024 16:34:46 +0100
3 Subject: meson: Don't relay on Cargo.lock, fix install path
4
5 ---
6 meson.build | 1 -
7 meson_options.txt | 4 ++++
8 podcasts-gtk/src/meson.build | 8 ++------
9 3 files changed, 6 insertions(+), 7 deletions(-)
10
11 diff --git a/meson.build b/meson.build
12 index 5193d82..3becb46 100644
13 --- a/meson.build
14 +++ b/meson.build
15 @@ -42,7 +42,6 @@ endif
16
17 podcast_toml = files(
18 'Cargo.toml',
19 - 'Cargo.lock',
20 'podcasts-data/Cargo.toml',
21 'podcasts-gtk/Cargo.toml',
22 )
23 diff --git a/meson_options.txt b/meson_options.txt
24 index 4c5cc39..8dda4f6 100644
25 --- a/meson_options.txt
26 +++ b/meson_options.txt
27 @@ -7,3 +7,7 @@ option (
28 ],
29 value: 'default'
30 )
31 +option (
32 + 'host_arch',
33 + type: 'string',
34 +)
35 diff --git a/podcasts-gtk/src/meson.build b/podcasts-gtk/src/meson.build
36 index 8bf8a00..1a3bcd2 100644
37 --- a/podcasts-gtk/src/meson.build
38 +++ b/podcasts-gtk/src/meson.build
39 @@ -29,8 +29,6 @@ else
40 message('Building in debug mode')
41 endif
42
43 -cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
44 -
45 cargo_release = custom_target('cargo-build',
46 build_by_default: true,
47 build_always_stale: true,
48 @@ -39,10 +37,8 @@ cargo_release = custom_target('cargo-build',
49 install_dir: podcasts_bindir,
50 console: true,
51 depends: podcasts_resources,
52 - command: ['env',
53 - cargo_env,
54 - cargo, 'build',
55 + command: [cargo, 'build',
56 cargo_options,
57 '&&',
58 - 'cp', 'podcasts-gtk' / 'src' / rust_target / 'podcasts-gtk', '@OUTPUT@',
59 + 'cp', 'podcasts-gtk' / 'src' / get_option('host_arch') / rust_target / 'podcasts-gtk', '@OUTPUT@',
60 ])