summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 85d6a84b42850a33d1b9d89890050bfd799e4585 (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: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=lib32-libplacebo-git
pkgver=v3.104.0.rc1.65.ge48a162
pkgrel=1
pkgdesc='Reusable library for GPU-accelerated video/image rendering primitives. (GIT version)'
url='https://github.com/haasn/libplacebo'
arch=('x86_64')
license=('LGPL2.1')
depends=('lib32-vulkan-icd-loader'
         'lib32-lcms2'
         'lib32-shaderc'
         'lib32-glslang'
         'lib32-libepoxy'
         )
makedepends=('git'
             'meson'
             'ninja'
             'vulkan-headers'
             'python-mako'
             )
provides=('lib32-libplacebo'
          'libplacebo.so'
          )
conflicts=('lib32-libplacebo')
source=('git+https://github.com/haasn/libplacebo.git')
sha256sums=('SKIP')

pkgver() {
  cd libplacebo
  echo "$(git describe --long --tags | tr - .)"
}

prepare() {
  mkdir -p build
}

build() {
  CFLAGS+=" -m32"
  CXXFLAGS+=" -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  cd build
  arch-meson ../libplacebo \
    --libdir=/usr/lib32 \
    -D vulkan=enabled \
    -D glslang=enabled \
    -D shaderc=enabled \
    -D lcms=enabled

  ninja -v
}

check() {
  ninja -C build test
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install

  rm -rf "${pkgdir}/usr/include"

  install -Dm644 libplacebo/README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}