blob: 34cbd6d12162444862f4df372f1025ffb86a01fd (
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
60
61
62
63
64
65
|
# Maintainer: Popolon <Popolon aL popolon.org>
pkgbase=thorvg
pkgname=thorvg
pkgver=0.15.10
pkgrel=1
pkgdesc="An open-source, lightweight, and portable library designed for rendering vector-based scenes and animations, including SVG and Lottie formats"
arch=('x86_64' 'aarch64' 'riscv32' 'riscv64' 'i386' 'i686' 'armv7h' 'armv6h' 'loong64' 'powerpc' 'powerpc64le' 'powerpc64')
url="https://www.thorvg.org/"
license=('MIT')
depends=('libpng' 'libjpeg' 'libwebp' 'mesa' 'libx11')
makedepends=('meson' 'ninja')
source=("https://github.com/${pkgname}/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz"
'example_stdio_h.patch')
sha256sums=('ea4bfda399364d0037b68b7bb50f78769d00cbe9d8ed743e05ae6c50d225c7cc'
'5eaf0991514b272c1da7f7f696643306b5d501a06733c36c01f5c972cc8394c7')
prepare() {
cd ${pkgname}-${pkgver}
sed -i 's|DEXAMPLE_DIR="@0@|DEXAMPLE_DIR="/usr/share/doc/thorvg|' meson.build
patch -p1 -i ../example_stdio_h.patch
meson setup builddir --prefix=/usr \
-Dsimd=true \
-Dengines=all \
-Dloaders=all \
-Dsavers=all \
-Dbindings="capi" \
-Dtools=all \
-Dexamples=true \
--reconfigure
}
build() {
cd ${pkgname}-${pkgver}
ninja -C builddir
}
_package() {
pkgdesc="An open-source, lightweight, and portable library designed for rendering vector-based scenes and animations, including SVG and Lottie formats"
cd ${pkgname}-${pkgver}
install -Dm644 LICENSE -t ${pkgdir}/usr/share/licenses/${pkgname}/
DESTDIR="$pkgdir/" ninja -C builddir install
}
_package-examples() {
depends=('sdl2')
pkgdesc="Examples for ${pkgbase} ${pkgdesc}"
cd ${pkgbase}-${pkgver}
mkdir -p ${pkgdir}/usr/share/doc/${pkgbase}
cp -a builddir/examples ${pkgdir}/usr/share/doc/${pkgbase}/
cp -a examples ${pkgdir}/usr/share/doc/${pkgbase}/
}
pkgname=(
"${pkgbase}"
"${pkgbase}-examples"
)
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
_package${_p#$pkgbase}
}"
done
|