# Maintainer: Kristian Klausen # Contributor: Egon Ashrafinia # Contributor: Tavian Barnes # Contributor: Jan de Groot # Contributor: Andreas Radke # Contributor: Thomas Dziedzic < gostrc at gmail > # Contributor: Antti "Tera" Oja # Contributor: Diego Jose # Credits to maintainers of mesa in extra! # Maintainer: Jan de Groot # Maintainer: Andreas Radke pkgbase=mesa-git pkgname=('ati-dri-git' 'intel-dri-git' 'nouveau-dri-git' 'svga-dri-git' 'mesa-git' 'mesa-libgl-git') pkgdesc="mesa trunk (git version)" pkgver=10.2.0_devel.61222 pkgrel=1 groups=('mesagit') arch=('i686' 'x86_64') makedepends=('python2' 'libxml2' 'libx11' 'glproto' 'libdrm' 'libxshmfence' 'dri3proto' 'libxxf86vm' 'libxdamage' 'libvdpau' 'wayland' 'elfutils' 'llvm' 'systemd' 'git' 'pacman>=4.1') url="http://mesa3d.sourceforge.net" license=('custom') source=(LICENSE 'mesa::git+http://anongit.freedesktop.org/git/mesa/mesa.git#branch=master') options=('!libtool') md5sums=('5c65a0fe315dd347e09b1f2826a1df5a' SKIP) # prepare() { # cd mesa # # patch -Np1 -i ../bison3-support.patch # } pkgver() { cd ${srcdir}/mesa echo $(grep -o --max-count=1 "[0-9]*\.[0-9]*\.[0-9]*-*[a-z]*" VERSION | tr "-" "_").$(git rev-list --count HEAD) } build() { cd ${srcdir}/mesa autoreconf -vfi # our automake is far too new for their build system :) ./configure --prefix=/usr \ --sysconfdir=/etc \ --with-dri-driverdir=/usr/lib/xorg/modules/dri \ --with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast \ --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \ --with-egl-platforms=x11,drm,wayland \ --with-llvm-shared-libs \ --enable-gallium-llvm \ --enable-egl \ --enable-gallium-egl \ --enable-shared-glapi \ --enable-gbm \ --enable-glx-tls \ --enable-dri \ --enable-glx \ --enable-osmesa \ --enable-gles1 \ --enable-gles2 \ --enable-texture-float \ --enable-xa \ --enable-debug \ --enable-vdpau # --help make # fake installation mkdir $srcdir/fakeinstall make DESTDIR=${srcdir}/fakeinstall install } package_ati-dri-git () { pkgdesc="Mesa drivers for AMD/ATI Radeon" depends=("mesa-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})" 'elfutils') optdepends=('libtxc_dxtn') conflicts=('ati-dri' 'xf86-video-ati<6.9.0-6') provides=('ati-dri') replaces=('ati-dri') install -m755 -d ${pkgdir}/usr/lib/vdpau/ mv -v ${srcdir}/fakeinstall/usr/lib/vdpau/libvdpau_{r600,radeonsi}.* ${pkgdir}/usr/lib/vdpau/ install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/{r200,r300,r600,radeon,radeonsi}_dri.so ${pkgdir}/usr/lib/xorg/modules/dri/ install -m755 -d ${pkgdir}/usr/lib/gallium-pipe mv -v ${srcdir}/fakeinstall/usr/lib/gallium-pipe/pipe_{r300,r600,radeonsi}* ${pkgdir}/usr/lib/gallium-pipe/ install -m755 -d "${pkgdir}/usr/share/licenses/ati-dri-git" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/ati-dri-git/" } package_intel-dri-git() { pkgdesc="Mesa drivers for Intel" optdepends=('libtxc_dxtn') depends=("mesa-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})") provides=('intel-dri') replaces=('intel-dri') conflicts=('intel-dri') install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/{i915,i965}_dri.so ${pkgdir}/usr/lib/xorg/modules/dri/ install -m755 -d "${pkgdir}/usr/share/licenses/intel-dri-git" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/intel-dri-git/" } package_nouveau-dri-git() { pkgdesc="Mesa drivers for Nouveau" optdepends=('libtxc_dxtn') depends=("mesa-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})") provides=('nouveau-dri') replaces=('nouveau-dri') conflicts=('nouveau-dri') install -m755 -d ${pkgdir}/usr/lib/vdpau/ mv -v ${srcdir}/fakeinstall/usr/lib/vdpau/libvdpau_nouveau.* ${pkgdir}/usr/lib/vdpau/ install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/nouveau_{dri,vieux_dri}.so ${pkgdir}/usr/lib/xorg/modules/dri/ install -m755 -d ${pkgdir}/usr/lib/gallium-pipe mv -v ${srcdir}/fakeinstall/usr/lib/gallium-pipe/pipe_nouveau* ${pkgdir}/usr/lib/gallium-pipe/ # vdpau drivers are still buggy with nouveau, so remove them (FS#36754) rm -rf ${pkgdir}/usr/lib/vdpau/ install -m755 -d "${pkgdir}/usr/share/licenses/nouveau-dri-git" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/nouveau-dri-git/" } package_svga-dri-git() { pkgdesc="Gallium3D VMware guest GL driver" depends=('libdrm' 'expat' 'llvm-libs' 'libffi' 'zlib' 'gcc-libs') provides=('svga-dri') replaces=('svga-dri') conflicts=('svga-dri') install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/vmwgfx_dri.so ${pkgdir}/usr/lib/xorg/modules/dri/ install -m755 -d ${pkgdir}/usr/lib/gallium-pipe mv -v ${srcdir}/fakeinstall/usr/lib/gallium-pipe/pipe_vmwgfx* ${pkgdir}/usr/lib/gallium-pipe/ install -m755 -d "${pkgdir}/usr/share/licenses/svga-dri-git" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/svga-dri-git/" } package_mesa-git() { pkgdesc="an open-source implementation of the OpenGL specification" depends=('libdrm' 'libvdpau' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd' 'elfutils' 'llvm-libs') optdepends=('opengl-man-pages: for the OpenGL API man pages') provides=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel' "mesa=$(cut -f-2 -d . <<< ${pkgver/_/-})" ) conflicts=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel' 'mesa') replaces=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel' 'mesa') mv -v ${srcdir}/fakeinstall/* ${pkgdir} # rename libgl.so to not conflict with blobs - may break gl.pc ? mv ${pkgdir}/usr/lib/libGL.so.1.2.0 ${pkgdir}/usr/lib/mesa-libGL.so.1.2.0 rm ${pkgdir}/usr/lib/libGL.so{,.1} install -m755 -d "${pkgdir}/usr/share/licenses/mesa-git" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-git/" } package_mesa-libgl-git() { pkgdesc="Mesa 3-D graphics library" depends=("mesa=$(cut -f-2 -d . <<< ${pkgver/_/-})") provides=("mesa-libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})" "libgl=$(cut -f-2 -d . <<< ${pkgver/_/-})") conflicts=('mesa-libgl') replaces=('libgl') # See FS#26284 install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions" ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1 ln -s mesa-libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1.2.0 install -m755 -d "${pkgdir}/usr/share/licenses/mesa-libgl-git" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-libgl-git/" }