2018-07-16 20:45:36 +02:00
|
|
|
# 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)
|
2013-07-20 05:24:59 +02:00
|
|
|
|
2015-03-08 11:05:33 +01:00
|
|
|
PKG_NAME="mesa"
|
2024-04-11 13:37:14 +00:00
|
|
|
PKG_VERSION="24.0.5"
|
|
|
|
|
PKG_SHA256="38cc245ca8faa3c69da6d2687f8906377001f63365348a62cc6f7fafb1e8c018"
|
2013-07-20 05:24:59 +02:00
|
|
|
PKG_LICENSE="OSS"
|
|
|
|
|
PKG_SITE="http://www.mesa3d.org/"
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_URL="https://mesa.freedesktop.org/archive/mesa-${PKG_VERSION}.tar.xz"
|
2018-06-01 09:36:26 -07:00
|
|
|
PKG_DEPENDS_TARGET="toolchain expat libdrm Mako:host"
|
2018-10-22 15:06:12 +02:00
|
|
|
PKG_LONGDESC="Mesa is a 3-D graphics library with an API."
|
2018-06-01 09:36:31 -07:00
|
|
|
|
|
|
|
|
get_graphicdrivers
|
|
|
|
|
|
2023-10-27 14:17:50 +00:00
|
|
|
if [ "${DEVICE}" = "Dragonboard" ]; then
|
|
|
|
|
PKG_DEPENDS_TARGET+=" libarchive libxml2 lua54"
|
|
|
|
|
fi
|
|
|
|
|
|
2023-05-04 12:13:16 +00:00
|
|
|
PKG_MESON_OPTS_TARGET="-Dgallium-drivers=${GALLIUM_DRIVERS// /,} \
|
2018-06-01 09:36:31 -07:00
|
|
|
-Dgallium-extra-hud=false \
|
|
|
|
|
-Dgallium-omx=disabled \
|
|
|
|
|
-Dgallium-nine=false \
|
|
|
|
|
-Dgallium-opencl=disabled \
|
2020-03-08 14:41:04 +00:00
|
|
|
-Dshader-cache=enabled \
|
|
|
|
|
-Dshared-glapi=enabled \
|
2018-06-01 09:36:31 -07:00
|
|
|
-Dopengl=true \
|
2020-03-08 14:41:04 +00:00
|
|
|
-Dgbm=enabled \
|
|
|
|
|
-Degl=enabled \
|
|
|
|
|
-Dvalgrind=disabled \
|
|
|
|
|
-Dlibunwind=disabled \
|
|
|
|
|
-Dlmsensors=disabled \
|
2018-06-01 09:36:31 -07:00
|
|
|
-Dbuild-tests=false \
|
2023-04-13 11:34:44 +00:00
|
|
|
-Ddraw-use-llvm=false \
|
2018-06-01 09:36:31 -07:00
|
|
|
-Dselinux=false \
|
2021-03-25 02:28:51 +01:00
|
|
|
-Dosmesa=false"
|
2013-07-20 05:24:59 +02:00
|
|
|
|
2019-09-02 23:40:04 +02:00
|
|
|
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
2022-12-15 15:40:16 +01:00
|
|
|
PKG_DEPENDS_TARGET+=" xorgproto libXext libXdamage libXfixes libXxf86vm libxcb libX11 libxshmfence libXrandr"
|
2017-05-19 08:26:52 -07:00
|
|
|
export X11_INCLUDES=
|
2022-12-15 15:40:16 +01:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dplatforms=x11 \
|
|
|
|
|
-Ddri3=enabled \
|
|
|
|
|
-Dglx=dri"
|
2021-11-24 17:25:54 +01:00
|
|
|
elif [ "${DISPLAYSERVER}" = "wl" ]; then
|
2022-12-15 15:40:16 +01:00
|
|
|
PKG_DEPENDS_TARGET+=" wayland wayland-protocols"
|
|
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dplatforms=wayland \
|
|
|
|
|
-Ddri3=disabled \
|
|
|
|
|
-Dglx=disabled"
|
2017-05-19 08:26:52 -07:00
|
|
|
else
|
2022-12-15 15:40:16 +01:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dplatforms="" \
|
|
|
|
|
-Ddri3=disabled \
|
|
|
|
|
-Dglx=disabled"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if listcontains "${GRAPHIC_DRIVERS}" "(nvidia|nvidia-ng)"; then
|
|
|
|
|
PKG_DEPENDS_TARGET+=" libglvnd"
|
|
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dglvnd=true"
|
|
|
|
|
else
|
|
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dglvnd=false"
|
2017-05-19 08:26:52 -07:00
|
|
|
fi
|
|
|
|
|
|
2019-09-02 23:40:04 +02:00
|
|
|
if [ "${LLVM_SUPPORT}" = "yes" ]; then
|
|
|
|
|
PKG_DEPENDS_TARGET+=" elfutils llvm"
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dllvm=enabled"
|
2013-07-20 05:24:59 +02:00
|
|
|
else
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dllvm=disabled"
|
2013-07-20 05:24:59 +02:00
|
|
|
fi
|
|
|
|
|
|
2019-09-02 23:40:04 +02:00
|
|
|
if [ "${VDPAU_SUPPORT}" = "yes" -a "${DISPLAYSERVER}" = "x11" ]; then
|
|
|
|
|
PKG_DEPENDS_TARGET+=" libvdpau"
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-vdpau=enabled"
|
2013-07-20 05:24:59 +02:00
|
|
|
else
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-vdpau=disabled"
|
2013-07-20 05:24:59 +02:00
|
|
|
fi
|
|
|
|
|
|
2019-09-02 23:40:04 +02:00
|
|
|
if [ "${VAAPI_SUPPORT}" = "yes" ] && listcontains "${GRAPHIC_DRIVERS}" "(r600|radeonsi)"; then
|
|
|
|
|
PKG_DEPENDS_TARGET+=" libva"
|
2022-12-22 15:47:42 +01:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=enabled \
|
|
|
|
|
-Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc"
|
2018-01-08 15:40:16 -08:00
|
|
|
else
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-va=disabled"
|
2018-01-08 15:40:16 -08:00
|
|
|
fi
|
|
|
|
|
|
2019-09-02 23:40:04 +02:00
|
|
|
if listcontains "${GRAPHIC_DRIVERS}" "vmware"; then
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-xa=enabled"
|
2018-06-01 09:36:31 -07:00
|
|
|
else
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dgallium-xa=disabled"
|
2018-06-01 09:36:31 -07:00
|
|
|
fi
|
2016-01-15 23:30:54 +01:00
|
|
|
|
2019-09-02 23:40:04 +02:00
|
|
|
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dgles1=disabled -Dgles2=enabled"
|
2016-04-11 16:00:48 +02:00
|
|
|
else
|
2020-03-08 14:41:04 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dgles1=disabled -Dgles2=disabled"
|
2016-04-11 16:00:48 +02:00
|
|
|
fi
|
2017-05-19 08:26:52 -07:00
|
|
|
|
2021-11-17 14:42:39 +01:00
|
|
|
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
|