Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

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