1 # Maintainer: Lone_Wolf <lonewolf@xs4all.nl>
2 # Contributor : Jan de Groot <jgc@archlinux.org>
3 # Contributor: Andreas Radke <andyrtr@archlinux.org>
4 # Adapted from offical archlinux mesa package
10 pkgdesc="Mesa for R300 & R600 chipsets - git version. If you live in the US, you should delete --enable-texture-float \ line."
12 depends=('libxt' 'libxxf86vm' 'libxdamage' 'xorg-server' 'libxv' 'libffi')
13 makedepends=('pkgconfig' 'python2' 'talloc' 'libxml2' 'imake' 'git' 'glproto' 'dri2proto>=2.6' 'llvm>=3.0' 'xorg-server-devel' 'libxvmc' 'libvdpau')
14 optdepends=('libtxc_dxtn: S3TC support'
15 'mesa-demos-git: glxinfo and glxgears')
16 provides=(mesa=${_realver} libgl=${_realver} ati-dri=${_realver} libglapi=${_realver} libegl=${_realver} khrplatform-devel=${_realver})
17 replaces=(mesa libgl ati-dri libglapi libegl khrplatform-devel)
18 conflicts=('xf86-video-ati<6.9.0-6' mesa libgl ati-dri libglapi libegl khrplatform-devel)
19 url="http://mesa3d.sourceforge.net"
22 md5sums=('5c65a0fe315dd347e09b1f2826a1df5a')
24 _gitroot='git://anongit.freedesktop.org/git/mesa/mesa'
28 msg 'Connecting to git.freedesktop.org GIT server....'
29 if [ -d ${_gitname} ] ; then
30 cd ${_gitname} && git pull origin
34 msg 'GIT checkout done or server timeout'
35 msg 'Starting make...'
39 # Cleanup and prepare the build dir
40 [ -d build ] && rm -rf build
41 cp -r ${_gitname} build
43 ./autogen.sh --prefix=/usr \
44 --with-dri-driverdir=/usr/lib/xorg/modules/dri \
45 --with-gallium-drivers=r300,r600,swrast \
46 --with-dri-drivers=swrast \
47 --enable-texture-float \
49 --enable-shared-dricore \
51 --enable-gallium-gbm \
54 --enable-gallium-g3dvl \
55 --enable-shared-glapi \
58 --enable-gallium-egl \
59 # left out compile flags
61 # --enable-32-bit build 32-bit libraries [default=auto]
62 # --enable-64-bit build 64-bit libraries [default=auto]
63 # --enable-dri enable DRI modules [default=auto]
64 # --enable-glx enable GLX library [default=auto]
65 # --disable-driglx-direct enable direct rendering in GLX and EGL for DRI
69 # --disable-shared build shared libraries [default=enabled]
70 # --disable-asm disable assembly usage [default=enabled on supported plaforms]
71 # --disable-pic compile PIC objects [default=enabled for shared builds on supported platforms]
72 # --disable-egl disable EGL library [default=enabled]
73 # --disable-glu enable OpenGL Utility library [default=enabled]
74 # --enable-gallium-llvm build gallium LLVM support [default=enabled on
79 # --enable-mangling enable mangled symbols and library name [default=disabled]
80 # --enable-selinux Build SELinux-aware Mesa [default=disabled]
81 # --disable-opengl disable support for standard OpenGL API [default=no]
82 # gles1 , gles2 & openvg are for embedded and handhelds devices, this package targets desktops and laptops
83 # --enable-gles1 enable support for OpenGL ES 1.x API [default=no]
84 # --enable-gles2 enable support for OpenGL ES 2.x API [default=no]
85 # --enable-openvg enable support for OpenVG API [default=no]
86 # --enable-d3d1x enable support for Direct3D 10 & 11 low-level API [default=no]
87 # --enable-xa enable build of the XA X Acceleration API [default=no]
88 # --enable-xlib-glx make GLX library Xlib-based instead of DRI-based [default=disable]
96 make DESTDIR="${pkgdir}" install
98 rm -f "${pkgdir}/usr/lib/libGL.so"*
99 rm -f "${pkgdir}/usr/lib/libGLESv"*
100 rm -f "${pkgdir}/usr/lib/libEGL"*
101 rm -rf "${pkgdir}/usr/lib/egl"
102 rm -f ${pkgdir}/usr/lib/pkgconfig/{glesv1_cm.pc,glesv2.pc}
103 rm -rf "${pkgdir}/usr/lib/xorg"
104 rm -f "${pkgdir}/usr/include/GL/glew.h"
105 rm -f "${pkgdir}/usr/include/GL/glxew.h"
106 rm -f "${pkgdir}/usr/include/GL/wglew.h"
107 rm -f "${pkgdir}/usr/include/GL/glut.h"
108 rm -rf ${pkgdir}/usr/include/{GLES,GLES2}
111 install -m755 -d "${pkgdir}/usr/lib"
112 install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
113 bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
114 bin/minstall lib/libdricore.so* "${pkgdir}/usr/lib/"
115 bin/minstall lib/libglsl.so* "${pkgdir}/usr/lib/"
116 cd src/mesa/drivers/dri
117 make -C ${srcdir}/build/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
118 ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
121 install -m755 -d "${pkgdir}/usr/lib"
122 bin/minstall lib/libglapi.so* "${pkgdir}/usr/lib/"
125 make -C src/gallium/targets/egl-static DESTDIR="${pkgdir}" install
126 install -m755 -d "${pkgdir}/usr/lib"
127 install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
128 install -m755 -d "${pkgdir}/usr/include"
129 install -m755 -d "${pkgdir}/usr/include/"
130 install -m755 -d "${pkgdir}/usr/include/EGL"
131 install -m755 -d "${pkgdir}/usr/share"
132 install -m755 -d "${pkgdir}/usr/share/doc"
133 install -m755 -d "${pkgdir}/usr/share/doc/libegl"
134 bin/minstall lib/libEGL.so* "${pkgdir}/usr/lib/"
135 install -m755 -d "${pkgdir}/usr/lib/egl"
136 bin/minstall lib/egl/* "${pkgdir}/usr/lib/egl/"
137 bin/minstall src/egl/main/egl.pc "${pkgdir}/usr/lib/pkgconfig/"
138 bin/minstall include/EGL/* "${pkgdir}/usr/include/EGL/"
139 bin/minstall docs/egl.html "${pkgdir}/usr/share/doc/libegl/"
142 install -m755 -d "${pkgdir}/usr/include/KHR"
143 bin/minstall include/KHR/khrplatform.h "${pkgdir}/usr/include/KHR/"
145 cd "${srcdir}/build/src/mesa/drivers/dri"
146 make -C ${srcdir}/build/src/gallium/targets/dri-r300 DESTDIR="${pkgdir}" install
147 make -C ${srcdir}/build/src/gallium/targets/dri-r600 DESTDIR="${pkgdir}" install
149 install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
150 install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/"