aports/community/librsvg/APKBUILD
Sertonix 6bd45b53fb */*: remove --no-rebuild from meson test
meson 1.7.0 and later don't include test build targets in the default
build target. With --no-rebuild the test targets aren't build at all.
Removing --no-rebuild shouldn't cause any false rebuilds since the files
aren't changed between the build() and check() step.

Fixes https://gitlab.alpinelinux.org/alpine/aports/-/issues/16891
Ref https://github.com/mesonbuild/meson/pull/10413
2025-05-09 20:48:14 +00:00

92 lines
1.9 KiB
Text

# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=librsvg
pkgver=2.60.0
pkgrel=0
pkgdesc="SAX-based renderer for SVG files into a GdkPixbuf"
url="https://wiki.gnome.org/Projects/LibRsvg"
arch="all"
license="LGPL-2.1-or-later"
depends_dev="rsvg-convert=$pkgver-r$pkgrel"
makedepends="
bzip2-dev
cairo-dev
cargo
cargo-c
dav1d-dev
font-dejavu
gi-docgen
glib-dev
gobject-introspection-dev
gtk+3.0-dev
libgsf-dev
meson
py3-docutils
rust
vala
"
install="$pkgname.post-upgrade"
subpackages="
$pkgname-dbg
$pkgname-dev
$pkgname-doc
rsvg-convert:_convert
rsvg-convert-doc:_convert_doc:noarch
"
source="https://download.gnome.org/sources/librsvg/${pkgver%.*}/librsvg-$pkgver.tar.xz
"
# tests are very dependent on versions of pango/cairo/freetype
options="!check net"
# secfixes:
# 2.56.3-r0:
# - CVE-2023-38633
# 2.50.4-r0:
# - RUSTSEC-2020-0146
# 2.46.2-r0:
# - CVE-2019-20446
export RUSTFLAGS="$RUSTFLAGS -C debuginfo=1"
prepare() {
default_prepare
git init -q
}
build() {
abuild-meson \
-Dintrospection=enabled \
-Dpixbuf=enabled \
-Dpixbuf-loader=enabled \
-Dvala=enabled \
-Dtests="$(want_check && echo true || echo false)" \
-Davif=enabled \
output
meson compile -C output
}
check() {
meson test --print-errorlogs -C output
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
_convert() {
pkgdesc="CLI utility to convert SVG files to PNG format"
amove usr/bin/rsvg-convert
}
_convert_doc() {
pkgdesc="CLI utility to convert SVG files to PNG format (documentation)"
depends=""
install_if="docs ${subpkgname%-doc}=$pkgver-r$pkgrel"
pkgdir="$pkgdir-doc" amove usr/share/man/man1/rsvg-convert.*
}
sha512sums="
e42251e00ee4231641028ad3764757d77686f417c6ac6dab879c887f93ba437c54a5e4bd49c1965b30ef1f1d4100561f0ff7fe6bdab182fae9a1fc9042af2ea8 librsvg-2.60.0.tar.xz
"