archrelease: copy trunk to extra-x86_64
[arch-packages.git] / glew / repos / extra-x86_64 / PKGBUILD
blob7f9407e4911970026c377d6551431451d64b3c07
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 options=('debug')
16 # https://sourceforge.net/projects/glew/files/glew/
17 source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz
18         glew-install.patch
19         egl+glx.patch)
20 sha1sums=('22d6e9b9e691080eb6313407dbf51cfebc3345ea'
21           'e1bfa1e6ae3c7a553920978111092ea9d3a33c95'
22           '30dbb0a98883db63414d41114aacc9f847edd066')
23 sha256sums=('d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1'
24             'ef864c1e673f6a8fab4d3f5bc3c3eb9596cd225c24765de9dff2064e72f350d5'
25             '206dc53e185aa2bd64b21107dcaafccb3207a8185ccd1c02a87ed9783c25cc61')
27 prepare() {
28   cd ${pkgname}-${pkgver}
29   
30   patch -Np1 -i ../glew-install.patch
31   patch -Np1 -i ../egl+glx.patch
32   
33   sed -i 's|lib64|lib|' config/Makefile.linux
34   sed -i '/^.PHONY: .*\.pc$/d' Makefile
37 build() {
38   cd ${pkgname}-${pkgver}
40   make STRIP= glew.bin
41   mv bin/glewinfo bin/glxewinfo
42   rm glew.pc
43   
44   make STRIP= SYSTEM=linux-egl glew.lib.shared bin/glewinfo
45   mv bin/glewinfo bin/eglewinfo
48 package() {
49   cd ${pkgname}-${pkgver}
50   
51   make GLEW_DEST="${pkgdir}/usr" STRIP= SYSTEM=linux-egl install
52   install -D -m755 -t "${pkgdir}/usr/bin" bin/eglewinfo bin/glxewinfo bin/visualinfo
53   ln -s eglewinfo "${pkgdir}/usr/bin/glewinfo"
54   
55   install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"