File: 0001-meson.build-fix-build-for-Debian.patch

package info (click to toggle)
gnome-decoder 0.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,936 kB
  • sloc: sh: 61; xml: 32; makefile: 27; sql: 6
file content (52 lines) | stat: -rw-r--r-- 1,522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From: Arnaud Ferraris <aferraris@debian.org>
Date: Tue, 1 Oct 2024 23:43:40 +0200
Subject: meson.build: fix build for Debian

We don't call `cargo` directly, but use a wrapper script instead, which
breaks some of the expectations. Make the needed changes to ensure the
package still builds.

We also need to override CARGO_HOME, so don't set this env var in
meson.build.

Forwarded: not-needed, Debian-only change
---
 meson_options.txt | 1 +
 src/meson.build   | 6 +-----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/meson_options.txt b/meson_options.txt
index 4d38d99..ee5f642 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,3 +8,4 @@ option (
   value: 'default',
   description: 'The build profile for Decoder. One of "default" or "development".'
 )
+option('host_arch', type: 'string')
diff --git a/src/meson.build b/src/meson.build
index 267cdef..41f6fd0 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -32,8 +32,6 @@ else
   message('Building in debug mode')
 endif
 
-cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
-
 cargo_build = custom_target(
   'cargo-build',
   build_by_default: true,
@@ -44,11 +42,9 @@ cargo_build = custom_target(
   install_dir: bindir,
   depends: resources,
   command: [
-    'env',
-    cargo_env,
     cargo, 'build',
     cargo_options,
     '&&',
-    'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
+    'cp', 'src' / get_option('host_arch') / rust_target / meson.project_name(), '@OUTPUT@',
   ]
 )