Patchwork [14/32] qt5base: add eglfs graphics backend

login
register
mail settings
Submitter Thomas Petazzoni
Date March 7, 2013, 8:18 p.m.
Message ID <1362687540-19440-15-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/225909/
State Superseded
Headers show

Comments

Thomas Petazzoni - March 7, 2013, 8:18 p.m.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/qt5/qt5base/Config.in                      |   11 ++++++-
 ...nce-add-egl-to-CONFIG-to-get-correct-incl.patch |   32 ++++++++++++++++++++
 package/qt5/qt5base/qt5base.mk                     |    9 ++++--
 3 files changed, 49 insertions(+), 3 deletions(-)
 create mode 100644 package/qt5/qt5base/qt5base-eglconvenience-add-egl-to-CONFIG-to-get-correct-incl.patch
Peter Korsgaard - March 10, 2013, 9:59 p.m.
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  package/qt5/qt5base/Config.in                      |   11 ++++++-
 Thomas>  ...nce-add-egl-to-CONFIG-to-get-correct-incl.patch |   32 ++++++++++++++++++++
 Thomas>  package/qt5/qt5base/qt5base.mk                     |    9 ++++--
 Thomas>  3 files changed, 49 insertions(+), 3 deletions(-)
 Thomas>  create mode 100644 package/qt5/qt5base/qt5base-eglconvenience-add-egl-to-CONFIG-to-get-correct-incl.patch

 Thomas> +++ b/package/qt5/qt5base/qt5base-eglconvenience-add-egl-to-CONFIG-to-get-correct-incl.patch
 Thomas> @@ -0,0 +1,32 @@
 Thomas> +From 588c60d0c3d11e79d19860fa62b03c935658d13a Mon Sep 17 00:00:00 2001
 Thomas> +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> +Date: Sun, 13 Jan 2013 14:36:48 +0100
 Thomas> +Subject: [PATCH qtbase] eglconvenience: add egl to CONFIG to get correct include
 Thomas> + paths
 Thomas> +

It seems this somehow (before adding to buildroot) got wordwrapped?
E.G. 'paths' should normally be part of the subject line.

Other than that it looks good.
Yann E. MORIN - March 10, 2013, 11:26 p.m.
Peter, Thomas, All,

On Sunday 10 March 2013 Peter Korsgaard wrote:
> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> 
>  Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>  Thomas> ---
>  Thomas>  package/qt5/qt5base/Config.in                      |   11 ++++++-
>  Thomas>  ...nce-add-egl-to-CONFIG-to-get-correct-incl.patch |   32 ++++++++++++++++++++
>  Thomas>  package/qt5/qt5base/qt5base.mk                     |    9 ++++--
>  Thomas>  3 files changed, 49 insertions(+), 3 deletions(-)
>  Thomas>  create mode 100644 package/qt5/qt5base/qt5base-eglconvenience-add-egl-to-CONFIG-to-get-correct-incl.patch
> 
>  Thomas> +++ b/package/qt5/qt5base/qt5base-eglconvenience-add-egl-to-CONFIG-to-get-correct-incl.patch
>  Thomas> @@ -0,0 +1,32 @@
>  Thomas> +From 588c60d0c3d11e79d19860fa62b03c935658d13a Mon Sep 17 00:00:00 2001
>  Thomas> +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>  Thomas> +Date: Sun, 13 Jan 2013 14:36:48 +0100
>  Thomas> +Subject: [PATCH qtbase] eglconvenience: add egl to CONFIG to get correct include
>  Thomas> + paths
>  Thomas> +
> 
> It seems this somehow (before adding to buildroot) got wordwrapped?
> E.G. 'paths' should normally be part of the subject line.

Notice how 'paths' has a space in front of it?
That's the way line continuation is expresed in an e-mail.

I expect (in fact I'm pretty sure) git-am correctly handles this case,
and folds back this part into the previous line, thus restoring the
initial subject line.

Regards,
Yann E. MORIN.

Patch

diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in
index 540c8b2..e91c405 100644
--- a/package/qt5/qt5base/Config.in
+++ b/package/qt5/qt5base/Config.in
@@ -67,7 +67,8 @@  config BR2_PACKAGE_QT5BASE_GUI
 	# linuxfb if nothing is enabled.
 	select BR2_PACKAGE_QT5BASE_LINUXFB if \
 	       !BR2_PACKAGE_QT5BASE_DIRECTFB && \
-	       !BR2_PACKAGE_QT5BASE_XCB
+	       !BR2_PACKAGE_QT5BASE_XCB && \
+	       !BR2_PACKAGE_QT5BASE_EGLFS
 	help
 	  This option enables the Qt5Gui library.
 
@@ -97,6 +98,14 @@  config BR2_PACKAGE_QT5BASE_XCB
 comment "X.org XCB backend available if X.org is enabled"
 	depends on !BR2_PACKAGE_XORG7
 
+config BR2_PACKAGE_QT5BASE_EGLFS
+	bool "eglfs support"
+	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	depends on BR2_PACKAGE_HAS_OPENGL_ES
+
+comment "eglfs backend available if OpenGLES and EGL are enabled"
+	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES
+
 config BR2_PACKAGE_QT5BASE_PRINTSUPPORT
 	bool "print support module"
 	select BR2_PACKAGE_QT5BASE_WIDGETS
diff --git a/package/qt5/qt5base/qt5base-eglconvenience-add-egl-to-CONFIG-to-get-correct-incl.patch b/package/qt5/qt5base/qt5base-eglconvenience-add-egl-to-CONFIG-to-get-correct-incl.patch
new file mode 100644
index 0000000..a85a5aa
--- /dev/null
+++ b/package/qt5/qt5base/qt5base-eglconvenience-add-egl-to-CONFIG-to-get-correct-incl.patch
@@ -0,0 +1,32 @@ 
+From 588c60d0c3d11e79d19860fa62b03c935658d13a Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 13 Jan 2013 14:36:48 +0100
+Subject: [PATCH qtbase] eglconvenience: add egl to CONFIG to get correct include
+ paths
+
+The eglconvenience code includes <EGL/egl.h>. Therefore, it should get
+the appropriate EGL-specific include paths from QMAKE_INCDIR_EGL,
+otherwise the build might if the EGL library has its headers in
+special locations. In order to achieve this, we simply add the "egl"
+feature to the list of features imported by eglconvenience.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ .../eglconvenience/eglconvenience.pri              |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri
+index 188eb1c..8996cea 100644
+--- a/src/platformsupport/eglconvenience/eglconvenience.pri
++++ b/src/platformsupport/eglconvenience/eglconvenience.pri
+@@ -5,6 +5,7 @@ contains(QT_CONFIG,egl) {
+     SOURCES += \
+         $$PWD/qeglconvenience.cpp \
+         $$PWD/qeglplatformcontext.cpp
++    CONFIG += egl
+ 
+     contains(QT_CONFIG,xlib) {
+         HEADERS += \
+-- 
+1.7.9.5
+
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index c30bf48..af6c578 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -20,9 +20,7 @@  QT5BASE_INSTALL_STAGING = YES
 #    want to use the one packaged in Buildroot
 QT5BASE_CONFIGURE_OPTS += \
 	-optimized-qmake \
-	-no-eglfs \
 	-no-kms \
-	-no-opengl \
 	-no-glib \
 	-no-cups \
 	-no-nis \
@@ -81,6 +79,13 @@  else
 QT5BASE_CONFIGURE_OPTS += -no-xcb
 endif
 
+ifeq ($(BR2_PACKAGE_QT5BASE_EGLFS),y)
+QT5BASE_CONFIGURE_OPTS += -opengl es2 -eglfs
+QT5BASE_DEPENDENCIES   += libgles libegl
+else
+QT5BASE_CONFIGURE_OPTS += -no-opengl -no-eglfs
+endif
+
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_OPENSSL),-openssl,-no-openssl)
 QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_OPENSSL),openssl)