db-move: moved adwaita-icon-theme from [testing] to [extra] (any)
[arch-packages.git] / glew / trunk / PKGBUILD
bloba475b92e33d88c80f86ef6f2359df73fecb86c7d
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
2 # Contributor: Stéphane Gaudreault <stephane@archlinux.org>
3 # Contributor: SleepyDog
5 pkgname=glew
6 pkgver=2.2.0
7 pkgrel=6
8 pkgdesc="The OpenGL Extension Wrangler Library"
9 arch=('x86_64')
10 url="https://github.com/nigels-com/glew"
11 license=('BSD' 'MIT' 'GPL')
12 depends=('glibc' 'libegl' 'libgl' 'glu')
13 optdepends=('libx11: for glxewinfo and visualinfo')
14 provides=('libGLEW.so')
15 # https://sourceforge.net/projects/glew/files/glew/
16 source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz
17         glew-install.patch
18         egl+glx.patch)
19 sha1sums=('22d6e9b9e691080eb6313407dbf51cfebc3345ea'
20           'e1bfa1e6ae3c7a553920978111092ea9d3a33c95'
21           '30dbb0a98883db63414d41114aacc9f847edd066')
22 sha256sums=('d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1'
23             'ef864c1e673f6a8fab4d3f5bc3c3eb9596cd225c24765de9dff2064e72f350d5'
24             '206dc53e185aa2bd64b21107dcaafccb3207a8185ccd1c02a87ed9783c25cc61')
26 prepare() {
27   cd ${pkgname}-${pkgver}
28   
29   patch -Np1 -i ../glew-install.patch
30   patch -Np1 -i ../egl+glx.patch
31   
32   sed -i 's|lib64|lib|' config/Makefile.linux
33   sed -i '/^.PHONY: .*\.pc$/d' Makefile
36 build() {
37   cd ${pkgname}-${pkgver}
39   make STRIP= glew.bin
40   mv bin/glewinfo bin/glxewinfo
41   rm glew.pc
42   
43   make STRIP= SYSTEM=linux-egl glew.lib.shared bin/glewinfo
44   mv bin/glewinfo bin/eglewinfo
47 package() {
48   cd ${pkgname}-${pkgver}
49   
50   make GLEW_DEST="${pkgdir}/usr" STRIP= SYSTEM=linux-egl install
51   install -D -m755 -t "${pkgdir}/usr/bin" bin/eglewinfo bin/glxewinfo bin/visualinfo
52   ln -s eglewinfo "${pkgdir}/usr/bin/glewinfo"
53   
54   install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"