0faa4b280f
"MESA3D_EGL_PLATFORMS = drm" is only needed when dri drivers are enabled: http://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=10.6#n1653 Unconditionally enable dri support, also for gallium drivers, quoting http://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=10.6#n1382 # Strictly speaking libgbm does not require --enable-dri, although # both of its backends do. Thus one can build libgbm without any # backends if --disable-dri is set. # To avoid unnecessary complexity of checking if at least one backend # is available when building, just mandate --enable-dri. AC_MSG_ERROR([gbm requires --enable-dri]) Fixes http://autobuild.buildroot.net/results/799/799f505594f668154af38cb2c2a1ed8a90337e9f/ http://autobuild.buildroot.net/results/d00/d00fe349e8710a1ad557507cf04b006216806868/ http://autobuild.buildroot.net/results/c7b/c7ba08c8cf54b2e7cf28c5e3454e92a408e724db/ http://autobuild.buildroot.net/results/cd7/cd717c9a3a1b0080192e7e765d990cce55513005/ Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Tested-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
160 lines
4.4 KiB
Makefile
160 lines
4.4 KiB
Makefile
################################################################################
|
|
#
|
|
# mesa3d
|
|
#
|
|
################################################################################
|
|
|
|
# When updating the version, please also update mesa3d-headers
|
|
MESA3D_VERSION = 11.0.3
|
|
MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
|
|
MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
|
|
MESA3D_LICENSE = MIT, SGI, Khronos
|
|
MESA3D_LICENSE_FILES = docs/license.html
|
|
MESA3D_AUTORECONF = YES
|
|
|
|
MESA3D_INSTALL_STAGING = YES
|
|
|
|
MESA3D_PROVIDES =
|
|
|
|
MESA3D_DEPENDENCIES = \
|
|
expat \
|
|
libdrm
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
MESA3D_DEPENDENCIES += openssl
|
|
MESA3D_CONF_OPTS += --with-sha1=libcrypto
|
|
else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
|
MESA3D_DEPENDENCIES += libgcrypt
|
|
MESA3D_CONF_OPTS += --with-sha1=libgcrypt
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y)
|
|
MESA3D_DEPENDENCIES += udev
|
|
MESA3D_CONF_OPTS += --disable-sysfs
|
|
else
|
|
MESA3D_CONF_OPTS += --enable-sysfs
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
|
MESA3D_DEPENDENCIES += \
|
|
xproto_xf86driproto \
|
|
xproto_dri2proto \
|
|
xproto_glproto \
|
|
xlib_libX11 \
|
|
xlib_libXext \
|
|
xlib_libXdamage \
|
|
xlib_libXfixes \
|
|
libxcb
|
|
MESA3D_CONF_OPTS += --enable-glx --disable-mangling
|
|
# quote from mesa3d configure "Building xa requires at least one non swrast gallium driver."
|
|
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
|
|
MESA3D_CONF_OPTS += --enable-xa
|
|
else
|
|
MESA3D_CONF_OPTS += --disable-xa
|
|
endif
|
|
else
|
|
MESA3D_CONF_OPTS += \
|
|
--disable-glx \
|
|
--disable-xa
|
|
endif
|
|
|
|
# Drivers
|
|
|
|
#Gallium Drivers
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600) += r600
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA) += svga
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST) += swrast
|
|
# 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_RADEON) += radeon
|
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
|
|
MESA3D_CONF_OPTS += \
|
|
--without-gallium-drivers
|
|
else
|
|
MESA3D_CONF_OPTS += \
|
|
--enable-shared-glapi \
|
|
--with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y))
|
|
endif
|
|
|
|
define MESA3D_REMOVE_OPENGL_PC
|
|
rm -f $(STAGING_DIR)/usr/lib/pkgconfig/dri.pc
|
|
rm -f $(STAGING_DIR)/usr/lib/pkgconfig/gl.pc
|
|
rm -rf $(STAGING_DIR)/usr/include/GL/
|
|
endef
|
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
|
|
MESA3D_CONF_OPTS += \
|
|
--without-dri-drivers --disable-dri3
|
|
MESA3D_POST_INSTALL_STAGING_HOOKS += MESA3D_REMOVE_OPENGL_PC
|
|
else
|
|
ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y)
|
|
MESA3D_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto xproto_presentproto
|
|
MESA3D_CONF_OPTS += --enable-dri3
|
|
else
|
|
MESA3D_CONF_OPTS += --disable-dri3
|
|
endif
|
|
ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
|
|
MESA3D_DEPENDENCIES += xlib_libXxf86vm
|
|
endif
|
|
MESA3D_PROVIDES += libgl
|
|
MESA3D_CONF_OPTS += \
|
|
--enable-shared-glapi \
|
|
--enable-driglx-direct \
|
|
--with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
|
|
endif
|
|
|
|
# APIs
|
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
|
|
MESA3D_CONF_OPTS += --enable-osmesa
|
|
else
|
|
MESA3D_CONF_OPTS += --disable-osmesa
|
|
endif
|
|
|
|
# Always enable OpenGL:
|
|
# - it is needed for GLES (mesa3d's ./configure is a bit weird)
|
|
# - but if no DRI driver is enabled, then libgl is not built,
|
|
# remove dri.pc and gl.pc in this case (MESA3D_REMOVE_OPENGL_PC)
|
|
MESA3D_CONF_OPTS += --enable-opengl --enable-dri
|
|
|
|
# libva and mesa3d have a circular dependency
|
|
# we do not need libva support in mesa3d, therefore disable this option
|
|
MESA3D_CONF_OPTS += --disable-va
|
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
|
|
MESA3D_PROVIDES += libegl
|
|
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
|
|
MESA3D_EGL_PLATFORMS = drm
|
|
endif
|
|
ifeq ($(BR2_PACKAGE_WAYLAND),y)
|
|
MESA3D_DEPENDENCIES += wayland
|
|
MESA3D_EGL_PLATFORMS += wayland
|
|
endif
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
|
MESA3D_EGL_PLATFORMS += x11
|
|
endif
|
|
MESA3D_CONF_OPTS += \
|
|
--enable-gbm \
|
|
--enable-egl \
|
|
--with-egl-platforms=$(subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS))
|
|
else
|
|
MESA3D_CONF_OPTS += \
|
|
--disable-egl
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
|
|
MESA3D_PROVIDES += libgles
|
|
MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2
|
|
else
|
|
MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
|
|
endif
|
|
|
|
# Avoid automatic search of llvm-config
|
|
MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin
|
|
|
|
$(eval $(autotools-package))
|