#!/bin/mkpkg
# description: SVG rendering library
# url: https://wiki.gnome.org/Projects/LibRsvg

name=librsvg
version=2.62.1
release=1
_minor=2.62
depends=(gdk-pixbuf cairo pango)
makedeps=(meson cargo-c)

source=(https://download.gnome.org/sources/$name/$_minor/$name-$version.tar.xz)

sha256sums=(
    "b41ca84206242fddd826a2bf76348d7cdf52c1050cbfa060b866e81a252145c3"
)

build() {
	cd $name-$version

	export CC=clang
	export CXX=clang++
	export AR=llvm-ar
	export CARGO_HTTP_CAINFO=/etc/ssl/cert.pem
	export RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=lld -C target-feature=-crt-static"

	meson setup build \
		--prefix=/usr \
		--buildtype=plain \
		-D introspection=disabled \
		-D docs=disabled \
		-D tests=false \
		-D pixbuf-loader=enabled
	meson compile -C build
	DESTDIR=$PKG meson install -C build

	rm -rf $PKG/usr/share/doc
}

signify() {
    untrusted comment: public key
    RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}

# vim: filetype=sh
