diff options
| -rw-r--r-- | meta-gnome/recipes-gnome/libtimezonemap/files/port-to-libsoup3.patch | 95 | ||||
| -rw-r--r-- | meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.6.bb | 5 |
2 files changed, 98 insertions, 2 deletions
diff --git a/meta-gnome/recipes-gnome/libtimezonemap/files/port-to-libsoup3.patch b/meta-gnome/recipes-gnome/libtimezonemap/files/port-to-libsoup3.patch new file mode 100644 index 0000000000..7039be1795 --- /dev/null +++ b/meta-gnome/recipes-gnome/libtimezonemap/files/port-to-libsoup3.patch | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | From: Joshua Peisach <itzswirlz2020@outlook.com> | ||
| 2 | Date: Sat, 06 Aug 2022 11:37:51 +0200 | ||
| 3 | Subject: Port to libsoup3. | ||
| 4 | |||
| 5 | Forwarded: not-yet | ||
| 6 | Last-Update: 2022-08-06 | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://salsa.debian.org/cinnamon-team/libtimezonemap/-/commit/ed57d8331a7429487b9c8ea97cc7bd684ed5a2e1] | ||
| 9 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 10 | --- | ||
| 11 | Index: libtimezonemap/configure.ac | ||
| 12 | =================================================================== | ||
| 13 | --- libtimezonemap.orig/configure.ac | ||
| 14 | +++ libtimezonemap/configure.ac | ||
| 15 | @@ -50,13 +50,13 @@ | ||
| 16 | GLIB_REQUIRED_VERSION=2.26 | ||
| 17 | GTK3_REQUIRED_VERSION=3.1.4 | ||
| 18 | GIO_REQUIRED_VERSION=2.5.11 | ||
| 19 | -SOUP_REQUIRED_VERSION=2.42.0 | ||
| 20 | +SOUP_REQUIRED_VERSION=3.0.7 | ||
| 21 | |||
| 22 | AC_CHECK_LIBM | ||
| 23 | |||
| 24 | PKG_CHECK_MODULES(LIBTIMEZONEMAP, gio-2.0 >= $GIO_REQUIRED_VERSION | ||
| 25 | gtk+-3.0 >= $GTK3_REQUIRED_VERSION | ||
| 26 | - libsoup-2.4 >= $SOUP_REQUIRED_VERSION | ||
| 27 | + libsoup-3.0 >= $SOUP_REQUIRED_VERSION | ||
| 28 | json-glib-1.0) | ||
| 29 | LIBTIMEZONEMAP_LIBS="$LIBTIMEZONEMAP_LIBS $LIBM" | ||
| 30 | |||
| 31 | Index: libtimezonemap/src/timezone-completion.c | ||
| 32 | =================================================================== | ||
| 33 | --- libtimezonemap.orig/src/timezone-completion.c | ||
| 34 | +++ libtimezonemap/src/timezone-completion.c | ||
| 35 | @@ -270,9 +270,10 @@ | ||
| 36 | CcTimezoneCompletionPrivate * priv = completion->priv; | ||
| 37 | GError * error = NULL; | ||
| 38 | GInputStream * stream; | ||
| 39 | - SoupMessage *message; | ||
| 40 | + const gchar * reason_phrase; | ||
| 41 | + SoupStatus status_code; | ||
| 42 | |||
| 43 | - stream = soup_request_send_finish (SOUP_REQUEST (object), res, &error); | ||
| 44 | + stream = soup_session_send_finish (priv->soup_session, res, &error); | ||
| 45 | if (stream == NULL) | ||
| 46 | { | ||
| 47 | if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | ||
| 48 | @@ -283,8 +284,9 @@ | ||
| 49 | return; | ||
| 50 | } | ||
| 51 | |||
| 52 | - message = soup_request_http_get_message (SOUP_REQUEST_HTTP (object)); | ||
| 53 | - if (message->status_code == SOUP_STATUS_OK) | ||
| 54 | + reason_phrase = soup_message_get_reason_phrase (SOUP_MESSAGE (object)); | ||
| 55 | + status_code = soup_message_get_status (SOUP_MESSAGE (object)); | ||
| 56 | + if (status_code == SOUP_STATUS_OK) | ||
| 57 | { | ||
| 58 | JsonParser *parser; | ||
| 59 | |||
| 60 | @@ -296,10 +298,10 @@ | ||
| 61 | else | ||
| 62 | { | ||
| 63 | g_warning ("Unable to fetch geonames (server responded with: %u %s)", | ||
| 64 | - message->status_code, message->reason_phrase); | ||
| 65 | + status_code, reason_phrase); | ||
| 66 | } | ||
| 67 | |||
| 68 | - g_object_unref (message); | ||
| 69 | + g_object_unref (object); | ||
| 70 | g_object_unref (stream); | ||
| 71 | } | ||
| 72 | |||
| 73 | @@ -362,7 +364,7 @@ | ||
| 74 | request_zones (CcTimezoneCompletion * completion) | ||
| 75 | { | ||
| 76 | CcTimezoneCompletionPrivate * priv = completion->priv; | ||
| 77 | - SoupRequest *req; | ||
| 78 | + SoupMessage *req; | ||
| 79 | GError *error = NULL; | ||
| 80 | |||
| 81 | priv->queued_request = 0; | ||
| 82 | @@ -391,10 +393,11 @@ | ||
| 83 | g_free (locale); | ||
| 84 | g_free (escaped); | ||
| 85 | |||
| 86 | - req = soup_session_request (priv->soup_session, url, &error); | ||
| 87 | + req = soup_message_new (NULL, url); | ||
| 88 | if (req) | ||
| 89 | { | ||
| 90 | - soup_request_send_async (req, priv->cancel, geonames_data_ready, completion); | ||
| 91 | + soup_session_send_async (priv->soup_session, req, G_PRIORITY_DEFAULT, | ||
| 92 | + priv->cancel, geonames_data_ready, completion); | ||
| 93 | g_object_unref (req); | ||
| 94 | } | ||
| 95 | else | ||
diff --git a/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.6.bb b/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.6.bb index 7c8e410b09..cca9e632f8 100644 --- a/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.6.bb +++ b/meta-gnome/recipes-gnome/libtimezonemap/libtimezonemap_0.4.6.bb | |||
| @@ -5,13 +5,14 @@ LICENSE = "GPL-3.0-only" | |||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 6 | 6 | ||
| 7 | SRC_URI = "${DEBIAN_MIRROR}/main/libt/${BPN}/${BPN}_${PV}.orig.tar.gz;downloadfilename=${BP}.tar.gz \ | 7 | SRC_URI = "${DEBIAN_MIRROR}/main/libt/${BPN}/${BPN}_${PV}.orig.tar.gz;downloadfilename=${BP}.tar.gz \ |
| 8 | file://0001-configure.ac-correct-the-version.patch" | 8 | file://0001-configure.ac-correct-the-version.patch \ |
| 9 | file://port-to-libsoup3.patch" | ||
| 9 | SRC_URI[sha256sum] = "0d634cc2476d8f57d1ee1864bd4f442180ae4bf040a9ae4bf73b66bbd85d7195" | 10 | SRC_URI[sha256sum] = "0d634cc2476d8f57d1ee1864bd4f442180ae4bf040a9ae4bf73b66bbd85d7195" |
| 10 | 11 | ||
| 11 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/libt/libtimezonemap" | 12 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/libt/libtimezonemap" |
| 12 | UPSTREAM_CHECK_REGEX = "libtimezonemap_(?P<pver>\d+(\.\d+)+)" | 13 | UPSTREAM_CHECK_REGEX = "libtimezonemap_(?P<pver>\d+(\.\d+)+)" |
| 13 | 14 | ||
| 14 | DEPENDS = "gtk+3 gdk-pixbuf libsoup-2.4 json-glib gnome-common-native" | 15 | DEPENDS = "gtk+3 gdk-pixbuf libsoup json-glib gnome-common-native" |
| 15 | 16 | ||
| 16 | B = "${S}" | 17 | B = "${S}" |
| 17 | 18 | ||
