pkg-mesa-qcom-git/PKGBUILD

276 lines
14 KiB
Bash
Raw Normal View History

2015-08-07 23:56:11 +08:00
# Maintainer: Lone_Wolf <lonewolf at xs4all dot nl>
# Contributor: Armin K. <krejzi at email dot com>
2014-12-31 02:42:36 +08:00
# Contributor: Kristian Klausen <klausenbusk@hotmail.com>
# Contributor: Egon Ashrafinia <e.ashrafinia@gmail.com>
# Contributor: Tavian Barnes <tavianator@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Antti "Tera" Oja <antti.bofh@gmail.com>
# Contributor: Diego Jose <diegoxter1006@gmail.com>
pkgbase=mesa-git
2016-10-08 05:50:33 +08:00
pkgname=('opencl-mesa-git' 'mesa-vulkan-intel-git' 'mesa-vulkan-radeon-git' 'libva-mesa-driver-git' 'mesa-vdpau-git' 'mesa-libgl-git' 'mesa-git')
pkgdesc="an open-source implementation of the OpenGL specification, git version"
2016-11-24 06:43:23 +08:00
pkgver=13.1.0_devel.86866.72c00e7
2016-07-21 08:52:27 +08:00
pkgrel=1
2014-12-31 02:42:36 +08:00
arch=('i686' 'x86_64')
2016-11-24 06:43:23 +08:00
makedepends=('python2-mako' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'dri3proto' 'presentproto'
2015-08-07 23:56:11 +08:00
'libxshmfence' 'libxxf86vm' 'libxdamage' 'libvdpau' 'libva' 'wayland' 'elfutils' 'llvm-svn'
'libomxil-bellagio' 'libcl' 'libclc' 'clang-svn' 'git' 'nettle' 'libtxc_dxtn' 'ocl-icd'
2016-06-20 22:20:46 +08:00
'libxvmc' 'vulkan-icd-loader' 'libgcrypt')
2014-12-31 02:42:36 +08:00
url="http://mesa3d.sourceforge.net"
license=('custom')
source=('mesa::git://anongit.freedesktop.org/mesa/mesa#branch=master'
2016-06-20 22:20:46 +08:00
'LICENSE'
2016-08-15 06:48:39 +08:00
'disable-pthread-stubs-on-linux.patch'
2016-11-09 02:20:48 +08:00
)
2016-08-15 06:48:39 +08:00
sha512sums=('SKIP'
'25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2'
'1a8ffbc194a8264ae08cad7b886ec87cd331047f35272fdcb11901ddb0c6f64e2cd69af946e01254c9df8fe881ad1e42162202e1bc38db97aaf294313fb0f9ce'
2016-11-09 02:20:48 +08:00
)
2014-12-31 02:42:36 +08:00
2016-06-20 22:20:46 +08:00
prepare() {
2016-08-15 06:48:39 +08:00
cd "${srcdir}"/mesa
# pthread-stubs is useless on linux
patch -Np1 -i "${srcdir}"/disable-pthread-stubs-on-linux.patch
}
2014-12-31 02:42:36 +08:00
pkgver() {
cd mesa
2015-08-07 23:56:11 +08:00
echo $(cat VERSION | tr "-" "_").$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
2014-12-31 02:42:36 +08:00
}
_mesaver() {
2016-08-15 06:48:39 +08:00
path="${srcdir}"/mesa/VERSION
2014-12-31 02:42:36 +08:00
[ -f $path ] && cat "$path"
}
build () {
cd mesa
2014-12-31 02:42:36 +08:00
./autogen.sh --prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
2016-02-04 20:41:29 +08:00
--with-gallium-drivers=i915,ilo,r300,r600,radeonsi,nouveau,svga,swrast,virgl \
2014-12-31 02:42:36 +08:00
--with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
--with-egl-platforms=x11,drm,wayland \
2016-10-08 05:50:33 +08:00
--with-vulkan-drivers=intel,radeon \
--with-clang-libdir=/usr/lib \
--with-sha1=libnettle \
2014-12-31 02:42:36 +08:00
--enable-texture-float \
2016-02-04 21:53:14 +08:00
--enable-dri3 \
--enable-osmesa \
2014-12-31 02:42:36 +08:00
--enable-xa \
--enable-gbm \
--enable-nine \
--enable-xvmc \
2014-12-31 02:42:36 +08:00
--enable-vdpau \
--enable-omx \
--enable-va \
2014-12-31 02:42:36 +08:00
--enable-opencl \
--enable-opencl-icd \
2016-10-08 05:50:33 +08:00
--enable-glx-tls
#
# configure flag description default overridden
# --enable-debug use debug compiler flags and macros [default=disabled]
# --enable-profile enable profiling of code [default=disabled]
# --enable-mangling enable mangled symbols and library name [default=disabled]
# --enable-texture-float enable floating-point textures and renderbuffers [default=disabled] enabled
# --disable-asm disable assembly usage [default=enabled on supported plaforms]
# --enable-selinux Build SELinux-aware Mesa [default=disabled]
# --disable-opengl disable support for standard OpenGL API [default=enabled]
# --disable-gles1 disable support for OpenGL ES 1.x API [default=enabled]
# --disable-gles2 disable support for OpenGL ES 2.x API [default=enabled]
# --enable-dri enable DRI modules [default=enabled]
2016-02-04 21:53:14 +08:00
# --enable-dri3 enable DRI3 [default=auto] enabled
# --enable-glx enable GLX library [default=enabled]
# --enable-osmesa enable OSMesa library [default=disabled] enabled
# --enable-gallium-osmesa enable Gallium implementation of the OSMesa library [default=disabled]
# --disable-egl disable EGL library [default=enabled]
# --enable-xa enable build of the XA X Acceleration API [default=disabled] enabled
# --enable-gbm enable gbm library [default=auto] enabled
# --enable-nine enable build of the nine Direct3D9 API [default=no] enabled
# --enable-xvmc enable xvmc library [default=auto] enabled
# --enable-vdpau enable vdpau library [default=auto] enabled
# --enable-omx enable OpenMAX library [default=disabled] enabled
# --enable-va enable va library [default=auto] enabled
# --enable-opencl enable OpenCL library [default=disabled] enabled
# --enable-opencl-icd Build an OpenCL ICD library to be loaded by an ICD implementation [default=disabled] enabled
# --enable-xlib-glx make GLX library Xlib-based instead of DRI-based [default=disabled]
# --enable-r600-llvm-compiler Enable experimental LLVM backend for graphics shaders [default=disabled]
# --enable-gallium-tests Enable optional Gallium tests) [default=disabled]
# --enable-shared-glapi Enable shared glapi for OpenGL [default=enabled]
# --disable-shader-cache Disable binary shader cache
# --enable-sysfs enable /sys PCI identification [default=disabled]
# --disable-driglx-direct disable direct rendering in GLX and EGL for DRI [default=auto]
# --enable-glx-tls enable TLS support in GLX [default=disabled] enabled
# --enable-glx-read-only-text Disable writable .text section on x86 (decreases performance) [default=disabled]
# --enable-gallium-llvm build gallium LLVM support [default=enabled on x86/x86_64]
# --enable-llvm-shared-libs link with LLVM shared libraries [default=enabled]
#
2014-12-31 02:42:36 +08:00
make
2014-12-31 02:42:36 +08:00
# fake installation
2016-08-15 06:48:39 +08:00
mkdir -p "${srcdir}"/fakeinstall
make DESTDIR="${srcdir}"/fakeinstall install
2014-12-31 02:42:36 +08:00
}
package_opencl-mesa-git () {
pkgdesc="OpenCL support for AMD/ATI Radeon Mesa drivers"
depends=('libxfixes' 'libxext' 'libcl' 'libclc' 'nettle' "mesa-git=${pkgver}")
2014-12-31 02:42:36 +08:00
optdepends=('opencl-headers: headers necessary for OpenCL development')
2015-08-07 23:56:11 +08:00
provides=("opencl-mesa=$(_mesaver)")
2014-12-31 02:42:36 +08:00
replaces=('opencl-mesa')
conflicts=('opencl-mesa')
2016-08-15 06:48:39 +08:00
install -v -m755 -d "${pkgdir}"/etc
mv -v "${srcdir}"/fakeinstall/etc/OpenCL "${pkgdir}"/etc/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -v -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/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/share/licenses/opencl-mesa-git
install -m644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/opencl-mesa-git/
2014-12-31 02:42:36 +08:00
}
2016-04-20 06:05:29 +08:00
package_mesa-vulkan-intel-git() {
# using vulkan-intel-git would be better, but that package already exists
2016-04-20 06:05:29 +08:00
pkgdesc="Vulkan driver for selected intel graphic chipsets"
depends=('vulkan-icd-loader' 'libgcrypt' 'wayland' 'libxcb' "mesa-git=${pkgver}")
provides=('vulkan-intel')
replaces=('vulkan-intel')
conflicts=('vulkan-intel')
# install -m755 -d ${pkgdir}/etc
# mv -v ${srcdir}/fakeinstall/etc/vulkan ${pkgdir}/etc/
2016-04-20 06:05:29 +08:00
2016-10-08 05:50:33 +08:00
install -m755 -d "${pkgdir}"/usr/{include/vulkan,lib,share/{vulkan/icd.d,licenses}}
2016-08-15 06:48:39 +08:00
mv -v "${srcdir}"/fakeinstall/usr/lib/libvulkan_intel.so "${pkgdir}"/usr/lib
mv -v "${srcdir}"/fakeinstall/usr/include/vulkan/vulkan_intel.h "${pkgdir}"/usr/include/vulkan
2016-10-08 05:50:33 +08:00
2016-10-23 22:45:49 +08:00
mv -v ${srcdir}/fakeinstall/usr/share/vulkan/icd.d/intel_icd.*.json ${pkgdir}/usr/share/vulkan/icd.d
2016-04-20 06:05:29 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/share/licenses/mesa-vulkan-intel-git
install -m644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/mesa-vulkan-intel-git/
2016-04-20 06:05:29 +08:00
}
2016-10-08 05:50:33 +08:00
package_mesa-vulkan-radeon-git() {
pkgdesc="Vulkan mesa driver for selected amd gpus (git version)"
depends=('vulkan-icd-loader' 'libgcrypt' 'wayland' 'libxcb')
provides=('vulkan-radeon')
replaces=('vulkan-radeon')
conflicts=('vulkan-radeon')
install -m755 -d ${pkgdir}/usr/share/vulkan/icd.d
2016-11-10 22:32:44 +08:00
mv -v ${srcdir}/fakeinstall/usr/share/vulkan/icd.d/radeon_icd.*.json ${pkgdir}/usr/share/vulkan/icd.d/
2016-10-08 05:50:33 +08:00
install -m755 -d ${pkgdir}/usr/lib
mv -v ${srcdir}/fakeinstall/usr/lib/libvulkan_radeon.so ${pkgdir}/usr/lib/
install -m755 -d "${pkgdir}/usr/share/licenses/mesa-vulkan-radeon-git"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa-vulkan-radeon-git/"
}
2014-12-31 02:42:36 +08:00
package_libva-mesa-driver-git() {
pkgdesc="VA-API implementation for gallium"
depends=('nettle' "mesa-git=${pkgver}")
2015-08-07 23:56:11 +08:00
provides=("libva-mesa-driver=$(_mesaver)")
2014-12-31 02:42:36 +08:00
conflicts=('libva-mesa-driver')
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/lib
mv -v "${srcdir}"/fakeinstall/usr/lib/dri "${pkgdir}"/usr/lib/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/share/licenses/libva-mesa-driver-git
install -m644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/libva-mesa-driver-git/
2014-12-31 02:42:36 +08:00
}
2015-08-07 23:56:11 +08:00
2014-12-31 02:42:36 +08:00
package_mesa-vdpau-git() {
pkgdesc="Mesa VDPAU drivers"
depends=('nettle' "mesa-git=${pkgver}")
2015-08-07 23:56:11 +08:00
provides=("mesa-vdpau=$(_mesaver)")
2014-12-31 02:42:36 +08:00
replaces=('mesa-vdpau')
conflicts=('mesa-vdpau')
2016-08-15 06:48:39 +08:00
install -v -m755 -d "${pkgdir}"/usr/lib
mv -v "${srcdir}"/fakeinstall/usr/lib/vdpau "${pkgdir}"/usr/lib/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/share/licenses/mesa-vdpau-git
install -m644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/mesa-vdpau-git/
2014-12-31 02:42:36 +08:00
}
package_mesa-git () {
pkgdesc="an open-source implementation of the OpenGL specification, git version"
2016-10-08 05:50:33 +08:00
depends=('libdrm' 'wayland' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'elfutils'
'libomxil-bellagio' 'libtxc_dxtn' 'nettle' 'llvm-libs-svn' 'libxvmc')
2016-01-30 04:29:31 +08:00
optdepends=('opengl-man-pages: for the OpenGL API man pages'
2014-12-31 02:42:36 +08:00
'mesa-vdpau-git: for accelerated video playback'
'libva-mesa-driver-git: for accelerated video playback')
2015-08-07 23:56:11 +08:00
provides=("mesa=$(_mesaver)" 'mesa-r300-r600-radeonsi-git' 'mesa-dri')
replaces=('mesa' 'mesa-r300-r600-radeonsi-git' 'mesa-dri')
conflicts=('mesa' 'mesa-r300-r600-radeonsi-git' 'mesa-dri')
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/etc
mv -v "${srcdir}"/fakeinstall/etc/drirc "${pkgdir}"/etc/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/lib/xorg/modules/dri
2014-12-31 02:42:36 +08:00
# ati-dri, nouveau-dri, intel-dri, svga-dri, swrast
2016-08-15 06:48:39 +08:00
mv -v "${srcdir}"/fakeinstall/usr/lib/xorg/modules/dri/* "${pkgdir}"/usr/lib/xorg/modules/dri/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
mv -v "${srcdir}"/fakeinstall/usr/lib/bellagio "${pkgdir}"/usr/lib/
mv -v "${srcdir}"/fakeinstall/usr/lib/d3d "${pkgdir}"/usr/lib/
mv -v "${srcdir}"/fakeinstall/usr/lib/*.so* "${pkgdir}"/usr/lib/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
mv -v "${srcdir}"/fakeinstall/usr/include "${pkgdir}"/usr/
# remove vulkan headers as they are provided by vulkan-headers package
2016-08-15 06:48:39 +08:00
rm -rf "${pkgdir}"/usr/include/vulkan
2016-08-15 06:48:39 +08:00
mv -v "${srcdir}"/fakeinstall/usr/lib/pkgconfig "${pkgdir}"/usr/lib/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/lib/mesa
2014-12-31 02:42:36 +08:00
# move libgl/EGL/glesv*.so to not conflict with blobs - may break .pc files ?
2016-08-15 06:48:39 +08:00
mv -v "${pkgdir}"/usr/lib/libGL.so* "${pkgdir}"/usr/lib/mesa/
mv -v "${pkgdir}"/usr/lib/libEGL.so* "${pkgdir}"/usr/lib/mesa/
mv -v "${pkgdir}"/usr/lib/libGLES*.so* "${pkgdir}"/usr/lib/mesa/
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/share/licenses/mesa-git
install -m644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/mesa-git/
2014-12-31 02:42:36 +08:00
}
package_mesa-libgl-git () {
pkgdesc="Mesa 3-D graphics library"
2015-08-07 23:56:11 +08:00
depends=("mesa-git=${pkgver}")
2016-11-09 02:20:48 +08:00
provides=("mesa-libgl=$(_mesaver)" "libgl=$(_mesaver)" 'libgles' 'libegl')
2015-08-07 23:56:11 +08:00
replaces=('mesa-libgl')
2016-11-09 02:20:48 +08:00
conflicts=('mesa-libgl' 'libgles' 'libegl')
2014-12-31 02:42:36 +08:00
# See FS#26284
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/lib/xorg/modules/extensions
ln -s libglx.xorg "${pkgdir}"/usr/lib/xorg/modules/extensions/libglx.so
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
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
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
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
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
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
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
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
2014-12-31 02:42:36 +08:00
2016-08-15 06:48:39 +08:00
install -m755 -d "${pkgdir}"/usr/share/licenses/mesa-libgl-git
install -m644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/mesa-libgl-git/
2016-04-20 06:05:29 +08:00
}