49 lines
1.6 KiB
Plaintext
49 lines
1.6 KiB
Plaintext
# Description: Mesa 3D Graphics Library
|
|
# URL: https://www.mesa3d.org/
|
|
# Maintainer: CRUX Xorg Team, xorg-ports at crux dot nu
|
|
# Depends on: elfutils libdrm libglvnd llvm python3-mako xorg-libxdamage xorg-libxrandr xorg-libxshmfence xorg-libxvmc xorg-libxxf86vm
|
|
# Optional: libva libvdpau wayland-protocols
|
|
|
|
name=mesa
|
|
version=22.1.1
|
|
release=1
|
|
source=(https://archive.mesa3d.org/$name-$version.tar.xz)
|
|
|
|
build() {
|
|
prt-get isinst glslang && PKGMK_MESA+=' -D vulkan-layers=device-select,intel-nullhw,overlay'
|
|
prt-get isinst libvdpau && PKGMK_MESA+=' -D gallium-vdpau=enabled' || PKGMK_MESA+=' -D gallium-vdpau=disabled'
|
|
prt-get isinst wayland-protocols && PKGMK_MESA_PLATFORMS+='wayland'
|
|
## for future references
|
|
#prt-get isinst xorg-libxdamage xorg-libxrandr xorg-libxshmfence xorg-libxvmc xorg-libxxf86vm && PKGMK_MESA_PLATFORMS+=',x11'
|
|
PKGMK_MESA_PLATFORMS+=',x11'
|
|
|
|
meson setup build mesa-$version $PKGMK_MESA \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--buildtype=plain \
|
|
--wrap-mode nodownload \
|
|
-D b_lto=true \
|
|
-D b_pie=true \
|
|
-D dri3=enabled \
|
|
-D egl=enabled \
|
|
-D llvm=enabled \
|
|
-D shared-llvm=enabled \
|
|
-D gbm=enabled \
|
|
-D gles1=disabled \
|
|
-D gles2=enabled \
|
|
-D glx=dri \
|
|
-D osmesa=true \
|
|
-D gallium-xa=enabled \
|
|
-D gallium-drivers=r300,r600,svga,swrast,radeonsi,nouveau,iris,virgl,crocus \
|
|
-D platforms=${PKGMK_MESA_PLATFORMS#,} \
|
|
-D shared-glapi=enabled \
|
|
-D vulkan-drivers=amd,intel \
|
|
-D glvnd=true
|
|
|
|
meson compile -C build -j ${JOBS:-1}
|
|
DESTDIR=$PKG meson install -C build
|
|
|
|
# indirect rendering symlink
|
|
ln -s libGLX_mesa.so.0 $PKG/usr/lib/libGLX_indirect.so.0
|
|
}
|