forked from ports/compat-32
59 lines
2.3 KiB
Plaintext
59 lines
2.3 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
|
|
# Optional: glslang libva-32 libvdpau-32 wayland-protocols
|
|
|
|
name=mesa-32
|
|
version=24.0.8
|
|
release=1
|
|
source=(https://archive.mesa3d.org/mesa-$version.tar.xz
|
|
x86-linux-gnu x86-linux-gnu-ccache)
|
|
|
|
build() {
|
|
export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig:/usr/share/pkgconfig'
|
|
|
|
prt-get isinst ccache && local _cross_file='x86-linux-gnu-ccache' || local _cross_file='x86-linux-gnu'
|
|
prt-get isinst glslang && PKGMK_MESA+=' -D vulkan-drivers=auto -D vulkan-layers=device-select,intel-nullhw,overlay' || PKGMK_MESA+=' -D vulkan-drivers='
|
|
prt-get isinst libva-32 && PKGMK_MESA+=' -D gallium-va=enabled' || PKGMK_MESA+=' -D gallium-va=disabled'
|
|
prt-get isinst libvdpau-32 && PKGMK_MESA+=' -D gallium-vdpau=enabled' || PKGMK_MESA+=' -D gallium-vdpau=disabled'
|
|
prt-get isinst vulkan-loader-32 && PKGMK_MESA_GALLIUM+='zink,'
|
|
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/$_cross_file \
|
|
--prefix=/usr \
|
|
--libdir=/usr/lib32 \
|
|
--sysconfdir=/etc \
|
|
--buildtype=plain \
|
|
--wrap-mode nodownload \
|
|
-D b_lto=false \
|
|
-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=${PKGMK_MESA_GALLIUM}crocus,iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl,i915 \
|
|
-D platforms=${PKGMK_MESA_PLATFORMS#,} \
|
|
-D shared-glapi=enabled \
|
|
-D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc \
|
|
-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/{include,share/{drirc.d,glvnd}}
|
|
rm -rf $PKG/usr/{bin,share/vulkan/{explicit_layer.d,implicit_layer.d}}
|
|
}
|