updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / mesa-git / PKGBUILD
blob62ff9c68ec288ab29bbb0a291d6969707d0b2cfb
1 # Maintainer: Egon Ashrafinia <e,ashrafinia@gmail.com>
2 # Contributor: Tavian Barnes <tavianator@gmail.com>
3 # Contributor: Jan de Groot <jgc@archlinux.org>
4 # Contributor: Andreas Radke <andyrtr@archlinux.org>
5 # Contributor: Thomas Dziedzic < gostrc at gmail >
6 # Contributor: Antti "Tera" Oja <antti.bofh@gmail.com>
7 # Contributor: Diego Jose <diegoxter1006@gmail.com>
9 pkgbase=mesa-git
10 pkgname=mesa-git #When building the package, remove this line and uncomment the "pkgname" below!!! This is just becuase AUR can't handle more then one pkgname.
12 # pkgname=('mesa-git' 'libgl-git' 'libglapi-git' 'libgles-git' 'libegl-git'
13 #          'ati-dri-git' 'intel-dri-git' 'nouveau-dri-git' 'khrplatform-devel-git')
14 pkgver=20111225
15 pkgrel=1
16 _mesaver=8.0
17 arch=(i686 x86_64)
18 makedepends=('git' 'glproto' 'libdrm' 'libxxf86vm' 'libxdamage' 'expat'
19              'libx11' 'libxt' 'gcc-libs' 'dri2proto' 'python2' 'libxml2'
20              'imake' 'llvm' 'udev' 'flex' 'bison')
21 url="http://mesa3d.sourceforge.net"
22 license=('custom')
23 source=(LICENSE)
24 md5sums=('5c65a0fe315dd347e09b1f2826a1df5a')
26 _gitroot='git://anongit.freedesktop.org/git/mesa/mesa'
27 _gitname='mesa'
29 build() {
30   msg 'Connecting to git.freedesktop.org GIT server....'
31   if [ -d ${_gitname} ] ; then
32     cd ${_gitname} && git pull origin
33   else
34     git clone ${_gitroot} --depth 1
35   fi
36   msg 'GIT checkout done or server timeout'
37   msg 'Starting make...'
39   cd "${srcdir}"
41   # Cleanup and prepare the build dir
42   [ -d build ] && rm -rf build
43   cp -r ${_gitname} build
44   cd build
46   ./autogen.sh --prefix=/usr \
47     --with-dri-driverdir=/usr/lib/xorg/modules/dri \
48     --with-gallium-drivers=r300,r600,nouveau,swrast \
49     --enable-gallium-egl --enable-shared-glapi \
50     --enable-glx-tls \
51     --with-driver=dri \
52     --enable-xcb \
53     --enable-gles1 \
54     --enable-gles2 \
55     --enable-egl \
56     --enable-shared-dricore \
57     --enable-texture-float \
58     --enable-shared-dricore
59   make -j5
62 package_libgl-git() {
63   depends=('libdrm' 'libxxf86vm' 'libxdamage' 'expat' 'libglapi-git' 'gcc-libs')
64   conflicts=('libgl')
65   provides=("libgl=${_mesaver}")
66   pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
68   cd "${srcdir}"/build
69   install -m755 -d "${pkgdir}/usr/lib"
70   install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
72   bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
73   bin/minstall lib/libdricore.so* "${pkgdir}/usr/lib/"
74   bin/minstall lib/libglsl.so* "${pkgdir}/usr/lib/"
76   cd src/mesa/drivers/dri
77   #make -C swrast DESTDIR="${pkgdir}" install
78   make -C "${srcdir}"/build/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
79   
80   #ln -s swrastg_dri.so "${pkgdir}/usr/lib/xorg/modules/dri/swrast_dri.so"
81   ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
83   install -m755 -d "${pkgdir}/usr/share/licenses/libgl-git"
84   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl-git/"
87 package_libglapi-git() {
88   depends=('glibc')
89   conflicts=('libglapi')
90   provides=("libglapi=${_mesaver}")
91   pkgdesc="free implementation of the GL API -- shared library. The Mesa GL API module is responsible for dispatching all the gl* functions"
93   cd "${srcdir}"/build
94   install -m755 -d "${pkgdir}/usr/lib"
95   bin/minstall lib/libglapi.so* "${pkgdir}/usr/lib/"
97   install -m755 -d "${pkgdir}/usr/share/licenses/libglapi"
98   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libglapi/"
101 package_libgles-git() {
102   depends=('libglapi-git' 'khrplatform-devel-git')
103   conflicts=('libgles')
104   provides=("libgles=${_mesaver}")
105   pkgdesc="Mesa GLES libraries and headers"
107   cd "${srcdir}"/build
108   install -m755 -d "${pkgdir}/usr/lib"
109   install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
110   install -m755 -d "${pkgdir}/usr/include"
111   install -m755 -d "${pkgdir}/usr/include/GLES"
112   install -m755 -d "${pkgdir}/usr/include/GLES2"
113   bin/minstall lib/libGLESv* "${pkgdir}/usr/lib/"
114   bin/minstall src/mapi/es1api/glesv1_cm.pc "${pkgdir}/usr/lib/pkgconfig/"
115   bin/minstall src/mapi/es2api/glesv2.pc "${pkgdir}/usr/lib/pkgconfig/"
116   bin/minstall include/GLES/* "${pkgdir}/usr/include/GLES/"
117   bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
118   bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
120   install -m755 -d "${pkgdir}/usr/share/licenses/libgles-git"
121   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgles-git/"
124 package_libegl-git() {
125   depends=('libglapi-git' 'libdrm' 'libxext' 'libxfixes' 'udev' 'khrplatform-devel-git')
126   conflicts=('libegl')
127   provides=("libegl=${_mesaver}")
128   pkgdesc="Mesa libEGL libraries and headers"
130   cd "${srcdir}"/build
131   make -C src/gallium/targets/egl-static DESTDIR="${pkgdir}" install
132   install -m755 -d "${pkgdir}/usr/lib"
133   install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
134   install -m755 -d "${pkgdir}/usr/include"
135   install -m755 -d "${pkgdir}/usr/include/"
136   install -m755 -d "${pkgdir}/usr/include/EGL"
137   install -m755 -d "${pkgdir}/usr/share"
138   install -m755 -d "${pkgdir}/usr/share/doc"
139   install -m755 -d "${pkgdir}/usr/share/doc/libegl"
140   bin/minstall lib/libEGL.so* "${pkgdir}/usr/lib/"
141   install -m755 -d "${pkgdir}/usr/lib/egl"
142   bin/minstall lib/egl/* "${pkgdir}/usr/lib/egl/"
143   bin/minstall src/egl/main/egl.pc "${pkgdir}/usr/lib/pkgconfig/"
144   bin/minstall include/EGL/* "${pkgdir}/usr/include/EGL/"
145   bin/minstall docs/egl.html "${pkgdir}/usr/share/doc/libegl/"
147   install -m755 -d "${pkgdir}/usr/share/licenses/libegl-git"
148   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libegl-git/"
151 package_ati-dri-git() {
152   depends=('libgl-git')
153   conflicts=('ati-dri' 'xf86-video-ati<6.9.0-6')
154   provides=("ati-dri=${_mesaver}")
155   pkgdesc="Mesa DRI + Gallium3D r300 drivers for AMD/ATI Radeon"
157   make -C ${srcdir}/build/src/mesa/drivers/dri/radeon DESTDIR="${pkgdir}" install
158   make -C ${srcdir}/build/src/mesa/drivers/dri/r200 DESTDIR="${pkgdir}" install
159   # classic mesa driver for R300 r300_dri.so
160   # gallium3D driver for R300 r300_dri.so
161   make -C "${srcdir}"/build/src/gallium/targets/dri-r300 DESTDIR="${pkgdir}" install
162   make -C "${srcdir}"/build/src/gallium/targets/dri-r600 DESTDIR="${pkgdir}" install
165 package_intel-dri-git() {
166   depends=('libgl-git')
167   conflicts=('intel-dri')
168   provides=("intel-dri=${_mesaver}")
169   pkgdesc="Mesa DRI drivers for Intel"
171   make -C ${srcdir}/build/src/mesa/drivers/dri/i915 DESTDIR="${pkgdir}" install
172   make -C ${srcdir}/build/src/mesa/drivers/dri/i965 DESTDIR="${pkgdir}" install
175 package_nouveau-dri-git() {
176   depends=('libgl-git')
177   conflicts=('nouveau-dri')
178   provides=("nouveau-dri=${_mesaver}")
179   pkgdesc="Mesa classic DRI + Gallium3D drivers for Nouveau"
181   # classic mesa driver for nv10 , nv20 nouveau_vieux_dri.so
182   make -C ${srcdir}/build/src/mesa/drivers/dri/nouveau DESTDIR="${pkgdir}" install
183   # gallium3D driver for nv30 - nv40 - nv50 nouveau_dri.so
184   make -C ${srcdir}/build/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install
187 package_mesa-git() {
188   depends=('libgl-git' 'libx11' 'libxt' 'gcc-libs' 'dri2proto' 'glproto')
189   optdepends=('opengl-man-pages: for the OpenGL API man pages')
190   conflicts=('mesa')
191   provides=("mesa=${_mesaver}")
192   pkgdesc="Mesa 3-D graphics libraries and include files"
194   cd "${srcdir}"/build
195   make DESTDIR="${pkgdir}" install
197   rm -f "${pkgdir}/usr/lib/libGL.so"*
198   rm -f "${pkgdir}/usr/lib/libglapi.so"*
199   rm -f "${pkgdir}/usr/lib/libGLESv"*
200   rm -f "${pkgdir}/usr/lib/libEGL"*
201   rm -rf "${pkgdir}/usr/lib/egl"
202   rm -f ${pkgdir}/usr/lib/pkgconfig/{glesv1_cm.pc,glesv2.pc,egl.pc}
203   rm -rf "${pkgdir}/usr/lib/xorg"
204   rm -f "${pkgdir}/usr/include/GL/glew.h"
205   rm -f "${pkgdir}/usr/include/GL/glxew.h"
206   rm -f "${pkgdir}/usr/include/GL/wglew.h"
207   rm -f "${pkgdir}/usr/include/GL/glut.h"
208   rm -rf ${pkgdir}/usr/include/{GLES,GLES2,EGL,KHR}
210   install -m755 -d "${pkgdir}/usr/share/licenses/mesa-git"
211   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-git/"
214 package_khrplatform-devel-git() {
215   conflicts=('khrplatform-devel')
216   provides=("khrplatform-devel=${_mesaver}")
217   pkgdesc="Khronos platform development package"
219   cd ${srcdir}/build
220   install -m755 -d "${pkgdir}/usr/include/KHR"
221   bin/minstall include/KHR/khrplatform.h "${pkgdir}/usr/include/KHR/"
223   install -m755 -d "${pkgdir}/usr/share/licenses/khrplatform-devel"
224   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/khrplatform-devel/"