diff options
| -rw-r--r-- | meta-gnome/recipes-gnome/libgsf/libgsf/0001-Compilation-attempt-fixes-for-libxml-2.13.patch | 105 | ||||
| -rw-r--r-- | meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb | 3 |
2 files changed, 107 insertions, 1 deletions
diff --git a/meta-gnome/recipes-gnome/libgsf/libgsf/0001-Compilation-attempt-fixes-for-libxml-2.13.patch b/meta-gnome/recipes-gnome/libgsf/libgsf/0001-Compilation-attempt-fixes-for-libxml-2.13.patch new file mode 100644 index 0000000000..08ff51205a --- /dev/null +++ b/meta-gnome/recipes-gnome/libgsf/libgsf/0001-Compilation-attempt-fixes-for-libxml-2.13.patch | |||
| @@ -0,0 +1,105 @@ | |||
| 1 | From 4a84e9857d83f684bf53d616942a393ce558a328 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Morten Welinder <terra@gnome.org> | ||
| 3 | Date: Wed, 3 Jul 2024 19:18:15 -0400 | ||
| 4 | Subject: [PATCH] Compilation: attempt fixes for libxml 2.13 | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libgsf/-/commit/5d4bb55095d3d6ef793c1908a88504183e28644c] | ||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | --- | ||
| 9 | configure.ac | 1 + | ||
| 10 | gsf/gsf-input-http.c | 19 +++++++++++++++++++ | ||
| 11 | 2 files changed, 20 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/configure.ac b/configure.ac | ||
| 14 | index fceb776..7c2f946 100644 | ||
| 15 | --- a/configure.ac | ||
| 16 | +++ b/configure.ac | ||
| 17 | @@ -238,6 +238,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <glib/gstdio.h>]], [[(void)g_chown("/ | ||
| 18 | AC_MSG_RESULT(yes)], | ||
| 19 | [AC_MSG_RESULT(no)]) | ||
| 20 | AC_CHECK_FUNCS(g_date_time_new_from_iso8601 g_date_time_format_iso8601) | ||
| 21 | +AC_CHECK_FUNCS(xmlNanoHTTPOpen xmlNanoHTTPClose) | ||
| 22 | CFLAGS=$SAVE_CFLAGS | ||
| 23 | LIBS=$SAVE_LIBS | ||
| 24 | |||
| 25 | diff --git a/gsf/gsf-input-http.c b/gsf/gsf-input-http.c | ||
| 26 | index bdde3c8..03f4045 100644 | ||
| 27 | --- a/gsf/gsf-input-http.c | ||
| 28 | +++ b/gsf/gsf-input-http.c | ||
| 29 | @@ -23,7 +23,10 @@ | ||
| 30 | #include <gsf/gsf-input-http.h> | ||
| 31 | #include <gsf/gsf.h> | ||
| 32 | |||
| 33 | +#ifdef HAVE_XMLNANOHTTPOPEN | ||
| 34 | +// It's going away, so make it conditional | ||
| 35 | #include <libxml/nanohttp.h> | ||
| 36 | +#endif | ||
| 37 | |||
| 38 | struct _GsfInputHTTP { | ||
| 39 | GsfInput input; | ||
| 40 | @@ -74,7 +77,9 @@ gsf_input_http_finalize (GObject *obj_input) | ||
| 41 | input->content_type = NULL; | ||
| 42 | |||
| 43 | if (input->ctx) { | ||
| 44 | +#ifdef HAVE_XMLNANOHTTPCLOSE | ||
| 45 | xmlNanoHTTPClose ((gpointer) input->ctx); | ||
| 46 | +#endif | ||
| 47 | input->ctx = NULL; | ||
| 48 | } | ||
| 49 | |||
| 50 | @@ -215,6 +220,7 @@ gsf_input_http_get_content_type (GsfInputHTTP *input) | ||
| 51 | return content_type; | ||
| 52 | } | ||
| 53 | |||
| 54 | +#ifdef HAVE_XMLNANOHTTPOPEN | ||
| 55 | static GsfInput * | ||
| 56 | make_local_copy (gpointer *ctx) | ||
| 57 | { | ||
| 58 | @@ -254,6 +260,7 @@ make_local_copy (gpointer *ctx) | ||
| 59 | |||
| 60 | return copy; | ||
| 61 | } | ||
| 62 | +#endif | ||
| 63 | |||
| 64 | /** | ||
| 65 | * gsf_input_http_new: | ||
| 66 | @@ -265,6 +272,7 @@ make_local_copy (gpointer *ctx) | ||
| 67 | GsfInput * | ||
| 68 | gsf_input_http_new (gchar const * url, GError **error G_GNUC_UNUSED) | ||
| 69 | { | ||
| 70 | +#ifdef HAVE_XMLNANOHTTPOPEN | ||
| 71 | GObject *obj; | ||
| 72 | GsfInput *input; | ||
| 73 | gpointer ctx; | ||
| 74 | @@ -293,6 +301,10 @@ gsf_input_http_new (gchar const * url, GError **error G_GNUC_UNUSED) | ||
| 75 | GSF_INPUT_HTTP (obj)->ctx = ctx; | ||
| 76 | |||
| 77 | return GSF_INPUT (obj); | ||
| 78 | +#else | ||
| 79 | + g_return_val_if_fail(url != NULL, NULL); | ||
| 80 | + return NULL; | ||
| 81 | +#endif | ||
| 82 | } | ||
| 83 | |||
| 84 | static GsfInput * | ||
| 85 | @@ -304,6 +316,7 @@ gsf_input_http_dup (GsfInput *src, GError **err) | ||
| 86 | static guint8 const * | ||
| 87 | gsf_input_http_read (GsfInput *input, size_t num_bytes, guint8 *buffer) | ||
| 88 | { | ||
| 89 | +#ifdef HAVE_XMLNANOHTTPOPEN | ||
| 90 | int nread; | ||
| 91 | size_t total_read; | ||
| 92 | gpointer ctx = GSF_INPUT_HTTP (input)->ctx; | ||
| 93 | @@ -324,6 +337,12 @@ gsf_input_http_read (GsfInput *input, size_t num_bytes, guint8 *buffer) | ||
| 94 | return NULL; | ||
| 95 | } | ||
| 96 | return buffer; | ||
| 97 | +#else | ||
| 98 | + (void)input; | ||
| 99 | + (void)num_bytes; | ||
| 100 | + (void)buffer; | ||
| 101 | + return NULL; | ||
| 102 | +#endif | ||
| 103 | } | ||
| 104 | |||
| 105 | static gboolean | ||
diff --git a/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb b/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb index 7e1842b1ac..97cbbe450c 100644 --- a/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb +++ b/meta-gnome/recipes-gnome/libgsf/libgsf_1.14.52.bb | |||
| @@ -10,7 +10,8 @@ GNOMEBASEBUILDCLASS = "autotools" | |||
| 10 | inherit gnomebase gobject-introspection gettext gtk-doc | 10 | inherit gnomebase gobject-introspection gettext gtk-doc |
| 11 | 11 | ||
| 12 | SRC_URI[archive.sha256sum] = "9181c914b9fac0e05d6bcaa34c7b552fe5fc0961d3c9f8c01ccc381fb084bcf0" | 12 | SRC_URI[archive.sha256sum] = "9181c914b9fac0e05d6bcaa34c7b552fe5fc0961d3c9f8c01ccc381fb084bcf0" |
| 13 | SRC_URI += "file://0001-configure.ac-drop-a-copy-paste-of-introspection.m4-m.patch" | 13 | SRC_URI += "file://0001-configure.ac-drop-a-copy-paste-of-introspection.m4-m.patch \ |
| 14 | file://0001-Compilation-attempt-fixes-for-libxml-2.13.patch" | ||
| 14 | 15 | ||
| 15 | PACKAGECONFIG ??= "" | 16 | PACKAGECONFIG ??= "" |
| 16 | PACKAGECONFIG[gdk-pixbuf] = "--with-gdk-pixbuf,--without-gdk-pixbuf,gdk-pixbuf" | 17 | PACKAGECONFIG[gdk-pixbuf] = "--with-gdk-pixbuf,--without-gdk-pixbuf,gdk-pixbuf" |
