logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://anongit.hacktivis.me/git/overlay.git/
commit: d906b5f5bbdeeaa630cfa5153733b31d3858549b
parent 4a442c2ad5dda68825ed32822a6c35d9109b0dba
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 19 Oct 2025 15:14:00 +0200

gnome-base/librsvg: Fix build with libxml2 2.13+

Diffstat:

Agnome-base/librsvg/files/librsvg-2.40.21-libxml2-2.13.patch27+++++++++++++++++++++++++++
Dgnome-base/librsvg/files/librsvg-2.40.21-xmlError-function-pointer-type.patch34----------------------------------
Mgnome-base/librsvg/librsvg-2.40.21-r1.ebuild3++-
3 files changed, 29 insertions(+), 35 deletions(-)

diff --git a/gnome-base/librsvg/files/librsvg-2.40.21-libxml2-2.13.patch b/gnome-base/librsvg/files/librsvg-2.40.21-libxml2-2.13.patch @@ -0,0 +1,27 @@ +Grabbed from FreeBSD ports +https://cgit.freebsd.org/ports/commit/?id=9acdf260eddc1fed2be63fca0115fb19ddaa1f4f + +--- a/rsvg-css.c.orig 2018-10-01 22:50:22 UTC ++++ b/rsvg-css.c +@@ -839,7 +839,11 @@ static void + } + + static void ++#if LIBXML_VERSION < 21200 + rsvg_xml_noerror (void *data, xmlErrorPtr error) ++#else ++rsvg_xml_noerror (void *data, const xmlError *error) ++#endif + { + } + +--- a/rsvg-private.h.orig 2020-02-26 17:40:25 UTC ++++ b/rsvg-private.h +@@ -32,6 +32,7 @@ + #include "rsvg.h" + + #include <libxml/SAX.h> ++#include <libxml/tree.h> + #include <libxml/xmlmemory.h> + #include <pango/pango.h> + #include <glib.h> diff --git a/gnome-base/librsvg/files/librsvg-2.40.21-xmlError-function-pointer-type.patch b/gnome-base/librsvg/files/librsvg-2.40.21-xmlError-function-pointer-type.patch @@ -1,34 +0,0 @@ -From fb59a892c4a2b900b929acbf05578d831749e3ba Mon Sep 17 00:00:00 2001 -From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me> -Date: Thu, 11 Apr 2024 15:54:07 +0200 -Subject: [PATCH] rsvg-css: Fix xmlError function pointer type - ---- - rsvg-css.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/rsvg-css.c b/rsvg-css.c -index 5b359a20..95073cf2 100644 ---- a/rsvg-css.c -+++ b/rsvg-css.c -@@ -839,7 +839,7 @@ rsvg_css_parse_overflow (const char *str, gboolean * inherit) - } - - static void --rsvg_xml_noerror (void *data, xmlErrorPtr error) -+rsvg_xml_noerror (void *data, const struct _xmlError *error) - { - } - -@@ -863,7 +863,7 @@ rsvg_css_parse_xml_attribute_string (const char *attribute_string) - - memset (&handler, 0, sizeof (handler)); - xmlSAX2InitDefaultSAXHandler (&handler, 0); -- handler.serror = rsvg_xml_noerror; -+ handler.serror = &rsvg_xml_noerror; - parser = xmlCreatePushParserCtxt (&handler, NULL, tag, strlen (tag) + 1, NULL); - parser->options |= XML_PARSE_NONET; - --- -2.43.2 - diff --git a/gnome-base/librsvg/librsvg-2.40.21-r1.ebuild b/gnome-base/librsvg/librsvg-2.40.21-r1.ebuild @@ -43,7 +43,8 @@ RESTRICT="test" # Lots of issues due to freetype changes and more; ever since ne PATCHES=( # https://bugzilla.gnome.org/show_bug.cgi?id=653323 "${FILESDIR}/${PN}-2.40.12-gtk-optional.patch" - "${FILESDIR}/librsvg-2.40.21-xmlError-function-pointer-type.patch" + # Fix build with libxml2 2.13+ + "${FILESDIR}/${PN}-2.40.21-libxml2-2.13.patch" ) src_prepare() {