File: patch-meson-build.diff

package info (click to toggle)
shortwave 5.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,844 kB
  • sloc: sh: 98; sql: 63; makefile: 22
file content (65 lines) | stat: -rw-r--r-- 1,980 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
53
54
55
56
57
58
59
60
61
62
63
64
65
From: Matthias Geiger <werdahias@debian.org>
Date: Sun, 7 Sep 2025 18:36:59 -0400
Subject: Set correct meson build paths

Forwarded: not-needed
Last-Update: 2025-02-10

Additionally, hardcode the git revision string to the upstream release commits' hash.
Last-Update: 2025-02-10
---
 meson.build       | 2 +-
 meson_options.txt | 5 +++++
 src/meson.build   | 4 +---
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 35312d1..7ee424b 100644
--- a/meson.build
+++ b/meson.build
@@ -34,7 +34,7 @@ name       = 'Shortwave'
 base_id    = 'de.haeckerfelix.Shortwave'
 path_id    = '/de/haeckerfelix/Shortwave'
 app_id     = base_id
-vcs_tag    = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
+vcs_tag    = '9a7e520'
 profile    = get_option('profile')
 datadir    = join_paths(get_option('prefix'), get_option('datadir'))
 localedir  = join_paths(get_option('prefix'), get_option('localedir'))
diff --git a/meson_options.txt b/meson_options.txt
index 4c5cc39..2e2d89f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -7,3 +7,8 @@ option (
   ],
   value: 'default'
 )
+option(
+  'host_arch',
+  type: 'string',
+  )
+
diff --git a/src/meson.build b/src/meson.build
index caf11a4..3ef5799 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -25,7 +25,6 @@ run_command(
 
 # Setup cargo
 cargo = find_program('cargo')
-cargo_env = [ 'CARGO_HOME=' + meson.project_build_root() / 'cargo-home' ]
 cargo_options = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
 cargo_options += [ '--target-dir', meson.project_build_root() / 'target' ]
 
@@ -48,10 +47,9 @@ cargo_release = custom_target(
   install_dir: bindir,
   command: [
     'env',
-    cargo_env,
     cargo, 'build',
     cargo_options,
     '&&',
-    'cp', 'target' / rust_target / meson.project_name(), '@OUTPUT@',
+    'cp', 'target' / get_option('host_arch') / 'release' / meson.project_name(), '@OUTPUT@',
   ]
 )