1 ################################################################################
5 ################################################################################
7 # When updating the version, please also update mesa3d-headers
8 MESA3D_VERSION
= 17.0.1
9 MESA3D_SOURCE
= mesa-
$(MESA3D_VERSION
).
tar.xz
10 MESA3D_SITE
= https
://mesa.freedesktop.org
/archive
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
= \
25 # The Sourcery MIPS toolchain has a special (non-upstream) feature to
26 # have "compact exception handling", which unfortunately breaks with
27 # mesa3d, so we disable it here by passing -mno-compact-eh.
28 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
),y
)
29 MESA3D_CONF_ENV
+= CFLAGS
="$(TARGET_CFLAGS) -mno-compact-eh"
30 MESA3D_CONF_ENV
+= CXXFLAGS
="$(TARGET_CXXFLAGS) -mno-compact-eh"
33 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
34 MESA3D_DEPENDENCIES
+= openssl
35 MESA3D_CONF_OPTS
+= --with-sha1
=libcrypto
36 else ifeq ($(BR2_PACKAGE_LIBGCRYPT
),y
)
37 MESA3D_DEPENDENCIES
+= libgcrypt
38 MESA3D_CONF_OPTS
+= --with-sha1
=libgcrypt
39 else ifeq ($(BR2_PACKAGE_LIBSHA1
),y
)
40 MESA3D_DEPENDENCIES
+= libsha1
41 MESA3D_CONF_OPTS
+= --with-sha1
=libsha1
44 ifeq ($(BR2_PACKAGE_XORG7
),y
)
45 MESA3D_DEPENDENCIES
+= \
54 MESA3D_CONF_OPTS
+= --enable-glx
--disable-mangling
55 # quote from mesa3d configure "Building xa requires at least one non swrast gallium driver."
56 ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA
),y
)
57 MESA3D_CONF_OPTS
+= --enable-xa
59 MESA3D_CONF_OPTS
+= --disable-xa
70 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
) += etnaviv imx
71 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
) += nouveau
72 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
) += r600
73 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
) += svga
74 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
) += swrast
75 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
) += vc4
76 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
) += virgl
78 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
) += swrast
79 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915
) += i915
80 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
) += i965
81 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU
) += nouveau
82 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
) += radeon
84 MESA3D_VULKAN_DRIVERS-
$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL
) += intel
86 ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
),)
88 --without-gallium-drivers
91 --enable-shared-glapi \
92 --with-gallium-drivers
=$(subst $(space
),$(comma
),$(MESA3D_GALLIUM_DRIVERS-y
))
95 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER
),)
97 --without-dri-drivers
--disable-dri3
99 ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO
),y
)
100 MESA3D_DEPENDENCIES
+= xlib_libxshmfence xproto_dri3proto xproto_presentproto
101 MESA3D_CONF_OPTS
+= --enable-dri3
103 MESA3D_CONF_OPTS
+= --disable-dri3
105 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM
),y
)
106 MESA3D_DEPENDENCIES
+= xlib_libXxf86vm
108 MESA3D_CONF_OPTS
+= \
109 --enable-shared-glapi \
110 --enable-driglx-direct \
111 --with-dri-drivers
=$(subst $(space
),$(comma
),$(MESA3D_DRI_DRIVERS-y
))
114 ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER
),)
115 MESA3D_CONF_OPTS
+= \
116 --without-vulkan-drivers
118 MESA3D_CONF_OPTS
+= \
119 --with-vulkan-drivers
=$(subst $(space
),$(comma
),$(MESA3D_VULKAN_DRIVERS-y
))
124 ifeq ($(BR2_PACKAGE_MESA3D_OSMESA
),y
)
125 MESA3D_CONF_OPTS
+= --enable-osmesa
127 MESA3D_CONF_OPTS
+= --disable-osmesa
130 # Always enable OpenGL:
131 # - it is needed for GLES (mesa3d's ./configure is a bit weird)
132 MESA3D_CONF_OPTS
+= --enable-opengl
--enable-dri
134 # libva and mesa3d have a circular dependency
135 # we do not need libva support in mesa3d, therefore disable this option
136 MESA3D_CONF_OPTS
+= --disable-va
138 # libGL is only provided for a full xorg stack
139 ifeq ($(BR2_PACKAGE_XORG7
),y
)
140 MESA3D_PROVIDES
+= libgl
142 define MESA3D_REMOVE_OPENGL_HEADERS
143 rm -rf
$(STAGING_DIR
)/usr
/include/GL
/
146 MESA3D_POST_INSTALL_STAGING_HOOKS
+= MESA3D_REMOVE_OPENGL_HEADERS
149 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL
),y
)
150 MESA3D_PROVIDES
+= libegl
151 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER
),y
)
152 MESA3D_EGL_PLATFORMS
= drm
153 else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
),y
)
154 MESA3D_EGL_PLATFORMS
= drm
155 else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
),y
)
156 MESA3D_EGL_PLATFORMS
= drm
157 else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
),y
)
158 MESA3D_EGL_PLATFORMS
= drm
160 ifeq ($(BR2_PACKAGE_WAYLAND
),y
)
161 MESA3D_DEPENDENCIES
+= wayland
162 MESA3D_EGL_PLATFORMS
+= wayland
164 ifeq ($(BR2_PACKAGE_XORG7
),y
)
165 MESA3D_EGL_PLATFORMS
+= x11
167 MESA3D_CONF_OPTS
+= \
170 --with-egl-platforms
=$(subst $(space
),$(comma
),$(MESA3D_EGL_PLATFORMS
))
172 MESA3D_CONF_OPTS
+= \
176 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES
),y
)
177 MESA3D_PROVIDES
+= libgles
178 MESA3D_CONF_OPTS
+= --enable-gles1
--enable-gles2
180 MESA3D_CONF_OPTS
+= --disable-gles1
--disable-gles2
183 # Avoid automatic search of llvm-config
184 MESA3D_CONF_OPTS
+= --with-llvm-prefix
=$(STAGING_DIR
)/usr
/bin
186 $(eval
$(autotools-package
))