kumquat-buildroot/package/mesa3d/mesa3d.mk

266 lines
7.6 KiB
Makefile
Raw Normal View History

################################################################################
#
# mesa3d
#
################################################################################
2009-02-24 14:29:59 +01:00
package/mesa3d-headers: new package Some OpenGL/EGL/GLES/VG providers do not provide the corresponding headers, and rely on using "the headers provided by the distribution". In our case, we can not rely on such headers, because we are not a distribution, and we have no way to provide those headers (not even speaking about relying on the headers provided by hte host distribution, because they might well not be installed at all). Also, we can not rely on another package to provide those headers, because we can only have one provider enabled in any configuration. The Khronos group provides such headers, and they are the reference headers, but we can not realy use them: - most of them are not packaged: they are not versioned and not provided in a tarball, but as separately downloadable files; - those headers are anyway incomplete: there are headers not provided by Khronos, like GL.h Instead, we rely on mesa3d to provide those headers: mesa3d has all the headers we need. Modifying the existing mesa3d package would not be easy; we'd have to differentiate whther we need only the headers or the full package. The meas3d Config.in and .mk are already quite non-trivial that adding such a feature would render them even more illegible. So, we introduce mea3d-headers as a new package, that is in fact just mesa3d with a much simplified Config.in and .mk, that other OpenXXX providers may select if they do not provide the OpenXXX headers. Note: we're not installing GLES3 headers, because what Buildroot currently calls libgles is in fact libgles2; we have no way to specify that we have libgles3. So, we just install headers for GLES and GLES2. [Thomas: - Wrap Config.in help text to a reasonable length. - Don't rely on mesa3d to provide mesa3d-headers: they should be mutually exclusive. Instead, error out if both packages are selected. - Take into account the update of mesa3d to 10.4.5. - Don't copy each header file individually, use a cp -dpfr call to copy entires header files directories.] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-10 21:01:10 +01:00
# When updating the version, please also update mesa3d-headers
MESA3D_VERSION = 20.3.2
MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
MESA3D_SITE = https://mesa.freedesktop.org/archive
MESA3D_LICENSE = MIT, SGI, Khronos
MESA3D_LICENSE_FILES = docs/license.rst
MESA3D_INSTALL_STAGING = YES
2009-02-24 14:29:59 +01:00
MESA3D_PROVIDES =
MESA3D_DEPENDENCIES = \
host-bison \
host-flex \
host-python3-mako \
libdrm \
zlib
ifeq ($(BR2_PACKAGE_EXPAT),y)
MESA3D_DEPENDENCIES += expat
endif
MESA3D_CONF_OPTS = \
-Dgallium-omx=disabled \
-Dpower8=disabled
package/mesa3d: disable --as-needed linker flag for Codesourcery ARM 2014.05 toolchain Meson build system enable by default -Wl,--as-needed [1][2] in the linker command line and due to this the libmesa_dri_drivers.so build fail with the Codesourcery ARM and Aarch64 2014.05 toolchain: /home/buildroot/autobuild/run/instance-1/output-1/host/bin/arm-none-linux-gnueabi-g++ -o src/mesa/drivers/dri/libmesa_dri_drivers.so -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libmesa_dri_drivers.so -Wl,--whole-archive src/mesa/drivers/dri/radeon/libr100.a src/mesa/drivers/dri/nouveau/libnouveau_vieux.a -Wl,--no-whole-archive src/mesa/drivers/dri/common/libmegadriver_stub.a src/mesa/drivers/dri/common/libdricommon.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/mesa/libmesa_classic.a src/mesa/libmesa_common.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/util/libmesa_util.a src/util/format/libmesa_format.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/util/libxmlconfig.a [...] src/mesa/drivers/dri/common/libmegadriver_stub.a(megadriver_stub.c.o): In function `megadriver_stub_init': megadriver_stub.c:(.text.startup+0x20): undefined reference to `dladdr' megadriver_stub.c:(.text.startup+0xbc): undefined reference to `dlsym' collect2: error: ld returned 1 exit status This problem seems to be specific to this toolchain release (ARM and aarch64) CodeSourcery 2014.05: gcc 4.8.3-prerelease; binutils 2.24.51.20140217; glibc 2.18 The following prebuilt toolchain has been tested and doesn't trigger this issue: Linaro 4.9-4.9-2014.11: gcc 4.9.3; binutils 2.24.0; glibc 2.19 CodeSourcery 2014.11: gcc 4.9.1; binutils 2.24.51.20140217; glibc 2.20 Older toolchains doesn't have a recent enough glibc or linux-headers version to breaking the build with mesa3d 20.1.0 or libdrm 2.4.102. In order to build mesa3d with the CodeSourcery 2014.05 using --as-needed would be reorder the static librairies: diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build index b09ca16e38a..9ac6731c522 100644 --- a/src/mesa/drivers/dri/meson.build +++ b/src/mesa/drivers/dri/meson.build @@ -59,7 +59,7 @@ if _dri_drivers != [] [], link_whole : _dri_drivers, link_with : [ - libmegadriver_stub, libdricommon, libglapi, + libdricommon, libmegadriver_stub, libglapi, libmesa_classic, ], Instead, we can disable --as-needed from the meson build system using "-Db_asneeded=false" only for this toolchain. [1] https://mesonbuild.com/Builtin-options.html [2] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed Fixes: http://autobuild.buildroot.net/results/eec39a4fbfbfaa58980fab36f2fd902a16eecf0f/build-end.log Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-06-13 12:47:08 +02:00
# Codesourcery ARM 2014.05 fail to link libmesa_dri_drivers.so with --as-needed linker
# flag due to a linker bug between binutils 2.24 and 2.25 (2.24.51.20140217).
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)
MESA3D_CONF_OPTS += -Db_asneeded=false
endif
ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
MESA3D_DEPENDENCIES += host-llvm llvm
MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'
MESA3D_CONF_OPTS += -Dllvm=enabled
else
# Avoid automatic search of llvm-config
MESA3D_CONF_OPTS += -Dllvm=disabled
endif
# Disable opencl-icd: OpenCL lib will be named libOpenCL instead of
# libMesaOpenCL and CL headers are installed
ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
MESA3D_PROVIDES += libopencl
MESA3D_DEPENDENCIES += clang libclc
MESA3D_CONF_OPTS += -Dgallium-opencl=standalone
else
MESA3D_CONF_OPTS += -Dgallium-opencl=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)
MESA3D_DEPENDENCIES += elfutils
endif
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
# Disable-mangling not yet supported by meson build system.
# glx:
# dri : dri based GLX requires at least one DRI driver || dri based GLX requires shared-glapi
# xlib : xlib conflicts with any dri driver
# gallium-xlib : Gallium-xlib based GLX requires at least one gallium driver || Gallium-xlib based GLX requires softpipe or llvmpipe || gallium-xlib conflicts with any dri driver.
MESA3D_CONF_OPTS += -Dglx=dri
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
MESA3D_CONF_OPTS += -Dgallium-xa=enabled
else
MESA3D_CONF_OPTS += -Dgallium-xa=disabled
endif
else
MESA3D_CONF_OPTS += \
-Dglx=disabled \
-Dgallium-xa=false
endif
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
MESA3D_CONF_OPTS += -Dgallium-vc4-neon=auto
else
MESA3D_CONF_OPTS += -Dgallium-vc4-neon=disabled
endif
# Drivers
#Gallium Drivers
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV) += etnaviv
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO) += freedreno
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915) += i915
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS) += iris
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO) += kmsro
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA) += lima
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST) += panfrost
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R300) += r300
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600) += r600
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA) += svga
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST) += swrast
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA) += tegra
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D) += v3d
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4) += vc4
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL) += virgl
# DRI Drivers
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915) += i915
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += r100
package/mesa3d: add support for Intel Vulkan driver The Vulkan intel driver depends on the i965 dri driver: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1653 and a sha1 implementation: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1656 The Vulkan driver needs linux/memfd.h https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_allocator.c?h=12.0#n30 which is not available in kernel headers older than 3.18: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/include/uapi/linux/memfd.h?id=refs/tags/v3.18.36 The Vulkan driver makes use of ifunc https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_entrypoints_gen.py?h=12.0#n287 which is not available on uClibc: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config.gcc;h=82cc9a9959b5ab57c0b8779e054b80cdb95f169b;hb=gcc-6-branch#l1485 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e6cdd6b1755033e8f416efaa4334d1294c0a43c6 The Vulkan driver makes use of static_assert https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_private.h?h=12.0#n153 Compiling the Vulkan driver with uClibc and musl fails, therefore this driver is glibc-only. Although the configure script does not check for dri3 support if the Intel Vulkan driver is enabled it needs it nonetheless: https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_wsi_x11.c?h=12.0#n682 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-17 18:27:55 +02:00
# Vulkan Drivers
MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
MESA3D_CONF_OPTS += \
-Dgallium-drivers= \
-Dgallium-extra-hud=false
else
MESA3D_CONF_OPTS += \
-Dshared-glapi=enabled \
-Dgallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) \
-Dgallium-extra-hud=true
endif
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
MESA3D_CONF_OPTS += \
-Ddri-drivers= -Ddri3=disabled
else
ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y)
MESA3D_DEPENDENCIES += xlib_libxshmfence
MESA3D_CONF_OPTS += -Ddri3=enabled
else
MESA3D_CONF_OPTS += -Ddri3=disabled
endif
MESA3D_CONF_OPTS += \
-Dshared-glapi=enabled \
-Dglx-direct=true \
-Ddri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
endif
package/mesa3d: add support for Intel Vulkan driver The Vulkan intel driver depends on the i965 dri driver: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1653 and a sha1 implementation: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1656 The Vulkan driver needs linux/memfd.h https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_allocator.c?h=12.0#n30 which is not available in kernel headers older than 3.18: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/include/uapi/linux/memfd.h?id=refs/tags/v3.18.36 The Vulkan driver makes use of ifunc https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_entrypoints_gen.py?h=12.0#n287 which is not available on uClibc: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config.gcc;h=82cc9a9959b5ab57c0b8779e054b80cdb95f169b;hb=gcc-6-branch#l1485 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e6cdd6b1755033e8f416efaa4334d1294c0a43c6 The Vulkan driver makes use of static_assert https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_private.h?h=12.0#n153 Compiling the Vulkan driver with uClibc and musl fails, therefore this driver is glibc-only. Although the configure script does not check for dri3 support if the Intel Vulkan driver is enabled it needs it nonetheless: https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_wsi_x11.c?h=12.0#n682 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-17 18:27:55 +02:00
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
MESA3D_CONF_OPTS += \
-Dvulkan-drivers=
package/mesa3d: add support for Intel Vulkan driver The Vulkan intel driver depends on the i965 dri driver: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1653 and a sha1 implementation: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1656 The Vulkan driver needs linux/memfd.h https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_allocator.c?h=12.0#n30 which is not available in kernel headers older than 3.18: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/include/uapi/linux/memfd.h?id=refs/tags/v3.18.36 The Vulkan driver makes use of ifunc https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_entrypoints_gen.py?h=12.0#n287 which is not available on uClibc: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config.gcc;h=82cc9a9959b5ab57c0b8779e054b80cdb95f169b;hb=gcc-6-branch#l1485 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e6cdd6b1755033e8f416efaa4334d1294c0a43c6 The Vulkan driver makes use of static_assert https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_private.h?h=12.0#n153 Compiling the Vulkan driver with uClibc and musl fails, therefore this driver is glibc-only. Although the configure script does not check for dri3 support if the Intel Vulkan driver is enabled it needs it nonetheless: https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_wsi_x11.c?h=12.0#n682 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-17 18:27:55 +02:00
else
MESA3D_DEPENDENCIES += xlib_libxshmfence
package/mesa3d: add support for Intel Vulkan driver The Vulkan intel driver depends on the i965 dri driver: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1653 and a sha1 implementation: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1656 The Vulkan driver needs linux/memfd.h https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_allocator.c?h=12.0#n30 which is not available in kernel headers older than 3.18: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/include/uapi/linux/memfd.h?id=refs/tags/v3.18.36 The Vulkan driver makes use of ifunc https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_entrypoints_gen.py?h=12.0#n287 which is not available on uClibc: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config.gcc;h=82cc9a9959b5ab57c0b8779e054b80cdb95f169b;hb=gcc-6-branch#l1485 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e6cdd6b1755033e8f416efaa4334d1294c0a43c6 The Vulkan driver makes use of static_assert https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_private.h?h=12.0#n153 Compiling the Vulkan driver with uClibc and musl fails, therefore this driver is glibc-only. Although the configure script does not check for dri3 support if the Intel Vulkan driver is enabled it needs it nonetheless: https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_wsi_x11.c?h=12.0#n682 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-17 18:27:55 +02:00
MESA3D_CONF_OPTS += \
-Ddri3=enabled \
-Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
package/mesa3d: add support for Intel Vulkan driver The Vulkan intel driver depends on the i965 dri driver: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1653 and a sha1 implementation: https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=12.0#n1656 The Vulkan driver needs linux/memfd.h https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_allocator.c?h=12.0#n30 which is not available in kernel headers older than 3.18: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/include/uapi/linux/memfd.h?id=refs/tags/v3.18.36 The Vulkan driver makes use of ifunc https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_entrypoints_gen.py?h=12.0#n287 which is not available on uClibc: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config.gcc;h=82cc9a9959b5ab57c0b8779e054b80cdb95f169b;hb=gcc-6-branch#l1485 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e6cdd6b1755033e8f416efaa4334d1294c0a43c6 The Vulkan driver makes use of static_assert https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_private.h?h=12.0#n153 Compiling the Vulkan driver with uClibc and musl fails, therefore this driver is glibc-only. Although the configure script does not check for dri3 support if the Intel Vulkan driver is enabled it needs it nonetheless: https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/anv_wsi_x11.c?h=12.0#n682 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-17 18:27:55 +02:00
endif
# APIs
ifeq ($(BR2_PACKAGE_MESA3D_OSMESA_CLASSIC),y)
MESA3D_CONF_OPTS += -Dosmesa=classic
else
MESA3D_CONF_OPTS += -Dosmesa=none
endif
# Always enable OpenGL:
# - Building OpenGL ES without OpenGL is not supported, so always keep opengl enabled.
MESA3D_CONF_OPTS += -Dopengl=true
# libva and mesa3d have a circular dependency
# we do not need libva support in mesa3d, therefore disable this option
MESA3D_CONF_OPTS += -Dgallium-va=disabled
# libGL is only provided for a full xorg stack
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
MESA3D_PROVIDES += libgl
else
define MESA3D_REMOVE_OPENGL_HEADERS
rm -rf $(STAGING_DIR)/usr/include/GL/
endef
MESA3D_POST_INSTALL_STAGING_HOOKS += MESA3D_REMOVE_OPENGL_HEADERS
endif
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_X11),y)
MESA3D_DEPENDENCIES += \
xlib_libX11 \
xlib_libXext \
xlib_libXdamage \
xlib_libXfixes \
xlib_libXrandr \
xlib_libXxf86vm \
xorgproto \
libxcb
MESA3D_PLATFORMS += x11
endif
ifeq ($(BR2_PACKAGE_WAYLAND),y)
MESA3D_DEPENDENCIES += wayland wayland-protocols
MESA3D_PLATFORMS += wayland
endif
MESA3D_CONF_OPTS += \
-Dplatforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
ifeq ($(BR2_PACKAGE_MESA3D_GBM),y)
MESA3D_CONF_OPTS += \
-Dgbm=enabled
else
MESA3D_CONF_OPTS += \
-Dgbm=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
MESA3D_PROVIDES += libegl
MESA3D_CONF_OPTS += \
-Degl=enabled
else
MESA3D_CONF_OPTS += \
-Degl=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
MESA3D_PROVIDES += libgles
MESA3D_CONF_OPTS += -Dgles1=enabled -Dgles2=enabled
else
MESA3D_CONF_OPTS += -Dgles1=disabled -Dgles2=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_XVMC),y)
MESA3D_DEPENDENCIES += xlib_libXv xlib_libXvMC
MESA3D_CONF_OPTS += -Dgallium-xvmc=enabled
else
MESA3D_CONF_OPTS += -Dgallium-xvmc=disabled
endif
ifeq ($(BR2_PACKAGE_VALGRIND),y)
MESA3D_CONF_OPTS += -Dvalgrind=enabled
MESA3D_DEPENDENCIES += valgrind
else
MESA3D_CONF_OPTS += -Dvalgrind=disabled
endif
ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
MESA3D_CONF_OPTS += -Dlibunwind=enabled
MESA3D_DEPENDENCIES += libunwind
else
MESA3D_CONF_OPTS += -Dlibunwind=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_VDPAU),y)
MESA3D_DEPENDENCIES += libvdpau
MESA3D_CONF_OPTS += -Dgallium-vdpau=enabled
else
MESA3D_CONF_OPTS += -Dgallium-vdpau=disabled
endif
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
MESA3D_CONF_OPTS += -Dlmsensors=enabled
MESA3D_DEPENDENCIES += lm-sensors
else
MESA3D_CONF_OPTS += -Dlmsensors=disabled
endif
ifeq ($(BR2_PACKAGE_ZSTD),y)
MESA3D_CONF_OPTS += -Dzstd=enabled
MESA3D_DEPENDENCIES += zstd
else
MESA3D_CONF_OPTS += -Dzstd=disabled
endif
$(eval $(meson-package))