summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gobject-introspection
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome/gobject-introspection')
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch6
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch28
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-exclude-girepo_dep-if-introspection-data.patch25
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb (renamed from meta/recipes-gnome/gobject-introspection/gobject-introspection_1.66.1.bb)65
4 files changed, 29 insertions, 95 deletions
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 185ebc154a..c9e1afffd0 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 41c3ee549787333a073a3ce6303efef625c74dce Mon Sep 17 00:00:00 2001 1From aeb5532f8be42d42f4e8725ca42e239b36983a4d 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 7d03485..20f4813 100644 24index a0754f4..2d456f9 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 @@
@@ -62,7 +62,7 @@ index 7d03485..20f4813 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 c8ef6aa..b85ff7f 100644 65index 786749a..15cf2a9 100644
66--- a/girepository/meson.build 66--- a/girepository/meson.build
67+++ b/girepository/meson.build 67+++ b/girepository/meson.build
68@@ -45,7 +45,7 @@ girepo_internals_lib = static_library('girepository-internals', 68@@ -45,7 +45,7 @@ girepo_internals_lib = static_library('girepository-internals',
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch
deleted file mode 100644
index b484b5e9e6..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From f742da8b3913f4818d3f419117076afe62f4dbf4 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 5 Sep 2018 16:46:52 +0200
4Subject: [PATCH] giscanner: ignore error return codes from ldd-wrapper
5
6prelink-rtld, which we use instead of ldd returns 127 when it can't find a library.
7It is not an error per se, but it breaks subprocess.check_output().
8
9Upstream-Status: Inappropriate [oe-core specific]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11
12---
13 giscanner/shlibs.py | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
17index d67df95..80352a6 100644
18--- a/giscanner/shlibs.py
19+++ b/giscanner/shlibs.py
20@@ -102,7 +102,7 @@ def _resolve_non_libtool(options, binary, libraries):
21 args.extend(['otool', '-L', binary.args[0]])
22 else:
23 args.extend(['ldd', binary.args[0]])
24- output = subprocess.check_output(args)
25+ output = subprocess.run(args, check=False, stdout=subprocess.PIPE).stdout
26 if isinstance(output, bytes):
27 output = output.decode("utf-8", "replace")
28
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-exclude-girepo_dep-if-introspection-data.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-exclude-girepo_dep-if-introspection-data.patch
deleted file mode 100644
index 8fba0124cf..0000000000
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-meson.build-exclude-girepo_dep-if-introspection-data.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From ef5446af0ddad6a341b47957097ac40c6cb5e6d3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 20 Oct 2020 22:40:14 +0200
4Subject: [PATCH] meson.build: exclude girepo_dep if introspection data is
5 disabled
6
7Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/248]
8Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9---
10 meson.build | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/meson.build b/meson.build
14index 14af2b1..a3c27c3 100644
15--- a/meson.build
16+++ b/meson.build
17@@ -283,7 +283,7 @@ pkg.generate(
18 # FIXME: meson.override_dependency() and declare_dependency()'s variable arguments
19 # are new in Meson 0.54.0, older versions of Meson won't be able to use g-i as
20 # subproject anyway
21-if meson.version().version_compare('>=0.54.0')
22+if meson.version().version_compare('>=0.54.0') and get_option('build_introspection_data') == true
23 girepo_dep = declare_dependency(
24 sources: typelibs,
25 dependencies: girepo_dep,
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.66.1.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb
index ee0ab2866b..05a08a50e0 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.66.1.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb
@@ -6,7 +6,7 @@ generation for bindings, API verification and documentation generation."
6HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection" 6HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection"
7BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues" 7BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues"
8SECTION = "libs" 8SECTION = "libs"
9LICENSE = "LGPLv2+ & GPLv2+" 9LICENSE = "LGPL-2.0-or-later & GPL-2.0-or-later & MIT"
10LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \ 10LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
11 file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \ 11 file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
12 file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \ 12 file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
@@ -14,28 +14,24 @@ 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://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \
18 file://0001-meson.build-exclude-girepo_dep-if-introspection-data.patch \
19 " 17 "
20 18
21SRC_URI[sha256sum] = "dd44a55ee5f426ea22b6b89624708f9e8d53f5cc94e5485c15c87cb30e06161d" 19SRC_URI[sha256sum] = "bd7babd99af7258e76819e45ba4a6bc399608fe762d83fde3cac033c50841bb4"
22 20
23SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch" 21SRC_URI:append:class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch"
24 22
25inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script 23inherit meson pkgconfig gtk-doc python3targetconfig qemu gobject-introspection-data upstream-version-is-even multilib_script
26 24
27GTKDOC_MESON_OPTION = "gtk_doc" 25GTKDOC_MESON_OPTION = "gtk_doc"
28 26
29MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" 27MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner"
30 28
31DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive" 29DEPENDS += " libffi zlib glib-2.0 python3 flex-native bison-native"
32 30
33# target build needs qemu to run temporary introspection binaries created 31# target build needs qemu to run temporary introspection binaries created
34# on the fly by g-ir-scanner and a native version of itself to run 32# on the fly by g-ir-scanner and a native version of itself to run
35# native versions of its own tools during build. 33# native versions of its own tools during build.
36# Also prelink-rtld is used to find out library dependencies of introspection binaries 34DEPENDS:append:class-target = " gobject-introspection-native qemu-native"
37# (standard ldd doesn't work when cross-compiling).
38DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
39 35
40# needed for writing out the qemu wrapper script 36# needed for writing out the qemu wrapper script
41export STAGING_DIR_HOST 37export STAGING_DIR_HOST
@@ -46,7 +42,7 @@ PACKAGECONFIG[doctool] = "-Ddoctool=enabled,-Ddoctool=disabled,python3-mako,"
46 42
47# Configure target build to use native tools of itself and to use a qemu wrapper 43# Configure target build to use native tools of itself and to use a qemu wrapper
48# and optionally to generate introspection data 44# and optionally to generate introspection data
49EXTRA_OEMESON_class-target = " \ 45EXTRA_OEMESON:class-target = " \
50 -Dgi_cross_use_prebuilt_gi=true \ 46 -Dgi_cross_use_prebuilt_gi=true \
51 -Dgi_cross_binary_wrapper=${B}/g-ir-scanner-qemuwrapper \ 47 -Dgi_cross_binary_wrapper=${B}/g-ir-scanner-qemuwrapper \
52 -Dgi_cross_ldd_wrapper=${B}/g-ir-scanner-lddwrapper \ 48 -Dgi_cross_ldd_wrapper=${B}/g-ir-scanner-lddwrapper \
@@ -55,21 +51,14 @@ EXTRA_OEMESON_class-target = " \
55 ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \ 51 ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \
56" 52"
57 53
58# Need to ensure ld.so.conf exists so prelink-native works 54do_configure:prepend:class-native() {
59# both before we build and if we install from sstate
60do_configure[prefuncs] += "gobject_introspection_preconfigure"
61python gobject_introspection_preconfigure () {
62 oe.utils.write_ld_so_conf(d)
63}
64
65do_configure_prepend_class-native() {
66 # Tweak the native python scripts so that they don't refer to the 55 # Tweak the native python scripts so that they don't refer to the
67 # full path of native python binary (the solution is taken from glib-2.0 recipe) 56 # full path of native python binary (the solution is taken from glib-2.0 recipe)
68 # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes) 57 # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
69 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in 58 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
70} 59}
71 60
72do_configure_prepend_class-target() { 61do_configure:prepend:class-target() {
73 # Write out a qemu wrapper that will be given to gi-scanner so that it 62 # Write out a qemu wrapper that will be given to gi-scanner so that it
74 # can run target helper binaries through that. 63 # can run target helper binaries through that.
75 qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" 64 qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
@@ -94,7 +83,7 @@ EOF
94 # from the target sysroot. 83 # from the target sysroot.
95 cat > ${B}/g-ir-scanner-wrapper << EOF 84 cat > ${B}/g-ir-scanner-wrapper << EOF
96#!/bin/sh 85#!/bin/sh
97# This prevents g-ir-scanner from writing cache data to $HOME 86# This prevents g-ir-scanner from writing cache data to user's HOME dir
98export GI_SCANNER_DISABLE_CACHE=1 87export GI_SCANNER_DISABLE_CACHE=1
99 88
100g-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 "\$@" 89g-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 "\$@"
@@ -113,7 +102,7 @@ EOF
113 # for a different architecture 102 # for a different architecture
114 cat > ${B}/g-ir-scanner-lddwrapper << EOF 103 cat > ${B}/g-ir-scanner-lddwrapper << EOF
115#!/bin/sh 104#!/bin/sh
116prelink-rtld --root=$STAGING_DIR_HOST "\$@" 105\$OBJDUMP -p "\$@"
117EOF 106EOF
118 chmod +x ${B}/g-ir-scanner-lddwrapper 107 chmod +x ${B}/g-ir-scanner-lddwrapper
119 108
@@ -122,22 +111,19 @@ EOF
122 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in 111 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
123} 112}
124 113
125do_compile_prepend() { 114do_compile:prepend() {
126 # This prevents g-ir-scanner from writing cache data to $HOME
127 export GI_SCANNER_DISABLE_CACHE=1
128
129 # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise 115 # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
130 export GIR_EXTRA_LIBS_PATH=$B/.libs 116 export GIR_EXTRA_LIBS_PATH=$B/.libs
131} 117}
132 118
133do_install_prepend() { 119do_install:prepend() {
134 # This prevents g-ir-scanner from writing cache data to $HOME 120 # This prevents g-ir-scanner from writing cache data to $HOME
135 export GI_SCANNER_DISABLE_CACHE=1 121 export GI_SCANNER_DISABLE_CACHE=1
136} 122}
137 123
138# Our wrappers need to be available system-wide, because they will be used 124# Our wrappers need to be available system-wide, because they will be used
139# to build introspection files for all other gobject-based packages 125# to build introspection files for all other gobject-based packages
140do_install_append_class-target() { 126do_install:append:class-target() {
141 install -d ${D}${bindir}/ 127 install -d ${D}${bindir}/
142 install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/ 128 install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
143 install ${B}/g-ir-scanner-wrapper ${D}${bindir}/ 129 install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
@@ -147,9 +133,9 @@ do_install_append_class-target() {
147 133
148# we need target versions of introspection tools in sysroot so that they can be run via qemu 134# we need target versions of introspection tools in sysroot so that they can be run via qemu
149# when building introspection files in other packages 135# when building introspection files in other packages
150SYSROOT_DIRS_append_class-target = " ${bindir}" 136SYSROOT_DIRS:append:class-target = " ${bindir}"
151 137
152SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess" 138SYSROOT_PREPROCESS_FUNCS:append:class-target = " gi_binaries_sysroot_preprocess"
153gi_binaries_sysroot_preprocess() { 139gi_binaries_sysroot_preprocess() {
154 # Tweak the binary names in the introspection pkgconfig file, so that it 140 # Tweak the binary names in the introspection pkgconfig file, so that it
155 # picks up our wrappers which do the cross-compile and qemu magic. 141 # picks up our wrappers which do the cross-compile and qemu magic.
@@ -159,7 +145,7 @@ gi_binaries_sysroot_preprocess() {
159 ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc 145 ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
160} 146}
161 147
162SYSROOT_PREPROCESS_FUNCS_append = " gi_ldsoconf_sysroot_preprocess" 148SYSROOT_PREPROCESS_FUNCS:append = " gi_ldsoconf_sysroot_preprocess"
163gi_ldsoconf_sysroot_preprocess () { 149gi_ldsoconf_sysroot_preprocess () {
164 mkdir -p ${SYSROOT_DESTDIR}${bindir} 150 mkdir -p ${SYSROOT_DESTDIR}${bindir}
165 dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN} 151 dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN}
@@ -182,26 +168,27 @@ gi_package_preprocess() {
182SSTATE_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}" 168SSTATE_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}"
183 169
184# .typelib files are needed at runtime and so they go to the main package 170# .typelib files are needed at runtime and so they go to the main package
185FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" 171FILES:${PN}:append = " ${libdir}/girepository-*/*.typelib"
186 172
187# .gir files go to dev package, as they're needed for developing (but not for running) 173# .gir files go to dev package, as they're needed for developing (but not for running)
188# things that depends on introspection. 174# things that depends on introspection.
189FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir" 175FILES:${PN}-dev:append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir"
190FILES_${PN}-dev_append = " ${datadir}/gir-*/*.rnc" 176FILES:${PN}-dev:append = " ${datadir}/gir-*/*.rnc"
191 177
192# These are used by gobject-based packages 178# These are used by gobject-based packages
193# to generate transient introspection binaries 179# to generate transient introspection binaries
194FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \ 180FILES:${PN}-dev:append = " ${datadir}/gobject-introspection-1.0/gdump.c \
195 ${datadir}/gobject-introspection-1.0/Makefile.introspection" 181 ${datadir}/gobject-introspection-1.0/Makefile.introspection"
196 182
197# These are used by dependent packages (e.g. pygobject) to build their 183# These are used by dependent packages (e.g. pygobject) to build their
198# testsuites. 184# testsuites.
199FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \ 185FILES:${PN}-dev:append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
200 ${datadir}/gobject-introspection-1.0/tests/*.h" 186 ${datadir}/gobject-introspection-1.0/tests/*.h"
201 187
202FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/" 188FILES:${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
203FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" 189FILES:${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
204 190
205RDEPENDS_${PN} = "python3-pickle python3-xml" 191# setuptools can be removed when upstream removes all uses of distutils
192RDEPENDS:${PN} = "python3-pickle python3-xml python3-setuptools"
206 193
207BBCLASSEXTEND = "native" 194BBCLASSEXTEND = "native"