File: build-ensure-it-can-build-with-Debian-packaging-tool.patch

package info (click to toggle)
gnome-video-trimmer 25.03-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,588 kB
  • sloc: makefile: 26; sh: 24; xml: 5
file content (55 lines) | stat: -rw-r--r-- 1,730 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
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Date: Fri, 3 Nov 2023 16:25:16 +0100
Subject: build: ensure it can build with Debian packaging tools

This implies not setting $CARGO_HOME and letting Cargo.lock be changed
or deleted prior to the build.

Forwarded: not-needed, Debian-only change
---
 build-aux/cargo.sh | 10 ++++------
 meson.build        |  1 -
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/build-aux/cargo.sh b/build-aux/cargo.sh
index 4cea551..2070ca4 100755
--- a/build-aux/cargo.sh
+++ b/build-aux/cargo.sh
@@ -3,7 +3,6 @@
 export MESON_BUILD_ROOT="$1"
 export MESON_SOURCE_ROOT="$2"
 export CARGO_TARGET_DIR="$MESON_BUILD_ROOT"/target
-export CARGO_HOME="$MESON_BUILD_ROOT"/cargo-home
 export OUTPUT="$3"
 export APP_ID_SUFFIX="$4"
 export APP_BIN="$5"
@@ -11,13 +10,12 @@ export APP_BIN="$5"
 if [ "$APP_ID_SUFFIX" = ".Devel" ]
 then
     echo "DEBUG MODE"
-    cargo build --manifest-path \
+    $CARGO build --manifest-path \
         "$MESON_SOURCE_ROOT"/Cargo.toml && \
-        cp "$CARGO_TARGET_DIR"/debug/"$APP_BIN" "$OUTPUT"
+        cp "$CARGO_TARGET_DIR"/$DEB_HOST_RUST_TYPE/debug/"$APP_BIN" "$OUTPUT"
 else
     echo "RELEASE MODE"
-    cargo build --manifest-path \
+    $CARGO build --manifest-path \
         "$MESON_SOURCE_ROOT"/Cargo.toml --release && \
-        cp "$CARGO_TARGET_DIR"/release/"$APP_BIN" "$OUTPUT"
+        cp "$CARGO_TARGET_DIR"/$DEB_HOST_RUST_TYPE/release/"$APP_BIN" "$OUTPUT"
 fi
-
diff --git a/meson.build b/meson.build
index d8b42bf..8c50b80 100644
--- a/meson.build
+++ b/meson.build
@@ -32,7 +32,6 @@ base_id = 'org.gnome.gitlab.YaLTeR.VideoTrimmer'
 app_id = base_id + app_id_suffix
 
 sources = files(
-  'Cargo.lock',
   'Cargo.toml',
 )