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-06-07 14:31:10 +02:00
|
|
|
MESA3D_CONF_OPT += --enable-glx
|
|
|
|
# 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),)
|
|
|
|
MESA3D_CONF_OPT += --enable-xa
|
|
|
|
else
|
|
|
|
MESA3D_CONF_OPT += --disable-xa
|
|
|
|
endif
|
2014-03-29 21:56:06 +01:00
|
|
|
else
|
|
|
|
MESA3D_CONF_OPT += \
|
|
|
|
--disable-glx \
|
|
|
|
--disable-xa
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),)
|
|
|
|
# fix for "configure: error: Cannot use static libraries for DRI drivers"
|
|
|
|
MESA3D_CONF_OPT += --disable-static
|
|
|
|
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),)
|
|
|
|
MESA3D_CONF_OPT += \
|
|
|
|
--without-gallium-drivers
|
|
|
|
else
|
|
|
|
MESA3D_CONF_OPT += \
|
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),)
|
|
|
|
MESA3D_CONF_OPT += \
|
|
|
|
--without-dri-drivers
|
|
|
|
else
|
2014-07-17 07:42:54 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y)
|
|
|
|
MESA3D_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto xproto_presentproto
|
|
|
|
MESA3D_CONF_OPT += --enable-dri3
|
|
|
|
else
|
|
|
|
MESA3D_CONF_OPT += --disable-dri3
|
|
|
|
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-03-29 21:56:06 +01:00
|
|
|
MESA3D_CONF_OPT += \
|
|
|
|
--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-04-17 18:04:19 +02:00
|
|
|
MESA3D_CONF_OPT += --enable-opengl
|
|
|
|
|
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
|
|
|
|
MESA3D_CONF_OPT += \
|
|
|
|
--enable-gbm \
|
|
|
|
--enable-egl \
|
|
|
|
--with-egl-platforms=$(subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS))
|
|
|
|
else
|
|
|
|
MESA3D_CONF_OPT += \
|
|
|
|
--disable-egl
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y)
|
2014-05-15 19:37:05 +02:00
|
|
|
MESA3D_PROVIDES += libgles
|
2014-03-29 21:56:06 +01:00
|
|
|
MESA3D_CONF_OPT += --enable-gles1 --enable-gles2
|
|
|
|
else
|
|
|
|
MESA3D_CONF_OPT += --disable-gles1 --disable-gles2
|
|
|
|
endif
|
2007-08-10 21:07:51 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|