summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-04-25 19:28:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-29 15:02:18 +0100
commit4a971a2ed065523a96694ccc5f7f6bf567c7f007 (patch)
tree6d28211e55b977ee0d46a45258717d4c1cda2259 /meta/recipes-gnome
parent3c2e77b186e857acedd749bda40baa713b7c2742 (diff)
downloadpoky-4a971a2ed065523a96694ccc5f7f6bf567c7f007.tar.gz
gobject-introspection: update to 1.64.1
All the cross-support patches are finally merged upstream; the maintainer also changed the option naming to his preference, so the recipe is adjusted. (From OE-Core rev: 4f024e10f2c889ca8c09257b7c09f2cbe2eb6d4e) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome')
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch50
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch163
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch8
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch70
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch26
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch49
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch45
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch39
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb (renamed from meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb)23
9 files changed, 12 insertions, 461 deletions
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch
deleted file mode 100644
index 9e1f79e881..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From 59d2cbb54c012b25adeb965a94b6585d911a4539 Mon Sep 17 00:00:00 2001
2From: Joshua Watt <JPEWhacker@gmail.com>
3Date: Wed, 20 Nov 2019 09:03:47 -0600
4Subject: [PATCH] Fix build reproducibility
5
6ba744068 ("Make meson.override_find_program working on more complex use
7cases") made the build no longer reproducible by encoding a build system
8path into the output. This shouldn't be necessary anyway, since it
9should be possible to add new paths to search for gir files by setting
10the XDG_DATA_DIR environment variable.
11
12Closes #318
13
14Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/192]
15Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
16---
17 girepository/girparser.c | 4 ----
18 meson.build | 1 -
19 2 files changed, 5 deletions(-)
20
21diff --git a/girepository/girparser.c b/girepository/girparser.c
22index fb47e75c..53450baf 100644
23--- a/girepository/girparser.c
24+++ b/girepository/girparser.c
25@@ -309,10 +309,6 @@ locate_gir (GIrParser *parser,
26 if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
27 return path;
28 g_free (path);
29- path = g_build_filename (UNINSTALLED_GIR_DIR, girname, NULL);
30- if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
31- return path;
32- g_free (path);
33 return NULL;
34 }
35
36diff --git a/meson.build b/meson.build
37index d6231c5f..2f248579 100644
38--- a/meson.build
39+++ b/meson.build
40@@ -90,7 +90,6 @@ endif
41 girdir = join_paths(gir_dir_prefix, 'gir-1.0')
42 config.set_quoted('GIR_DIR', girdir)
43 config.set_quoted('GOBJECT_INTROSPECTION_LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
44-config.set_quoted('UNINSTALLED_GIR_DIR', join_paths(meson.current_build_dir(), 'gir'))
45
46 foreach type : ['char', 'short', 'int', 'long']
47 size = cc.sizeof(type)
48--
492.23.0
50
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch
deleted file mode 100644
index 639f9c8f61..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch
+++ /dev/null
@@ -1,163 +0,0 @@
1From 0417a1bb08745f2bf5310d20b342c2b3b9b212d3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 15 Nov 2018 15:10:05 +0100
4Subject: [PATCH] Port cross-compilation support to meson
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9---
10 gir/meson.build | 62 ++++++++++++++++++++++++++++++++++-------------
11 meson.build | 4 ++-
12 meson_options.txt | 20 +++++++++++++++
13 3 files changed, 68 insertions(+), 18 deletions(-)
14
15diff --git a/gir/meson.build b/gir/meson.build
16index c312100..a028033 100644
17--- a/gir/meson.build
18+++ b/gir/meson.build
19@@ -41,16 +41,29 @@ gir_files = [
20 typelibdir = join_paths(get_option('libdir'), 'girepository-1.0')
21 install_data(gir_files, install_dir: girdir)
22
23-scanner_command = [
24- python,
25- girscanner,
26- '--output=@OUTPUT@',
27- '--no-libtool',
28- '--quiet',
29- '--reparse-validate',
30- '--add-include-path', join_paths(meson.current_build_dir()),
31- '--add-include-path', join_paths(meson.current_source_dir()),
32-]
33+if get_option('enable-host-gi')
34+ scanner_command = [
35+ 'g-ir-scanner',
36+ '--output=@OUTPUT@',
37+ '--no-libtool',
38+ '--quiet',
39+ '--reparse-validate',
40+ '--add-include-path', join_paths(meson.current_build_dir()),
41+ '--add-include-path', join_paths(meson.current_source_dir()),
42+ ]
43+else
44+ scanner_command = [
45+ python,
46+ girscanner,
47+ '--output=@OUTPUT@',
48+ '--no-libtool',
49+ '--quiet',
50+ '--reparse-validate',
51+ '--add-include-path', join_paths(meson.current_build_dir()),
52+ '--add-include-path', join_paths(meson.current_source_dir()),
53+ ]
54+endif
55+
56
57 dep_type = glib_dep.type_name()
58 if dep_type == 'internal'
59@@ -63,6 +76,12 @@ if dep_type == 'internal'
60 '--extra-library=glib-2.0', '--extra-library=gobject-2.0']
61 endif
62
63+if get_option('enable-gi-cross-wrapper') != ''
64+ scanner_command += ['--use-binary-wrapper=' + get_option('enable-gi-cross-wrapper')]
65+endif
66+if get_option('enable-gi-ldd-wrapper') != ''
67+ scanner_command += ['--use-ldd-wrapper=' + get_option('enable-gi-ldd-wrapper')]
68+endif
69 # Take a glob and print to newlines
70 globber = '''
71 from glob import glob
72@@ -89,8 +108,8 @@ glib_command = scanner_command + [
73
74 if dep_type == 'pkgconfig'
75 glib_command += ['--external-library', '--pkg=glib-2.0']
76- glib_libdir = glib_dep.get_pkgconfig_variable('libdir')
77- glib_incdir = join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0')
78+ glib_libdir = get_option('pkgconfig-sysroot-path') + glib_dep.get_pkgconfig_variable('libdir')
79+ glib_incdir = get_option('pkgconfig-sysroot-path') + join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0')
80 glib_libincdir = join_paths(glib_libdir, 'glib-2.0', 'include')
81 glib_files += join_paths(glib_incdir, 'gobject', 'glib-types.h')
82 glib_files += join_paths(glib_libincdir, 'glibconfig.h')
83@@ -345,7 +364,7 @@ if giounix_dep.found()
84 dep_type = giounix_dep.type_name()
85 if dep_type == 'pkgconfig'
86 gio_command += ['--pkg=gio-unix-2.0']
87- giounix_includedir = join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0')
88+ giounix_includedir = get_option('pkgconfig-sysroot-path') + join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0')
89 # Get the installed gio-unix header list
90 ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h')))
91 if ret.returncode() != 0
92@@ -428,15 +447,24 @@ gir_files += custom_target('gir-girepository',
93 )
94
95 typelibs = []
96+if get_option('enable-gi-cross-wrapper') != ''
97+ gircompiler_command = [get_option('enable-gi-cross-wrapper'), gircompiler.full_path(), '-o', '@OUTPUT@', '@INPUT@',
98+ '--includedir', meson.current_build_dir(),
99+ '--includedir', meson.current_source_dir(),
100+ ]
101+else
102+ gircompiler_command = [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
103+ '--includedir', meson.current_build_dir(),
104+ '--includedir', meson.current_source_dir(),
105+ ]
106+endif
107+
108 foreach gir : gir_files
109 typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(),
110 input: gir,
111 output: '@BASENAME@.typelib',
112 depends: [gobject_gir, ],
113- command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
114- '--includedir', meson.current_build_dir(),
115- '--includedir', meson.current_source_dir(),
116- ],
117+ command: gircompiler_command,
118 install: true,
119 install_dir: typelibdir,
120 )
121diff --git a/meson.build b/meson.build
122index a5e825f..a28490a 100644
123--- a/meson.build
124+++ b/meson.build
125@@ -168,7 +168,9 @@ endif
126 subdir('girepository')
127 subdir('tools')
128 subdir('giscanner')
129-subdir('gir')
130+if get_option('enable-introspection-data') == true
131+ subdir('gir')
132+endif
133 subdir('examples')
134 subdir('docs')
135 subdir('tests')
136diff --git a/meson_options.txt b/meson_options.txt
137index 445a68a..a325511 100644
138--- a/meson_options.txt
139+++ b/meson_options.txt
140@@ -25,3 +25,23 @@ option('python', type: 'string', value: 'python3',
141 option('gir_dir_prefix', type: 'string',
142 description: 'Intermediate prefix for gir installation under ${prefix}'
143 )
144+
145+option('enable-host-gi', type: 'boolean', value : false,
146+ description: 'Use gobject introspection tools installed in the host system (useful when cross-compiling)'
147+)
148+
149+option('enable-gi-cross-wrapper', type: 'string',
150+ description: 'Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)'
151+)
152+
153+option('enable-gi-ldd-wrapper', type: 'string',
154+ description: 'Use a ldd wrapper instead of system ldd command in giscanner (useful when cross-compiling)'
155+)
156+
157+option('enable-introspection-data', type: 'boolean', value : true,
158+ description: 'Build introspection data (.gir and .typelib files) in addition to library and tools'
159+)
160+
161+option('pkgconfig-sysroot-path', type: 'string',
162+ description: 'Specify a sysroot path to prepend to pkgconfig output (useful when cross-compiling)'
163+)
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch
index a15401aeb2..9d6f5dea3c 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch
@@ -1,4 +1,4 @@
1From 673623851fb70c0e43cf79cef67b3751432ebe72 Mon Sep 17 00:00:00 2001 1From 8dfb44450ca9fffc15977e95eadcb7054ab60a9a Mon Sep 17 00:00:00 2001
2From: Sascha Silbe <x-yo17@se-silbe.de> 2From: Sascha Silbe <x-yo17@se-silbe.de>
3Date: Fri, 8 Jun 2018 13:55:10 +0200 3Date: Fri, 8 Jun 2018 13:55:10 +0200
4Subject: [PATCH] Relocate the repository directory for native builds 4Subject: [PATCH] Relocate the repository directory for native builds
@@ -21,7 +21,7 @@ Signed-off-by: Sascha Silbe <x-yo17@se-silbe.de>
21 2 files changed, 14 insertions(+), 3 deletions(-) 21 2 files changed, 14 insertions(+), 3 deletions(-)
22 22
23diff --git a/girepository/girepository.c b/girepository/girepository.c 23diff --git a/girepository/girepository.c b/girepository/girepository.c
24index ca5dc2b..7a4d17f 100644 24index b7948d6..39a2586 100644
25--- a/girepository/girepository.c 25--- a/girepository/girepository.c
26+++ b/girepository/girepository.c 26+++ b/girepository/girepository.c
27@@ -21,6 +21,8 @@ 27@@ -21,6 +21,8 @@
@@ -42,7 +42,7 @@ index ca5dc2b..7a4d17f 100644
42 /** 42 /**
43 * SECTION:girepository 43 * SECTION:girepository
44 * @short_description: GObject Introspection repository manager 44 * @short_description: GObject Introspection repository manager
45@@ -212,9 +216,16 @@ init_globals (void) 45@@ -215,9 +219,16 @@ init_globals (void)
46 g_free (custom_dirs); 46 g_free (custom_dirs);
47 } 47 }
48 48
@@ -62,7 +62,7 @@ index ca5dc2b..7a4d17f 100644
62 typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir); 62 typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir);
63 63
64diff --git a/girepository/meson.build b/girepository/meson.build 64diff --git a/girepository/meson.build b/girepository/meson.build
65index 1d7aed6..5637fb5 100644 65index 204659f..3e61d31 100644
66--- a/girepository/meson.build 66--- a/girepository/meson.build
67+++ b/girepository/meson.build 67+++ b/girepository/meson.build
68@@ -44,7 +44,7 @@ girepo_internals_lib = static_library('girepository-internals', 68@@ -44,7 +44,7 @@ girepo_internals_lib = static_library('girepository-internals',
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
deleted file mode 100644
index ddd955354d..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From 6653c28f0b76aad86e26c512b03efcec6d9d9e95 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 3 Jan 2018 17:02:01 +0200
4Subject: [PATCH] giscanner: add a --lib-dirs-envvar option
5
6By default LD_LIBRARY_PATH is set to the list of target library paths;
7this breaks down in cross-compilation environment, as we need to run a
8native emulation wrapper rather than the target binary itself. This patch
9allows exporting those paths to a different environment variable
10which can be picked up and used by the wrapper.
11
12Upstream-Status: Pending
13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14
15---
16 giscanner/ccompiler.py | 4 ++--
17 giscanner/dumper.py | 3 ++-
18 giscanner/scannermain.py | 3 +++
19 3 files changed, 7 insertions(+), 3 deletions(-)
20
21diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
22index 32c9296..3fb262b 100644
23--- a/giscanner/ccompiler.py
24+++ b/giscanner/ccompiler.py
25@@ -174,7 +174,7 @@ class CCompiler(object):
26
27 self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
28
29- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths):
30+ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar):
31 # An "internal" link is where the library to be introspected
32 # is being built in the current directory.
33
34@@ -184,7 +184,7 @@ class CCompiler(object):
35 if os.name == 'nt':
36 runtime_path_envvar = ['LIB', 'PATH']
37 else:
38- runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH']
39+ runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar]
40 # Search the current directory first
41 # (This flag is not supported nor needed for Visual C++)
42 args.append('-L.')
43diff --git a/giscanner/dumper.py b/giscanner/dumper.py
44index 2b851a5..10a7c39 100644
45--- a/giscanner/dumper.py
46+++ b/giscanner/dumper.py
47@@ -244,7 +244,8 @@ class DumpCompiler(object):
48 libtool,
49 self._options.libraries,
50 self._options.extra_libraries,
51- self._options.library_paths)
52+ self._options.library_paths,
53+ self._options.lib_dirs_envvar)
54 args.extend(pkg_config_libs)
55
56 else:
57diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
58index 9013562..9c9fe12 100644
59--- a/giscanner/scannermain.py
60+++ b/giscanner/scannermain.py
61@@ -126,6 +126,9 @@ def _get_option_parser():
62 parser.add_option("", "--use-ldd-wrapper",
63 action="store", dest="ldd_wrapper", default=None,
64 help="wrapper to use instead of ldd (useful when cross-compiling)")
65+ parser.add_option("", "--lib-dirs-envvar",
66+ action="store", dest="lib_dirs_envvar", default=None,
67+ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH")
68 parser.add_option("", "--program-arg",
69 action="append", dest="program_args", default=[],
70 help="extra arguments to program")
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch
deleted file mode 100644
index c4951b22bb..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 2c384187cc22113c0c9b1cd233948118f7c085ef Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 25 Mar 2019 13:28:48 +0100
4Subject: [PATCH] meson.build: disable tests when cross-compiling
5
6Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/64]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 meson.build | 4 +++-
10 1 file changed, 3 insertions(+), 1 deletion(-)
11
12diff --git a/meson.build b/meson.build
13index 2544ff3..4c16fe5 100644
14--- a/meson.build
15+++ b/meson.build
16@@ -168,7 +168,9 @@ if get_option('enable-introspection-data') == true
17 endif
18 subdir('examples')
19 subdir('docs')
20-subdir('tests')
21+if not meson.is_cross_build()
22+ subdir('tests')
23+endif
24
25 install_data('Makefile.introspection', install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'))
26 install_data('m4/introspection.m4', install_dir: join_paths(get_option('datadir'), 'aclocal'))
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
deleted file mode 100644
index b954dcebd8..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From 5f985fd8a24764ccb38af6335d4584d7e33fc3a1 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 19 Oct 2015 18:26:40 +0300
4Subject: [PATCH] giscanner: add --use-binary-wrapper option
5
6With this option, giscanner will use a wrapper executable to run
7binaries it's producing, instead of running them directly. This
8is useful when binaries are cross-compiled and cannot be run directly,
9but they can be run using for example QEMU emulation.
10
11Upstream-Status: Pending [review on oe-core list]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13
14---
15 giscanner/scannermain.py | 14 ++++++++++++++
16 1 file changed, 14 insertions(+)
17
18diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
19index c004fb1..0b6a2d2 100644
20--- a/giscanner/scannermain.py
21+++ b/giscanner/scannermain.py
22@@ -120,6 +120,9 @@ def _get_option_parser():
23 parser.add_option("", "--program",
24 action="store", dest="program", default=None,
25 help="program to execute")
26+ parser.add_option("", "--use-binary-wrapper",
27+ action="store", dest="wrapper", default=None,
28+ help="wrapper to use for running programs (useful when cross-compiling)")
29 parser.add_option("", "--program-arg",
30 action="append", dest="program_args", default=[],
31 help="extra arguments to program")
32@@ -417,6 +420,17 @@ def create_binary(transformer, options, args):
33 gdump_parser.get_error_quark_functions())
34
35 shlibs = resolve_shlibs(options, binary, options.libraries)
36+ if options.wrapper:
37+ # The wrapper needs the binary itself, not the libtool wrapper script,
38+ # so we check if libtool has sneaked the binary into .libs subdirectory
39+ # and adjust the path accordingly
40+ import os.path
41+ dir_name, binary_name = os.path.split(binary.args[0])
42+ libtool_binary = os.path.join(dir_name, '.libs', binary_name)
43+ if os.path.exists(libtool_binary):
44+ binary.args[0] = libtool_binary
45+ # Then prepend the wrapper to the command line to execute
46+ binary.args = [options.wrapper] + binary.args
47 gdump_parser.set_introspection_binary(binary)
48 gdump_parser.parse()
49 return shlibs
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
deleted file mode 100644
index 79264ed086..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From cba7807888a4a1f1d630d16c51c89859209334b3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 30 Oct 2015 16:28:46 +0200
4Subject: [PATCH] giscanner: add a --use-ldd-wrapper option
5
6This is useful in cross-compile environments where system's ldd
7command does not work on binaries built for a different architecture
8
9Upstream-Status: Pending [review in oe-core]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11
12---
13 giscanner/scannermain.py | 3 +++
14 giscanner/shlibs.py | 4 +++-
15 2 files changed, 6 insertions(+), 1 deletion(-)
16
17diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
18index 0b6a2d2..9013562 100644
19--- a/giscanner/scannermain.py
20+++ b/giscanner/scannermain.py
21@@ -123,6 +123,9 @@ def _get_option_parser():
22 parser.add_option("", "--use-binary-wrapper",
23 action="store", dest="wrapper", default=None,
24 help="wrapper to use for running programs (useful when cross-compiling)")
25+ parser.add_option("", "--use-ldd-wrapper",
26+ action="store", dest="ldd_wrapper", default=None,
27+ help="wrapper to use instead of ldd (useful when cross-compiling)")
28 parser.add_option("", "--program-arg",
29 action="append", dest="program_args", default=[],
30 help="extra arguments to program")
31diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
32index 2c61f2f..d67df95 100644
33--- a/giscanner/shlibs.py
34+++ b/giscanner/shlibs.py
35@@ -96,7 +96,9 @@ def _resolve_non_libtool(options, binary, libraries):
36 args.extend(libtool)
37 args.append('--mode=execute')
38 platform_system = platform.system()
39- if platform_system == 'Darwin':
40+ if options.ldd_wrapper:
41+ args.extend([options.ldd_wrapper, binary.args[0]])
42+ elif platform_system == 'Darwin':
43 args.extend(['otool', '-L', binary.args[0]])
44 else:
45 args.extend(['ldd', binary.args[0]])
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
deleted file mode 100644
index 26f8da6d41..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 740d91151ffe576e0c08513af9d7bc8133eb9dfb Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 8 Oct 2015 18:30:35 +0300
4Subject: [PATCH] Prefix pkg-config paths with PKG_CONFIG_SYSROOT_DIR
5 environment variable
6
7This environment variable sets the location of sysroot directory in cross-compilation
8environments; if the variable is not set, the prefix will be empty.
9
10Upstream-Status: Pending [review on oe-core list]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12
13---
14 m4/introspection.m4 | 8 ++++----
15 1 file changed, 4 insertions(+), 4 deletions(-)
16
17diff --git a/m4/introspection.m4 b/m4/introspection.m4
18index d89c3d9..b562266 100644
19--- a/m4/introspection.m4
20+++ b/m4/introspection.m4
21@@ -56,14 +56,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
22 INTROSPECTION_GIRDIR=
23 INTROSPECTION_TYPELIBDIR=
24 if test "x$found_introspection" = "xyes"; then
25- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
26- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
27- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
28+ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
29+ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
30+ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
31 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
32 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
33 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
34 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
35- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
36+ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
37 fi
38 AC_SUBST(INTROSPECTION_SCANNER)
39 AC_SUBST(INTROSPECTION_COMPILER)
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb
index b1371776af..9dfb55e055 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb
@@ -14,18 +14,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
14 " 14 "
15 15
16SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \ 16SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \
17 file://0003-giscanner-add-use-binary-wrapper-option.patch \
18 file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
19 file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
20 file://0001-giscanner-add-a-lib-dirs-envvar-option.patch \
21 file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \ 17 file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \
22 file://0001-Port-cross-compilation-support-to-meson.patch \
23 file://0001-meson.build-disable-tests-when-cross-compiling.patch \
24 file://0001-Fix-build-reproducibility.patch \
25 " 18 "
26 19
27SRC_URI[md5sum] = "37278eab3704e42234b6080b8cf241f1" 20SRC_URI[md5sum] = "3419dfd086efcf83768e0579ab6abd2b"
28SRC_URI[sha256sum] = "b1ee7ed257fdbc008702bdff0ff3e78a660e7e602efa8f211dc89b9d1e7d90a2" 21SRC_URI[sha256sum] = "80beae6728c134521926affff9b2e97125749b38d38744dc901f4010ee3e7fa7"
29 22
30SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch" 23SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch"
31 24
@@ -49,16 +42,16 @@ export STAGING_DIR_HOST
49export B 42export B
50 43
51PACKAGECONFIG ?= "" 44PACKAGECONFIG ?= ""
52PACKAGECONFIG[doctool] = "-Ddoctool=true,-Ddoctool=false,python3-mako," 45PACKAGECONFIG[doctool] = "-Ddoctool=enabled,-Ddoctool=disabled,python3-mako,"
53 46
54# Configure target build to use native tools of itself and to use a qemu wrapper 47# Configure target build to use native tools of itself and to use a qemu wrapper
55# and optionally to generate introspection data 48# and optionally to generate introspection data
56EXTRA_OEMESON_class-target = " \ 49EXTRA_OEMESON_class-target = " \
57 -Denable-host-gi=true \ 50 -Dgi_cross_use_host_gi=true \
58 -Denable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \ 51 -Dgi_cross_binary_wrapper=${B}/g-ir-scanner-qemuwrapper \
59 -Denable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \ 52 -Dgi_cross_ldd_wrapper=${B}/g-ir-scanner-lddwrapper \
60 -Dpkgconfig-sysroot-path=${PKG_CONFIG_SYSROOT_DIR} \ 53 -Dgi_cross_pkgconfig_sysroot_path=${PKG_CONFIG_SYSROOT_DIR} \
61 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Denable-introspection-data=true', '-Denable-introspection-data=false', d)} \ 54 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dbuild_introspection_data=true', '-Dbuild_introspection_data=false', d)} \
62 ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \ 55 ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \
63" 56"
64 57