1 ################################################################################
5 ################################################################################
7 # When updating the version, please also update mesa3d-headers
8 MESA3D_VERSION
= 13.0.2
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
= \
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_NOUVEAU
) += nouveau
71 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
) += r600
72 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
) += svga
73 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
) += swrast
74 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
) += vc4
75 MESA3D_GALLIUM_DRIVERS-
$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
) += virgl
77 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
) += swrast
78 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915
) += i915
79 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
) += i965
80 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU
) += nouveau
81 MESA3D_DRI_DRIVERS-
$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
) += radeon
83 MESA3D_VULKAN_DRIVERS-
$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL
) += intel
85 ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
),)
87 --without-gallium-drivers
90 --enable-shared-glapi \
91 --with-gallium-drivers
=$(subst $(space
),$(comma
),$(MESA3D_GALLIUM_DRIVERS-y
))
94 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER
),)
96 --without-dri-drivers
--disable-dri3
98 ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO
),y
)
99 MESA3D_DEPENDENCIES
+= xlib_libxshmfence xproto_dri3proto xproto_presentproto
100 MESA3D_CONF_OPTS
+= --enable-dri3
102 MESA3D_CONF_OPTS
+= --disable-dri3
104 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM
),y
)
105 MESA3D_DEPENDENCIES
+= xlib_libXxf86vm
107 MESA3D_CONF_OPTS
+= \
108 --enable-shared-glapi \
109 --enable-driglx-direct \
110 --with-dri-drivers
=$(subst $(space
),$(comma
),$(MESA3D_DRI_DRIVERS-y
))
113 ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER
),)
114 MESA3D_CONF_OPTS
+= \
115 --without-vulkan-drivers
117 MESA3D_CONF_OPTS
+= \
118 --with-vulkan-drivers
=$(subst $(space
),$(comma
),$(MESA3D_VULKAN_DRIVERS-y
))
123 ifeq ($(BR2_PACKAGE_MESA3D_OSMESA
),y
)
124 MESA3D_CONF_OPTS
+= --enable-osmesa
126 MESA3D_CONF_OPTS
+= --disable-osmesa
129 # Always enable OpenGL:
130 # - it is needed for GLES (mesa3d's ./configure is a bit weird)
131 MESA3D_CONF_OPTS
+= --enable-opengl
--enable-dri
133 # libva and mesa3d have a circular dependency
134 # we do not need libva support in mesa3d, therefore disable this option
135 MESA3D_CONF_OPTS
+= --disable-va
137 # libGL is only provided for a full xorg stack
138 ifeq ($(BR2_PACKAGE_XORG7
),y
)
139 MESA3D_PROVIDES
+= libgl
142 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL
),y
)
143 MESA3D_PROVIDES
+= libegl
144 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER
),y
)
145 MESA3D_EGL_PLATFORMS
= drm
146 else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
),y
)
147 MESA3D_EGL_PLATFORMS
= drm
148 else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
),y
)
149 MESA3D_EGL_PLATFORMS
= drm
151 ifeq ($(BR2_PACKAGE_WAYLAND
),y
)
152 MESA3D_DEPENDENCIES
+= wayland
153 MESA3D_EGL_PLATFORMS
+= wayland
155 ifeq ($(BR2_PACKAGE_XORG7
),y
)
156 MESA3D_EGL_PLATFORMS
+= x11
158 MESA3D_CONF_OPTS
+= \
161 --with-egl-platforms
=$(subst $(space
),$(comma
),$(MESA3D_EGL_PLATFORMS
))
163 MESA3D_CONF_OPTS
+= \
167 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES
),y
)
168 MESA3D_PROVIDES
+= libgles
169 MESA3D_CONF_OPTS
+= --enable-gles1
--enable-gles2
171 MESA3D_CONF_OPTS
+= --disable-gles1
--disable-gles2
174 # Avoid automatic search of llvm-config
175 MESA3D_CONF_OPTS
+= --with-llvm-prefix
=$(STAGING_DIR
)/usr
/bin
177 $(eval
$(autotools-package
))