1 ################################################################################
5 ################################################################################
7 # When updating the version, please also update mesa3d-headers
8 MESA3D_VERSION = 10.5.4
9 MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
10 MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
11 MESA3D_LICENSE = MIT, SGI, Khronos
12 MESA3D_LICENSE_FILES = docs/license.html
13 MESA3D_AUTORECONF = YES
15 MESA3D_INSTALL_STAGING = YES
19 MESA3D_DEPENDENCIES = \
23 ifeq ($(BR2_PACKAGE_XORG7),y)
24 MESA3D_DEPENDENCIES += \
33 MESA3D_CONF_OPTS += --enable-glx --disable-mangling
34 # quote from mesa3d configure "Building xa requires at least one non swrast gallium driver."
35 ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
36 MESA3D_CONF_OPTS += --enable-xa
38 MESA3D_CONF_OPTS += --disable-xa
46 ifeq ($(BR2_STATIC_LIBS),)
47 # fix for "configure: error: Cannot use static libraries for DRI drivers"
48 MESA3D_CONF_OPTS += --disable-static
54 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau
55 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600) += r600
56 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA) += svga
57 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST) += swrast
59 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast
60 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915) += i915
61 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965
62 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon
64 ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
66 --without-gallium-drivers
69 --enable-shared-glapi \
70 --with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y))
73 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
75 --without-dri-drivers --without-dri --disable-dri3
77 ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y)
78 MESA3D_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto xproto_presentproto
79 MESA3D_CONF_OPTS += --enable-dri3
81 MESA3D_CONF_OPTS += --disable-dri3
83 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
84 MESA3D_DEPENDENCIES += xlib_libXxf86vm
86 MESA3D_PROVIDES += libgl
89 --enable-shared-glapi \
90 --enable-driglx-direct \
91 --with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
96 # Always enable OpenGL:
97 # - it is needed for GLES (mesa3d's ./configure is a bit weird)
98 # - but if no DRI driver is enabled, then libgl is not built
99 MESA3D_CONF_OPTS += --enable-opengl
101 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
102 MESA3D_PROVIDES += libegl
103 # egl depends on gbm, gbm depends on udev
104 MESA3D_DEPENDENCIES += udev
105 MESA3D_EGL_PLATFORMS = drm
106 ifeq ($(BR2_PACKAGE_WAYLAND),y)
107 MESA3D_DEPENDENCIES += wayland
108 MESA3D_EGL_PLATFORMS += wayland
110 ifeq ($(BR2_PACKAGE_XORG7),y)
111 MESA3D_EGL_PLATFORMS += x11
113 MESA3D_CONF_OPTS += \
116 --with-egl-platforms=$(subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS))
118 MESA3D_CONF_OPTS += \
122 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
123 MESA3D_PROVIDES += libgles
124 MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2
126 MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
129 # Avoid automatic search of llvm-config
130 MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin
132 $(eval $(autotools-package))