ports: Split mesa into two packages: osmesa, glx

Now SDL and other stuff that use opengl dont have to pull X11 libraries

We now also compile glx backend with DRI instead of xlib. This allows
building EGL support as well!
This commit is contained in:
2026-07-05 14:05:14 +03:00
parent e78fcf63b6
commit 97d26b5d4e
5 changed files with 67 additions and 8 deletions

View File

@@ -3,17 +3,30 @@
NAME='mesa'
VERSION='26.1.4'
DOWNLOAD_URL="https://archive.mesa3d.org/mesa-$VERSION.tar.xz#072705caa9adf4740f1489194b13e278ad959166863b5271fe423a86353c9ab6"
DEPENDENCIES=('zlib' 'zstd' 'expat' 'libX11' 'libXext')
TAR_CONTENT="mesa-$VERSION"
DEPENDENCIES=('zlib' 'zstd' 'expat')
CONFIGURE_OPTIONS=(
'-Dprefix=/usr'
'-Dosmesa=true'
'-Dvulkan-drivers=[]'
'-Dgallium-drivers=llvmpipe'
'-Dplatforms=x11'
'-Dglx=xlib'
'-Dbuildtype=release'
'-Dvulkan-drivers='
'-Dgallium-drivers=llvmpipe'
)
if [[ "$MESA_VARIANT" == "glx" ]]; then
NAME='mesa-glx'
DEPENDENCIES+=('libX11' 'libXext' 'libXfixes' 'libxshmfence' 'libXxf86vm' 'libXrandr' 'libdrm')
CONFIGURE_OPTIONS+=(
'-Dplatforms=x11'
'-Dglx=dri'
)
else
CONFIGURE_OPTIONS+=(
'-Dplatforms='
'-Dglx=disabled'
'-Dosmesa=true'
)
fi
pre_configure() {
llvm_version='22.1.8'
llvm_dir_name="llvm-banan_os-$llvm_version-$BANAN_ARCH"