From 5acdada56a6da42d5b601778e59490a2432c6696 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Fri, 22 Mar 2019 17:13:48 -0300 Subject: [PATCH] New package: resvg-0.6.1 --- srcpkgs/libresvg-devel | 1 + srcpkgs/libresvg0 | 1 + srcpkgs/resvg/template | 55 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 120000 srcpkgs/libresvg-devel create mode 120000 srcpkgs/libresvg0 create mode 100644 srcpkgs/resvg/template diff --git a/srcpkgs/libresvg-devel b/srcpkgs/libresvg-devel new file mode 120000 index 00000000000..21cb613c3a0 --- /dev/null +++ b/srcpkgs/libresvg-devel @@ -0,0 +1 @@ +resvg \ No newline at end of file diff --git a/srcpkgs/libresvg0 b/srcpkgs/libresvg0 new file mode 120000 index 00000000000..21cb613c3a0 --- /dev/null +++ b/srcpkgs/libresvg0 @@ -0,0 +1 @@ +resvg \ No newline at end of file diff --git a/srcpkgs/resvg/template b/srcpkgs/resvg/template new file mode 100644 index 00000000000..02506182ef8 --- /dev/null +++ b/srcpkgs/resvg/template @@ -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 " +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" + } +}