mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
mesa: updated to support libglvnd / clean up
- added glvnd options - dropped libGL symlink hacks
This commit is contained in:
parent
8eef015081
commit
56a1b5195d
@ -7,11 +7,10 @@ PKG_VERSION="19.1.6"
|
||||
PKG_SHA256="a3dc32262e3baa6a32cd153c32b0a5af3e52e0b88ff94787438e7414eb13264e"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.mesa3d.org/"
|
||||
PKG_URL="https://github.com/mesa3d/mesa/archive/mesa-$PKG_VERSION.tar.gz"
|
||||
PKG_URL="https://github.com/mesa3d/mesa/archive/mesa-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain expat libdrm Mako:host"
|
||||
PKG_LONGDESC="Mesa is a 3-D graphics library with an API."
|
||||
PKG_TOOLCHAIN="meson"
|
||||
PKG_BUILD_FLAGS="+lto"
|
||||
|
||||
if listcontains "${GRAPHIC_DRIVERS}" "(lima|panfrost)"; then
|
||||
PKG_VERSION="ef919d8dcb9272ad7b23f5dbd8b7fb2f83393b42" # master-19.3
|
||||
@ -34,7 +33,6 @@ PKG_MESON_OPTS_TARGET="-Ddri-drivers=${DRI_DRIVERS// /,} \
|
||||
-Dopengl=true \
|
||||
-Dgbm=true \
|
||||
-Degl=true \
|
||||
-Dglvnd=false \
|
||||
-Dasm=true \
|
||||
-Dvalgrind=false \
|
||||
-Dlibunwind=false \
|
||||
@ -43,69 +41,48 @@ PKG_MESON_OPTS_TARGET="-Ddri-drivers=${DRI_DRIVERS// /,} \
|
||||
-Dselinux=false \
|
||||
-Dosmesa=none"
|
||||
|
||||
if [ "$DISPLAYSERVER" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET xorgproto libXext libXdamage libXfixes libXxf86vm libxcb libX11 libxshmfence libXrandr"
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET+=" xorgproto libXext libXdamage libXfixes libXxf86vm libxcb libX11 libxshmfence libXrandr libglvnd"
|
||||
export X11_INCLUDES=
|
||||
PKG_MESON_OPTS_TARGET+=" -Dplatforms=x11,drm -Ddri3=true -Dglx=dri"
|
||||
elif [ "$DISPLAYSERVER" = "weston" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET wayland wayland-protocols"
|
||||
PKG_MESON_OPTS_TARGET+=" -Dplatforms=wayland,drm -Ddri3=false -Dglx=disabled"
|
||||
PKG_MESON_OPTS_TARGET+=" -Dplatforms=x11,drm -Ddri3=true -Dglx=dri -Dglvnd=true"
|
||||
elif [ "${DISPLAYSERVER}" = "weston" ]; then
|
||||
PKG_DEPENDS_TARGET+=" wayland wayland-protocols"
|
||||
PKG_MESON_OPTS_TARGET+=" -Dplatforms=wayland,drm -Ddri3=false -Dglx=disabled -Dglvnd=false"
|
||||
else
|
||||
PKG_MESON_OPTS_TARGET+=" -Dplatforms=drm -Ddri3=false -Dglx=disabled"
|
||||
PKG_MESON_OPTS_TARGET+=" -Dplatforms=drm -Ddri3=false -Dglx=disabled -Dglvnd=false"
|
||||
fi
|
||||
|
||||
if [ "$LLVM_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET elfutils llvm"
|
||||
export LLVM_CONFIG="$SYSROOT_PREFIX/usr/bin/llvm-config-host"
|
||||
if [ "${LLVM_SUPPORT}" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET+=" elfutils llvm"
|
||||
export LLVM_CONFIG="${SYSROOT_PREFIX}/usr/bin/llvm-config-host"
|
||||
PKG_MESON_OPTS_TARGET+=" -Dllvm=true"
|
||||
else
|
||||
PKG_MESON_OPTS_TARGET+=" -Dllvm=false"
|
||||
fi
|
||||
|
||||
if [ "$VDPAU_SUPPORT" = "yes" -a "$DISPLAYSERVER" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau"
|
||||
if [ "${VDPAU_SUPPORT}" = "yes" -a "${DISPLAYSERVER}" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET+=" libvdpau"
|
||||
PKG_MESON_OPTS_TARGET+=" -Dgallium-vdpau=true"
|
||||
else
|
||||
PKG_MESON_OPTS_TARGET+=" -Dgallium-vdpau=false"
|
||||
fi
|
||||
|
||||
if [ "$VAAPI_SUPPORT" = "yes" ] && listcontains "$GRAPHIC_DRIVERS" "(r600|radeonsi)"; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva"
|
||||
if [ "${VAAPI_SUPPORT}" = "yes" ] && listcontains "${GRAPHIC_DRIVERS}" "(r600|radeonsi)"; then
|
||||
PKG_DEPENDS_TARGET+=" libva"
|
||||
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=true"
|
||||
else
|
||||
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=false"
|
||||
fi
|
||||
|
||||
if listcontains "$GRAPHIC_DRIVERS" "vmware"; then
|
||||
if listcontains "${GRAPHIC_DRIVERS}" "vmware"; then
|
||||
PKG_MESON_OPTS_TARGET+=" -Dgallium-xa=true"
|
||||
else
|
||||
PKG_MESON_OPTS_TARGET+=" -Dgallium-xa=false"
|
||||
fi
|
||||
|
||||
if [ "$OPENGLES_SUPPORT" = "yes" ]; then
|
||||
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
||||
PKG_MESON_OPTS_TARGET+=" -Dgles1=false -Dgles2=true"
|
||||
else
|
||||
PKG_MESON_OPTS_TARGET+=" -Dgles1=false -Dgles2=false"
|
||||
fi
|
||||
|
||||
# Temporary workaround:
|
||||
# Listed libraries are static, while mesa expects shared ones. This breaks the
|
||||
# dependency tracking. The following has some ideas on how to address that.
|
||||
# https://github.com/LibreELEC/LibreELEC.tv/pull/2163
|
||||
pre_configure_target() {
|
||||
if [ "$DISPLAYSERVER" = "x11" ]; then
|
||||
export LIBS="-lxcb-dri3 -lxcb-dri2 -lxcb-xfixes -lxcb-present -lxcb-sync -lxshmfence -lz"
|
||||
fi
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
# Similar hack is needed on EGL, GLES* front. Might as well drop it and test the GLVND?
|
||||
if [ "$DISPLAYSERVER" = "x11" ]; then
|
||||
# rename and relink for cooperate with nvidia drivers
|
||||
rm -rf $INSTALL/usr/lib/libGL.so
|
||||
rm -rf $INSTALL/usr/lib/libGL.so.1
|
||||
ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so
|
||||
ln -sf /var/lib/libGL.so $INSTALL/usr/lib/libGL.so.1
|
||||
mv $INSTALL/usr/lib/libGL.so.1.2.0 $INSTALL/usr/lib/libGL_mesa.so.1
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user