summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c6305458b9954b09569abaad2af7589be47b927 (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: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Andrew Sun <adsun701 at gmail dot com>

pkgname=lib32-egl-wayland
pkgver=1.1.13
pkgrel=1
pkgdesc='EGLStream-based Wayland external platform (32-bits)'
arch=('x86_64')
url='https://github.com/NVIDIA/egl-wayland'
license=('MIT')
depends=(
  'lib32-wayland'
  "egl-wayland=2:${pkgver}"
)
makedepends=(
  'meson'
  'git'
  'lib32-libglvnd'
)
provides=('libnvidia-egl-wayland.so')
_commit=69ae9cf07bbec3b00a682918bf0dc845e989677  # tags/1.1.13
options=('!emptydirs')
source=("git+${url}#commit=${_commit}")
sha256sums=('SKIP')

pkgver() {
  cd egl-wayland
#   echo $(git describe --tags | tr - +)
  echo "$(git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g')"
}

prepare() {
  cd $_basename
}

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  arch-meson egl-wayland build \
    --libdir=/usr/lib32

  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

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

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

  install -Dm644 egl-wayland/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}