blob: 4a366251848dad7036c3d48d42fb861ad147a5ea [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From 3bf597b16e23cd2ce0ee3b05c23b46add5e26cd4 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Thu, 28 Oct 2021 18:57:24 +0200
4Subject: [PATCH] Introduce options 'gjs_path' to optionally set path to gjs
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Pending
10
11Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com>
12---
13 js/dbusServices/meson.build | 2 +-
14 meson.build | 6 +++++-
15 meson_options.txt | 6 ++++++
16 subprojects/extensions-app/js/meson.build | 2 +-
17 subprojects/extensions-app/meson.build | 7 ++++++-
18 subprojects/extensions-app/meson_options.txt | 6 ++++++
19 6 files changed, 25 insertions(+), 4 deletions(-)
20
21diff --git a/js/dbusServices/meson.build b/js/dbusServices/meson.build
Patrick Williams58776372022-04-13 09:07:35 -050022index eb941ed..16efaeb 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000023--- a/js/dbusServices/meson.build
24+++ b/js/dbusServices/meson.build
25@@ -27,7 +27,7 @@ foreach service, dir : dbus_services
26
27 serviceconf = configuration_data()
28 serviceconf.set('service', service)
Patrick Williams58776372022-04-13 09:07:35 -050029- serviceconf.set('gjs', gjs.full_path())
Andrew Geissler595f6302022-01-24 19:11:47 +000030+ serviceconf.set('gjs', gjs)
31 serviceconf.set('pkgdatadir', pkgdatadir)
32
33 configure_file(
34diff --git a/meson.build b/meson.build
Patrick Williams58776372022-04-13 09:07:35 -050035index 8d7478f..7c9cc6a 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000036--- a/meson.build
37+++ b/meson.build
38@@ -138,7 +138,11 @@ endif
39
Patrick Williams58776372022-04-13 09:07:35 -050040 mutter_typelibdir = mutter_dep.get_variable('typelibdir')
Andrew Geissler595f6302022-01-24 19:11:47 +000041 python = find_program('python3')
42-gjs = find_program('gjs')
43+if get_option('gjs_path') == ''
44+ gjs = find_program('gjs')
45+else
46+ gjs = get_option('gjs_path')
47+endif
48
49 cc = meson.get_compiler('c')
50
51diff --git a/meson_options.txt b/meson_options.txt
Patrick Williams58776372022-04-13 09:07:35 -050052index f0f2ecf..a45f2e4 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000053--- a/meson_options.txt
54+++ b/meson_options.txt
55@@ -45,3 +45,9 @@ option('soup2',
56 value: true,
57 description: 'Use Soup 2.4 instead of Soup 3. Must be in sync with libgweather'
58 )
59+
60+option('gjs_path',
61+ type: 'string',
62+ value: '',
63+ description: 'Instead of searching gjs executable, configure path'
64+)
65diff --git a/subprojects/extensions-app/js/meson.build b/subprojects/extensions-app/js/meson.build
Patrick Williams58776372022-04-13 09:07:35 -050066index ce2a776..8f7bba4 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000067--- a/subprojects/extensions-app/js/meson.build
68+++ b/subprojects/extensions-app/js/meson.build
69@@ -9,7 +9,7 @@ endif
70 launcherconf.set('prefix', prefix)
71 launcherconf.set('libdir', libdir)
72 launcherconf.set('pkgdatadir', pkgdatadir)
Patrick Williams58776372022-04-13 09:07:35 -050073-launcherconf.set('gjs', gjs.full_path())
Andrew Geissler595f6302022-01-24 19:11:47 +000074+launcherconf.set('gjs', gjs)
75
76 configure_file(
77 input: prgname + '.in',
78diff --git a/subprojects/extensions-app/meson.build b/subprojects/extensions-app/meson.build
Patrick Williams58776372022-04-13 09:07:35 -050079index c260d7a..c5b7554 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000080--- a/subprojects/extensions-app/meson.build
81+++ b/subprojects/extensions-app/meson.build
82@@ -44,7 +44,12 @@ localedir = join_paths(datadir, 'locale')
83 metainfodir = join_paths(datadir, 'metainfo')
84 servicedir = join_paths(datadir, 'dbus-1', 'services')
85
86-gjs = find_program('gjs')
87+if get_option('gjs_path') == ''
88+ gjs = find_program('gjs')
89+else
90+ gjs = get_option('gjs_path')
91+endif
92+
93 appstream_util = find_program('appstream-util', required: false)
94 desktop_file_validate = find_program('desktop-file-validate', required: false)
95
96diff --git a/subprojects/extensions-app/meson_options.txt b/subprojects/extensions-app/meson_options.txt
Patrick Williams58776372022-04-13 09:07:35 -050097index ca2eb41..2787785 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000098--- a/subprojects/extensions-app/meson_options.txt
99+++ b/subprojects/extensions-app/meson_options.txt
100@@ -10,3 +10,9 @@ option('profile',
101 ],
102 value: 'default'
103 )
104+
105+option('gjs_path',
106+ type: 'string',
107+ value: '',
108+ description: 'Instead of searching gjs executable, configure path'
109+)
110--
Patrick Williams58776372022-04-13 09:07:35 -05001112.34.1
Andrew Geissler595f6302022-01-24 19:11:47 +0000112