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 Sep 23rd, 2012  |  syntax: None  |  size: 10.38 KB  |  views: 108  |  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: 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>
  8.  
  9. pkgbase=mesa-git
  10. pkgname=('mesa-git')
  11. true && pkgname=('mesa-git' 'libgl-git' 'osmesa-git' 'libglapi-git' 'libgles-git' 'libegl-git' 'ati-dri-git' 'intel-dri-git' 'nouveau-dri-git' 'svga-dri-git' 'khrplatform-devel-git' 'libgbm-git')
  12. pkgver=20120923
  13. pkgrel=2
  14. _mesaver=8.1
  15. arch=(i686 x86_64)
  16. makedepends=('clang' 'git' 'glproto' 'libdrm' 'libxxf86vm' 'libxdamage' 'expat'
  17.              'libx11' 'libxt' 'gcc-libs' 'dri2proto' 'python2' 'libxml2'
  18.              'imake' 'llvm' 'udev' 'flex' 'bison')
  19. url="http://mesa3d.sourceforge.net"
  20. license=('custom')
  21. source=(LICENSE)
  22. md5sums=('5c65a0fe315dd347e09b1f2826a1df5a')
  23.  
  24. _gitroot='git://anongit.freedesktop.org/git/mesa/mesa'
  25. _gitname='mesa'
  26.  
  27. build() {
  28.   msg 'Connecting to git.freedesktop.org GIT server....'
  29.   if [ -d ${_gitname} ] ; then
  30.     cd ${_gitname} && git pull origin
  31.   else
  32.     git clone ${_gitroot} --depth 1
  33.   fi
  34.   msg 'GIT checkout done or server timeout'
  35.   msg 'Starting make...'
  36.  
  37.   cd "${srcdir}"
  38.  
  39.   # Cleanup and prepare the build dir
  40.   [ -d build ] && rm -rf build
  41.   cp -r ${_gitname} build
  42.   cd build
  43.  
  44.   ./autogen.sh --prefix=/usr \
  45.     --with-dri-driverdir=/usr/lib/xorg/modules/dri \
  46.     --with-gallium-drivers=r300,r600,nouveau,svga,swrast \
  47.     --with-clang-libdir=/usr/lib \
  48.     --enable-gallium-llvm \
  49.     --enable-gallium-egl \
  50.     --enable-glx-tls \
  51.     --enable-gles1 \
  52.     --enable-gles2 \
  53.     --enable-egl \
  54.     --enable-dri \
  55.     --enable-glx \
  56.     --enable-xa \
  57.     --enable-osmesa \
  58.     --enable-gbm \
  59.     --enable-opencl \
  60.     --enable-texture-float
  61.   echo -e "\ninstall: " >> src/mesa/drivers/osmesa/Makefile
  62.   make
  63. }
  64.  
  65. package_libgl-git() {
  66.   depends=('libdrm' 'libxxf86vm' 'libxdamage' 'expat' 'libglapi-git' 'gcc-libs')
  67.   conflicts=('libgl')
  68.   provides=("libgl=${_mesaver}")
  69.   pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
  70.  
  71.   cd "${srcdir}"/build
  72.   install -m755 -d "${pkgdir}/usr/lib"
  73.   install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
  74.  
  75.   bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
  76.   bin/minstall lib/libdricore* "${pkgdir}/usr/lib/"
  77.  
  78.   cd src/mesa/drivers/dri
  79.   #make -C swrast DESTDIR="${pkgdir}" install
  80.   make -C "${srcdir}"/build/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
  81.  
  82.   #ln -s swrastg_dri.so "${pkgdir}/usr/lib/xorg/modules/dri/swrast_dri.so"
  83.   ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
  84.  
  85.   install -m755 -d "${pkgdir}/usr/share/licenses/libgl-git"
  86.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl-git/"
  87. }
  88.  
  89. package_osmesa-git() {
  90.   depends=('mesa-git')
  91.   conflicts=('osmesa')
  92.   provides=("osmesa=${_mesaver}")
  93.   optdepends=('opengl-man-pages: for the OpenGL API man pages')
  94.   pkgdesc="Mesa 3D off-screen rendering library"
  95.  
  96.   cd "${srcdir}"/build
  97.   install -m755 -d "${pkgdir}/usr/lib"
  98.   install -m755 -d "${pkgdir}/usr/lib/pkgconfig/"
  99.  
  100.   bin/minstall lib/libOSMesa.so* "${pkgdir}/usr/lib/"
  101.   bin/minstall src/mesa/drivers/osmesa/osmesa.pc "${pkgdir}/usr/lib/pkgconfig/"
  102.  
  103.   install -m755 -d "${pkgdir}/usr/share/licenses/osmesa-git"
  104.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/osmesa-git/"
  105. }
  106.  
  107. package_libglapi-git() {
  108.   depends=('glibc')
  109.   conflicts=('libglapi')
  110.   provides=("libglapi=${_mesaver}")
  111.   pkgdesc="free implementation of the GL API -- shared library. The Mesa GL API module is responsible for dispatching all the gl* functions"
  112.  
  113.   cd "${srcdir}"/build
  114.   install -m755 -d "${pkgdir}/usr/lib"
  115.   bin/minstall lib/libglapi.so* "${pkgdir}/usr/lib/"
  116.  
  117.   install -m755 -d "${pkgdir}/usr/share/licenses/libglapi"
  118.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libglapi/"
  119. }
  120.  
  121. package_libgles-git() {
  122.   depends=('libglapi-git' 'khrplatform-devel-git')
  123.   conflicts=('libgles')
  124.   provides=("libgles=${_mesaver}")
  125.   pkgdesc="Mesa GLES libraries and headers"
  126.  
  127.   cd "${srcdir}"/build
  128.   install -m755 -d "${pkgdir}/usr/lib"
  129.   install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
  130.   install -m755 -d "${pkgdir}/usr/include"
  131.   install -m755 -d "${pkgdir}/usr/include/GLES"
  132.   install -m755 -d "${pkgdir}/usr/include/GLES2"
  133.   bin/minstall lib/libGLESv* "${pkgdir}/usr/lib/"
  134.   bin/minstall src/mapi/es1api/glesv1_cm.pc "${pkgdir}/usr/lib/pkgconfig/"
  135.   bin/minstall src/mapi/es2api/glesv2.pc "${pkgdir}/usr/lib/pkgconfig/"
  136.   bin/minstall include/GLES/* "${pkgdir}/usr/include/GLES/"
  137.   bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
  138.  
  139.   install -m755 -d "${pkgdir}/usr/share/licenses/libgles-git"
  140.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgles-git/"
  141. }
  142.  
  143. package_libegl-git() {
  144.   depends=('libglapi-git' 'libdrm' 'libxext' 'libxfixes' 'udev' 'khrplatform-devel-git')
  145.   conflicts=('libegl')
  146.   provides=("libegl=${_mesaver}")
  147.   pkgdesc="Mesa libEGL libraries and headers"
  148.  
  149.   cd "${srcdir}"/build
  150.   make -C src/gallium/targets/egl-static DESTDIR="${pkgdir}" install
  151.   install -m755 -d "${pkgdir}/usr/lib"
  152.   install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
  153.   install -m755 -d "${pkgdir}/usr/include"
  154.   install -m755 -d "${pkgdir}/usr/include/"
  155.   install -m755 -d "${pkgdir}/usr/include/EGL"
  156.   install -m755 -d "${pkgdir}/usr/share"
  157.   install -m755 -d "${pkgdir}/usr/share/doc"
  158.   install -m755 -d "${pkgdir}/usr/share/doc/libegl"
  159.   bin/minstall lib/libEGL.so* "${pkgdir}/usr/lib/"
  160.   install -m755 -d "${pkgdir}/usr/lib/egl"
  161.   bin/minstall lib/egl/* "${pkgdir}/usr/lib/egl/"
  162.   bin/minstall src/egl/main/egl.pc "${pkgdir}/usr/lib/pkgconfig/"
  163.   bin/minstall include/EGL/* "${pkgdir}/usr/include/EGL/"
  164.   bin/minstall docs/egl.html "${pkgdir}/usr/share/doc/libegl/"
  165.  
  166.   install -m755 -d "${pkgdir}/usr/share/licenses/libegl-git"
  167.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libegl-git/"
  168. }
  169.  
  170. package_ati-dri-git() {
  171.   depends=('libgl-git')
  172.   conflicts=('ati-dri' 'xf86-video-ati<6.9.0-6')
  173.   provides=("ati-dri=${_mesaver}")
  174.   pkgdesc="Mesa DRI + Gallium3D r300 drivers for AMD/ATI Radeon"
  175.  
  176.   # Fix libtool relink issue
  177.   install -m755 -d "${pkgdir}/usr/lib"
  178.   cp ${srcdir}/build/lib/libdricore* ${pkgdir}/usr/lib/
  179.   make -C ${srcdir}/build/src/mesa/drivers/dri/radeon DESTDIR="${pkgdir}" install
  180.   make -C ${srcdir}/build/src/mesa/drivers/dri/r200 DESTDIR="${pkgdir}" install
  181.   # classic mesa driver for R300 r300_dri.so
  182.   # gallium3D driver for R300 r300_dri.so
  183.   make -C "${srcdir}"/build/src/gallium/targets/dri-r300 DESTDIR="${pkgdir}" install
  184.   make -C "${srcdir}"/build/src/gallium/targets/dri-r600 DESTDIR="${pkgdir}" install
  185.   # Remove libdricore
  186.   rm ${pkgdir}/usr/lib/libdricore*
  187.  
  188. }
  189.  
  190. package_intel-dri-git() {
  191.   depends=('libgl-git')
  192.   conflicts=('intel-dri')
  193.   provides=("intel-dri=${_mesaver}")
  194.   pkgdesc="Mesa DRI drivers for Intel"
  195.   # Fix libtool relink issue
  196.   install -m755 -d "${pkgdir}/usr/lib"
  197.   cp ${srcdir}/build/lib/libdricore* ${pkgdir}/usr/lib/
  198.   make -C ${srcdir}/build/src/mesa/drivers/dri/i915 DESTDIR="${pkgdir}" install
  199.   make -C ${srcdir}/build/src/mesa/drivers/dri/i965 DESTDIR="${pkgdir}" install
  200.   # Remove libdricore
  201.   rm ${pkgdir}/usr/lib/libdricore*
  202. }
  203.  
  204. package_nouveau-dri-git() {
  205.   depends=('libgl-git')
  206.   conflicts=('nouveau-dri')
  207.   provides=("nouveau-dri=${_mesaver}")
  208.   pkgdesc="Mesa classic DRI + Gallium3D drivers for Nouveau"
  209.   # Fix libtool relink issue
  210.   install -m755 -d "${pkgdir}/usr/lib"
  211.   cp ${srcdir}/build/lib/libdricore* ${pkgdir}/usr/lib/
  212.   # classic mesa driver for nv10 , nv20 nouveau_vieux_dri.so
  213.   make -C ${srcdir}/build/src/mesa/drivers/dri/nouveau DESTDIR="${pkgdir}" install
  214.   # gallium3D driver for nv30 - nv40 - nv50 nouveau_dri.so
  215.   make -C ${srcdir}/build/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install
  216.   # Remove libdricore
  217.   rm ${pkgdir}/usr/lib/libdricore*
  218. }
  219.  
  220.  
  221. package_svga-dri-git() {
  222.   depends=("mesa-git")
  223.   conflicts=('svga-dri')
  224.   provides=("svga-dri=${_mesaver}")
  225.   pkgdesc="Gallium3D VMware guest GL driver"
  226.  
  227.   make -C ${srcdir}/build/src/gallium/targets/dri-vmwgfx DESTDIR="${pkgdir}" install
  228. }
  229.  
  230. package_mesa-git() {
  231.   depends=('libgl-git' 'libx11' 'libxt' 'gcc-libs' 'dri2proto' 'glproto')
  232.   optdepends=('opengl-man-pages: for the OpenGL API man pages')
  233.   conflicts=('mesa')
  234.   provides=("mesa=${_mesaver}")
  235.   pkgdesc="Mesa 3-D graphics libraries and include files"
  236.  
  237.   cd "${srcdir}"/build
  238.   make DESTDIR="${pkgdir}" install
  239.  
  240.   rm -f "${pkgdir}/usr/lib/libGL.so"*
  241.   rm -f "${pkgdir}/usr/lib/libglapi.so"*
  242.   rm -f "${pkgdir}/usr/lib/libgbm.so"*
  243.   rm -f "${pkgdir}/usr/lib/libGLESv"*
  244.   rm -f "${pkgdir}/usr/lib/libEGL"*
  245.   rm -f "${pkgdir}/usr/lib/libOSMesa.so"*
  246.   rm -f "${pkgdir}/usr/lib/libdricore8.1.0.so"*
  247.   rm -rf "${pkgdir}/usr/lib/egl"
  248.   rm -f ${pkgdir}/usr/lib/pkgconfig/{glesv1_cm.pc,glesv2.pc,egl.pc,osmesa.pc,gbm.pc}
  249.   rm -rf "${pkgdir}/usr/lib/xorg"
  250.   rm -f "${pkgdir}/usr/include/GL/glew.h"
  251.   rm -f "${pkgdir}/usr/include/GL/glxew.h"
  252.   rm -f "${pkgdir}/usr/include/GL/wglew.h"
  253.   rm -f "${pkgdir}/usr/include/GL/glut.h"
  254.   rm -rf ${pkgdir}/usr/include/{GLES,GLES2,EGL,KHR}
  255.  
  256.   rm -f "${pkgdir}/usr/lib/libdricore9"*
  257.  
  258.   install -m755 -d "${pkgdir}/usr/share/licenses/mesa-git"
  259.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-git/"
  260. }
  261.  
  262. package_khrplatform-devel-git() {
  263.   conflicts=('khrplatform-devel')
  264.   provides=("khrplatform-devel=${_mesaver}")
  265.   pkgdesc="Khronos platform development package"
  266.  
  267.   cd ${srcdir}/build
  268.   install -m755 -d "${pkgdir}/usr/include/KHR"
  269.   bin/minstall include/KHR/khrplatform.h "${pkgdir}/usr/include/KHR/"
  270.  
  271.   install -m755 -d "${pkgdir}/usr/share/licenses/khrplatform-devel"
  272.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/khrplatform-devel/"
  273. }
  274.  
  275.  
  276. package_libgbm-git() {
  277.   conflicts=('libgbm')
  278.   provides=("libgbm=${_mesaver}")
  279.   depends=('glibc')
  280.   pkgdesc="Mesa gbm library"
  281.  
  282.   cd ${srcdir}/build
  283.   install -m755 -d "${pkgdir}/usr/lib"
  284.   bin/minstall lib/libgbm.so* "${pkgdir}/usr/lib/"
  285.   install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
  286.   bin/minstall src/gbm/main/gbm.pc "${pkgdir}/usr/lib/pkgconfig/"
  287.  
  288.   install -m755 -d "${pkgdir}/usr/share/licenses/libgbm"
  289.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgbm/"
  290. }