File: build-Add-rust-triplet-to-path.patch

package info (click to toggle)
xdg-desktop-portal-phosh 0.46.0-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 896 kB
  • sloc: ansic: 2,616; python: 139; sh: 114; xml: 67; makefile: 25; lisp: 24
file content (40 lines) | stat: -rw-r--r-- 1,374 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
From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
Date: Sat, 21 Dec 2024 10:09:56 +0100
Subject: build: Add rust triplet to path
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Debian's cargo sets --target so the output paths change

Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
 subprojects/pfs/meson_options.txt | 4 ++++
 subprojects/pfs/src/meson.build   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/subprojects/pfs/meson_options.txt b/subprojects/pfs/meson_options.txt
index 2d47184..1baf5ec 100644
--- a/subprojects/pfs/meson_options.txt
+++ b/subprojects/pfs/meson_options.txt
@@ -5,3 +5,7 @@ option('examples',
 option('shared-lib',
        type: 'boolean', value: false,
        description: 'Build shared library')
+
+option('deb_triplet',
+       type: 'string', value: '',
+       description: 'Rust triplet')
diff --git a/subprojects/pfs/src/meson.build b/subprojects/pfs/src/meson.build
index 3abd29a..8ffcfe6 100644
--- a/subprojects/pfs/src/meson.build
+++ b/subprojects/pfs/src/meson.build
@@ -51,7 +51,7 @@ cargo_static_lib_build = custom_target(
     cargo_opt,
     '&&',
     'cp',
-    meson.project_build_root() / 'src' / rust_target / 'libpfs.a',
+    meson.project_build_root() / 'src' / get_option('deb_triplet') / rust_target / 'libpfs.a',
     '@OUTPUT@',
   ],
 )