Want more features on Pastebin? Sign Up, it's FREE!
Guest

pkgbuild mesa-git

By: a guest on Jul 27th, 2011  |  syntax: None  |  size: 9.87 KB  |  views: 178  |  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. # Contributor: Jan de Groot <jgc@archlinux.org>
  3. # Contributor: Andreas Radke <andyrtr@archlinux.org>
  4. # Contributor: Thomas Dziedzic < gostrc at gmail >
  5. # Contributor: Antti "Tera" Oja <antti.bofh@gmail.com>
  6. # Contributor: Diego Jose <diegoxter1006@gmail.com
  7.  
  8. pkgbase=mesa-git
  9. pkgname=('mesa-git' 'libgl-git' 'libglapi-git' 'libgles-git' 'libegl-git' 'ati-dri-git'
  10.          'intel-dri-git' 'unichrome-dri-git' 'mach64-dri-git' 'mga-dri-git'
  11.          'r128-dri-git' 'savage-dri-git' 'sis-dri-git' 'tdfx-dri-git'
  12.          'nouveau-dri-git')
  13. pkgver=20110727
  14. pkgrel=1
  15. _mesaver=7.12
  16. arch=(i686 x86_64)
  17. makedepends=('git' 'glproto-git' 'libdrm-git' 'libxxf86vm' 'libxdamage' 'expat' 'libx11' 'libxt'
  18.              'gcc-libs' 'dri2proto-git' 'python2' 'libxml2' 'imake' 'llvm' 'udev')
  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}
  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,swrast \
  47.     --enable-gallium-egl --enable-shared-glapi \
  48.     --enable-glx-tls \
  49.     --with-driver=dri \
  50.     --enable-xcb \
  51.     --disable-glut \
  52.     --enable-gles1 \
  53.     --enable-gles2 \
  54.     --enable-egl \
  55.     --enable-shared-dricore \
  56.     --enable-texture-float
  57.   make
  58. }
  59.  
  60. package_libgl-git() {
  61.   depends=('libdrm-git' 'libxxf86vm' 'libxdamage' 'expat' 'libglapi-git' 'gcc-libs')
  62.   conflicts=('libgl')
  63.   provides=("libgl=${_mesaver}")
  64.   pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
  65.  
  66.   cd ${srcdir}/build
  67.   install -m755 -d "${pkgdir}/usr/lib"
  68.   install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
  69.  
  70.   bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
  71.   bin/minstall lib/libdricore.so* "${pkgdir}/usr/lib/"
  72.   bin/minstall lib/libglsl.so* "${pkgdir}/usr/lib/"
  73.  
  74.   cd src/mesa/drivers/dri
  75.   #make -C swrast DESTDIR="${pkgdir}" install
  76.   make -C "${srcdir}"/build/src/gallium/targets/dri-swrast DESTDIR="${pkgdir}" install
  77.   #ln -s swrastg_dri.so "${pkgdir}/usr/lib/xorg/modules/dri/swrast_dri.so"
  78.   ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
  79.  
  80.   install -m755 -d "${pkgdir}/usr/share/licenses/libgl-git"
  81.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl-git/"
  82. }
  83.  
  84. package_libglapi-git() {
  85.   depends=('glibc')
  86.   conflicts=('libglapi')
  87.   pkgdesc="free implementation of the GL API -- shared library. The Mesa GL API module is responsible for dispatching all the gl* functions"
  88.  
  89.   cd ${srcdir}/build  
  90.   install -m755 -d "${pkgdir}/usr/lib"
  91.   bin/minstall lib/libglapi.so* "${pkgdir}/usr/lib/"
  92.  
  93.   install -m755 -d "${pkgdir}/usr/share/licenses/libglapi"
  94.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libglapi/"
  95. }
  96.  
  97.  
  98.  
  99. package_libgles-git() {
  100.   depends=('libglapi-git')
  101.   conflicts=('libgles')
  102.   provides=("libgles=${_mesaver}")
  103.   pkgdesc="Mesa GLES libraries and headers"
  104.  
  105.   cd ${srcdir}/build
  106.   install -m755 -d "${pkgdir}/usr/lib"
  107.   install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
  108.   install -m755 -d "${pkgdir}/usr/include"
  109.   install -m755 -d "${pkgdir}/usr/include/GLES"
  110.   install -m755 -d "${pkgdir}/usr/include/GLES2"
  111.   bin/minstall lib/libGLESv* "${pkgdir}/usr/lib/"
  112.   bin/minstall src/mapi/es1api/glesv1_cm.pc "${pkgdir}/usr/lib/pkgconfig/"
  113.   bin/minstall src/mapi/es2api/glesv2.pc "${pkgdir}/usr/lib/pkgconfig/"
  114.   bin/minstall include/GLES/* "${pkgdir}/usr/include/GLES/"
  115.   bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
  116.   bin/minstall include/GLES2/* "${pkgdir}/usr/include/GLES2/"
  117.  
  118.   install -m755 -d "${pkgdir}/usr/share/licenses/libgles-git"
  119.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgles-git/"
  120. }
  121.  
  122. package_libegl-git() {
  123.   depends=('libglapi-git' 'libdrm' 'libxext' 'libxfixes' 'udev')
  124.   conflicts=('libegl')
  125.   provides=("libegl=${_mesaver}")
  126.   pkgdesc="Mesa libEGL libraries and headers"
  127.  
  128.   cd ${srcdir}/build
  129.   make -C src/gallium/targets/egl-static DESTDIR="${pkgdir}" install
  130.   install -m755 -d "${pkgdir}/usr/lib"
  131.   install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
  132.   install -m755 -d "${pkgdir}/usr/include"
  133.   install -m755 -d "${pkgdir}/usr/include/"
  134.   install -m755 -d "${pkgdir}/usr/include/EGL"
  135.   install -m755 -d "${pkgdir}/usr/include/KHR"
  136.   install -m755 -d "${pkgdir}/usr/share"
  137.   install -m755 -d "${pkgdir}/usr/share/doc"
  138.   install -m755 -d "${pkgdir}/usr/share/doc/libegl"
  139.   bin/minstall lib/libEGL.so* "${pkgdir}/usr/lib/"
  140.   install -m755 -d "${pkgdir}/usr/lib/egl"
  141.   bin/minstall lib/egl/* "${pkgdir}/usr/lib/egl/"
  142.   bin/minstall src/egl/main/egl.pc "${pkgdir}/usr/lib/pkgconfig/"
  143.   bin/minstall include/EGL/* "${pkgdir}/usr/include/EGL/"
  144.   bin/minstall include/KHR/khrplatform.h "${pkgdir}/usr/include/KHR/"
  145.   bin/minstall docs/egl.html "${pkgdir}/usr/share/doc/libegl/"
  146.  
  147.   install -m755 -d "${pkgdir}/usr/share/licenses/libegl-git"
  148.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libegl-git/"
  149. }
  150.  
  151. package_mesa-git() {
  152.   depends=('libgl-git' 'libx11' 'libxt' 'gcc-libs' 'dri2proto-git' 'glproto-git')
  153.   optdepends=('opengl-man-pages: for the OpenGL API man pages')
  154.   conflicts=('mesa')
  155.   provides=("mesa=${_mesaver}")
  156.   pkgdesc="Mesa 3-D graphics libraries and include files"
  157.  
  158.   cd ${srcdir}/build
  159.   make DESTDIR="${pkgdir}" install
  160.  
  161.   rm -f "${pkgdir}/usr/lib/libGL.so"*
  162.   rm -f "${pkgdir}/usr/lib/libglapi.so"*
  163.   rm -f "${pkgdir}/usr/lib/libGLESv"*
  164.   rm -f "${pkgdir}/usr/lib/libEGL"*
  165.   rm -rf "${pkgdir}/usr/lib/egl"
  166.   rm -f ${pkgdir}/usr/lib/pkgconfig/{glesv1_cm.pc,glesv2.pc,egl.pc}
  167.   rm -rf "${pkgdir}/usr/lib/xorg"
  168.   rm -f "${pkgdir}/usr/include/GL/glew.h"
  169.   rm -f "${pkgdir}/usr/include/GL/glxew.h"
  170.   rm -f "${pkgdir}/usr/include/GL/wglew.h"
  171.   rm -f "${pkgdir}/usr/include/GL/glut.h"
  172.   rm -rf ${pkgdir}/usr/include/{GLES,GLES2,EGL,KHR}
  173.  
  174.   install -m755 -d "${pkgdir}/usr/share/licenses/mesa-git"
  175.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-git/"
  176. }
  177.  
  178. package_ati-dri-git() {
  179.   depends=('libgl-git')
  180.   conflicts=('ati-dri' 'xf86-video-ati<6.9.0-6')
  181.   provides=("ati-dri=${_mesaver}")
  182.   pkgdesc="Mesa DRI + Gallium3D r300 drivers for AMD/ATI Radeon"
  183.  
  184.   make -C ${srcdir}/build/src/mesa/drivers/dri/radeon DESTDIR="${pkgdir}" install
  185.   make -C ${srcdir}/build/src/mesa/drivers/dri/r200 DESTDIR="${pkgdir}" install
  186.   # classic mesa driver for R300 r300_dri.so
  187.   # gallium3D driver for R300 r300_dri.so
  188.   make -C "${srcdir}"/build/src/gallium/targets/dri-r300 DESTDIR="${pkgdir}" install
  189.   make -C "${srcdir}"/build/src/gallium/targets/dri-r600 DESTDIR="${pkgdir}" install
  190. }
  191.  
  192. package_intel-dri-git() {
  193.   depends=('libgl-git')
  194.   conflicts=('intel-dri')
  195.   provides=("intel-dri=${_mesaver}")
  196.   pkgdesc="Mesa DRI drivers for Intel"
  197.  
  198.   make -C ${srcdir}/build/src/mesa/drivers/dri/i810 DESTDIR="${pkgdir}" install
  199.   make -C ${srcdir}/build/src/mesa/drivers/dri/i915 DESTDIR="${pkgdir}" install
  200.   make -C ${srcdir}/build/src/mesa/drivers/dri/i965 DESTDIR="${pkgdir}" install
  201. }
  202.  
  203. package_unichrome-dri-git() {
  204.   depends=('libgl-git')
  205.   conflicts=('unichrome-dri')
  206.   provides=("unichrome-dri=${_mesaver}")
  207.   pkgdesc="Mesa DRI drivers for S3 Graphics/VIA Unichrome"
  208.  
  209.   make -C ${srcdir}/build/src/mesa/drivers/dri/unichrome DESTDIR="${pkgdir}" install
  210. }
  211.  
  212. package_mach64-dri-git() {
  213.   depends=('libgl-git')
  214.   conflicts=('mach64-dri')
  215.   provides=("mach64-dri=${_mesaver}")
  216.   pkgdesc="Mesa DRI drivers for ATI Mach64"
  217.   conflicts=('xf86-video-mach64<6.8.2')
  218.  
  219.   make -C ${srcdir}/build/src/mesa/drivers/dri/mach64 DESTDIR="${pkgdir}" install
  220. }
  221.  
  222. package_mga-dri-git() {
  223.   depends=('libgl-git')
  224.   conflicts=('mga-dri' 'xf86-video-mach64<6.8.2')
  225.   provides=("mga-dri=${_mesaver}")
  226.   pkgdesc="Mesa DRI drivers for Matrox"
  227.   make -C ${srcdir}/build/src/mesa/drivers/dri/mga DESTDIR="${pkgdir}" install
  228. }
  229.  
  230. package_r128-dri-git() {
  231.   depends=('libgl-git')
  232.   provides=("r128-dri=${_mesaver}")
  233.   conflicts=('r128-dri' 'xf86-video-r128<6.8.1')
  234.  
  235.   pkgdesc="Mesa DRI drivers for ATI Rage128"
  236.  
  237.   make -C ${srcdir}/build/src/mesa/drivers/dri/r128 DESTDIR="${pkgdir}" install
  238. }
  239.  
  240. package_savage-dri-git() {
  241.   depends=('libgl-git')
  242.   conflicts=('savage-dri' 'xf86-video-savage<2.3.1')
  243.   provides=("savage-dri=${_mesaver}")
  244.   pkgdesc="Mesa DRI drivers for S3 Sraphics/VIA Savage"
  245.   make -C ${srcdir}/build/src/mesa/drivers/dri/savage DESTDIR="${pkgdir}" install
  246. }
  247.  
  248. package_sis-dri-git() {
  249.   depends=('libgl-git')
  250.   conflicts=('sis-dri' 'xf86-video-sis<0.10.2')
  251.   provides=("sis-dri=${_mesaver}")
  252.   pkgdesc="Mesa DRI drivers for SiS"
  253.  
  254.   make -C ${srcdir}/build/src/mesa/drivers/dri/sis DESTDIR="${pkgdir}" install
  255. }
  256.  
  257. package_tdfx-dri-git() {
  258.   depends=('libgl-git')
  259.   conflicts=('tdfx-dri' 'xf86-video-tdfx<1.4.3')
  260.   provides=("tdfx-dri=${_mesaver}")
  261.   pkgdesc="Mesa DRI drivers for 3dfx"
  262.  
  263.   make -C ${srcdir}/build/src/mesa/drivers/dri/tdfx DESTDIR="${pkgdir}" install
  264. }
  265.  
  266. package_nouveau-dri-git() {
  267.   depends=('libgl-git')
  268.   conflicts=('nouveau-dri')
  269.   provides=("nouveau-dri=${_mesaver}")
  270.   pkgdesc="Mesa classic DRI + Gallium3D drivers for Nouveau"
  271.  
  272.   # classic mesa driver for nv10 , nv20 nouveau_vieux_dri.so
  273.   make -C ${srcdir}/build/src/mesa/drivers/dri/nouveau DESTDIR="${pkgdir}" install
  274.   # Ugly hack to work around buildsystem bug
  275.   # gallium3D driver for nv30 - nv40 - nv50 nouveau_dri.
  276.   # gallium3D driver for nv30 - nv40 - nv50 nouveau_dri.so
  277.   make -C ${srcdir}/build/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install
  278. }
clone this paste RAW Paste Data