File: patch-meson-build.diff

package info (click to toggle)
mousai 0.7.8-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,356 kB
  • sloc: xml: 26; makefile: 22; sh: 10
file content (78 lines) | stat: -rw-r--r-- 1,689 bytes parent folder | download | duplicates (2)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From: Matthias Geiger <werdahias@debian.org>
Date: Thu, 12 Sep 2024 18:29:43 +0200
Subject: Patch meson.build to allow building with Debian crates

Forwarded: not-needed
---
 meson_options.txt |  4 ++++
 src/meson.build   | 35 +----------------------------------
 2 files changed, 5 insertions(+), 34 deletions(-)

diff --git a/meson_options.txt b/meson_options.txt
index 13b5f3a..db8f9e5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,3 +8,7 @@ option(
   value: 'default',
   description: 'The build profile for Mousai. One of "default" or "development".'
 )
+option(
+  'host_arch',
+  type: 'string',
+  )
diff --git a/src/meson.build b/src/meson.build
index 002cc1f..307bf75 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -30,7 +30,6 @@ else
   message('Building in debug mode')
 endif
 
-cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
 
 cargo_build = custom_target(
   'cargo-build',
@@ -43,42 +42,10 @@ cargo_build = custom_target(
   depends: resources,
   command: [
     'env',
-    cargo_env,
     cargo, 'build',
     cargo_options,
     '&&',
-    'cp', 'src' / rust_target / meson.project_name(), '@OUTPUT@',
+    'cp', 'src' / get_option('host_arch') / 'release' / meson.project_name(), '@OUTPUT@',
   ]
 )
 
-test(
-  'cargo-test',
-  cargo,
-  args: [
-    'test',
-    cargo_options,
-    '--',
-    '--nocapture',
-  ],
-  env: [
-    'RUST_BACKTRACE=1',
-    cargo_env
-  ],
-  timeout: 300, # give cargo more time
-)
-
-test(
-  'cargo-clippy',
-  cargo,
-  args: [
-    'clippy',
-    cargo_options,
-    '--',
-    '-D',
-    'warnings'
-  ],
-  env: [
-    cargo_env
-  ],
-  timeout: 300, # give cargo more time
-)