New package: resvg-0.6.1

This commit is contained in:
maxice8 2019-03-22 17:13:48 -03:00 committed by maxice8
parent 1a8b97bb67
commit 5acdada56a
3 changed files with 57 additions and 0 deletions

1
srcpkgs/libresvg-devel Symbolic link
View file

@ -0,0 +1 @@
resvg

1
srcpkgs/libresvg0 Symbolic link
View file

@ -0,0 +1 @@
resvg

55
srcpkgs/resvg/template Normal file
View file

@ -0,0 +1,55 @@
# Template file for 'resvg'
pkgname=resvg
version=0.6.1
revision=1
build_helper="rust"
hostmakedepends="cargo qt5-host-tools pkg-config"
makedepends="pango-devel cairo-devel gdk-pixbuf-devel rust-std qt5-devel"
short_desc="SVG rendering library written in Rust"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="MPL-2.0"
homepage="https://github.com/RazrFalcon/resvg"
distfiles="https://github.com/RazrFalcon/resvg/releases/download/v${version}/resvg-${version}.tar.xz"
checksum=7206f79f67b4c8610353134c375ed3ff9c5eb63b16fae267b94730c23ebe4ee1
do_build() {
for dir in capi tools/{render,u}svg; do
(
cd $dir
if grep -q cairo-backend Cargo.toml; then
cargo build --release --target ${RUST_TARGET} --features="qt-backend cairo-backend"
else
cargo build --release --target ${RUST_TARGET}
fi
)
done
}
do_install() {
for t in {render,u}svg; do
vbin target/${RUST_TARGET}/release/$t
done
# Install library as libresvg.so.0 and make the solink
vinstall target/${RUST_TARGET}/release/libresvg.so 755 usr/lib libresvg.so.0
ln -rs "${DESTDIR}"/usr/lib/libresvg.so.0 "${DESTDIR}"/usr/lib/libresvg.so
vinstall capi/include/resvg.h 644 usr/include
vinstall capi/include/ResvgQt.h 644 usr/include
}
libresvg0_package() {
short_desc+=" - resvg library"
pkg_install() {
vmove "usr/lib/libresvg.so.*"
}
}
libresvg-devel_package() {
depends="libresvg0-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
}
}