summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6bcbd383f64a4af34381971ea3cce68859633f46 (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
# Maintainer: Popolon <Popolon aL popolon.org>

pkgname=thorvg-examples-git
_pkgname=thorvg-examples
pkgver=r60.246739f
pkgrel=1
pkgdesc="examples for lightweight, and portable library designed for rendering vector-based scenes and animations, including SVG and Lottie formats"
url="https://www.thorvg.org/"
arch=($CARCH)
license=('MIT')
depends=('thorvg') # doesn"t work with it either: 'wgpu-native-git')
makedepends=('meson' 'ninja')
conflicts=('thorvg-examples')
provides=('thorvg-examples')
source=("${_pkgname}::git+https://github.com/thorvg/thorvg.example.git")
sha256sums=(SKIP)

pkgver() {
    cd "${_pkgname}/"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd ${_pkgname}
    sed -i 's|DEXAMPLE_DIR="@0@|DEXAMPLE_DIR="/usr/share/doc/thorvg-examples|' meson.build
    meson setup builddir --prefix=/usr \
      --reconfigure
#      -Dengines=all \ autodetected even if meson_build write default:sw???

}

build() {
    cd ${_pkgname}
    meson setup builddir
    ninja -C builddir
}

package() {
    mkdir -p ${pkgdir}/usr/share/doc/${_pkgname}
    rm -R ${_pkgname}/builddir/src/*.p
    cp -a ${_pkgname}/builddir/src/* ${pkgdir}/usr/share/doc/${_pkgname}/
    cp -a ${_pkgname}/res ${pkgdir}/usr/share/doc/${_pkgname}/
    cp -a ${_pkgname}/src/*.cpp ${pkgdir}/usr/share/doc/${_pkgname}/
    cp -a ${_pkgname}/src/all.sh ${pkgdir}/usr/share/doc/${_pkgname}/
}