1 # Maintainer: Tavian Barnes <tavianator@gmail.com>
2 # Maintainer: Jan de Groot <jgc@archlinux.org>
3 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
4 # Maintainer: Thomas Dziedzic < gostrc at gmail >
5 # Contributor: Antti "Tera" Oja <antti.bofh@gmail.com>
9 #pkgname=('mesa-git' 'libgl-git' 'ati-dri-git' 'intel-dri-git'
10 # 'unichrome-dri-git' 'mach64-dri-git' 'mga-dri-git' 'r128-dri-git'
11 # 'savage-dri-git' 'sis-dri-git' 'tdfx-dri-git' 'nouveau-dri-git')
15 makedepends=('git' 'pkgconfig' 'glproto-git' 'libdrm-git' 'libxxf86vm'
16 'libxdamage' 'expat' 'libx11' 'libxt' 'gcc-libs' 'dri2proto'
17 'python2' 'talloc' 'libxml2' 'imake')
18 url="http://mesa3d.sourceforge.net"
20 source=(ftp://ftp.archlinux.org/other/mesa/gl-manpages-1.0.1.tar.bz2
22 md5sums=('6ae05158e678f4594343f32c2ca50515'
23 '5c65a0fe315dd347e09b1f2826a1df5a')
25 _gitroot='git://anongit.freedesktop.org/git/mesa/mesa'
29 msg 'Connecting to git.freedesktop.org GIT server....'
30 if [ -d ${_gitname} ] ; then
31 cd ${_gitname} && git pull origin
35 msg 'GIT checkout done or server timeout'
36 msg 'Starting make...'
40 # Cleanup and prepare the build dir
41 [ -d build ] && rm -rf build
42 cp -r ${_gitname} build
46 sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
47 -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find $srcdir -name '*.py')
48 sed -i -e "s|PYTHON2 = python|PYTHON2 = python2|" "${srcdir}"/build/configs/{default,autoconf.in}
49 sed -i -e "s|python|python2|" "${srcdir}"/build/src/gallium/auxiliary/Makefile
51 ./autogen.sh --prefix=/usr \
52 --with-dri-driverdir=/usr/lib/xorg/modules/dri \
54 --enable-gallium-radeon \
55 --enable-gallium-nouveau \
59 --with-state-trackers=dri,glx \
63 cd "${srcdir}/gl-manpages-1.0.1"
64 ./configure --prefix=/usr
69 depends=('libdrm-git' 'libxxf86vm' 'libxdamage' 'expat')
71 provides=('libgl=7.9')
72 pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
75 install -m755 -d "${pkgdir}/usr/lib"
76 install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
78 bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
80 cd src/mesa/drivers/dri
81 make -C swrast DESTDIR="${pkgdir}" install
82 ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
84 install -m755 -d "${pkgdir}/usr/share/licenses/libgl"
85 install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl/"
89 depends=('libgl-git' 'libx11' 'libxt' 'gcc-libs' 'dri2proto-git' 'libdrm-git' 'glproto-git')
92 pkgdesc="Mesa 3-D graphics libraries and include files"
95 make DESTDIR="${pkgdir}" install
97 rm -f "${pkgdir}/usr/lib/libGL.so"*
98 rm -rf "${pkgdir}/usr/lib/xorg"
99 rm -f "${pkgdir}/usr/include/GL/glew.h"
100 rm -f "${pkgdir}/usr/include/GL/glut"*
101 rm -f "${pkgdir}/usr/include/GL/glxew.h"
102 rm -f "${pkgdir}/usr/include/GL/wglew.h"
104 cd "${srcdir}/gl-manpages-1.0.1"
105 make DESTDIR="${pkgdir}" install
107 install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
108 install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
111 package_ati-dri-git() {
112 depends=('libgl-git')
113 conflicts=('ati-dri')
114 provides=('ati-dri=7.9')
115 pkgdesc="Mesa DRI + Gallium3D r300 drivers for AMD/ATI Radeon"
117 cd "${srcdir}/build/src/mesa/drivers/dri"
118 make -C radeon DESTDIR="${pkgdir}" install
119 make -C r200 DESTDIR="${pkgdir}" install
120 # classic mesa driver for R300 r300_dri.so
121 # make -C r300 DESTDIR="${pkgdir}" install <------- depricated
122 # gallium3D driver for R300 r300_dri.so
123 make -C ${srcdir}/build/src/gallium/targets/dri-r300 DESTDIR="${pkgdir}" install
124 make -C r600 DESTDIR="${pkgdir}" install
127 package_unichrome-dri-git() {
128 depends=('libgl-git')
129 conflicts=('unichrome-dri')
130 provides=('unichrome-dri=7.9')
131 pkgdesc="Mesa DRI drivers for S3 Graphics/VIA Unichrome"
133 cd "${srcdir}/build/src/mesa/drivers/dri"
134 make -C unichrome DESTDIR="${pkgdir}" install
137 package_mach64-dri-git() {
138 depends=('libgl-git')
139 conflicts=('mach64-dri')
140 provides=('mack64-dri=7.9')
141 pkgdesc="Mesa DRI drivers for ATI Mach64"
143 cd "${srcdir}/build/src/mesa/drivers/dri"
144 make -C mach64 DESTDIR="${pkgdir}" install
147 package_mga-dri-git() {
148 depends=('libgl-git')
149 conflicts=('mga-dri')
150 provides=('mga-dri=7.9')
151 pkgdesc="Mesa DRI drivers for Matrox"
153 cd "${srcdir}/build/src/mesa/drivers/dri"
154 make -C mga DESTDIR="${pkgdir}" install
157 package_r128-dri-git() {
158 depends=('libgl-git')
159 conflicts=('r128-dri')
160 provides=('r128-dri=7.9')
161 pkgdesc="Mesa DRI drivers for ATI Rage128"
163 cd "${srcdir}/build/src/mesa/drivers/dri"
164 make -C r128 DESTDIR="${pkgdir}" install
167 package_savage-dri-git() {
168 depends=('libgl-git')
169 conflicts=('savage-dri')
170 provides=('savage-dri=7.9')
171 pkgdesc="Mesa DRI drivers for S3 Sraphics/VIA Savage"
173 cd "${srcdir}/build/src/mesa/drivers/dri"
174 make -C savage DESTDIR="${pkgdir}" install
177 package_sis-dri-git() {
178 depends=('libgl-git')
179 conflicts=('sis-dri')
180 provides=('sis-dri=7.9')
181 pkgdesc="Mesa DRI drivers for SiS"
183 cd "${srcdir}/build/src/mesa/drivers/dri"
184 make -C sis DESTDIR="${pkgdir}" install
187 package_tdfx-dri-git() {
188 depends=('libgl-git')
189 conflicts=('tdfx-dri')
190 provides=('tdfx-dri=7.9')
191 pkgdesc="Mesa DRI drivers for 3dfx"
193 cd "${srcdir}/build/src/mesa/drivers/dri"
194 make -C tdfx DESTDIR="${pkgdir}" install
197 package_nouveau-dri-git() {
198 depends=('libgl-git')
199 conflicts=('nouveau-dri')
200 provides=('nouveau-dri=7.9')
201 pkgdesc="Mesa classic DRI + Gallium3D drivers for Nouveau"
203 cd "${srcdir}/build/src/mesa/drivers/dri"
204 # classic mesa driver for nv10 , nv20 nouveau_vieux_dri.so
205 make -C nouveau DESTDIR="${pkgdir}" install
206 # gallium3D driver for nv30 - nv40 - nv50 nouveau_dri.so
207 make -C ${srcdir}/build/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install
210 package_intel-dri-git() {
211 depends=('libgl-git')
212 conflicts=('intel-dri')
213 provides=('intel-dri=7.9')
214 pkgdesc="Mesa DRI drivers for Intel"
216 cd "${srcdir}/build/src/mesa/drivers/dri"
217 make -C i810 DESTDIR="${pkgdir}" install
218 make -C i915 DESTDIR="${pkgdir}" install
219 make -C i965 DESTDIR="${pkgdir}" install