mesa/PKGBUILD

55 lines
1.6 KiB
Bash
Raw Permalink Normal View History

2024-04-15 22:45:06 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=mesa
pkgver=24.0.1
pkgrel=1
pkgdesc="An open-source implementation of the OpenGL specification"
arch=('x86_64')
url="https://www.mesa3d.org/"
license=('MIT AND BSD-3-Clause AND SGI-B-2.0')
depends=('glibc' 'gcc-libs' 'expat' 'libdrm' 'libelf' 'libx11' 'libxcb'
'libxext' 'libxfixes' 'libxshmfence' 'libxxf86vm' 'zlib' 'zstd' 'libxrandr'
'python-mako' 'llvm-libs' 'wayland')
makedepends=('meson' 'glslang' 'llvm' 'wayland-protocols')
source=(https://mesa.freedesktop.org/archive/${pkgname}-${pkgver}.tar.xz
mesa-add_xdemos-2.patch)
sha256sums=(f387192b08c471c545590dd12230a2a343244804b5fe866fec6aea02eab57613
52c375052d14dc879b70da4881f8ed32ecba1c8b58a4865386e05c1003aed343)
prepare(){
cd ${pkgname}-${pkgver}
patch -Np1 -i ${srcdir}/mesa-add_xdemos-2.patch
}
build() {
cd ${pkgname}-${pkgver}
meson setup build \
--prefix=/usr \
--buildtype=release \
-Dlibdir=/usr/lib64 \
-Dplatforms=x11,wayland \
-Dgallium-drivers=auto \
-Dvulkan-drivers=auto \
-Dvalgrind=disabled \
-Dlibunwind=disabled \
-Dllvm=enabled
meson compile -C build
}
package() {
cd ${pkgname}-${pkgver}
meson install -C build --destdir ${pkgdir}
install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
cp -rv docs -T ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
}