blob: 335e7a864da14cd663410d9fe3e9f696b3ed6978 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Maintainer: Philipp A. <flying-sheep@web.de>
# Contributor: Caleb Maclennan <caleb@alerque.com>
pkgname=resvg
pkgver=0.45.0
pkgrel=3
pkgdesc='SVG rendering library and CLI'
arch=(i686 x86_64)
url="https://github.com/linebender/$pkgname"
license=(Apache-2.0 MIT)
depends=(gdk-pixbuf2)
optdepends=(
'qt5-base: For the Qt backend'
'cairo: For the cairo backend'
)
makedepends=(cargo clang qt5-base qt5-tools cairo pango)
source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('871a1583da6af849f8bafd44abc0a75fa7bc9d8ccb242b9e0eae5b5cd4e156c1')
prepare() {
cd "$pkgname-$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
mkdir -p tools/kde-dolphin-thumbnailer/build
}
build() {
cd "$pkgname-$pkgver"
export CARGO_TARGET_DIR=target
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --workspace --frozen --release --all-features
(
cd tools/viewsvg
qmake PREFIX="$pkgdir/usr"
make
)
cargo doc --release --no-deps -p resvg-capi
}
check() {
cd "$pkgname-$pkgver"
export CARGO_TARGET_DIR=target
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 -t "$pkgdir/usr/bin/" target/release/{resvg,usvg} tools/viewsvg/viewsvg
install -Dm755 -t "$pkgdir/usr/lib/" target/release/libresvg.so
install -Dm644 -t "$pkgdir/usr/include/" crates/c-api/*.h
install -d "$pkgdir/usr/share/doc/resvg"
cp -r target/doc/* "$pkgdir/usr/share/doc/resvg"
}
|