* runit is kept at -Np0 ```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
55 lines
1.5 KiB
Bash
55 lines
1.5 KiB
Bash
# 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="Orphaned <orphan@voidlinux.org>"
|
|
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"
|
|
}
|
|
}
|