# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: SleepyDog

_pkgbase=glew
pkgname=glew-wayland
pkgver=2.1.0
pkgrel=3
pkgdesc="The OpenGL Extension Wrangler Library (for Wayland)"
arch=('x86_64')
url='https://glew.sourceforge.net/'
license=('BSD' 'GPL' 'MIT')
depends=('glu' 'libxi' 'libxmu')
conflicts=('glew')
source=("https://downloads.sourceforge.net/$_pkgbase/$_pkgbase-$pkgver.tgz")
sha256sums=('04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95')

prepare() {
  cd "$_pkgbase-$pkgver"

  sed -i '/^.PHONY: .*\.pc$/d' Makefile
  sed -i 's,lib64,lib,' config/Makefile.linux
}

build() {
  make -C "$_pkgbase-$pkgver"
}

package_glew-wayland() {
  cd "$_pkgbase-$pkgver"

  make GLEW_DEST="$pkgdir/usr" SYSTEM=linux-egl install.all
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim: ts=2 sw=2 et:
