Files
buildroot/package/libglib2/2.82.0/0001-meson.build-add-girdir-to-gio-2.0.pc-and-glib-2.0.pc.patch
Fiona Klute (WIWA) 11aa1cfa5a package/{gobject-introspection, libglib2}: bump to {1.82.0, 2.82.4}
There are a lot of interconnected changes in these releases:

Since 2.79.0, the introspection (i11n) data for libglib2 was moved out
of gobject-introspection (GOI) and into libglib2 itself, thus building
libglib2 with i11n needs tools provided by GOI [0].

However, GOI needs libglib2, but it is content with a libglib2 that
does not have i11n. So we introduce a new package, libglib2-bootstrap,
that provides a minimalist libglib2 that is enough to build GOI, build
GOI, then build the final, complete libglib2 with i11n.

However, not every package needs i11n, so we make that optional: if GOI
is enabled, libglib2 will have i11n, otherwise it won't.

This means the dependency ordering has changed: GOI used to
build-depend on libglib2, but now that's the other way around. This
will cause issues with packages that build-depend only on GOI and then
expect a libglib2 with i11n; those will only get a basic libglib2
without i11n at build time, but a full one at runtime. Those packages
will have to be fixed to also include a build dependency on libglib2.

The version bump between libglib2 and GOI must be done in lock-step,
because newer GOI does not support an older libglib2 and, as seen
above, newer libglib2 has the data previously provided by older GOI.

As a consequence of now generating its own i11n data, libglib2 needs to
be able to run target programs during the build, to extract data layout
and generate i11n data, a bit like GOI does [1]. So we provide a qemu
wrapper similar to the one in nodejs-src, and use that as meson's
exe_wrapper.

Except for our first patch, the other libglib2 patches were backports,
and are present upstream already, so we can drop them; the first patch
needs being refreshed.

We also move the remaining patch to a versioned sub-directory, so that
it is easier to share the patches between libglib2-bootstrap and
libglib2, should we need to add more patches in the future.

Drop the "giscanner: remove dependency on distutils.msvccompile"
patch, included upstream.

Updated hash for giscanner/scannerlexer.l is due to code changes, no
change in license, see [2] (two commits in 2024).

[0] https://gitlab.gnome.org/GNOME/glib/-/blob/2.79.0/NEWS?ref_type=tags#L8-17
[1] technically, this should not be needed if libglib2 only uses the
    wrappers provided by GOI: g-ir-scanner et al. However, its
    meson.build explicitly checks that it can run generated binaries
    through the exe_wrapper. Investigating if that's really needed is
    left as an exercise for the interested party: in practice, we will
    have to be able to run via host-qemu, so this does not add any build
    time overhead.
[2] https://gitlab.gnome.org/GNOME/gobject-introspection/-/commits/1.82.0/giscanner/scannerlexer.l?ref_type=tags

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-02-04 16:16:11 +01:00

54 lines
2.1 KiB
Diff

From 3fcd5f431dee9909b6bcbd9b8b61d4b1fe4b5f92 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 12 Nov 2021 18:01:05 +0100
Subject: [PATCH] meson.build: add girdir to gio-2.0.pc and glib-2.0.pc
Add girdir to gio-2.0.pc and glib-2.0.pc to fix the following build
failure with atk or libnice:
/home/giuliobenetti/autobuild/run/instance-1/output-1/host/riscv32-buildroot-linux-gnu/sysroot/usr/bin/g-ir-compiler atk/Atk-1.0.gir --output atk/Atk-1.0.typelib --includedir=/usr/share/gir-1.0
Could not find GIR file 'GObject-2.0.gir'; check XDG_DATA_DIRS or use --includedir
Fixes:
- http://autobuild.buildroot.org/results/2716929db638977e6bf665352a08bd580e1dd0ae
- http://autobuild.buildroot.org/results/3088ef32b03e0bb984291b1227b187f1ff816eb7
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Dario: make the patch to be applied with fuzz factor 0]
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
[Fiona: refresh for glib 2.80.4]
Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Upstream: Never submitted
---
gio/meson.build | 1 +
glib/meson.build | 1 +
2 files changed, 2 insertions(+)
diff --git a/gio/meson.build b/gio/meson.build
index 59c2b0f..5120537 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -885,6 +885,7 @@ pkg.generate(libgio,
variables : [
'schemasdir=' + '${datadir}' / schemas_subdir,
'dtdsdir=' + '${datadir}' / dtds_subdir,
+ 'girdir=' + join_paths('${libdir}', '../share/gir-1.0'),
'giomoduledir=' + pkgconfig_giomodulesdir,
'gio=' + '${bindir}' / 'gio',
'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
diff --git a/glib/meson.build b/glib/meson.build
index d2efeba..a69532b 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -447,6 +447,7 @@ pkg.generate(libglib,
subdirs : ['glib-2.0'],
extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
variables : [
+ 'girdir=' + join_paths('${libdir}', '../share/gir-1.0'),
'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal',
'gobject_query=' + '${bindir}' / 'gobject-query',
'glib_mkenums=' + '${bindir}' / 'glib-mkenums',
--
2.45.2