From e5a05b5df8a13dd04170d509c5f698eb10dc42d2 Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Wed, 23 Mar 2022 16:43:30 -0700 Subject: [PATCH] libgweather: update to 4.0.0 --- common/shlibs | 2 +- .../patches/fix-cross-introspection.patch | 14 +++++ ...metar-test-dont-use-known-duplicates.patch | 51 +++++++++++++++++++ srcpkgs/libgweather/template | 20 +++++--- srcpkgs/libgweather/update | 1 + 5 files changed, 80 insertions(+), 8 deletions(-) create mode 100644 srcpkgs/libgweather/patches/fix-cross-introspection.patch create mode 100644 srcpkgs/libgweather/patches/metar-test-dont-use-known-duplicates.patch diff --git a/common/shlibs b/common/shlibs index d6a318a8125..7dd4039d1ba 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1129,7 +1129,7 @@ libgstwebrtc-1.0.so.0 gst-plugins-bad1-1.18.4_2 libgstgl-1.0.so.0 gst-plugins-base1-1.14.0_1 libgnome-desktop-3.so.19 gnome-desktop-3.37.90.1_1 libsecret-1.so.0 libsecret-0.10_1 -libgweather-3.so.16 libgweather-3.34.0_1 +libgweather-4.so.0 libgweather-4.0.0_1 libgnomekbd.so.8 libgnomekbd-3.6.0_1 libgnomekbdui.so.8 libgnomekbd-3.6.0_1 libibus-1.0.so.5 ibus-1.4.99.20120917_1 diff --git a/srcpkgs/libgweather/patches/fix-cross-introspection.patch b/srcpkgs/libgweather/patches/fix-cross-introspection.patch new file mode 100644 index 00000000000..fbec0c3317f --- /dev/null +++ b/srcpkgs/libgweather/patches/fix-cross-introspection.patch @@ -0,0 +1,14 @@ +diff --git a/libgweather/meson.build b/libgweather/meson.build +index 08311af4..ef554f2e 100644 +--- a/libgweather/meson.build ++++ b/libgweather/meson.build +@@ -208,7 +208,7 @@ lib_libgweather = library('gweather-4', + ) + + g_ir_scanner = find_program('g-ir-scanner', required: get_option('introspection')) +-build_gir = get_option('introspection') and g_ir_scanner.found() and not meson.is_cross_build() ++build_gir = get_option('introspection') and g_ir_scanner.found() + + enable_vala = get_option('enable_vala') + vapigen = find_program('vapigen', required: enable_vala == 'true') + diff --git a/srcpkgs/libgweather/patches/metar-test-dont-use-known-duplicates.patch b/srcpkgs/libgweather/patches/metar-test-dont-use-known-duplicates.patch new file mode 100644 index 00000000000..5646cd24cc2 --- /dev/null +++ b/srcpkgs/libgweather/patches/metar-test-dont-use-known-duplicates.patch @@ -0,0 +1,51 @@ +From 8b4fe0ad32bac4da47188207541b0aec3f786498 Mon Sep 17 00:00:00 2001 +From: Pierre Labastie +Date: Sun, 10 Apr 2022 22:24:47 +0200 +Subject: [PATCH] metar test: Don't use "known" duplicates + +The metar list provided by NOAA contains duplicate ICAO codes. +Those duplicates may change over time, so it does not make sense +to use an array of known duplicates. Presently a duplicate is rejected +when it is known, and inserted if it is not, leading to a difference +in the number of insertions and the number of keys, so that the test +fails. If any duplicate is rejected, the number of insertions is +always equal to the number of keys (unless something goes wrong +in g_hash_table_insert). And this is the default behavior for known +duplicates anyway. + +Closes: https://gitlab.gnome.org/GNOME/libgweather/-/issues/168 +--- + libgweather/tests/metar.c | 15 +++------------ + 1 file changed, 3 insertions(+), 12 deletions(-) + +diff --git a/libgweather/tests/metar.c b/libgweather/tests/metar.c +index 7d6c7c04..a6fa7e79 100644 +--- a/libgweather/tests/metar.c ++++ b/libgweather/tests/metar.c +@@ -41,20 +41,11 @@ parse_metar_stations (const char *contents) + continue; + } + ++ /* If it is a duplicate discard it */ + if (g_hash_table_lookup (stations_ht, station)) { +- const char * const known_duplicates[] = { +- "VOGO", +- "KHQG", +- "KOEL", +- "KTQK", +- "KX26", +- NULL +- }; +- if (g_strv_contains (known_duplicates, station)) { +- g_free (station); +- continue; +- } + g_test_message ("Weather station '%s' already defined\n", station); ++ g_free (station); ++ continue; + } + + g_hash_table_insert (stations_ht, station, g_strdup (line)); +-- +GitLab + diff --git a/srcpkgs/libgweather/template b/srcpkgs/libgweather/template index 857006ea878..da1cea0e42c 100644 --- a/srcpkgs/libgweather/template +++ b/srcpkgs/libgweather/template @@ -1,11 +1,14 @@ # Template file for 'libgweather' pkgname=libgweather -version=40.0 +reverts="40.0_1" +version=4.0.0 revision=1 build_style=meson build_helper="gir" -configure_args="$(vopt_bool gir enable_vala) -Dzoneinfo_dir=/usr/share/zoneinfo" -hostmakedepends="glib-devel intltool pkg-config python3-gobject-devel $(vopt_if gir vala)" +configure_args="$(vopt_bool gir enable_vala) $(vopt_bool gir introspection) + $(vopt_bool gtk_doc gtk_doc) -Dzoneinfo_dir=/usr/share/zoneinfo" +hostmakedepends="glib-devel gettext pkg-config python3-gobject-devel $(vopt_if gir vala) + $(vopt_if gtk_doc gi-docgen)" makedepends="geocode-glib-devel gtk+3-devel libsoup-gnome-devel" depends="tzdata" short_desc="GNOME Weather information access library" @@ -13,15 +16,15 @@ maintainer="Enno Boland " license="LGPL-2.1-or-later" homepage="https://wiki.gnome.org/Projects/LibGWeather" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=ca4e8f2a4baaa9fc6d75d8856adb57056ef1cd6e55c775ba878ae141b6276ee6 +checksum=440d44801b6f72b48c676e5e37f9109cfee1394fd74cc92725e1b1ba4fae834c -build_options="gir" -build_options_default="gir" +build_options="gir gtk_doc" +build_options_default="gir gtk_doc" post_patch() { # This test requires LC_IDENTIFICATION, which is a GLIBC's extension # And looks like we didn't ship it. - vsed -i -e '/setlocale.*fr_FR/i return;' libgweather/test_libgweather.c + vsed -i -e '/setlocale.*fr_FR/i return;' libgweather/tests/test_libgweather.c } libgweather-devel_package() { @@ -35,5 +38,8 @@ libgweather-devel_package() { vmove usr/share/gir-1.0 vmove usr/share/vala fi + if [ "$build_option_gtk_doc" ]; then + vmove usr/share/doc + fi } } diff --git a/srcpkgs/libgweather/update b/srcpkgs/libgweather/update index e69de29bb2d..496ee53deb1 100644 --- a/srcpkgs/libgweather/update +++ b/srcpkgs/libgweather/update @@ -0,0 +1 @@ +ignore="40.*"