PKGBUILDs/extra/mesa-amber/PKGBUILD

77 lines
2.4 KiB
Bash
Raw Normal View History

2022-03-30 00:08:05 +00:00
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - removed intel DRI drivers
# - enable lto for aarch64
highmem=1
pkgname=mesa-amber
pkgdesc="classic OpenGL (non-Gallium3D) drivers"
2022-06-09 17:15:48 +00:00
pkgver=21.3.9
2023-01-18 12:13:37 +00:00
pkgrel=4
2022-03-30 00:08:05 +00:00
arch=('x86_64')
makedepends=('python-mako' 'libxml2' 'libx11' 'xorgproto' 'libdrm' 'libxshmfence' 'libxxf86vm'
2023-01-18 12:13:37 +00:00
'libxdamage' 'wayland' 'wayland-protocols' 'zstd' 'elfutils'
2022-03-30 00:08:05 +00:00
'libglvnd' 'libunwind' 'libxrandr' 'valgrind' 'cmake' 'meson')
url="https://www.mesa3d.org/"
license=('custom')
source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
LICENSE)
2022-06-09 17:15:48 +00:00
sha512sums=('4cec6f4f50f444fcd327f7c40f8899c2f265e348e121455262b540b1f890a1468bbea59965af0876c548fa97aa0a05a1b23fa6ca7d308bd60328cfdeab757684'
2022-03-30 00:08:05 +00:00
'SKIP'
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7')
2022-06-09 17:15:48 +00:00
#validpgpkeys=('57551DE15B968F6341C248F68D8E31AFC32428A6') # Eric Engestrom <eric@engestrom.ch>
validpgpkeys=('71C4B75620BC75708B4BDB254C95FAAB3EB073EC') # Dylan Baker <dylan@pnwbakers.com>
2022-03-30 00:08:05 +00:00
prepare() {
cd mesa-$pkgver
}
build() {
arch-meson mesa-$pkgver build \
-D b_lto=$([[ $CARCH == aarch64 ]] && echo true || echo false) \
-D b_ndebug=true \
-D amber=true \
-D platforms=auto \
-D dri-drivers=r100,r200,nouveau \
-D gallium-drivers=swrast \
-D vulkan-drivers=auto \
-D dri3=enabled \
-D egl=enabled \
-D gbm=enabled \
-D gles1=disabled \
-D gles2=enabled \
-D glvnd=auto \
-D glx=dri \
-D libunwind=enabled \
2023-01-18 12:13:37 +00:00
-D llvm=disabled \
2022-03-30 00:08:05 +00:00
-D lmsensors=disabled \
-D osmesa=true \
-D shared-glapi=enabled \
-D microsoft-clc=disabled \
-D valgrind=enabled
# Print config
meson configure build
ninja -C build
meson compile -C build
}
2022-04-02 14:11:55 +00:00
2022-03-30 00:08:05 +00:00
package() {
2023-01-18 12:13:37 +00:00
depends=('libglvnd' 'libdrm' 'zstd' 'wayland' 'libxshmfence' 'libxxf86vm' 'libxfixes')
2022-03-30 00:08:05 +00:00
conflicts=('mesa')
2022-04-02 14:11:55 +00:00
provides=("mesa=${pkgver}" "opengl-driver")
2022-03-30 00:08:05 +00:00
DESTDIR="${pkgdir}" meson install -C build
2022-05-06 14:15:32 +00:00
# indirect rendering
ln -s /usr/lib/libGLX_amber.so.0 "${pkgdir}/usr/lib/libGLX_indirect.so.0"
2022-03-30 00:08:05 +00:00
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}