Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 14th, 2010  |  syntax: None  |  size: 6.85 KB  |  views: 110  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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>
  6.  
  7. pkgbase=mesa-git
  8. #pkgname=mesa-git
  9. pkgname=('mesa-git' 'libgl-git' 'intel-dri-git')
  10. pkgver=20101114
  11. pkgrel=1
  12. arch=(i686 x86_64)
  13. makedepends=('git' 'pkgconfig' 'glproto-git' 'libdrm-git' 'libxxf86vm'
  14.              'libxdamage' 'expat' 'libx11' 'libxt' 'gcc-libs' 'dri2proto'
  15.              'python2' 'talloc' 'libxml2' 'imake')
  16. url="http://mesa3d.sourceforge.net"
  17. license=('custom')
  18. source=(ftp://ftp.archlinux.org/other/mesa/gl-manpages-1.0.1.tar.bz2
  19.         LICENSE)
  20. md5sums=('6ae05158e678f4594343f32c2ca50515'
  21.          '5c65a0fe315dd347e09b1f2826a1df5a')
  22.  
  23. _gitroot='git://anongit.freedesktop.org/git/mesa/mesa'
  24. _gitname='mesa'
  25.  
  26. build() {
  27.   msg 'Connecting to git.freedesktop.org GIT server....'
  28.   if [ -d ${_gitname} ] ; then
  29.     cd ${_gitname} && git pull origin
  30.   else
  31.     git clone ${_gitroot}
  32.   fi
  33.   msg 'GIT checkout done or server timeout'
  34.   msg 'Starting make...'
  35.  
  36.   cd ${srcdir}
  37.  
  38.   # Cleanup and prepare the build dir
  39.   [ -d build ] && rm -rf build
  40.   cp -r ${_gitname} build
  41.   cd build
  42.  
  43.   # python2 build fixes
  44.   sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
  45.          -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find $srcdir -name '*.py')
  46.   sed -i -e "s|PYTHON2 = python|PYTHON2 = python2|" "${srcdir}"/build/configs/{default,autoconf.in}
  47.   sed -i -e "s|python|python2|" "${srcdir}"/build/src/gallium/auxiliary/Makefile
  48.  
  49.   msg 'Applying patches'
  50.   # Revert "intel: sync to vblank by default"
  51.   # This reverts commit e9bf3e4cc9a7e4bcd4c45bd707541d26ecdf0409.
  52.   sed -i -e 's/DRI_CONF_VBLANK_ALWAYS_SYNC/DRI_CONF_VBLANK_DEF_INTERVAL_0/g' src/mesa/drivers/dri/intel/intel_screen.c
  53.  
  54.   ./autogen.sh --prefix=/usr \
  55.     --with-dri-driverdir=/usr/lib/xorg/modules/dri \
  56.     --with-dri-drivers=swrast,radeon,r200,r300,r600,i810,i915,i965,unichrome,mach64,mga,r128,savage,sis,tdfx \
  57.     --enable-egl \
  58.     --enable-gles2 \
  59.     --disable-gallium \
  60.     --enable-glx-tls \
  61.     --with-driver=dri \
  62.     --enable-xcb \
  63.     --with-state-trackers=dri,glx \
  64.     --disable-glut
  65.   make
  66.  
  67.   cd "${srcdir}/gl-manpages-1.0.1"
  68.   ./configure --prefix=/usr
  69.   make
  70. }
  71.  
  72. package_libgl-git() {
  73.   depends=('libdrm-git' 'libxxf86vm' 'libxdamage' 'expat')
  74.   conflicts=('libgl')
  75.   provides=('libgl=7.9')
  76.   pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
  77.  
  78.   cd "${srcdir}"/build
  79.   install -m755 -d "${pkgdir}/usr/lib"
  80.   install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
  81.  
  82.   bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
  83.  
  84.   cd src/mesa/drivers/dri
  85.   make -C swrast DESTDIR="${pkgdir}" install
  86.   ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
  87.  
  88.   install -m755 -d "${pkgdir}/usr/share/licenses/libgl"
  89.   install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl/"
  90. }
  91.  
  92. package_ati-dri-git() {
  93.   depends=('libgl-git')
  94.   conflicts=('ati-dri')
  95.   provides=('ati-dri=7.9')
  96.   pkgdesc="Mesa DRI + Gallium3D r300 drivers for AMD/ATI Radeon"
  97.  
  98.   cd "${srcdir}/build/src/mesa/drivers/dri"
  99.   make -C radeon DESTDIR="${pkgdir}" install
  100.   make -C r200 DESTDIR="${pkgdir}" install
  101.   # classic mesa driver for R300 r300_dri.so
  102. # make -C r300 DESTDIR="${pkgdir}" install  <------- depricated
  103.   # gallium3D driver for R300 r300_dri.so
  104.   make -C ${srcdir}/build/src/gallium/targets/dri-r300 DESTDIR="${pkgdir}" install
  105.   make -C r600 DESTDIR="${pkgdir}" install
  106. }
  107.  
  108. package_intel-dri-git() {
  109.   depends=('libgl-git')
  110.   conflicts=('intel-dri')
  111.   provides=('intel-dri=7.9')
  112.   pkgdesc="Mesa DRI drivers for Intel"
  113.  
  114.   cd "${srcdir}/build/src/mesa/drivers/dri"
  115.   make -C i810 DESTDIR="${pkgdir}" install
  116.   make -C i915 DESTDIR="${pkgdir}" install
  117.   make -C i965 DESTDIR="${pkgdir}" install
  118. }
  119.  
  120. package_unichrome-dri-git() {
  121.   depends=('libgl-git')
  122.   conflicts=('unichrome-dri')
  123.   provides=('unichrome-dri=7.9')
  124.   pkgdesc="Mesa DRI drivers for S3 Graphics/VIA Unichrome"
  125.  
  126.   cd "${srcdir}/build/src/mesa/drivers/dri"
  127.   make -C unichrome DESTDIR="${pkgdir}" install
  128. }
  129.  
  130. package_mach64-dri-git() {
  131.   depends=('libgl-git')
  132.   conflicts=('mach64-dri')
  133.   provides=('mack64-dri=7.9')
  134.   pkgdesc="Mesa DRI drivers for ATI Mach64"
  135.  
  136.   cd "${srcdir}/build/src/mesa/drivers/dri"
  137.   make -C mach64 DESTDIR="${pkgdir}" install
  138. }
  139.  
  140. package_mga-dri-git() {
  141.   depends=('libgl-git')
  142.   conflicts=('mga-dri')
  143.   provides=('mga-dri=7.9')
  144.   pkgdesc="Mesa DRI drivers for Matrox"
  145.  
  146.   cd "${srcdir}/build/src/mesa/drivers/dri"
  147.   make -C mga DESTDIR="${pkgdir}" install
  148. }
  149.  
  150. package_r128-dri-git() {
  151.   depends=('libgl-git')
  152.   conflicts=('r128-dri')
  153.   provides=('r128-dri=7.9')
  154.   pkgdesc="Mesa DRI drivers for ATI Rage128"
  155.  
  156.   cd "${srcdir}/build/src/mesa/drivers/dri"
  157.   make -C r128 DESTDIR="${pkgdir}" install
  158. }
  159.  
  160. package_savage-dri-git() {
  161.   depends=('libgl-git')
  162.   conflicts=('savage-dri')
  163.   provides=('savage-dri=7.9')
  164.   pkgdesc="Mesa DRI drivers for S3 Sraphics/VIA Savage"
  165.  
  166.   cd "${srcdir}/build/src/mesa/drivers/dri"
  167.   make -C savage DESTDIR="${pkgdir}" install
  168. }
  169.  
  170. package_sis-dri-git() {
  171.   depends=('libgl-git')
  172.   conflicts=('sis-dri')
  173.   provides=('sis-dri=7.9')
  174.   pkgdesc="Mesa DRI drivers for SiS"
  175.  
  176.   cd "${srcdir}/build/src/mesa/drivers/dri"
  177.   make -C sis DESTDIR="${pkgdir}" install
  178. }
  179.  
  180. package_tdfx-dri-git() {
  181.   depends=('libgl-git')
  182.   conflicts=('tdfx-dri')
  183.   provides=('tdfx-dri=7.9')
  184.   pkgdesc="Mesa DRI drivers for 3dfx"
  185.  
  186.   cd "${srcdir}/build/src/mesa/drivers/dri"
  187.   make -C tdfx DESTDIR="${pkgdir}" install
  188. }
  189.  
  190. package_nouveau-dri-git() {
  191.   depends=('libgl-git')
  192.   conflicts=('nouveau-dri')
  193.   provides=('nouveau-dri=7.9')
  194.   pkgdesc="Mesa classic DRI + Gallium3D drivers for Nouveau"
  195.  
  196.   cd "${srcdir}/build/src/mesa/drivers/dri"
  197.   # classic mesa driver for nv10 , nv20 nouveau_vieux_dri.so
  198.   make -C nouveau DESTDIR="${pkgdir}" install
  199.   # gallium3D driver for nv30 - nv40 - nv50 nouveau_dri.so
  200.   make -C ${srcdir}/build/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install
  201. }
  202.  
  203. package_mesa-git() {
  204.   depends=('libgl-git' 'libx11' 'libxt' 'gcc-libs' 'dri2proto-git' 'libdrm-git' 'glproto-git')
  205.   conflicts=('mesa')
  206.   provides=('mesa=7.9' 'wayland-mesa-git')
  207.   pkgdesc="Mesa 3-D graphics libraries and include files"
  208.  
  209.   cd "${srcdir}"/build
  210.   make DESTDIR="${pkgdir}" install
  211.  
  212.   rm -f "${pkgdir}/usr/lib/libGL.so"*
  213.   rm -rf "${pkgdir}/usr/lib/xorg"
  214.   rm -f "${pkgdir}/usr/include/GL/glew.h"
  215.   rm -f "${pkgdir}/usr/include/GL/glut"*
  216.   rm -f "${pkgdir}/usr/include/GL/glxew.h"
  217.   rm -f "${pkgdir}/usr/include/GL/wglew.h"
  218.  
  219.   cd "${srcdir}/gl-manpages-1.0.1"
  220.   make DESTDIR="${pkgdir}" install
  221.  
  222.   install -m755 -d "${pkgdir}/usr/share/licenses/mesa"
  223.   install -m755 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/"
  224. }