97 lines
3.4 KiB
Makefile
97 lines
3.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
PKG_NAME="mesa"
|
|
PKG_LICENSE="OSS"
|
|
PKG_DEPENDS_TARGET="toolchain expat libdrm Mako:host"
|
|
PKG_LONGDESC="Mesa is a 3-D graphics library with an API."
|
|
PKG_TOOLCHAIN="meson"
|
|
PKG_PATCH_DIRS+=" ${DEVICE}"
|
|
|
|
case ${DEVICE} in
|
|
RK35*)
|
|
PKG_VERSION="120202c675749c5ef81ae4c8cdc30019b4de08f4"
|
|
PKG_SITE="https://gitlab.com/panfork/mesa"
|
|
PKG_URL="${PKG_SITE}.git"
|
|
PKG_GIT_CLONE_BRANCH="csf"
|
|
;;
|
|
*)
|
|
PKG_VERSION="23.0.0"
|
|
PKG_SHA256="01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
|
|
PKG_SITE="http://www.mesa3d.org/"
|
|
PKG_URL="https://mesa.freedesktop.org/archive/mesa-${PKG_VERSION}.tar.xz"
|
|
;;
|
|
esac
|
|
|
|
get_graphicdrivers
|
|
|
|
PKG_MESON_OPTS_TARGET="-Ddri-drivers= \
|
|
-Dgallium-drivers=${GALLIUM_DRIVERS// /,} \
|
|
-Dgallium-extra-hud=false \
|
|
-Dgallium-omx=disabled \
|
|
-Dgallium-nine=false \
|
|
-Dgallium-opencl=disabled \
|
|
-Dshader-cache=enabled \
|
|
-Dshared-glapi=enabled \
|
|
-Dopengl=true \
|
|
-Dgbm=enabled \
|
|
-Degl=enabled \
|
|
-Dlibunwind=disabled \
|
|
-Dlmsensors=disabled \
|
|
-Dbuild-tests=false \
|
|
-Dselinux=false \
|
|
-Dosmesa=false"
|
|
|
|
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
|
PKG_DEPENDS_TARGET+=" xorgproto libXext libXdamage libXfixes libXxf86vm libxcb libX11 libxshmfence libXrandr libglvnd glfw"
|
|
export X11_INCLUDES=
|
|
PKG_MESON_OPTS_TARGET+=" -Dplatforms=x11 -Ddri3=enabled -Dglx=dri -Dglvnd=true"
|
|
elif [ "${DISPLAYSERVER}" = "wl" ]; then
|
|
PKG_DEPENDS_TARGET+=" wayland wayland-protocols libglvnd glfw"
|
|
PKG_MESON_OPTS_TARGET+=" -Dplatforms=wayland,x11 -Ddri3=enabled -Dglx=dri -Dglvnd=true"
|
|
PKG_DEPENDS_TARGET+=" xorgproto libXext libXdamage libXfixes libXxf86vm libxcb libX11 libxshmfence libXrandr libglvnd"
|
|
export X11_INCLUDES=
|
|
else
|
|
PKG_MESON_OPTS_TARGET+=" -Dplatforms="" -Ddri3=disabled -Dglx=disabled -Dglvnd=false"
|
|
fi
|
|
|
|
if [ "${LLVM_SUPPORT}" = "yes" ]; then
|
|
PKG_DEPENDS_TARGET+=" elfutils llvm"
|
|
PKG_MESON_OPTS_TARGET+=" -Dllvm=enabled"
|
|
else
|
|
PKG_MESON_OPTS_TARGET+=" -Dllvm=disabled"
|
|
fi
|
|
|
|
if [ "${VDPAU_SUPPORT}" = "yes" -a "${DISPLAYSERVER}" = "x11" ]; then
|
|
PKG_DEPENDS_TARGET+=" libvdpau"
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-vdpau=enabled"
|
|
else
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-vdpau=disabled"
|
|
fi
|
|
|
|
if [ "${VAAPI_SUPPORT}" = "yes" ] && listcontains "${GRAPHIC_DRIVERS}" "(r600|radeonsi)"; then
|
|
PKG_DEPENDS_TARGET+=" libva"
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=enabled"
|
|
else
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=disabled"
|
|
fi
|
|
|
|
if listcontains "${GRAPHIC_DRIVERS}" "vmware"; then
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-xa=enabled"
|
|
else
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-xa=disabled"
|
|
fi
|
|
|
|
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
|
PKG_MESON_OPTS_TARGET+=" -Dgles1=enabled -Dgles2=enabled"
|
|
else
|
|
PKG_MESON_OPTS_TARGET+=" -Dgles1=disabled -Dgles2=disabled"
|
|
fi
|
|
|
|
if [ "${VULKAN_SUPPORT}" = "yes" ]; then
|
|
PKG_DEPENDS_TARGET+=" ${VULKAN} vulkan-tools"
|
|
PKG_MESON_OPTS_TARGET+=" -Dvulkan-drivers=${VULKAN_DRIVERS_MESA// /,}"
|
|
else
|
|
PKG_MESON_OPTS_TARGET+=" -Dvulkan-drivers="
|
|
fi
|