From 3533741683530eb476b7499b39bc83137d96393c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 21 Nov 2023 18:19:40 +0700 Subject: [PATCH] libgweather: update to 4.4.0. --- ...fallback-metric-unit-detection-logic.patch | 32 ------------- srcpkgs/libgweather/patches/metar.patch | 45 +++++++++++++++++++ srcpkgs/libgweather/patches/vdsa.patch | 24 ++++++++++ srcpkgs/libgweather/template | 4 +- 4 files changed, 71 insertions(+), 34 deletions(-) delete mode 100644 srcpkgs/libgweather/patches/0001-Fix-fallback-metric-unit-detection-logic.patch create mode 100644 srcpkgs/libgweather/patches/metar.patch create mode 100644 srcpkgs/libgweather/patches/vdsa.patch diff --git a/srcpkgs/libgweather/patches/0001-Fix-fallback-metric-unit-detection-logic.patch b/srcpkgs/libgweather/patches/0001-Fix-fallback-metric-unit-detection-logic.patch deleted file mode 100644 index f01db684fe4d65..00000000000000 --- a/srcpkgs/libgweather/patches/0001-Fix-fallback-metric-unit-detection-logic.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e65f3041b1a14dc7d46935091b35ae6a7236d118 Mon Sep 17 00:00:00 2001 -From: Michal Vasilek -Date: Sun, 18 Sep 2022 19:32:51 +0200 -Subject: [PATCH] Fix fallback metric unit detection logic - -When HAVE__NL_MEASUREMENT_MEASUREMENT is not defined (for example on -musl systems), the fallback logic checks for units in translation files. - -If the unit in translation files is metric, we should use metric and -not print a warning about missing translation and use metric. - -Introduced in 1c140fc8ce08260d5008847945bf345654ad7fa8 ---- - libgweather/gweather-info.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgweather/gweather-info.c b/libgweather/gweather-info.c -index d33d3905..193ee86c 100644 ---- a/libgweather/gweather-info.c -+++ b/libgweather/gweather-info.c -@@ -880,7 +880,7 @@ is_locale_metric (void) - - if (strcmp (e, "default:inch") == 0) - return FALSE; -- else if (strcmp (e, "default:mm") == 1) -+ else if (strcmp (e, "default:mm") == 0) - return TRUE; - else { - g_warning ("Wrong translation for libgweather; please file " --- -2.37.3 - diff --git a/srcpkgs/libgweather/patches/metar.patch b/srcpkgs/libgweather/patches/metar.patch new file mode 100644 index 00000000000000..0e099d3dd76a54 --- /dev/null +++ b/srcpkgs/libgweather/patches/metar.patch @@ -0,0 +1,45 @@ +From e62b4f1790c525af6d565a2d6adf8a178e9e7153 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= +Date: Mon, 20 Nov 2023 12:24:45 +0200 +Subject: [PATCH] metar: update dataserver URL + +Info about URL change: +https://github.com/mate-desktop/libmateweather/pull/79#issuecomment-1765810415 + +https://gitlab.gnome.org/GNOME/libgweather/-/issues/232 +https://gitlab.gnome.org/GNOME/libgweather/-/issues/236 +--- + libgweather/weather-metar.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libgweather/weather-metar.c b/libgweather/weather-metar.c +index c0e8a6e5..3cb5ecc5 100644 +--- a/libgweather/weather-metar.c ++++ b/libgweather/weather-metar.c +@@ -675,7 +675,7 @@ metar_start_open (GWeatherInfo *info) + if (!loc->latlon_valid) + return; + +- g_debug ("metar_start_open, requesting: https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=3&mostRecent=true&fields=raw_text&stationString=%s", loc->code); ++ g_debug ("metar_start_open, requesting: https://aviationweather.gov/cgi-bin/data/dataserver.php?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=3&mostRecent=true&fields=raw_text&stationString=%s", loc->code); + query = soup_form_encode ( + "dataSource", + "metars", +@@ -696,14 +696,14 @@ metar_start_open (GWeatherInfo *info) + uri = g_uri_build (SOUP_HTTP_URI_FLAGS, + "https", + NULL, +- "www.aviationweather.gov", ++ "aviationweather.gov", + -1, +- "/adds/dataserver_current/httpparam", ++ "/cgi-bin/data/dataserver.php", + query, + NULL); + g_free (query); + #else +- uri = soup_uri_new ("https://www.aviationweather.gov/adds/dataserver_current/httpparam"); ++ uri = soup_uri_new ("https://aviationweather.gov/cgi-bin/data/dataserver.php"); + uri->query = query; + #endif + msg = soup_message_new_from_uri ("GET", uri); diff --git a/srcpkgs/libgweather/patches/vdsa.patch b/srcpkgs/libgweather/patches/vdsa.patch new file mode 100644 index 00000000000000..397297d3f128b5 --- /dev/null +++ b/srcpkgs/libgweather/patches/vdsa.patch @@ -0,0 +1,24 @@ +Date: Tue, 21 Nov 2023 17:51:29 +0700 +Subject: [PATCH] Locations: Siem Reap changes its international airport + +Old airport won't provide new METAR. +--- + data/Locations.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/Locations.xml b/data/Locations.xml +index f4d1e6c6..c42e9508 100644 +--- a/data/Locations.xml ++++ b/data/Locations.xml +@@ -3081,7 +3081,7 @@ + + + Siem Reap +- VDSR ++ VDSA + 13.366667 103.850000 + + +-- +2.42.0 + diff --git a/srcpkgs/libgweather/template b/srcpkgs/libgweather/template index fdcdffd1c35504..16c75b36eb8065 100644 --- a/srcpkgs/libgweather/template +++ b/srcpkgs/libgweather/template @@ -1,7 +1,7 @@ # Template file for 'libgweather' pkgname=libgweather reverts="40.0_1" -version=4.2.0 +version=4.4.0 revision=1 build_style=meson build_helper="gir" @@ -17,7 +17,7 @@ license="LGPL-2.1-or-later" homepage="https://wiki.gnome.org/Projects/LibGWeather" changelog="https://gitlab.gnome.org/GNOME/libgweather/-/raw/main/NEWS" distfiles="${GNOME_SITE}/libgweather/${version%.*}/libgweather-${version}.tar.xz" -checksum=af8a812da0d8976a000e1d62572c256086a817323fbf35b066dbfdd8d2ca6203 +checksum=366e866ff2a708b894cfea9475b8e8ff54cb3e2b477ea72a8ade0dabee5f48a4 build_options="gir gtk_doc" build_options_default="gir gtk_doc"