diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-06-06 16:11:38 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-07 15:22:37 +0100 |
commit | a2eb6d486710973dc40d62d37c70aedf86c8ec3e (patch) | |
tree | c6abe5c7acd2abea20746de06e29984c68a025f0 | |
parent | 794a23a3818e41756e40a95dc037b4e6b9bf3dbf (diff) | |
download | poky-a2eb6d486710973dc40d62d37c70aedf86c8ec3e.tar.gz |
gobject-introspection: move to Python 3
(From OE-Core rev: db702fb12f7b34928a52e522ad269ac43f1dcace)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
4 files changed, 19 insertions, 10 deletions
diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass index f16627dacd..8cd7b7ed50 100644 --- a/meta/classes/gobject-introspection.bbclass +++ b/meta/classes/gobject-introspection.bbclass | |||
@@ -1,8 +1,11 @@ | |||
1 | # Inherit this class in recipes to enable building their introspection files | 1 | # Inherit this class in recipes to enable building their introspection files |
2 | 2 | ||
3 | # This sets up autoconf-based recipes to build introspection data (or not), | 3 | # python3native is inherited to prevent introspection tools being run with |
4 | # host's python 3 (they need to be run with native python 3) | ||
5 | # | ||
6 | # This also sets up autoconf-based recipes to build introspection data (or not), | ||
4 | # depending on distro and machine features (see gobject-introspection-data class). | 7 | # depending on distro and machine features (see gobject-introspection-data class). |
5 | inherit gobject-introspection-data | 8 | inherit python3native gobject-introspection-data |
6 | EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} " | 9 | EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} " |
7 | 10 | ||
8 | # When building native recipes, disable introspection, as it is not necessary, | 11 | # When building native recipes, disable introspection, as it is not necessary, |
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 index b0d098c9fc..f21eaca855 100644 --- 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 | |||
@@ -36,11 +36,11 @@ index 633496f..d684cd0 100755 | |||
36 | + # The wrapper needs the binary itself, not the libtool wrapper script, | 36 | + # The wrapper needs the binary itself, not the libtool wrapper script, |
37 | + # so we check if libtool has sneaked the binary into .libs subdirectory | 37 | + # so we check if libtool has sneaked the binary into .libs subdirectory |
38 | + # and adjust the path accordingly | 38 | + # and adjust the path accordingly |
39 | + import os.path | 39 | + import os.path |
40 | + dir_name, binary_name = os.path.split(binary.args[0]) | 40 | + dir_name, binary_name = os.path.split(binary.args[0]) |
41 | + libtool_binary = os.path.join(dir_name, '.libs', binary_name) | 41 | + libtool_binary = os.path.join(dir_name, '.libs', binary_name) |
42 | + if os.path.exists(libtool_binary): | 42 | + if os.path.exists(libtool_binary): |
43 | + binary.args[0] = libtool_binary | 43 | + binary.args[0] = libtool_binary |
44 | + # Then prepend the wrapper to the command line to execute | 44 | + # Then prepend the wrapper to the command line to execute |
45 | + binary.args = [options.wrapper] + binary.args | 45 | + binary.args = [options.wrapper] + binary.args |
46 | gdump_parser.set_introspection_binary(binary) | 46 | gdump_parser.set_introspection_binary(binary) |
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb index f368814deb..8adede66a5 100644 --- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb | |||
@@ -18,18 +18,21 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/1.48/${BPN}-${PV}.tar.xz \ | |||
18 | SRC_URI[md5sum] = "01301fa9019667d48e927353e08bc218" | 18 | SRC_URI[md5sum] = "01301fa9019667d48e927353e08bc218" |
19 | SRC_URI[sha256sum] = "fa275aaccdbfc91ec0bc9a6fd0562051acdba731e7d584b64a277fec60e75877" | 19 | SRC_URI[sha256sum] = "fa275aaccdbfc91ec0bc9a6fd0562051acdba731e7d584b64a277fec60e75877" |
20 | 20 | ||
21 | inherit autotools pkgconfig gtk-doc pythonnative qemu gobject-introspection-data | 21 | inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data |
22 | BBCLASSEXTEND = "native" | 22 | BBCLASSEXTEND = "native" |
23 | 23 | ||
24 | # necessary to let the call for python-config from configure.ac succeed | 24 | # necessary to let the call for python-config from configure.ac succeed |
25 | export STAGING_INCDIR | 25 | export STAGING_INCDIR |
26 | export STAGING_LIBDIR | 26 | export STAGING_LIBDIR |
27 | 27 | ||
28 | # autoconf macros otherwise will default to Python 2 | ||
29 | export PYTHON | ||
30 | |||
28 | # needed for writing out the qemu wrapper script | 31 | # needed for writing out the qemu wrapper script |
29 | export STAGING_DIR_HOST | 32 | export STAGING_DIR_HOST |
30 | export B | 33 | export B |
31 | 34 | ||
32 | DEPENDS_append = " libffi zlib glib-2.0 python flex-native bison-native" | 35 | DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native" |
33 | 36 | ||
34 | # target build needs qemu to run temporary introspection binaries created | 37 | # target build needs qemu to run temporary introspection binaries created |
35 | # on the fly by g-ir-scanner and a native version of itself to run | 38 | # on the fly by g-ir-scanner and a native version of itself to run |
@@ -44,7 +47,7 @@ do_configure_prepend_class-native() { | |||
44 | # Tweak the native python scripts so that they don't refer to the | 47 | # Tweak the native python scripts so that they don't refer to the |
45 | # full path of native python binary (the solution is taken from glib-2.0 recipe) | 48 | # full path of native python binary (the solution is taken from glib-2.0 recipe) |
46 | # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes) | 49 | # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes) |
47 | sed -i -e '1s,#!.*,#!${USRBINPATH}/env nativepython,' ${S}/tools/g-ir-tool-template.in | 50 | sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in |
48 | } | 51 | } |
49 | 52 | ||
50 | do_configure_prepend_class-target() { | 53 | do_configure_prepend_class-target() { |
@@ -97,7 +100,7 @@ EOF | |||
97 | 100 | ||
98 | # Also tweak the target python scripts so that they don't refer to the | 101 | # Also tweak the target python scripts so that they don't refer to the |
99 | # native version of python binary (the solution is taken from glib-2.0 recipe) | 102 | # native version of python binary (the solution is taken from glib-2.0 recipe) |
100 | sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/tools/g-ir-tool-template.in | 103 | sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in |
101 | } | 104 | } |
102 | 105 | ||
103 | # Configure target build to use native tools of itself and to use a qemu wrapper | 106 | # Configure target build to use native tools of itself and to use a qemu wrapper |
@@ -109,7 +112,7 @@ EXTRA_OECONF_class-target += "--enable-host-gi \ | |||
109 | " | 112 | " |
110 | 113 | ||
111 | PACKAGECONFIG ?= "" | 114 | PACKAGECONFIG ?= "" |
112 | PACKAGECONFIG[doctool] = "--enable-doctool,--disable-doctool,python-mako," | 115 | PACKAGECONFIG[doctool] = "--enable-doctool,--disable-doctool,python3-mako," |
113 | 116 | ||
114 | do_compile_prepend_class-target() { | 117 | do_compile_prepend_class-target() { |
115 | # This prevents g-ir-scanner from writing cache data to $HOME | 118 | # This prevents g-ir-scanner from writing cache data to $HOME |
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb b/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb index 9a2387e81c..2de698bb80 100644 --- a/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb +++ b/meta/recipes-sato/webkit/webkitgtk_2.12.3.bb | |||
@@ -21,7 +21,10 @@ SRC_URI = "\ | |||
21 | SRC_URI[md5sum] = "aebb4029c09dd81664aa830e4a584c85" | 21 | SRC_URI[md5sum] = "aebb4029c09dd81664aa830e4a584c85" |
22 | SRC_URI[sha256sum] = "173cbb9a2eca23eee52e99965483ab25aa9c0569ef5b57041fc0c129cc26c307" | 22 | SRC_URI[sha256sum] = "173cbb9a2eca23eee52e99965483ab25aa9c0569ef5b57041fc0c129cc26c307" |
23 | 23 | ||
24 | inherit cmake lib_package pkgconfig perlnative pythonnative distro_features_check upstream-version-is-even gobject-introspection | 24 | # pythonnative must come after gobject-introspection, otherwise |
25 | # webkit build configuration will not attempt to find Python 2.x after | ||
26 | # finding (and rejecting) Python 3.x | ||
27 | inherit cmake lib_package pkgconfig gobject-introspection perlnative pythonnative distro_features_check upstream-version-is-even | ||
25 | 28 | ||
26 | # depends on libxt | 29 | # depends on libxt |
27 | REQUIRED_DISTRO_FEATURES = "x11" | 30 | REQUIRED_DISTRO_FEATURES = "x11" |