PKGBUILDs/extra/mesa-amber/PKGBUILD

117 lines
2.9 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
2022-06-09 17:15:48 +00:00
pkgver=21.3.9
2024-01-01 03:16:14 +00:00
pkgrel=6
pkgdesc="classic OpenGL (non-Gallium3D) drivers"
2022-03-30 00:08:05 +00:00
url="https://www.mesa3d.org/"
2024-01-01 03:16:14 +00:00
arch=('x86_64')
license=('MIT AND BSD-3-Clause AND SGI-B-2.0')
makedepends=(
'cmake'
'elfutils'
'libdrm'
'libglvnd'
'libunwind'
'libx11'
'libxdamage'
'libxml2'
'libxrandr'
'libxshmfence'
'libxxf86vm'
'meson'
'python-mako'
'valgrind'
'wayland'
'wayland-protocols'
'xorgproto'
'zstd'
)
source=(
https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
LICENSE
)
sha256sums=('91fe6f20339884e37a7c47bfba42fb1cd397512c9ed5ad423de369f047cd8b5c'
2022-03-30 00:08:05 +00:00
'SKIP'
2024-01-01 03:16:14 +00:00
'7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537')
b2sums=('79669f9492c505b1729c526adf5a8261737b6088bdf01db654a0dca8ba22600ec985b574edfeee3a28c76e6e0f815782362973876e1d75b58f4417f45df70add'
'SKIP'
'1ecf007b82260710a7bf5048f47dd5d600c168824c02c595af654632326536a6527fbe0738670ee7b921dd85a70425108e0f471ba85a8e1ca47d294ad74b4adb')
2022-06-09 17:15:48 +00:00
validpgpkeys=('71C4B75620BC75708B4BDB254C95FAAB3EB073EC') # Dylan Baker <dylan@pnwbakers.com>
2022-03-30 00:08:05 +00:00
prepare() {
cd mesa-$pkgver
2024-01-01 03:16:14 +00:00
# Include package release in version string so Chromium invalidates
# its GPU cache; otherwise it can cause pages to render incorrectly.
# https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2020604
echo "$pkgver-arch$epoch.$pkgrel" >VERSION
2022-03-30 00:08:05 +00:00
}
build() {
2024-01-01 03:16:14 +00:00
local meson_options=(
2022-03-30 00:08:05 +00:00
-D b_lto=$([[ $CARCH == aarch64 ]] && echo true || echo false) \
2024-01-01 03:16:14 +00:00
-D amber=true
-D b_ndebug=true
2022-03-30 00:08:05 +00:00
-D dri-drivers=r100,r200,nouveau \
2024-01-01 03:16:14 +00:00
-D dri3=enabled
-D egl=enabled
-D gallium-drivers=swrast
-D gbm=enabled
-D gles1=disabled
-D gles2=enabled
-D glvnd=true
-D glx=dri
-D libunwind=enabled
-D llvm=disabled
-D lmsensors=disabled
-D microsoft-clc=disabled
-D osmesa=true
-D platforms=x11,wayland
-D shared-glapi=enabled
2022-03-30 00:08:05 +00:00
-D valgrind=enabled
2024-01-01 03:16:14 +00:00
-D vulkan-drivers=auto
)
2022-03-30 00:08:05 +00:00
2024-01-01 03:16:14 +00:00
# Build only minimal debug info to reduce size
CFLAGS+=' -g1'
CXXFLAGS+=' -g1'
2022-03-30 00:08:05 +00:00
2024-01-01 03:16:14 +00:00
arch-meson mesa-$pkgver build "${meson_options[@]}"
meson configure build # Print config
2022-03-30 00:08:05 +00:00
meson compile -C build
}
2022-04-02 14:11:55 +00:00
2022-03-30 00:08:05 +00:00
package() {
2024-01-01 03:16:14 +00:00
depends=(
'libdrm'
'libglvnd'
'libxfixes'
'libxshmfence'
'libxxf86vm'
'wayland'
'zstd'
)
2022-03-30 00:08:05 +00:00
conflicts=('mesa')
2024-01-01 03:16:14 +00:00
provides=(
"mesa=${pkgver}"
"opengl-driver"
)
2022-03-30 00:08:05 +00:00
2024-01-01 03:16:14 +00:00
meson install -C build --destdir "${pkgdir}"
2022-03-30 00:08:05 +00:00
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
}