librsvg: 2.61.1 -> 2.61.2, pick upstream patch for libxml 2.15 support (#457296)

This commit is contained in:
Grimmauld
2025-11-01 12:33:15 +00:00
committed by GitHub
2 changed files with 11 additions and 34 deletions
@@ -1,23 +0,0 @@
diff --git a/rsvg/tests/errors.rs b/rsvg/tests/errors.rs
index 02b134bee..46391fa5d 100644
--- a/rsvg/tests/errors.rs
+++ b/rsvg/tests/errors.rs
@@ -14,15 +14,12 @@ use rsvg::{CairoRenderer, ImplementationLimit, Loader, LoadingError, RenderingEr
#[ignore]
#[test]
+#[should_panic]
fn too_many_elements() {
let name = "tests/fixtures/errors/bug515-too-many-elements.svgz";
- assert!(matches!(
- Loader::new().read_path(name),
- Err(LoadingError::LimitExceeded(
- ImplementationLimit::TooManyLoadedElements
- ))
- ));
+ // libxml2 might return an error without updating the element count, so just expect any error, not specifically too many elements
+ Loader::new().read_path(name).unwrap();
}
fn rendering_instancing_limit(name: &str) {
+11 -11
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch,
pkg-config,
meson,
ninja,
@@ -49,7 +50,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "librsvg";
version = "2.61.1";
version = "2.61.2";
outputs = [
"out"
@@ -61,24 +62,23 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchurl {
url = "mirror://gnome/sources/librsvg/${lib.versions.majorMinor finalAttrs.version}/librsvg-${finalAttrs.version}.tar.xz";
hash = "sha256-vBu81BkSCwmNsovqVTNdneJHDU5qn27pcge0EPwVhn0=";
hash = "sha256-RkTYNiPdYcxEecKzw3Lh2isoFVLryQA1yNGsUC6x3AA=";
};
patches = [
# too_many_elements test fails with libxml 2.15.0,
# because libxml2 no longer updates the element count
# before erroring out, which breaks the librsvg limit check.
#
# This is okay, because the error is still detected.
# The error is simply not reported accurately.
# https://gitlab.gnome.org/GNOME/librsvg/-/issues/1201
./expect-any-error-too-many-elements.patch
(fetchpatch {
# https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/1149
# libxml 2.15+ requires adjustments to error handling
# remove next librsvg release
url = "https://gitlab.gnome.org/GNOME/librsvg/-/commit/6663df8e9aec323f0c124e97a7c7447a90c67c4a.patch";
hash = "sha256-+iyRvxVMxSCW0IIizXXheBFytwhBtU4cyJNTBebCOSg=";
})
];
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src;
name = "librsvg-deps-${finalAttrs.version}";
hash = "sha256-3DAFyY7uNB5cP8ry28v12QsFdxHtpr1nyLtzhojBq7c=";
hash = "sha256-OZspQg9ryDNILUZMiB77vIF0uGCMyVe7blX5BJk102k=";
dontConfigure = true;
};