File: patch-meson.diff

package info (click to toggle)
glycin 2.0.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,424 kB
  • sloc: python: 418; ansic: 212; xml: 70; makefile: 28; sh: 27; javascript: 10
file content (69 lines) | stat: -rw-r--r-- 2,044 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
66
67
68
69
From: Matthias Geiger <werdahias@riseup.net>
Date: Thu, 11 Jan 2024 18:19:47 +0100
Subject: Patch meson.build to allow building in debian

This patch allows building under debian by using a workaround to pass DEB_RUST_HOST
to meson to get the correct installation location.

Forwarded: not-needed
---
 glycin-loaders/meson.build | 2 +-
 libglycin/meson.build      | 2 +-
 meson.build                | 1 -
 meson_options.txt          | 5 +++++
 4 files changed, 7 insertions(+), 3 deletions(-)

--- a/glycin-loaders/meson.build
+++ b/glycin-loaders/meson.build
@@ -103,7 +103,7 @@
     output: loader,
     command: [
       'cp',
-      cargo_target_dir / rust_target / loader,
+      cargo_target_dir / get_option('host_arch') / 'release' / loader,
       '@OUTPUT@',
     ],
   )
--- a/libglycin/meson.build
+++ b/libglycin/meson.build
@@ -70,7 +70,7 @@
         endif
     endif

-    cargo_output = cargo_target_dir / rust_target / f'libglycin@suffix@.so'.replace('-', '_')
+    cargo_output = cargo_target_dir / get_option('host_arch') / 'release' / f'libglycin@suffix@.so'.replace('-', '_')

     # Build library with Rust
     libglycin = custom_target(
--- a/meson.build
+++ b/meson.build
@@ -29,7 +29,6 @@
 crate_version_bin = find_program(meson.project_source_root() / 'build-aux/crates-version.py')

 cargo_env = environment()
-cargo_env.set('CARGO_HOME', cargo_home)

 if get_option('libglycin') and get_option('libglycin-gtk4')
   # Let the libglycin-gtk4 build find the previously built libglycin
--- a/glycin-thumbnailer/meson.build
+++ b/glycin-thumbnailer/meson.build
@@ -29,7 +28,7 @@ custom_target(
     output: 'glycin-thumbnailer',
     command: [
         'cp',
-        cargo_target_dir / rust_target / 'glycin-thumbnailer',
+        cargo_target_dir / get_option('host_arch') / 'release'/ 'glycin-thumbnailer',
         '@OUTPUT@',
     ],
 )
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -123,3 +123,8 @@
   type: 'boolean',
   description: 'Build thumbnailer',
 )
+
+option(
+  'host_arch',
+  type: 'string',
+)