diff options
Diffstat (limited to 'meta/recipes-gnome/gobject-introspection/gobject-introspection/0010-meson-add-option-gir-dir-prefix.patch')
-rw-r--r-- | meta/recipes-gnome/gobject-introspection/gobject-introspection/0010-meson-add-option-gir-dir-prefix.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0010-meson-add-option-gir-dir-prefix.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0010-meson-add-option-gir-dir-prefix.patch new file mode 100644 index 0000000000..8eec5f867e --- /dev/null +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0010-meson-add-option-gir-dir-prefix.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From bbc34f00fd30a13eafc607a956de60d822260355 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kai Kang <kai.kang@windriver.com> | ||
3 | Date: Fri, 14 Sep 2018 01:26:38 -0700 | ||
4 | Subject: [PATCH] meson: add option 'gir-dir-prefix' | ||
5 | |||
6 | Add option 'gir-dir-prefix' for meson to make the installation path of | ||
7 | .gir files could be configured which has been done for autoconf. | ||
8 | |||
9 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gobject-introspection/commit/3938b86f5289c2b28a5ec42965b8da4b509445c4] | ||
10 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
11 | --- | ||
12 | gir/meson.build | 1 - | ||
13 | meson.build | 8 +++++++- | ||
14 | meson_options.txt | 4 ++++ | ||
15 | 3 files changed, 11 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/gir/meson.build b/gir/meson.build | ||
18 | index 607bbc4..1cb514a 100644 | ||
19 | --- a/gir/meson.build | ||
20 | +++ b/gir/meson.build | ||
21 | @@ -34,7 +34,6 @@ gir_files = [ | ||
22 | ] | ||
23 | |||
24 | typelibdir = join_paths(get_option('libdir'), 'girepository-1.0') | ||
25 | -girdir = join_paths(get_option('datadir'), 'gir-1.0') | ||
26 | install_data(gir_files, install_dir: girdir) | ||
27 | |||
28 | scanner_command = [ | ||
29 | diff --git a/meson.build b/meson.build | ||
30 | index a1432f7..17acd82 100644 | ||
31 | --- a/meson.build | ||
32 | +++ b/meson.build | ||
33 | @@ -18,7 +18,12 @@ python = pymod.find_installation(get_option('python')) | ||
34 | cc = meson.get_compiler('c') | ||
35 | config = configuration_data() | ||
36 | config.set_quoted('GIR_SUFFIX', 'gir-1.0') | ||
37 | -config.set_quoted('GIR_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'gir-1.0')) | ||
38 | +gir_dir_prefix = get_option('gir-dir-prefix') | ||
39 | +if gir_dir_prefix == '' | ||
40 | + gir_dir_prefix = get_option('datadir') | ||
41 | +endif | ||
42 | +girdir = join_paths(get_option('prefix'), gir_dir_prefix, 'gir-1.0') | ||
43 | +config.set_quoted('GIR_DIR', girdir) | ||
44 | config.set_quoted('GOBJECT_INTROSPECTION_LIBDIR', join_paths(get_option('prefix'), get_option('libdir'))) | ||
45 | |||
46 | foreach type : ['char', 'short', 'int', 'long'] | ||
47 | @@ -93,6 +98,7 @@ pkgconfig_conf.set('libdir', join_paths('${prefix}', get_option('libdir'))) | ||
48 | pkgconfig_conf.set('datarootdir', join_paths('${prefix}', get_option('datadir'))) | ||
49 | pkgconfig_conf.set('datadir', '${datarootdir}') | ||
50 | pkgconfig_conf.set('includedir', join_paths('${prefix}', get_option('includedir'))) | ||
51 | +pkgconfig_conf.set('GIR_DIR', join_paths('${prefix}', gir_dir_prefix, 'gir-1.0')) | ||
52 | if host_system == 'windows' or host_system == 'cygwin' | ||
53 | pkgconfig_conf.set('EXEEXT', '.exe') | ||
54 | else | ||
55 | diff --git a/meson_options.txt b/meson_options.txt | ||
56 | index 49726be..ee6958d 100644 | ||
57 | --- a/meson_options.txt | ||
58 | +++ b/meson_options.txt | ||
59 | @@ -21,3 +21,7 @@ option('cairo-libname', type: 'string', | ||
60 | option('python', type: 'string', value: 'python3', | ||
61 | description: 'Path or name of the Python interpreter to build for' | ||
62 | ) | ||
63 | + | ||
64 | +option('gir-dir-prefix', type: 'string', | ||
65 | + description: 'Intermediate prefix for gir installation under ${prefix}' | ||
66 | +) | ||