new blfs: gnome-base/librsvg-2.61.0
This commit is contained in:
73
gnome-base/librsvg-2.61.0.PKGBUILD
Normal file
73
gnome-base/librsvg-2.61.0.PKGBUILD
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
pkgname=librsvg
|
||||||
|
pkgver=2.61.0
|
||||||
|
_ver=${pkgver%.*}
|
||||||
|
pkgdesc="SVG rendering library"
|
||||||
|
homepage="https://wiki.gnome.org/Projects/LibRsvg"
|
||||||
|
arch=(x86_64)
|
||||||
|
license=(LGPL-2.1-or-later)
|
||||||
|
depends=(
|
||||||
|
cairo
|
||||||
|
freetype
|
||||||
|
gcc
|
||||||
|
gdk-pixbuf
|
||||||
|
glib
|
||||||
|
glibc
|
||||||
|
harfbuzz
|
||||||
|
libxml2
|
||||||
|
pango
|
||||||
|
)
|
||||||
|
makedepends=(
|
||||||
|
cargo-c
|
||||||
|
gobject-introspection
|
||||||
|
meson
|
||||||
|
python-docutils
|
||||||
|
rust
|
||||||
|
)
|
||||||
|
checkdepends=(ttf-dejavu)
|
||||||
|
_patches=("librsvg-2.60.0-libxml2-2.15.0-tests.patch")
|
||||||
|
_patch_sums=("0c0495867924d9121db39b7f3cf14eff")
|
||||||
|
sources=("${pkgname}-${pkgver}.tar.xz"
|
||||||
|
${_patches[@]}
|
||||||
|
)
|
||||||
|
urls=("https://download.gnome.org/sources/librsvg/${_ver}/${sources[0]}"
|
||||||
|
${_patches[@]}
|
||||||
|
)
|
||||||
|
md5sums=("7ed4ffdee87e0d7f356fedfea77744ca"
|
||||||
|
${_patch_sums[@]}
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
tar -xf ${distdir}/${sources[0]} --strip-components=1
|
||||||
|
for _patch in ${_patches[@]}; do
|
||||||
|
patch -p1 -i ${filedir}/${_patch}
|
||||||
|
done
|
||||||
|
cargo fetch --locked --target "$(rustc --print host-tuple)"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_build() {
|
||||||
|
local meson_options=(
|
||||||
|
--prefix=/usr
|
||||||
|
--buildtype=release
|
||||||
|
--wrap-mode=nodownload
|
||||||
|
-D avif=disabled
|
||||||
|
-D introspection=enabled
|
||||||
|
-D pixbuf=enabled
|
||||||
|
-D pixbuf-loader=enabled
|
||||||
|
-D docs=disabled
|
||||||
|
-D vala=disabled
|
||||||
|
-D tests=true
|
||||||
|
)
|
||||||
|
|
||||||
|
meson setup build "${meson_options[@]}"
|
||||||
|
meson compile -C build
|
||||||
|
}
|
||||||
|
|
||||||
|
src_check() {
|
||||||
|
meson test -C build --print-errorlogs --no-rebuild
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
meson install -C build --destdir "$pkgdir" --no-rebuild
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:ft=sh syn=sh et sw=2:
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
https://bugs.gentoo.org/964256
|
||||||
|
https://gitlab.gnome.org/GNOME/librsvg/-/issues/1201
|
||||||
|
|
||||||
|
"This patch makes the test succeed. Therefore, there is probably not a security issue here.
|
||||||
|
An error does occur, it just is not being reported as TooManyLoadedElements.
|
||||||
|
So just the dumb thing, adding an unwrap and expecting it to fail is a decent enough bandaid."
|
||||||
|
--- 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) {
|
||||||
|
|
||||||
Reference in New Issue
Block a user