diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-03-09 17:01:50 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-12 22:11:17 +0000 |
commit | c54c5fc63c05d416f3733a742fc94f7a169adc8b (patch) | |
tree | 6f676b91962e41c541cf7c7e7ad36ed500bdea59 /meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch | |
parent | 723434fb3bb78f18fdf281d31efa5b59138ca8a6 (diff) | |
download | openembedded-core-contrib-c54c5fc63c05d416f3733a742fc94f7a169adc8b.tar.gz |
gobject-introspection: add the recipe
The recipe has comments that explain what is going on and why.
Also, there are patches necessary to make it work in Yocto cross-compilation environment;
they will be submitted upstream.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch')
-rw-r--r-- | meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch new file mode 100644 index 0000000000..e1241a9499 --- /dev/null +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch @@ -0,0 +1,52 @@ +From 2322f36056265f809aaffb74fcf5ac0c83129752 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 19 Oct 2015 18:26:40 +0300 +Subject: [PATCH 2/4] 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 <alex.kanavin@gmail.com> + +--- + giscanner/scannermain.py | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index b36284d..e37d3e3 100755 +--- a/giscanner/scannermain.py ++++ b/giscanner/scannermain.py +@@ -118,6 +118,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") +@@ -406,6 +409,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 +-- +2.1.4 + |