aboutsummaryrefslogtreecommitdiffstats
path: root/meta-gnome/recipes-gnome/gnome-shell/gnome-shell/0001-Introduce-options-gjs_path-to-optionally-set-path-to.patch
blob: 8ef0da16fe8f45ae7b7a202e3c362152d0310851 (plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
From e9835f650d70bf22ad0e5d8c2179aa01b2d18955 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Thu, 28 Oct 2021 18:57:24 +0200
Subject: [PATCH] Introduce options 'gjs_path' to optionally set path to gjs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Upstream-Status: Pending

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 js/dbusServices/meson.build                  | 2 +-
 meson.build                                  | 6 +++++-
 meson_options.txt                            | 6 ++++++
 subprojects/extensions-app/js/meson.build    | 2 +-
 subprojects/extensions-app/meson.build       | 7 ++++++-
 subprojects/extensions-app/meson_options.txt | 6 ++++++
 6 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/js/dbusServices/meson.build b/js/dbusServices/meson.build
index 48b7f89..700b590 100644
--- a/js/dbusServices/meson.build
+++ b/js/dbusServices/meson.build
@@ -22,7 +22,7 @@ foreach service, dir : dbus_services
 
   serviceconf = configuration_data()
   serviceconf.set('service', service)
-  serviceconf.set('gjs', gjs.full_path())
+  serviceconf.set('gjs', gjs)
   serviceconf.set('pkgdatadir', pkgdatadir)
 
   configure_file(
diff --git a/meson.build b/meson.build
index a6d83b1..2c612a8 100644
--- a/meson.build
+++ b/meson.build
@@ -134,7 +134,11 @@ endif
 
 mutter_typelibdir = mutter_dep.get_variable('typelibdir')
 python = find_program('python3')
-gjs = find_program('gjs')
+if get_option('gjs_path') == ''
+  gjs = find_program('gjs')
+else
+  gjs = get_option('gjs_path')
+endif
 
 cc = meson.get_compiler('c')
 
diff --git a/meson_options.txt b/meson_options.txt
index 6e83d92..1bf0ecb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -45,3 +45,9 @@ option('systemd',
   value: true,
   description: 'Enable systemd integration'
 )
+
+option('gjs_path',
+  type: 'string',
+  value: '',
+  description: 'Instead of searching gjs executable, configure path'
+)
diff --git a/subprojects/extensions-app/js/meson.build b/subprojects/extensions-app/js/meson.build
index c9a67f8..91ae887 100644
--- a/subprojects/extensions-app/js/meson.build
+++ b/subprojects/extensions-app/js/meson.build
@@ -9,7 +9,7 @@ endif
 launcherconf.set('prefix', prefix)
 launcherconf.set('libdir', libdir)
 launcherconf.set('pkgdatadir', pkgdatadir)
-launcherconf.set('gjs', gjs.full_path())
+launcherconf.set('gjs', gjs)
 
 configure_file(
   input: prgname + '.in',
diff --git a/subprojects/extensions-app/meson.build b/subprojects/extensions-app/meson.build
index 45f391b..d581408 100644
--- a/subprojects/extensions-app/meson.build
+++ b/subprojects/extensions-app/meson.build
@@ -47,7 +47,12 @@ metainfodir = join_paths(datadir, 'metainfo')
 schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
 servicedir = join_paths(datadir, 'dbus-1', 'services')
 
-gjs = find_program('gjs')
+if get_option('gjs_path') == ''
+  gjs = find_program('gjs')
+else
+  gjs = get_option('gjs_path')
+endif
+
 appstream_util = find_program('appstream-util', required: false)
 appstreamcli = find_program('appstreamcli', required: false)
 desktop_file_validate = find_program('desktop-file-validate', required: false)
diff --git a/subprojects/extensions-app/meson_options.txt b/subprojects/extensions-app/meson_options.txt
index ca2eb41..2787785 100644
--- a/subprojects/extensions-app/meson_options.txt
+++ b/subprojects/extensions-app/meson_options.txt
@@ -10,3 +10,9 @@ option('profile',
   ],
   value: 'default'
 )
+
+option('gjs_path',
+  type: 'string',
+  value: '',
+  description: 'Instead of searching gjs executable, configure path'
+)