libxml2.patch 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. https://bugs.gentoo.org/917532
  2. https://gitlab.gnome.org/GNOME/gupnp-av/-/commit/9557768121d54fdcedabe7544863515d6a813354
  3. https://gitlab.gnome.org/GNOME/gupnp-av/-/commit/1e10a41fcef6ae0d3e89958db89bc22398f3b4f1
  4. From 9557768121d54fdcedabe7544863515d6a813354 Mon Sep 17 00:00:00 2001
  5. From: Jens Georg <mail@jensge.org>
  6. Date: Thu, 3 Aug 2023 23:52:43 +0200
  7. Subject: [PATCH] Remove deprecates xmlRecoverMemory
  8. Cannot currently remove xmlSchemaValidateStream as validateDoc fails to
  9. accept the XSD
  10. --- a/libgupnp-av/gupnp-didl-lite-parser.c
  11. +++ b/libgupnp-av/gupnp-didl-lite-parser.c
  12. @@ -230,12 +230,17 @@ gupnp_didl_lite_parser_parse_didl_recursive (GUPnPDIDLLiteParser *parser,
  13. GUPnPAVXMLDoc *xml_doc = NULL;
  14. gboolean result;
  15. - doc = xmlRecoverMemory (didl, strlen (didl));
  16. + doc = xmlReadMemory (didl,
  17. + strlen (didl),
  18. + NULL,
  19. + NULL,
  20. + XML_PARSE_NONET | XML_PARSE_RECOVER);
  21. if (doc == NULL) {
  22. g_set_error (error,
  23. G_MARKUP_ERROR,
  24. G_MARKUP_ERROR_PARSE,
  25. - "Could not parse DIDL-Lite XML:\n%s", didl);
  26. + "Could not parse DIDL-Lite XML:\n%s",
  27. + didl);
  28. return FALSE;
  29. }
  30. --- a/libgupnp-av/gupnp-feature-list-parser.c
  31. +++ b/libgupnp-av/gupnp-feature-list-parser.c
  32. @@ -114,12 +114,17 @@ gupnp_feature_list_parser_parse_text
  33. xmlNode *element;
  34. GList *feature_list = NULL;
  35. - doc = xmlRecoverMemory (text, strlen (text));
  36. + doc = xmlReadMemory (text,
  37. + strlen (text),
  38. + NULL,
  39. + NULL,
  40. + XML_PARSE_NONET | XML_PARSE_RECOVER);
  41. if (doc == NULL) {
  42. g_set_error (error,
  43. G_MARKUP_ERROR,
  44. G_MARKUP_ERROR_PARSE,
  45. - "Could not parse FeatureList XML:\n%s", text);
  46. + "Could not parse FeatureList XML:\n%s",
  47. + text);
  48. return NULL;
  49. }
  50. --
  51. GitLab
  52. From 1e10a41fcef6ae0d3e89958db89bc22398f3b4f1 Mon Sep 17 00:00:00 2001
  53. From: Jens Georg <mail@jensge.org>
  54. Date: Sat, 25 Nov 2023 17:58:49 +0100
  55. Subject: [PATCH] xml: Fix compatibility with libxml2 2.12.x
  56. --- a/libgupnp-av/xml-util.h
  57. +++ b/libgupnp-av/xml-util.h
  58. @@ -16,6 +16,7 @@
  59. #include <glib.h>
  60. #include <libxml/tree.h>
  61. +#include <libxml/parser.h>
  62. #include <stdarg.h>
  63. #include <glib-object.h>
  64. --
  65. GitLab