From patchwork Thu Mar 13 21:16:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 330125 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id DFD6A2C0098 for ; Fri, 14 Mar 2014 08:17:12 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 10F7E94423; Thu, 13 Mar 2014 21:17:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wm2BMColHPfZ; Thu, 13 Mar 2014 21:17:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2AAD194410; Thu, 13 Mar 2014 21:17:09 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id BEA9C1BF9FF for ; Thu, 13 Mar 2014 21:17:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B91189440A for ; Thu, 13 Mar 2014 21:17:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uzhZhqjXgktx for ; Thu, 13 Mar 2014 21:17:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from blu0-omc2-s34.blu0.hotmail.com (blu0-omc2-s34.blu0.hotmail.com [65.55.111.109]) by hemlock.osuosl.org (Postfix) with ESMTP id 37E2194410 for ; Thu, 13 Mar 2014 21:17:06 +0000 (UTC) Received: from BLU0-SMTP17 ([65.55.111.73]) by blu0-omc2-s34.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 13 Mar 2014 14:17:04 -0700 X-TMN: [C5Trcgi4Z3Rg92NgKJhpcSwbLnHYiTKQ] X-Originating-Email: [berndkuhls@hotmail.com] Message-ID: Received: from fli4l.lan.fli4l ([87.146.216.216]) by BLU0-SMTP17.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 13 Mar 2014 14:17:03 -0700 Received: from [192.168.1.122] (port=53586 helo=fli4lbuild64.lan.fli4l) by fli4l.lan.fli4l with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80.1) (envelope-from ) id 1WOCzs-0001L2-U9; Thu, 13 Mar 2014 22:17:01 +0100 From: Bernd Kuhls To: buildroot@buildroot.org Date: Thu, 13 Mar 2014 22:16:42 +0100 X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1394745405-4720-1-git-send-email-berndkuhls@hotmail.com> References: <1394745405-4720-1-git-send-email-berndkuhls@hotmail.com> MIME-Version: 1.0 X-OriginalArrivalTime: 13 Mar 2014 21:17:03.0536 (UTC) FILETIME=[9476BB00:01CF3F01] Cc: Bernd Kuhls Subject: [Buildroot] =?utf-8?q?=5BPATCH_v7_2/5=5D_mesa3d=3A_modularize_and?= =?utf-8?q?_bump_to_version_10=2E0=2E4?= X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net - add options to select mesa3d drivers - uClibc support was fixed in mesa3d v9.2 https://bugs.freedesktop.org/show_bug.cgi?id=51782 therefore mesa3d-uclibc-locale.patch was removed - removed MESA3D_AUTORECONF=yes as it was needed only for mesa3d-uclibc-locale.patch Signed-off-by: Bernd Kuhls Signed-off-by: Spenser Gilliland --- v7: - fix typo XPROTO_DRI2_PROTO -> XPROTO_DRI2PROTO (Sebastien) v6: - version bump 10.0.4 - reinstated dependency on xorg for the intel dri driver (Sebastien) - moved --enable/disable-shared-glapi option (Sebastien) v5: - added suggestions from Sebastien removed dependency on xorg for the intel dri driver moved --enable/disable-dri/glx options v4: - removed even more options after intensive build tests - renamed BR2_PACKAGE_UDEV -> BR2_PACKAGE_HAS_UDEV (Thomas) - improved driver detection in mesa3d.mk (Thomas) - small fixes (Thomas) v3: - removed OpenCL and several Radeon drivers due to missing dependencies v2: - bump to version 10.0.3 v1: - rebased on Spenser Gilliland´s patch http://patchwork.ozlabs.org/patch/278303/ - bump to version 10.0.2 - fixed bug in variable naming BR2_PACKAGE_MESA3D_DRI_DRIVERS_* -> BR2_PACKAGE_MESA3D_DRI_DRIVER_* preventing DRI drivers from being built package/mesa3d/Config.in | 116 +++++++++++++++++++- package/mesa3d/mesa3d-uclibc-locale.patch | 56 ---------- package/mesa3d/mesa3d.mk | 116 ++++++++++++++++---- .../xserver_xorg-server/xserver_xorg-server.mk | 4 +- 4 files changed, 209 insertions(+), 83 deletions(-) delete mode 100644 package/mesa3d/mesa3d-uclibc-locale.patch diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in index 0ce168e..217528b 100644 --- a/package/mesa3d/Config.in +++ b/package/mesa3d/Config.in @@ -1,14 +1,118 @@ config BR2_PACKAGE_MESA3D bool "Mesa 3D Graphics Library" - select BR2_PACKAGE_XPROTO_GLPROTO - select BR2_PACKAGE_XLIB_LIBXXF86VM - select BR2_PACKAGE_XLIB_LIBXDAMAGE - select BR2_PACKAGE_XLIB_LIBXFIXES - select BR2_PACKAGE_XPROTO_DRI2PROTO select BR2_PACKAGE_LIBDRM select BR2_PACKAGE_EXPAT select BR2_PACKAGE_HOST_LIBXML2_PYTHON - depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + select BR2_PACKAGE_XPROTO_DRI2PROTO if BR2_PACKAGE_XSERVER_XORG_SERVER + select BR2_PACKAGE_XPROTO_XF86DRIPROTO if BR2_PACKAGE_XSERVER_XORG_SERVER + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XSERVER_XORG_SERVER + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XSERVER_XORG_SERVER + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XSERVER_XORG_SERVER + select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XSERVER_XORG_SERVER + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XSERVER_XORG_SERVER depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_LARGEFILE help Mesa 3D, an open-source implementation of the OpenGL specification. + + http://mesa3d.org + +if BR2_PACKAGE_MESA3D + +# inform the .mk file of gallium or dri driver selection +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRIVER + bool + +config BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_MESA3D_DRIVER + depends on !BR2_PREFER_STATIC_LIB + bool + +comment "DRI drivers need shared libdrm" + depends on BR2_PREFER_STATIC_LIB + +config BR2_PACKAGE_MESA3D_DRIVER + bool + +menu "Drivers" + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU + bool "Gallium nouveau driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_NOUVEAU + help + Supports all Nvidia GPUs. + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA + bool "Gallium vmware svga driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_VMWGFX + help + This is a virtual GPU driver for VMWare virtual machines. + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST + bool "Gallium swrast driver" + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + help + This is a software opengl implementation using the Gallium3D + infrastructure. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST + bool "DRI swrast driver" + select BR2_PACKAGE_MESA3D_DRI_DRIVER + help + This is a software opengl implementation using the DRI + infrastructure. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965 + bool "DRI i965 driver" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM_INTEL + help + Supports all Intel GPUs. This version is most supported by Intel. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON + bool "DRI radeon driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM_RADEON + help + Legacy Radeon driver for R100 series GPUs. + +endmenu + +menu "Additional API Support" +depends on BR2_PACKAGE_MESA3D_DRIVER + +config BR2_PACKAGE_MESA3D_OPENGL_EGL + bool "EGL" + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_HAS_OPENGL_EGL + help + Use the Khronos EGL APIs. EGL is a window manager for OpenGL applications + similar to GLX, for X, and WGL, for Windows. + +config BR2_PACKAGE_MESA3D_OPENGL_ES + bool "OpenGL ES" + select BR2_PACKAGE_HAS_OPENGL_ES + help + Use the Khronos OpenGL ES APIs. This is commonly used on embedded + systems and represents a subset of the OpenGL API. + +endmenu + +config BR2_PACKAGE_PROVIDES_OPENGL_EGL + default "mesa3d" + +config BR2_PACKAGE_PROVIDES_OPENGL_ES + default "mesa3d" + +endif + +comment "mesa3d needs a toolchain w/ C++, largefile" + depends on !BR2_LARGEFILE || !BR2_INSTALL_LIBSTDCPP diff --git a/package/mesa3d/mesa3d-uclibc-locale.patch b/package/mesa3d/mesa3d-uclibc-locale.patch deleted file mode 100644 index 99afe8d..0000000 --- a/package/mesa3d/mesa3d-uclibc-locale.patch +++ /dev/null @@ -1,56 +0,0 @@ -[PATCH] Fix compilation on uClibc without locale support - -Based on similar patch from OE: - -http://git.openembedded.org/openembedded-core/commit/meta/recipes-graphics/mesa/mesa/0001-Compile-with-uclibc.patch?id=e4039eb74b20e96d4b8837cd58cf2d13d091e1ad - -Signed-off-by: Peter Korsgaard ---- - configure.ac | 3 +++ - src/glsl/strtod.c | 2 +- - src/mesa/main/imports.c | 2 +- - 3 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index fbaa376..454dad2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -450,6 +450,9 @@ AC_SUBST([DLOPEN_LIBS]) - dnl See if posix_memalign is available - AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"]) - -+dnl See if newlocale is available -+AC_CHECK_FUNCS_ONCE(newlocale) -+ - dnl SELinux awareness. - AC_ARG_ENABLE([selinux], - [AS_HELP_STRING([--enable-selinux], -diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c -index a876e13..9fce7e9 100644 ---- a/src/glsl/strtod.c -+++ b/src/glsl/strtod.c -@@ -44,7 +44,7 @@ double - double - glsl_strtod(const char *s, char **end) - { --#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) -+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined(HAVE_NEWLOCALE) - static locale_t loc = NULL; - if (!loc) { - loc = newlocale(LC_CTYPE_MASK, "C", NULL); -diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c -index d3727ef..363bf32 100644 ---- a/src/mesa/main/imports.c -+++ b/src/mesa/main/imports.c -@@ -757,7 +757,7 @@ float - float - _mesa_strtof( const char *s, char **end ) - { --#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) -+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined(HAVE_NEWLOCALE) - static locale_t loc = NULL; - if (!loc) { - loc = newlocale(LC_CTYPE_MASK, "C", NULL); --- -1.7.10.4 - diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk index d4080d4..c6287db 100644 --- a/package/mesa3d/mesa3d.mk +++ b/package/mesa3d/mesa3d.mk @@ -4,31 +4,15 @@ # ################################################################################ -MESA3D_VERSION = 7.10.3 -MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz -MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/older-versions/7.x/$(MESA3D_VERSION) +MESA3D_VERSION = 10.0.4 +MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2 +MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION) MESA3D_LICENSE = MIT, SGI, Khronos MESA3D_LICENSE_FILES = docs/license.html -MESA3D_AUTORECONF = YES MESA3D_INSTALL_STAGING = YES -MESA3D_CONF_OPT = \ - --disable-egl \ - --disable-glu \ - --disable-glw \ - --disable-glut \ - --disable-gallium \ - --with-driver=dri \ - --with-dri-drivers=swrast \ - --disable-static - MESA3D_DEPENDENCIES = \ - xproto_glproto \ - xlib_libXxf86vm \ - xlib_libXdamage \ - xlib_libXfixes \ - xproto_dri2proto \ libdrm \ expat \ host-xutil_makedepend \ @@ -37,4 +21,98 @@ MESA3D_DEPENDENCIES = \ host-bison \ host-flex +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER),y) +MESA3D_DEPENDENCIES += \ + xproto_xf86driproto \ + xproto_dri2proto \ + xproto_glproto \ + xlib_libX11 \ + xlib_libXext \ + xlib_libXdamage \ + xlib_libXfixes \ + libxcb +MESA3D_CONF_OPT += \ + --enable-glx \ + --enable-xa +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 +MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965 +MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon + +# at least one API is required, for buildroot enable OpenGL API by default +# other APIs (EGL, EGL_ES) are optional +ifeq ($(MESA3D_GALLIUM_DRIVERS-y)$(MESA3D_DRI_DRIVERS-y),) +MESA3D_CONF_OPT += \ + --disable-opengl +else +MESA3D_CONF_OPT += \ + --enable-opengl +endif + +ifeq ($(MESA3D_GALLIUM_DRIVERS-y),) +MESA3D_CONF_OPT += \ + --without-gallium-drivers +else +MESA3D_CONF_OPT += \ + --with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) +endif + +ifeq ($(MESA3D_DRI_DRIVERS-y),) +MESA3D_CONF_OPT += \ + --disable-dri \ + --disable-shared-glapi \ + --without-dri-drivers +else +MESA3D_CONF_OPT += \ + --enable-dri \ + --enable-shared-glapi \ + --with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y)) +endif + +# APIs + +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) +# 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 +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER),y) +MESA3D_EGL_PLATFORMS += x11 +endif +MESA3D_CONF_OPT += \ + --enable-gbm \ + --enable-egl \ + --with-egl-platforms=$(foreach subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS)) +else +MESA3D_CONF_OPT += \ + --disable-gbm \ + --disable-egl +endif + +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y) +MESA3D_CONF_OPT += --enable-gles1 --enable-gles2 +else +MESA3D_CONF_OPT += --disable-gles1 --disable-gles2 +endif + $(eval $(autotools-package)) diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk index 576579b..034b591 100644 --- a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk @@ -99,7 +99,7 @@ else # modular XSERVER_XORG_SERVER_CONF_OPT += --disable-kdrive --disable-xfbdev endif -ifeq ($(BR2_PACKAGE_MESA3D),y) +ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y) XSERVER_XORG_SERVER_DEPENDENCIES += mesa3d xproto_xf86driproto else XSERVER_XORG_SERVER_CONF_OPT += --disable-dri @@ -172,7 +172,7 @@ ifneq ($(BR2_PACKAGE_XLIB_LIBDMX),y) XSERVER_XORG_SERVER_CONF_OPT += --disable-dmx endif -ifeq ($(BR2_PACKAGE_MESA3D),y) +ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y) XSERVER_XORG_SERVER_CONF_OPT += --enable-glx else XSERVER_XORG_SERVER_CONF_OPT += --disable-glx