ncftp: bump version to 3.2.6
[buildroot-gz.git] / package / mesa3d / mesa3d.mk
bloba0186587fd639fb611467432c86d0faa058d1b6a
1 ################################################################################
3 # mesa3d
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
17 MESA3D_PROVIDES =
19 MESA3D_DEPENDENCIES = \
20 host-bison \
21 host-flex \
22 expat \
23 libdrm
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"
31 endif
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
42 endif
44 ifeq ($(BR2_PACKAGE_XORG7),y)
45 MESA3D_DEPENDENCIES += \
46 xproto_xf86driproto \
47 xproto_dri2proto \
48 xproto_glproto \
49 xlib_libX11 \
50 xlib_libXext \
51 xlib_libXdamage \
52 xlib_libXfixes \
53 libxcb
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
58 else
59 MESA3D_CONF_OPTS += --disable-xa
60 endif
61 else
62 MESA3D_CONF_OPTS += \
63 --disable-glx \
64 --disable-xa
65 endif
67 # Drivers
69 #Gallium Drivers
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
76 # DRI Drivers
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
82 # Vulkan Drivers
83 MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel
85 ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
86 MESA3D_CONF_OPTS += \
87 --without-gallium-drivers
88 else
89 MESA3D_CONF_OPTS += \
90 --enable-shared-glapi \
91 --with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y))
92 endif
94 ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
95 MESA3D_CONF_OPTS += \
96 --without-dri-drivers --disable-dri3
97 else
98 ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y)
99 MESA3D_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto xproto_presentproto
100 MESA3D_CONF_OPTS += --enable-dri3
101 else
102 MESA3D_CONF_OPTS += --disable-dri3
103 endif
104 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
105 MESA3D_DEPENDENCIES += xlib_libXxf86vm
106 endif
107 MESA3D_CONF_OPTS += \
108 --enable-shared-glapi \
109 --enable-driglx-direct \
110 --with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
111 endif
113 ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
114 MESA3D_CONF_OPTS += \
115 --without-vulkan-drivers
116 else
117 MESA3D_CONF_OPTS += \
118 --with-vulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y))
119 endif
121 # APIs
123 ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
124 MESA3D_CONF_OPTS += --enable-osmesa
125 else
126 MESA3D_CONF_OPTS += --disable-osmesa
127 endif
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
140 endif
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
150 endif
151 ifeq ($(BR2_PACKAGE_WAYLAND),y)
152 MESA3D_DEPENDENCIES += wayland
153 MESA3D_EGL_PLATFORMS += wayland
154 endif
155 ifeq ($(BR2_PACKAGE_XORG7),y)
156 MESA3D_EGL_PLATFORMS += x11
157 endif
158 MESA3D_CONF_OPTS += \
159 --enable-gbm \
160 --enable-egl \
161 --with-egl-platforms=$(subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS))
162 else
163 MESA3D_CONF_OPTS += \
164 --disable-egl
165 endif
167 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
168 MESA3D_PROVIDES += libgles
169 MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2
170 else
171 MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
172 endif
174 # Avoid automatic search of llvm-config
175 MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin
177 $(eval $(autotools-package))