File: patch-meson-build.diff

package info (click to toggle)
swayosd 0.1.0-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 616 kB
  • sloc: makefile: 19; xml: 19
file content (44 lines) | stat: -rw-r--r-- 1,212 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
Description: Patch meson.build
 Patch meson_build to allow building in Debian
Author: Matthias Geiger <werdahias@debian.org>
Forwarded: not-needed
Last-Update: 2024-09-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/

--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,4 @@
+option(
+  'host_arch',
+  type: 'string',
+  )
--- a/src/meson.build
+++ b/src/meson.build
@@ -4,7 +4,6 @@
 assert(cargo_bin.found())
 cargo_opt  = [ '--manifest-path', meson.project_source_root() / 'Cargo.toml' ]
 cargo_opt += [ '--target-dir', meson.project_build_root()  / 'src' ]
-cargo_env  = [ 'CARGO_HOME=' + meson.project_build_root()  / 'cargo-home' ]
 
 if get_option('buildtype') == 'release'
   cargo_opt += [ '--release' ]
@@ -20,7 +20,7 @@
 ]
 binaries_path = []
 foreach prog : binaries
-  binaries_path += '@OUTDIR@/@0@/@1@'.format(rust_target, prog)
+  binaries_path += 'src' / get_option('host_arch') / 'debug' / prog
 endforeach
 
 custom_target(
@@ -32,7 +32,7 @@
   install: true,
   install_dir: join_paths(get_option('prefix'), get_option('bindir')),
   command: [
-    'env', cargo_env,
+    'env',
     cargo_bin, 'build', cargo_opt, '&&',
     'cp', '-f', binaries_path, '@OUTDIR@'
   ]