# Description: The EGLStream-based Wayland external platform
# URL: https://github.com/NVIDIA/egl-wayland/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: eglexternalplatform mesa wayland-protocols

name=egl-wayland
version=1.1.12
release=1
source=(https://github.com/NVIDIA/egl-wayland/archive/$version/$name-$version-$release.tar.gz
  glvnd.diff)

build() {
  patch -Np1 -d $name-$version -i $SRC/glvnd.diff

  meson setup $name-$version build \
    --prefix=/usr \
    --buildtype=plain \
    --wrap-mode nodownload \
    -D b_lto=true \
    -D b_pie=true
  meson compile -C build
  DESTDIR=$PKG meson install -C build
}
