# $Id$ # Maintainer: Jan de Groot # Maintainer: Andreas Radke pkgbase=mesa pkgname=('mesa-dri' 'mesa-vdpau' 'mesa' 'mesa-libgl') #'opencl-mesa' pkgver=10.3.0 pkgrel=2 _gitver=a68f421d7370fa4b82bd2d6f94aba9cbfde39b33 arch=('i686' 'x86_64') makedepends=('python2' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'dri3proto' 'presentproto' 'libxshmfence' 'libxxf86vm' 'libxdamage' 'libvdpau' 'wayland' 'elfutils' 'systemd') url="http://mesa3d.sourceforge.net" license=('custom') groups=('modified') source=("MesaLib-${pkgver}.tar.bz2"::"http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-${_gitver}.tar.bz2" LICENSE) sha256sums=('SKIP' '7fdc119cf53c8ca65396ea73f6d10af641ba41ea1dd2bd44a824726e01c8b3f2') build() { cd ${srcdir}/?esa-* 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=r600,swrast \ --with-dri-drivers= \ --with-egl-platforms=x11,drm,wayland \ --disable-llvm-shared-libs \ --enable-egl \ --disable-gallium-egl \ --disable-gallium-gbm \ --enable-gbm \ --disable-gallium-llvm \ --enable-shared-glapi \ --enable-glx \ --enable-glx-tls \ --enable-dri \ --disable-osmesa \ --enable-gles1 \ --enable-gles2 \ --enable-texture-float \ --enable-xa \ --enable-vdpau --enable-debug # --enable-omx \ # --enable-opencl --enable-opencl-icd \ # --with-clang-libdir=/usr/lib # --help # --disable-gallium-egl : not well maintained/expose more bugs, so prefer egl_dri2 (FS#40096) # --disable-gallium-gbm : FS#41337 only useful with gallium-egl make -s # fake installation mkdir $srcdir/fakeinstall make DESTDIR=${srcdir}/fakeinstall install } package_opencl-mesa() { pkgdesc="OpenCL support for AMD/ATI Radeon mesa drivers" depends=('expat' 'libdrm' 'elfutils' 'libxfixes' 'libxext' 'libcl' 'libclc' 'clang') optdepends=('opencl-headers: headers necessary for OpenCL development') install -m755 -d ${pkgdir}/etc mv -v ${srcdir}/fakeinstall/etc/OpenCL ${pkgdir}/etc/ install -m755 -d ${pkgdir}/usr/lib/gallium-pipe mv -v ${srcdir}/fakeinstall/usr/lib/lib*OpenCL* ${pkgdir}/usr/lib/ mv -v ${srcdir}/fakeinstall/usr/lib/gallium-pipe/pipe_{r600,radeonsi}.so ${pkgdir}/usr/lib/gallium-pipe/ install -m755 -d "${pkgdir}/usr/share/licenses/opencl-mesa" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/opencl-mesa/" } package_mesa-dri() { pkgdesc="Mesa DRI drivers" depends=('expat' 'libdrm' 'libtxc_dxtn') conflicts=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri') provides=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri') replaces=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri') install -m755 -d ${pkgdir}/etc mv -v ${srcdir}/fakeinstall/etc/drirc ${pkgdir}/etc install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri # ati-dri mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/r600_dri.so ${pkgdir}/usr/lib/xorg/modules/dri # nouveau-dri # mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/nouveau{,_vieux}_dri.so ${pkgdir}/usr/lib/xorg/modules/dri # intel-dri # mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/{i915,i965}_dri.so ${pkgdir}/usr/lib/xorg/modules/dri # svga-dri # mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/vmwgfx_dri.so ${pkgdir}/usr/lib/xorg/modules/dri # swrast mv -v ${srcdir}/fakeinstall/usr/lib/xorg/modules/dri/{kms_,}swrast_dri.so ${pkgdir}/usr/lib/xorg/modules/dri install -m755 -d "${pkgdir}/usr/share/licenses/mesa-dri" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-dri/" } package_mesa-vdpau() { pkgdesc="Mesa VDPAU drivers" depends=('libdrm' 'libx11' 'expat' 'elfutils') install -m755 -d ${pkgdir}/usr/lib mv -v ${srcdir}/fakeinstall/usr/lib/vdpau ${pkgdir}/usr/lib install -m755 -d "${pkgdir}/usr/share/licenses/mesa-vdpau" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-vdpau/" } package_mesa() { pkgdesc="an open-source implementation of the OpenGL specification" depends=('libdrm' 'wayland' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'systemd' 'elfutils' 'mesa-dri') optdepends=('opengl-man-pages: for the OpenGL API man pages') provides=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel') conflicts=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel') replaces=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel') install -m755 -d ${pkgdir}/usr/lib # mv -v ${srcdir}/fakeinstall/usr/lib/bellagio ${pkgdir}/usr/lib mv -v ${srcdir}/fakeinstall/usr/lib/lib{gbm,glapi,wayland-egl,xatracker}.so* ${pkgdir}/usr/lib/ # FS#41337 #mv -v ${srcdir}/fakeinstall/usr/lib/gbm/gbm_gallium_drm* ${pkgdir}/usr/lib/gbm/ mv -v ${srcdir}/fakeinstall/usr/include ${pkgdir}/usr mv -v ${srcdir}/fakeinstall/usr/lib/pkgconfig ${pkgdir}/usr/lib/ install -m755 -d ${pkgdir}/usr/lib/mesa # move libgl/EGL/glesv*.so to not conflict with blobs - may break .pc files ? mv -v ${srcdir}/fakeinstall/usr/lib/libGL.so* ${pkgdir}/usr/lib/mesa/ mv -v ${srcdir}/fakeinstall/usr/lib/libEGL.so* ${pkgdir}/usr/lib/mesa/ mv -v ${srcdir}/fakeinstall/usr/lib/libGLES*.so* ${pkgdir}/usr/lib/mesa/ install -m755 -d "${pkgdir}/usr/share/licenses/mesa" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/" } package_mesa-libgl() { pkgdesc="Mesa 3-D graphics library" depends=('mesa') provides=('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 /usr/lib/mesa/libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1.2.0 ln -s libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so.1 ln -s libGL.so.1.2.0 ${pkgdir}/usr/lib/libGL.so ln -s /usr/lib/mesa/libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so.1.0.0 ln -s libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so.1 ln -s libEGL.so.1.0.0 ${pkgdir}/usr/lib/libEGL.so ln -s /usr/lib/mesa/libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so.1.1.0 ln -s libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so.1 ln -s libGLESv1_CM.so.1.1.0 ${pkgdir}/usr/lib/libGLESv1_CM.so ln -s /usr/lib/mesa/libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so.2.0.0 ln -s libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so.2 ln -s libGLESv2.so.2.0.0 ${pkgdir}/usr/lib/libGLESv2.so install -m755 -d "${pkgdir}/usr/share/licenses/mesa-libgl" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-libgl/" }