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
|
|
|
|
2014-09-21 18:55:52 +02:00
|
|
|
MESA3D_VERSION = 10.3.0
|
2014-03-29 21:56:06 +01:00
|
|
|
MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
|
2014-09-21 18:55:52 +02:00
|
|
|
MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/10.3
|
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 = \
|
2012-10-12 08:58:24 +02:00
|
|
|
expat \
|
2014-03-29 21:56:06 +01:00
|
|
|
host-bison \
|
|
|
|
host-flex \
|
|
|
|
host-gettext \
|
2013-04-07 15:19:38 +02:00
|
|
|
host-python \
|
2014-03-29 21:56:06 +01:00
|
|
|
host-xutil_makedepend \
|
|
|
|
libdrm
|
|
|
|
|
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
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --enable-glx
|
2014-06-07 14:31:10 +02:00
|
|
|
# quote from mesa3d configure "Building xa requires at least one non swrast gallium driver."
|
|
|
|
ifneq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU)$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA),)
|
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
|
|
|
|
|
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),)
|
|
|
|
# fix for "configure: error: Cannot use static libraries for DRI drivers"
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --disable-static
|
2014-03-29 21:56:06 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
#Gallium Drivers
|
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau
|
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA) += svga
|
|
|
|
MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST) += swrast
|
|
|
|
# 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
|
|
|
|
MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon
|
|
|
|
|
|
|
|
ifeq ($(MESA3D_GALLIUM_DRIVERS-y),)
|
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
|
|
|
|
|
|
|
|
ifeq ($(MESA3D_DRI_DRIVERS-y),)
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2014-10-03 19:22:50 +02:00
|
|
|
--without-dri-drivers --without-dri --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
|
2014-05-15 19:37:05 +02:00
|
|
|
MESA3D_PROVIDES += libgl
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += \
|
2014-03-29 21:56:06 +01:00
|
|
|
--enable-dri \
|
|
|
|
--enable-shared-glapi \
|
|
|
|
--with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y))
|
|
|
|
endif
|
|
|
|
|
|
|
|
# APIs
|
|
|
|
|
2014-04-20 00:01:43 +02:00
|
|
|
# Always enable OpenGL:
|
|
|
|
# - it is needed for GLES (mesa3d's ./configure is a bit weird)
|
|
|
|
# - but if no DRI driver is enabled, then libgl is not built
|
2014-09-27 21:32:44 +02:00
|
|
|
MESA3D_CONF_OPTS += --enable-opengl
|
2014-04-17 18:04:19 +02:00
|
|
|
|
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
|
2014-03-29 21:56:06 +01:00
|
|
|
# egl depends on gbm, gbm depends on udev
|
|
|
|
MESA3D_DEPENDENCIES += udev
|
|
|
|
MESA3D_EGL_PLATFORMS = drm
|
|
|
|
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
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|