Skip to content

Instantly share code, notes, and snippets.

@ChristophHaag
Last active April 7, 2017 12:08
GLEW with EGL
# $Id: PKGBUILD 273106 2016-08-05 12:19:53Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: SleepyDog
pkgname=glew
pkgver=2.0.0
pkgrel=1
pkgdesc="The OpenGL Extension Wrangler Library"
arch=('i686' 'x86_64')
url="http://glew.sourceforge.net"
license=('BSD' 'MIT' 'GPL')
depends=('libxmu' 'libxi' 'glu')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz)
sha1sums=('6e15c84f7e1fad34cd3679f784a233744ddf048f')
build() {
cd ${pkgname}-${pkgver}
echo 'diff --git a/Makefile b/Makefile
index 88b7a54..12da5b3 100644
--- a/Makefile
+++ b/Makefile
@@ -81,6 +81,8 @@ else
OPT = $(POPT)
endif
INCLUDE = -Iinclude
+LDFLAGS.GL = -lEGL -lGL
+CFLAGS.EXTRA += -DGLEW_EGL
CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA)
all debug: glew.lib glew.bin' | git apply -vvv
sed -i 's|lib64|lib|' config/Makefile.linux
sed -i '/^.PHONY: .*\.pc$/d' Makefile
make
}
package() {
cd ${pkgname}-${pkgver}
make GLEW_DEST="${pkgdir}/usr" install.all
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# chmod 0755 "${pkgdir}"/usr/lib/libGLEW*.so.${pkgver}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment