From 4a971a2ed065523a96694ccc5f7f6bf567c7f007 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sat, 25 Apr 2020 19:28:08 +0200 Subject: 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 Signed-off-by: Richard Purdie --- .../0001-Fix-build-reproducibility.patch | 50 ----- ...1-Port-cross-compilation-support-to-meson.patch | 163 ---------------- ...he-repository-directory-for-native-builds.patch | 8 +- ...01-giscanner-add-a-lib-dirs-envvar-option.patch | 70 ------- ....build-disable-tests-when-cross-compiling.patch | 26 --- ...3-giscanner-add-use-binary-wrapper-option.patch | 49 ----- ...04-giscanner-add-a-use-ldd-wrapper-option.patch | 45 ----- ...config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch | 39 ---- .../gobject-introspection_1.62.0.bb | 209 --------------------- .../gobject-introspection_1.64.1.bb | 202 ++++++++++++++++++++ 10 files changed, 206 insertions(+), 655 deletions(-) delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Fix-build-reproducibility.patch delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Port-cross-compilation-support-to-meson.patch delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-disable-tests-when-cross-compiling.patch delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb create mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb (limited to 'meta/recipes-gnome') 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 @@ -From 59d2cbb54c012b25adeb965a94b6585d911a4539 Mon Sep 17 00:00:00 2001 -From: Joshua Watt -Date: Wed, 20 Nov 2019 09:03:47 -0600 -Subject: [PATCH] Fix build reproducibility - -ba744068 ("Make meson.override_find_program working on more complex use -cases") made the build no longer reproducible by encoding a build system -path into the output. This shouldn't be necessary anyway, since it -should be possible to add new paths to search for gir files by setting -the XDG_DATA_DIR environment variable. - -Closes #318 - -Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/192] -Signed-off-by: Joshua Watt ---- - girepository/girparser.c | 4 ---- - meson.build | 1 - - 2 files changed, 5 deletions(-) - -diff --git a/girepository/girparser.c b/girepository/girparser.c -index fb47e75c..53450baf 100644 ---- a/girepository/girparser.c -+++ b/girepository/girparser.c -@@ -309,10 +309,6 @@ locate_gir (GIrParser *parser, - if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) - return path; - g_free (path); -- path = g_build_filename (UNINSTALLED_GIR_DIR, girname, NULL); -- if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) -- return path; -- g_free (path); - return NULL; - } - -diff --git a/meson.build b/meson.build -index d6231c5f..2f248579 100644 ---- a/meson.build -+++ b/meson.build -@@ -90,7 +90,6 @@ endif - girdir = join_paths(gir_dir_prefix, 'gir-1.0') - config.set_quoted('GIR_DIR', girdir) - config.set_quoted('GOBJECT_INTROSPECTION_LIBDIR', join_paths(get_option('prefix'), get_option('libdir'))) --config.set_quoted('UNINSTALLED_GIR_DIR', join_paths(meson.current_build_dir(), 'gir')) - - foreach type : ['char', 'short', 'int', 'long'] - size = cc.sizeof(type) --- -2.23.0 - 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 @@ -From 0417a1bb08745f2bf5310d20b342c2b3b9b212d3 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 15 Nov 2018 15:10:05 +0100 -Subject: [PATCH] Port cross-compilation support to meson - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin - ---- - gir/meson.build | 62 ++++++++++++++++++++++++++++++++++------------- - meson.build | 4 ++- - meson_options.txt | 20 +++++++++++++++ - 3 files changed, 68 insertions(+), 18 deletions(-) - -diff --git a/gir/meson.build b/gir/meson.build -index c312100..a028033 100644 ---- a/gir/meson.build -+++ b/gir/meson.build -@@ -41,16 +41,29 @@ gir_files = [ - typelibdir = join_paths(get_option('libdir'), 'girepository-1.0') - install_data(gir_files, install_dir: girdir) - --scanner_command = [ -- python, -- girscanner, -- '--output=@OUTPUT@', -- '--no-libtool', -- '--quiet', -- '--reparse-validate', -- '--add-include-path', join_paths(meson.current_build_dir()), -- '--add-include-path', join_paths(meson.current_source_dir()), --] -+if get_option('enable-host-gi') -+ scanner_command = [ -+ 'g-ir-scanner', -+ '--output=@OUTPUT@', -+ '--no-libtool', -+ '--quiet', -+ '--reparse-validate', -+ '--add-include-path', join_paths(meson.current_build_dir()), -+ '--add-include-path', join_paths(meson.current_source_dir()), -+ ] -+else -+ scanner_command = [ -+ python, -+ girscanner, -+ '--output=@OUTPUT@', -+ '--no-libtool', -+ '--quiet', -+ '--reparse-validate', -+ '--add-include-path', join_paths(meson.current_build_dir()), -+ '--add-include-path', join_paths(meson.current_source_dir()), -+ ] -+endif -+ - - dep_type = glib_dep.type_name() - if dep_type == 'internal' -@@ -63,6 +76,12 @@ if dep_type == 'internal' - '--extra-library=glib-2.0', '--extra-library=gobject-2.0'] - endif - -+if get_option('enable-gi-cross-wrapper') != '' -+ scanner_command += ['--use-binary-wrapper=' + get_option('enable-gi-cross-wrapper')] -+endif -+if get_option('enable-gi-ldd-wrapper') != '' -+ scanner_command += ['--use-ldd-wrapper=' + get_option('enable-gi-ldd-wrapper')] -+endif - # Take a glob and print to newlines - globber = ''' - from glob import glob -@@ -89,8 +108,8 @@ glib_command = scanner_command + [ - - if dep_type == 'pkgconfig' - glib_command += ['--external-library', '--pkg=glib-2.0'] -- glib_libdir = glib_dep.get_pkgconfig_variable('libdir') -- glib_incdir = join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0') -+ glib_libdir = get_option('pkgconfig-sysroot-path') + glib_dep.get_pkgconfig_variable('libdir') -+ glib_incdir = get_option('pkgconfig-sysroot-path') + join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0') - glib_libincdir = join_paths(glib_libdir, 'glib-2.0', 'include') - glib_files += join_paths(glib_incdir, 'gobject', 'glib-types.h') - glib_files += join_paths(glib_libincdir, 'glibconfig.h') -@@ -345,7 +364,7 @@ if giounix_dep.found() - dep_type = giounix_dep.type_name() - if dep_type == 'pkgconfig' - gio_command += ['--pkg=gio-unix-2.0'] -- giounix_includedir = join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0') -+ giounix_includedir = get_option('pkgconfig-sysroot-path') + join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0') - # Get the installed gio-unix header list - ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h'))) - if ret.returncode() != 0 -@@ -428,15 +447,24 @@ gir_files += custom_target('gir-girepository', - ) - - typelibs = [] -+if get_option('enable-gi-cross-wrapper') != '' -+ gircompiler_command = [get_option('enable-gi-cross-wrapper'), gircompiler.full_path(), '-o', '@OUTPUT@', '@INPUT@', -+ '--includedir', meson.current_build_dir(), -+ '--includedir', meson.current_source_dir(), -+ ] -+else -+ gircompiler_command = [gircompiler, '-o', '@OUTPUT@', '@INPUT@', -+ '--includedir', meson.current_build_dir(), -+ '--includedir', meson.current_source_dir(), -+ ] -+endif -+ - foreach gir : gir_files - typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(), - input: gir, - output: '@BASENAME@.typelib', - depends: [gobject_gir, ], -- command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@', -- '--includedir', meson.current_build_dir(), -- '--includedir', meson.current_source_dir(), -- ], -+ command: gircompiler_command, - install: true, - install_dir: typelibdir, - ) -diff --git a/meson.build b/meson.build -index a5e825f..a28490a 100644 ---- a/meson.build -+++ b/meson.build -@@ -168,7 +168,9 @@ endif - subdir('girepository') - subdir('tools') - subdir('giscanner') --subdir('gir') -+if get_option('enable-introspection-data') == true -+ subdir('gir') -+endif - subdir('examples') - subdir('docs') - subdir('tests') -diff --git a/meson_options.txt b/meson_options.txt -index 445a68a..a325511 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -25,3 +25,23 @@ option('python', type: 'string', value: 'python3', - option('gir_dir_prefix', type: 'string', - description: 'Intermediate prefix for gir installation under ${prefix}' - ) -+ -+option('enable-host-gi', type: 'boolean', value : false, -+ description: 'Use gobject introspection tools installed in the host system (useful when cross-compiling)' -+) -+ -+option('enable-gi-cross-wrapper', type: 'string', -+ description: 'Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)' -+) -+ -+option('enable-gi-ldd-wrapper', type: 'string', -+ description: 'Use a ldd wrapper instead of system ldd command in giscanner (useful when cross-compiling)' -+) -+ -+option('enable-introspection-data', type: 'boolean', value : true, -+ description: 'Build introspection data (.gir and .typelib files) in addition to library and tools' -+) -+ -+option('pkgconfig-sysroot-path', type: 'string', -+ description: 'Specify a sysroot path to prepend to pkgconfig output (useful when cross-compiling)' -+) 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 @@ -From 673623851fb70c0e43cf79cef67b3751432ebe72 Mon Sep 17 00:00:00 2001 +From 8dfb44450ca9fffc15977e95eadcb7054ab60a9a Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Fri, 8 Jun 2018 13:55:10 +0200 Subject: [PATCH] Relocate the repository directory for native builds @@ -21,7 +21,7 @@ Signed-off-by: Sascha Silbe 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/girepository/girepository.c b/girepository/girepository.c -index ca5dc2b..7a4d17f 100644 +index b7948d6..39a2586 100644 --- a/girepository/girepository.c +++ b/girepository/girepository.c @@ -21,6 +21,8 @@ @@ -42,7 +42,7 @@ index ca5dc2b..7a4d17f 100644 /** * SECTION:girepository * @short_description: GObject Introspection repository manager -@@ -212,9 +216,16 @@ init_globals (void) +@@ -215,9 +219,16 @@ init_globals (void) g_free (custom_dirs); } @@ -62,7 +62,7 @@ index ca5dc2b..7a4d17f 100644 typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir); diff --git a/girepository/meson.build b/girepository/meson.build -index 1d7aed6..5637fb5 100644 +index 204659f..3e61d31 100644 --- a/girepository/meson.build +++ b/girepository/meson.build @@ -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 @@ -From 6653c28f0b76aad86e26c512b03efcec6d9d9e95 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Wed, 3 Jan 2018 17:02:01 +0200 -Subject: [PATCH] giscanner: add a --lib-dirs-envvar option - -By default LD_LIBRARY_PATH is set to the list of target library paths; -this breaks down in cross-compilation environment, as we need to run a -native emulation wrapper rather than the target binary itself. This patch -allows exporting those paths to a different environment variable -which can be picked up and used by the wrapper. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin - ---- - giscanner/ccompiler.py | 4 ++-- - giscanner/dumper.py | 3 ++- - giscanner/scannermain.py | 3 +++ - 3 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py -index 32c9296..3fb262b 100644 ---- a/giscanner/ccompiler.py -+++ b/giscanner/ccompiler.py -@@ -174,7 +174,7 @@ class CCompiler(object): - - self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations" - -- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths): -+ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar): - # An "internal" link is where the library to be introspected - # is being built in the current directory. - -@@ -184,7 +184,7 @@ class CCompiler(object): - if os.name == 'nt': - runtime_path_envvar = ['LIB', 'PATH'] - else: -- runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] -+ runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar] - # Search the current directory first - # (This flag is not supported nor needed for Visual C++) - args.append('-L.') -diff --git a/giscanner/dumper.py b/giscanner/dumper.py -index 2b851a5..10a7c39 100644 ---- a/giscanner/dumper.py -+++ b/giscanner/dumper.py -@@ -244,7 +244,8 @@ class DumpCompiler(object): - libtool, - self._options.libraries, - self._options.extra_libraries, -- self._options.library_paths) -+ self._options.library_paths, -+ self._options.lib_dirs_envvar) - args.extend(pkg_config_libs) - - else: -diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py -index 9013562..9c9fe12 100644 ---- a/giscanner/scannermain.py -+++ b/giscanner/scannermain.py -@@ -126,6 +126,9 @@ def _get_option_parser(): - parser.add_option("", "--use-ldd-wrapper", - action="store", dest="ldd_wrapper", default=None, - help="wrapper to use instead of ldd (useful when cross-compiling)") -+ parser.add_option("", "--lib-dirs-envvar", -+ action="store", dest="lib_dirs_envvar", default=None, -+ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH") - parser.add_option("", "--program-arg", - action="append", dest="program_args", default=[], - 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 @@ -From 2c384187cc22113c0c9b1cd233948118f7c085ef Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 25 Mar 2019 13:28:48 +0100 -Subject: [PATCH] meson.build: disable tests when cross-compiling - -Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/64] -Signed-off-by: Alexander Kanavin ---- - meson.build | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 2544ff3..4c16fe5 100644 ---- a/meson.build -+++ b/meson.build -@@ -168,7 +168,9 @@ if get_option('enable-introspection-data') == true - endif - subdir('examples') - subdir('docs') --subdir('tests') -+if not meson.is_cross_build() -+ subdir('tests') -+endif - - install_data('Makefile.introspection', install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0')) - 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 @@ -From 5f985fd8a24764ccb38af6335d4584d7e33fc3a1 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 19 Oct 2015 18:26:40 +0300 -Subject: [PATCH] giscanner: add --use-binary-wrapper option - -With this option, giscanner will use a wrapper executable to run -binaries it's producing, instead of running them directly. This -is useful when binaries are cross-compiled and cannot be run directly, -but they can be run using for example QEMU emulation. - -Upstream-Status: Pending [review on oe-core list] -Signed-off-by: Alexander Kanavin - ---- - giscanner/scannermain.py | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py -index c004fb1..0b6a2d2 100644 ---- a/giscanner/scannermain.py -+++ b/giscanner/scannermain.py -@@ -120,6 +120,9 @@ def _get_option_parser(): - parser.add_option("", "--program", - action="store", dest="program", default=None, - help="program to execute") -+ parser.add_option("", "--use-binary-wrapper", -+ action="store", dest="wrapper", default=None, -+ help="wrapper to use for running programs (useful when cross-compiling)") - parser.add_option("", "--program-arg", - action="append", dest="program_args", default=[], - help="extra arguments to program") -@@ -417,6 +420,17 @@ def create_binary(transformer, options, args): - gdump_parser.get_error_quark_functions()) - - shlibs = resolve_shlibs(options, binary, options.libraries) -+ if options.wrapper: -+ # The wrapper needs the binary itself, not the libtool wrapper script, -+ # so we check if libtool has sneaked the binary into .libs subdirectory -+ # and adjust the path accordingly -+ import os.path -+ dir_name, binary_name = os.path.split(binary.args[0]) -+ libtool_binary = os.path.join(dir_name, '.libs', binary_name) -+ if os.path.exists(libtool_binary): -+ binary.args[0] = libtool_binary -+ # Then prepend the wrapper to the command line to execute -+ binary.args = [options.wrapper] + binary.args - gdump_parser.set_introspection_binary(binary) - gdump_parser.parse() - 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 @@ -From cba7807888a4a1f1d630d16c51c89859209334b3 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 30 Oct 2015 16:28:46 +0200 -Subject: [PATCH] giscanner: add a --use-ldd-wrapper option - -This is useful in cross-compile environments where system's ldd -command does not work on binaries built for a different architecture - -Upstream-Status: Pending [review in oe-core] -Signed-off-by: Alexander Kanavin - ---- - giscanner/scannermain.py | 3 +++ - giscanner/shlibs.py | 4 +++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py -index 0b6a2d2..9013562 100644 ---- a/giscanner/scannermain.py -+++ b/giscanner/scannermain.py -@@ -123,6 +123,9 @@ def _get_option_parser(): - parser.add_option("", "--use-binary-wrapper", - action="store", dest="wrapper", default=None, - help="wrapper to use for running programs (useful when cross-compiling)") -+ parser.add_option("", "--use-ldd-wrapper", -+ action="store", dest="ldd_wrapper", default=None, -+ help="wrapper to use instead of ldd (useful when cross-compiling)") - parser.add_option("", "--program-arg", - action="append", dest="program_args", default=[], - help="extra arguments to program") -diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py -index 2c61f2f..d67df95 100644 ---- a/giscanner/shlibs.py -+++ b/giscanner/shlibs.py -@@ -96,7 +96,9 @@ def _resolve_non_libtool(options, binary, libraries): - args.extend(libtool) - args.append('--mode=execute') - platform_system = platform.system() -- if platform_system == 'Darwin': -+ if options.ldd_wrapper: -+ args.extend([options.ldd_wrapper, binary.args[0]]) -+ elif platform_system == 'Darwin': - args.extend(['otool', '-L', binary.args[0]]) - else: - 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 @@ -From 740d91151ffe576e0c08513af9d7bc8133eb9dfb Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 8 Oct 2015 18:30:35 +0300 -Subject: [PATCH] Prefix pkg-config paths with PKG_CONFIG_SYSROOT_DIR - environment variable - -This environment variable sets the location of sysroot directory in cross-compilation -environments; if the variable is not set, the prefix will be empty. - -Upstream-Status: Pending [review on oe-core list] -Signed-off-by: Alexander Kanavin - ---- - m4/introspection.m4 | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/m4/introspection.m4 b/m4/introspection.m4 -index d89c3d9..b562266 100644 ---- a/m4/introspection.m4 -+++ b/m4/introspection.m4 -@@ -56,14 +56,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], - INTROSPECTION_GIRDIR= - INTROSPECTION_TYPELIBDIR= - if test "x$found_introspection" = "xyes"; then -- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` -+ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -+ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -+ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` - INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` - INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" - INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` - INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` -- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection -+ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection - fi - AC_SUBST(INTROSPECTION_SCANNER) - 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.62.0.bb deleted file mode 100644 index b1371776af..0000000000 --- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb +++ /dev/null @@ -1,209 +0,0 @@ -SUMMARY = "Middleware layer between GObject-using C libraries and language bindings" -DESCRIPTION = "GObject Introspection is a project for providing machine \ -readable introspection data of the API of C libraries. This introspection \ -data can be used in several different use cases, for example automatic code \ -generation for bindings, API verification and documentation generation." -HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection" -BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues" -SECTION = "libs" -LICENSE = "LGPLv2+ & GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \ - file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \ - file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \ - file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27 \ - " - -SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \ - file://0003-giscanner-add-use-binary-wrapper-option.patch \ - file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \ - file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \ - file://0001-giscanner-add-a-lib-dirs-envvar-option.patch \ - file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \ - file://0001-Port-cross-compilation-support-to-meson.patch \ - file://0001-meson.build-disable-tests-when-cross-compiling.patch \ - file://0001-Fix-build-reproducibility.patch \ - " - -SRC_URI[md5sum] = "37278eab3704e42234b6080b8cf241f1" -SRC_URI[sha256sum] = "b1ee7ed257fdbc008702bdff0ff3e78a660e7e602efa8f211dc89b9d1e7d90a2" - -SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch" - -inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script - -GTKDOC_MESON_OPTION = "gtk_doc" - -MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" - -DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive" - -# target build needs qemu to run temporary introspection binaries created -# on the fly by g-ir-scanner and a native version of itself to run -# native versions of its own tools during build. -# Also prelink-rtld is used to find out library dependencies of introspection binaries -# (standard ldd doesn't work when cross-compiling). -DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native" - -# needed for writing out the qemu wrapper script -export STAGING_DIR_HOST -export B - -PACKAGECONFIG ?= "" -PACKAGECONFIG[doctool] = "-Ddoctool=true,-Ddoctool=false,python3-mako," - -# Configure target build to use native tools of itself and to use a qemu wrapper -# and optionally to generate introspection data -EXTRA_OEMESON_class-target = " \ - -Denable-host-gi=true \ - -Denable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \ - -Denable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \ - -Dpkgconfig-sysroot-path=${PKG_CONFIG_SYSROOT_DIR} \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Denable-introspection-data=true', '-Denable-introspection-data=false', d)} \ - ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \ -" - -# Need to ensure ld.so.conf exists so prelink-native works -# both before we build and if we install from sstate -do_configure[prefuncs] += "gobject_introspection_preconfigure" -python gobject_introspection_preconfigure () { - oe.utils.write_ld_so_conf(d) -} - -do_configure_prepend_class-native() { - # Tweak the native python scripts so that they don't refer to the - # full path of native python binary (the solution is taken from glib-2.0 recipe) - # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes) - sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in -} - -do_configure_prepend_class-target() { - # Write out a qemu wrapper that will be given to gi-scanner so that it - # can run target helper binaries through that. - qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" - cat > ${B}/g-ir-scanner-qemuwrapper << EOF -#!/bin/sh -# Use a modules directory which doesn't exist so we don't load random things -# which may then get deleted (or their dependencies) and potentially segfault -export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy - -$qemu_binary "\$@" -if [ \$? -ne 0 ]; then - echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help." - echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )" - exit 1 -fi -EOF - chmod +x ${B}/g-ir-scanner-qemuwrapper - - # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files - # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use - # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory - # from the target sysroot. - cat > ${B}/g-ir-scanner-wrapper << EOF -#!/bin/sh -# This prevents g-ir-scanner from writing cache data to $HOME -export GI_SCANNER_DISABLE_CACHE=1 - -g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 --add-include-path=${STAGING_LIBDIR}/gir-1.0 "\$@" -EOF - chmod +x ${B}/g-ir-scanner-wrapper - - # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu. - # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent. - cat > ${B}/g-ir-compiler-wrapper << EOF -#!/bin/sh -${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@" -EOF - chmod +x ${B}/g-ir-compiler-wrapper - - # Write out a wrapper to use instead of ldd, which does not work when a binary is built - # for a different architecture - cat > ${B}/g-ir-scanner-lddwrapper << EOF -#!/bin/sh -prelink-rtld --root=$STAGING_DIR_HOST "\$@" -EOF - chmod +x ${B}/g-ir-scanner-lddwrapper - - # Also tweak the target python scripts so that they don't refer to the - # native version of python binary (the solution is taken from glib-2.0 recipe) - sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in -} - -do_compile_prepend() { - # This prevents g-ir-scanner from writing cache data to $HOME - export GI_SCANNER_DISABLE_CACHE=1 - - # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise - export GIR_EXTRA_LIBS_PATH=$B/.libs -} - -# Our wrappers need to be available system-wide, because they will be used -# to build introspection files for all other gobject-based packages -do_install_append_class-target() { - install -d ${D}${bindir}/ - install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/ - install ${B}/g-ir-scanner-wrapper ${D}${bindir}/ - install ${B}/g-ir-compiler-wrapper ${D}${bindir}/ - install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/ -} - -# we need target versions of introspection tools in sysroot so that they can be run via qemu -# when building introspection files in other packages -SYSROOT_DIRS_append_class-target = " ${bindir}" - -SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess" -gi_binaries_sysroot_preprocess() { - # Tweak the binary names in the introspection pkgconfig file, so that it - # picks up our wrappers which do the cross-compile and qemu magic. - sed -i \ - -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \ - -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \ - ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc -} - -SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess" -gi_ldsoconf_sysroot_preprocess () { - mkdir -p ${SYSROOT_DESTDIR}${bindir} - dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN} - echo "#!/bin/sh" > $dest - echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest - echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest - echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest - chmod 755 $dest -} - -# Remove wrapper files from the package, only used for cross-compiling -PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess" -gi_package_preprocess() { - rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper - rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper - rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper - rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper -} - -SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}" - -# .typelib files are needed at runtime and so they go to the main package -FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" - -# .gir files go to dev package, as they're needed for developing (but not for running) -# things that depends on introspection. -FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir" -FILES_${PN}-dev_append = " ${datadir}/gir-*/*.rnc" - -# These are used by gobject-based packages -# to generate transient introspection binaries -FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \ - ${datadir}/gobject-introspection-1.0/Makefile.introspection" - -# These are used by dependent packages (e.g. pygobject) to build their -# testsuites. -FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \ - ${datadir}/gobject-introspection-1.0/tests/*.h" - -FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/" -FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" - -RDEPENDS_${PN} = "python3-pickle python3-xml" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb new file mode 100644 index 0000000000..9dfb55e055 --- /dev/null +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.64.1.bb @@ -0,0 +1,202 @@ +SUMMARY = "Middleware layer between GObject-using C libraries and language bindings" +DESCRIPTION = "GObject Introspection is a project for providing machine \ +readable introspection data of the API of C libraries. This introspection \ +data can be used in several different use cases, for example automatic code \ +generation for bindings, API verification and documentation generation." +HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues" +SECTION = "libs" +LICENSE = "LGPLv2+ & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \ + file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \ + file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \ + file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27 \ + " + +SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \ + file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \ + " + +SRC_URI[md5sum] = "3419dfd086efcf83768e0579ab6abd2b" +SRC_URI[sha256sum] = "80beae6728c134521926affff9b2e97125749b38d38744dc901f4010ee3e7fa7" + +SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch" + +inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script + +GTKDOC_MESON_OPTION = "gtk_doc" + +MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" + +DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive" + +# target build needs qemu to run temporary introspection binaries created +# on the fly by g-ir-scanner and a native version of itself to run +# native versions of its own tools during build. +# Also prelink-rtld is used to find out library dependencies of introspection binaries +# (standard ldd doesn't work when cross-compiling). +DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native" + +# needed for writing out the qemu wrapper script +export STAGING_DIR_HOST +export B + +PACKAGECONFIG ?= "" +PACKAGECONFIG[doctool] = "-Ddoctool=enabled,-Ddoctool=disabled,python3-mako," + +# Configure target build to use native tools of itself and to use a qemu wrapper +# and optionally to generate introspection data +EXTRA_OEMESON_class-target = " \ + -Dgi_cross_use_host_gi=true \ + -Dgi_cross_binary_wrapper=${B}/g-ir-scanner-qemuwrapper \ + -Dgi_cross_ldd_wrapper=${B}/g-ir-scanner-lddwrapper \ + -Dgi_cross_pkgconfig_sysroot_path=${PKG_CONFIG_SYSROOT_DIR} \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dbuild_introspection_data=true', '-Dbuild_introspection_data=false', d)} \ + ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \ +" + +# Need to ensure ld.so.conf exists so prelink-native works +# both before we build and if we install from sstate +do_configure[prefuncs] += "gobject_introspection_preconfigure" +python gobject_introspection_preconfigure () { + oe.utils.write_ld_so_conf(d) +} + +do_configure_prepend_class-native() { + # Tweak the native python scripts so that they don't refer to the + # full path of native python binary (the solution is taken from glib-2.0 recipe) + # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes) + sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in +} + +do_configure_prepend_class-target() { + # Write out a qemu wrapper that will be given to gi-scanner so that it + # can run target helper binaries through that. + qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" + cat > ${B}/g-ir-scanner-qemuwrapper << EOF +#!/bin/sh +# Use a modules directory which doesn't exist so we don't load random things +# which may then get deleted (or their dependencies) and potentially segfault +export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy + +$qemu_binary "\$@" +if [ \$? -ne 0 ]; then + echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help." + echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )" + exit 1 +fi +EOF + chmod +x ${B}/g-ir-scanner-qemuwrapper + + # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files + # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use + # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory + # from the target sysroot. + cat > ${B}/g-ir-scanner-wrapper << EOF +#!/bin/sh +# This prevents g-ir-scanner from writing cache data to $HOME +export GI_SCANNER_DISABLE_CACHE=1 + +g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 --add-include-path=${STAGING_LIBDIR}/gir-1.0 "\$@" +EOF + chmod +x ${B}/g-ir-scanner-wrapper + + # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu. + # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent. + cat > ${B}/g-ir-compiler-wrapper << EOF +#!/bin/sh +${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@" +EOF + chmod +x ${B}/g-ir-compiler-wrapper + + # Write out a wrapper to use instead of ldd, which does not work when a binary is built + # for a different architecture + cat > ${B}/g-ir-scanner-lddwrapper << EOF +#!/bin/sh +prelink-rtld --root=$STAGING_DIR_HOST "\$@" +EOF + chmod +x ${B}/g-ir-scanner-lddwrapper + + # Also tweak the target python scripts so that they don't refer to the + # native version of python binary (the solution is taken from glib-2.0 recipe) + sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in +} + +do_compile_prepend() { + # This prevents g-ir-scanner from writing cache data to $HOME + export GI_SCANNER_DISABLE_CACHE=1 + + # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise + export GIR_EXTRA_LIBS_PATH=$B/.libs +} + +# Our wrappers need to be available system-wide, because they will be used +# to build introspection files for all other gobject-based packages +do_install_append_class-target() { + install -d ${D}${bindir}/ + install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/ + install ${B}/g-ir-scanner-wrapper ${D}${bindir}/ + install ${B}/g-ir-compiler-wrapper ${D}${bindir}/ + install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/ +} + +# we need target versions of introspection tools in sysroot so that they can be run via qemu +# when building introspection files in other packages +SYSROOT_DIRS_append_class-target = " ${bindir}" + +SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess" +gi_binaries_sysroot_preprocess() { + # Tweak the binary names in the introspection pkgconfig file, so that it + # picks up our wrappers which do the cross-compile and qemu magic. + sed -i \ + -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \ + -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \ + ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc +} + +SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess" +gi_ldsoconf_sysroot_preprocess () { + mkdir -p ${SYSROOT_DESTDIR}${bindir} + dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN} + echo "#!/bin/sh" > $dest + echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest + echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest + echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest + chmod 755 $dest +} + +# Remove wrapper files from the package, only used for cross-compiling +PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess" +gi_package_preprocess() { + rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper + rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper + rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper + rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper +} + +SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}" + +# .typelib files are needed at runtime and so they go to the main package +FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" + +# .gir files go to dev package, as they're needed for developing (but not for running) +# things that depends on introspection. +FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir" +FILES_${PN}-dev_append = " ${datadir}/gir-*/*.rnc" + +# These are used by gobject-based packages +# to generate transient introspection binaries +FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \ + ${datadir}/gobject-introspection-1.0/Makefile.introspection" + +# These are used by dependent packages (e.g. pygobject) to build their +# testsuites. +FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \ + ${datadir}/gobject-introspection-1.0/tests/*.h" + +FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/" +FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" + +RDEPENDS_${PN} = "python3-pickle python3-xml" + +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf