2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2007-08-10 21:07:51 +02:00
|
|
|
#
|
|
|
|
# mesa3d
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-02-24 14:29:59 +01:00
|
|
|
|
package/mesa3d-headers: new package
Some OpenGL/EGL/GLES/VG providers do not provide the corresponding
headers, and rely on using "the headers provided by the distribution".
In our case, we can not rely on such headers, because we are not a
distribution, and we have no way to provide those headers (not even
speaking about relying on the headers provided by hte host distribution,
because they might well not be installed at all).
Also, we can not rely on another package to provide those headers,
because we can only have one provider enabled in any configuration.
The Khronos group provides such headers, and they are the reference
headers, but we can not realy use them:
- most of them are not packaged: they are not versioned and not
provided in a tarball, but as separately downloadable files;
- those headers are anyway incomplete: there are headers not provided
by Khronos, like GL.h
Instead, we rely on mesa3d to provide those headers: mesa3d has all the
headers we need.
Modifying the existing mesa3d package would not be easy; we'd have to
differentiate whther we need only the headers or the full package. The
meas3d Config.in and .mk are already quite non-trivial that adding such
a feature would render them even more illegible.
So, we introduce mea3d-headers as a new package, that is in fact just
mesa3d with a much simplified Config.in and .mk, that other OpenXXX
providers may select if they do not provide the OpenXXX headers.
Note: we're not installing GLES3 headers, because what Buildroot
currently calls libgles is in fact libgles2; we have no way to specify
that we have libgles3. So, we just install headers for GLES and GLES2.
[Thomas:
- Wrap Config.in help text to a reasonable length.
- Don't rely on mesa3d to provide mesa3d-headers: they should be
mutually exclusive. Instead, error out if both packages are
selected.
- Take into account the update of mesa3d to 10.4.5.
- Don't copy each header file individually, use a cp -dpfr call to
copy entires header files directories.]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-10 21:01:10 +01:00
|
|
|
# When updating the version, please also update mesa3d-headers
|
2016-09-17 13:58:22 +02:00
|
|
|
MESA3D_VERSION = 12.0.3
|
2015-03-15 17:10:01 +01:00
|
|
|
MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
|
2014-10-13 20:05:26 +02:00
|
|
|
MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
|
2013-05-09 07:51:02 +02:00
|
|
|
MESA3D_LICENSE = MIT, SGI, Khronos
|
|
|
|
MESA3D_LICENSE_FILES = docs/license.html
|
2014-04-09 14:54:21 +02:00
|
|
|
MESA3D_AUTORECONF = YES
|
2013-05-09 07:51:02 +02:00
|
|
|
|
2010-04-01 14:46:33 +02:00
|
|
|
MESA3D_INSTALL_STAGING = YES
|
2009-02-24 14:29:59 +01:00
|
|
|
|
2014-05-15 19:37:05 +02:00
|
|
|
MESA3D_PROVIDES =
|
|
|
|
|
2012-02-06 17:19:53 +01:00
|
|
|
MESA3D_DEPENDENCIES = \
|
2016-04-08 14:35:00 +02:00
|
|
|
host-bison \
|
|
|
|
host-flex \
|
2012-10-12 08:58:24 +02:00
|
|
|
expat \
|
2014-03-29 21:56:06 +01:00
|
|
|
libdrm
|
|
|
|
|
2016-05-31 12:15:55 +02:00
|
|
|
# The Sourcery MIPS toolchain has a special (non-upstream) feature to
|
|
|
|
# have "compact exception handling", which unfortunately breaks with
|
|
|
|
# mesa3d, so we disable it here by passing -mno-compact-eh.
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y)
|
|
|
|
MESA3D_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mno-compact-eh"
|
|
|
|
MESA3D_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -mno-compact-eh"
|
|
|
|
endif
|
|
|
|
|
2015-06-15 20:31:57 +02:00
|
|
|
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
|
2016-07-17 18:27:53 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_LIBSHA1),y)
|
|
|
|
MESA3D_DEPENDENCIES += libsha1
|
|
|
|
MESA3D_CONF_OPTS += --with-sha1=libsha1
|
2015-06-15 20:31:57 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-10 12:09:14 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
2015-06-07 13:41:02 +02:00
|
|
|
MESA3D_DEPENDENCIES += udev
|
|
|
|
MESA3D_CONF_OPTS += --disable-sysfs
|
|
|
|
else
|
|
|
|
MESA3D_CONF_OPTS += --enable-sysfs
|
|
|
|
endif
|
|
|
|
|
2014-07-17 07:42:55 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
2014-03-29 21:56:06 +01:00
|
|
|
MESA3D_DEPENDENCIES += \
|
|
|
|
xproto_xf86driproto \
|
|
|
|
xproto_dri2proto \
|
|
|
|
xproto_glproto \
|
|
|
|
xlib_libX11 \
|
|
|
|
xlib_libXext \
|
|
|
|
xlib_libXdamage \
|
|
|
|
xlib_libXfixes \
|
|
|
|
libxcb
|
2015-03-15 17:10:01 +01:00
|
|
|
MESA3D_CONF_OPTS += --enable-glx --disable-mangling
|
2014-06-07 14:31:10 +02:00
|
|
|
# quote from mesa3d configure "Building xa requires at least one non swrast gallium driver."
|
2015-02-02 21:41:21 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --enable-xa
|
2014-06-07 14:31:10 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --disable-xa
|
2014-06-07 14:31:10 +02:00
|
|
|
endif
|
2014-03-29 21:56:06 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2014-03-29 21:56:06 +01:00
|
|
|
--disable-glx \
|
|
|
|
--disable-xa
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
#Gallium Drivers
|
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau
|
2015-01-17 18:03:55 +01:00
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600) += r600
|
2014-03-29 21:56:06 +01:00
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA) += svga
|
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST) += swrast
|
2016-04-07 21:03:39 +02:00
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4) += vc4
|
2015-12-19 12:01:23 +01:00
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL) += virgl
|
2014-03-29 21:56:06 +01:00
|
|
|
# DRI Drivers
|
|
|
|
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast
|
2014-08-31 01:49:19 +02:00
|
|
|
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915) += i915
|
2014-03-29 21:56:06 +01:00
|
|
|
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965
|
2015-12-19 12:01:24 +01:00
|
|
|
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau
|
2014-03-29 21:56:06 +01:00
|
|
|
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon
|
|
|
|
|
2015-04-30 17:12:16 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2014-03-29 21:56:06 +01:00
|
|
|
--without-gallium-drivers
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2014-05-10 12:02:15 +02:00
|
|
|
--enable-shared-glapi \
|
2014-03-29 21:56:06 +01:00
|
|
|
--with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y))
|
|
|
|
endif
|
|
|
|
|
2015-04-30 17:12:16 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),)
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2015-09-26 12:32:43 +02:00
|
|
|
--without-dri-drivers --disable-dri3
|
2014-03-29 21:56:06 +01:00
|
|
|
else
|
2014-07-17 07:42:54 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y)
|
|
|
|
MESA3D_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto xproto_presentproto
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --enable-dri3
|
2014-07-17 07:42:54 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --disable-dri3
|
2014-07-17 07:42:54 +02:00
|
|
|
endif
|
2014-09-03 21:48:09 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
|
|
|
|
MESA3D_DEPENDENCIES += xlib_libXxf86vm
|
|
|
|
endif
|
2016-03-28 23:48:15 +02:00
|
|
|
# libGL is only provided for a full xorg stack
|
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
2014-05-15 19:37:05 +02:00
|
|
|
MESA3D_PROVIDES += libgl
|
2016-03-28 23:48:15 +02:00
|
|
|
endif
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2014-03-29 21:56:06 +01:00
|
|
|
--enable-shared-glapi \
|
2015-03-15 17:10:01 +01:00
|
|
|
--enable-driglx-direct \
|
2014-03-29 21:56:06 +01:00
|
|
|
--with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
|
|
|
|
endif
|
|
|
|
|
|
|
|
# APIs
|
|
|
|
|
2015-10-03 19:21:55 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y)
|
|
|
|
MESA3D_CONF_OPTS += --enable-osmesa
|
|
|
|
else
|
|
|
|
MESA3D_CONF_OPTS += --disable-osmesa
|
|
|
|
endif
|
|
|
|
|
2014-04-20 00:01:43 +02:00
|
|
|
# Always enable OpenGL:
|
|
|
|
# - it is needed for GLES (mesa3d's ./configure is a bit weird)
|
2015-09-26 12:32:43 +02:00
|
|
|
MESA3D_CONF_OPTS += --enable-opengl --enable-dri
|
2014-04-17 18:04:19 +02:00
|
|
|
|
2015-07-29 21:42:54 +02:00
|
|
|
# libva and mesa3d have a circular dependency
|
|
|
|
# we do not need libva support in mesa3d, therefore disable this option
|
|
|
|
MESA3D_CONF_OPTS += --disable-va
|
|
|
|
|
2014-03-29 21:56:06 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
|
2014-05-15 19:37:05 +02:00
|
|
|
MESA3D_PROVIDES += libegl
|
2015-09-26 12:32:43 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
|
2014-03-29 21:56:06 +01:00
|
|
|
MESA3D_EGL_PLATFORMS = drm
|
2016-06-01 08:56:55 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4),y)
|
|
|
|
MESA3D_EGL_PLATFORMS = drm
|
2015-12-20 19:31:05 +01:00
|
|
|
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL),y)
|
|
|
|
MESA3D_EGL_PLATFORMS = drm
|
2015-09-26 12:32:43 +02:00
|
|
|
endif
|
2014-03-29 21:56:06 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_WAYLAND),y)
|
|
|
|
MESA3D_DEPENDENCIES += wayland
|
|
|
|
MESA3D_EGL_PLATFORMS += wayland
|
|
|
|
endif
|
2014-07-17 07:42:55 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
2014-03-29 21:56:06 +01:00
|
|
|
MESA3D_EGL_PLATFORMS += x11
|
|
|
|
endif
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2014-03-29 21:56:06 +01:00
|
|
|
--enable-gbm \
|
|
|
|
--enable-egl \
|
|
|
|
--with-egl-platforms=$(subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS))
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2014-03-29 21:56:06 +01:00
|
|
|
--disable-egl
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
|
2014-05-15 19:37:05 +02:00
|
|
|
MESA3D_PROVIDES += libgles
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2
|
2014-03-29 21:56:06 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2
|
2014-03-29 21:56:06 +01:00
|
|
|
endif
|
2007-08-10 21:07:51 +02:00
|
|
|
|
2015-03-31 01:16:00 +02:00
|
|
|
# Avoid automatic search of llvm-config
|
|
|
|
MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|