diff mbox series

[meta-gnome,17/21] gweather-locations: Add recipe

Message ID 20261127070211.2329979-18-khem.raj@oss.qualcomm.com
State New
Headers show
Series Upstream checks, source fixes and upgrades | expand

Commit Message

Khem Raj Nov. 27, 2026, 7:02 a.m. UTC
libgweather 4.5 moved its world locations database (Locations.xml and
the precompiled GVariant Locations.bin) into this module, and libgweather
4.6 finds it through the gweather-locations pkg-config file.

Locations.bin is generated at build time with python3-gi in host byte
order, so the package stays architecture specific. glib-2.0-native has
no introspection data, so the generator uses the target GLib typelib (as
libgweather4 did before) and the recipe is skipped without
GI_DATA_ENABLED.

Tested by building libgweather4 against it for qemux86-64.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../libgweather/gweather-locations_2026.2.bb  | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/libgweather/gweather-locations_2026.2.bb
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gnome/libgweather/gweather-locations_2026.2.bb b/meta-gnome/recipes-gnome/libgweather/gweather-locations_2026.2.bb
new file mode 100644
index 0000000000..ec878e9a2c
--- /dev/null
+++ b/meta-gnome/recipes-gnome/libgweather/gweather-locations_2026.2.bb
@@ -0,0 +1,29 @@ 
+SUMMARY = "Locations database for libgweather"
+DESCRIPTION = "The world locations database used by libgweather, as XML \
+source and as a precompiled GVariant database."
+HOMEPAGE = "https://gitlab.gnome.org/GNOME/gweather-locations"
+BUGTRACKER = "https://gitlab.gnome.org/GNOME/gweather-locations/-/issues"
+
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=570a9b3749dd0463a1778803b12a6dce"
+
+inherit gnomebase gettext python3native gobject-introspection-data
+
+SRC_URI[archive.sha256sum] = "e7570a3661e0a752a06387b2032585cf588fc56770b1f9f39f1a55d17b2835fe"
+
+# Releases are numbered <year>.<n>; there are no development series
+UPSTREAM_CHECK_REGEX = "gweather-locations-(?P<pver>\d+\.\d+)\.tar"
+
+# Locations.bin is generated with python3-gi, using the target GLib typelib
+DEPENDS = "glib-2.0 python3-pygobject-native"
+export GI_TYPELIB_PATH = "${STAGING_LIBDIR}/girepository-1.0"
+
+python __anonymous() {
+    if d.getVar('GI_DATA_ENABLED') != 'True':
+        raise bb.parse.SkipRecipe("needs the GLib introspection typelib (GI_DATA_ENABLED)")
+}
+
+FILES:${PN} += " \
+    ${datadir}/gweather-locations \
+    ${libdir}/gweather-locations \
+"