forked from ports/compat-32
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
# Description: Mesa 3D Graphics Library
|
|
# URL: https://www.mesa3d.org/
|
|
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
|
# Depends on: elfutils-32 expat-32 libdrm-32 libglvnd-32 llvm-32 mesa xorg-libxdamage-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 zstd-32
|
|
# Optional: libva libvdpau-32 wayland-protocols
|
|
|
|
name=mesa-32
|
|
version=21.3.1
|
|
release=1
|
|
source=(https://archive.mesa3d.org/mesa-$version.tar.xz
|
|
x86-linux-gnu)
|
|
|
|
build() {
|
|
export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig:/usr/share/pkgconfig'
|
|
prt-get isinst glslang && PKGMK_MESA+=' -D vulkan-layers=device-select,intel-nullhw,overlay'
|
|
prt-get isinst libvdpau-32 && 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-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 && PKGMK_MESA_PLATFORMS+=',x11'
|
|
PKGMK_MESA_PLATFORMS+=',x11'
|
|
|
|
meson setup mesa-$version build $PKGMK_MESA \
|
|
--cross-file=$SRC/x86-linux-gnu \
|
|
--prefix=/usr \
|
|
--libdir=/usr/lib32 \
|
|
--sysconfdir=/etc \
|
|
--buildtype=plain \
|
|
--wrap-mode nodownload \
|
|
-D b_lto=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 osmesa=true \
|
|
-D gallium-xa=enabled \
|
|
-D gallium-drivers=r300,r600,svga,swrast,radeonsi,nouveau,iris,virgl \
|
|
-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/lib32/libGLX_indirect.so.0
|
|
|
|
rm -r $PKG/usr/{bin,include,share/{drirc.d,glvnd,vulkan/{explicit_layer.d,implicit_layer.d}}} || true
|
|
}
|