void-packages/srcpkgs/librsvg/template
Érico Nogueira 720281efbb librsvg: update to 2.52.2, adopt.
Credit to biopsin for spotting the workaround with .cargo/config.

Upstream issue: https://gitlab.gnome.org/GNOME/librsvg/-/issues/810
2021-10-24 14:55:06 -03:00

54 lines
1.6 KiB
Bash

# Template file for 'librsvg'
pkgname=librsvg
version=2.52.2
revision=1
build_style=gnu-configure
build_helper="gir"
configure_args="--disable-static --enable-introspection --enable-vala"
hostmakedepends="cargo pkg-config python glib-devel gdk-pixbuf-devel vala"
makedepends="cairo-devel freetype-devel gdk-pixbuf-devel libcroco-devel
libglib-devel libxml2-devel pango-devel rust vala"
short_desc="SVG library for GNOME"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="GPL-2.0-or-later, LGPL-2.0-or-later"
homepage="https://wiki.gnome.org/Projects/LibRsvg"
# update changelog when release series changes
changelog="https://gitlab.gnome.org/GNOME/librsvg/-/raw/librsvg-2.50/NEWS"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=03d2887c18ffb906e1a60f97fe46a7169f69aa28d6db5d285748f3618b093427
# reference files are for specific pango and harfbuzz versions
# the test suite isn't designed to be run by distros
make_check=no
pre_configure() {
# otherwise the final linking step uses "cc" instead of $CC
if [ "$CROSS_BUILD" ]; then
cat >> .cargo/config <<- EOF
[target.${RUST_TARGET}]
linker = "${CC}"
EOF
fi
}
librsvg-devel_package() {
depends="gdk-pixbuf-devel cairo-devel libcroco-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share/gtk-doc
vmove usr/share/gir-1.0
vmove usr/share/vala
}
}
librsvg-utils_package() {
short_desc+=" - utilities"
pkg_install() {
vmove usr/bin/rsvg-convert
vmove usr/share/man/man1/rsvg-convert.1
}
}