Patchwork [1/2] qt5: add rPi EGL glue code

login
register
mail settings
Submitter Floris Bos
Date March 1, 2013, 10:13 p.m.
Message ID <1362175994-17431-1-git-send-email-bos@je-eigen-domein.nl>
Download mbox | patch
Permalink /patch/224453/
State Accepted
Commit 6cd7b60f8bd2ad827028e3a82d2f62cf63831a99
Headers show

Comments

Floris Bos - March 1, 2013, 10:13 p.m.
When the rpi-userland package is selected, assume we are targetting
the Raspberry Pi, and add the right platform glue code when building
the Qt5 EGLFS plugin.

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
---
 package/qt5/qt5base/qt5base-mkspecs-files.patch |    5 ++++-
 package/qt5/qt5base/qt5base.mk                  |    6 ++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
Thomas Petazzoni - March 3, 2013, 7:09 p.m.
Dear Floris Bos,

On Fri,  1 Mar 2013 23:13:13 +0100, Floris Bos wrote:
> When the rpi-userland package is selected, assume we are targetting
> the Raspberry Pi, and add the right platform glue code when building
> the Qt5 EGLFS plugin.
> 
> Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>

Thanks. I've applied your 3 patches (the two ones related to Rasberry
Pi), and the one related to installation of fonts. They will be sent
when I send the next version of my Qt5 pull request.

Thanks!

Thomas

Patch

diff --git a/package/qt5/qt5base/qt5base-mkspecs-files.patch b/package/qt5/qt5base/qt5base-mkspecs-files.patch
index a86d0b1..d5827f6 100644
--- a/package/qt5/qt5base/qt5base-mkspecs-files.patch
+++ b/package/qt5/qt5base/qt5base-mkspecs-files.patch
@@ -14,7 +14,7 @@  Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
 ===================================================================
 --- /dev/null
 +++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-@@ -0,0 +1,38 @@
+@@ -0,0 +1,41 @@
 +MAKEFILE_GENERATOR      = UNIX
 +CONFIG                  += incremental gdb_dwarf_index
 +QMAKE_INCREMENTAL_STYLE = sublib
@@ -49,6 +49,9 @@  Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
 +
 +QMAKE_LIBS             += -lrt -lpthread -ldl
 +
++# device specific glue code
++EGLFS_PLATFORM_HOOKS_SOURCES =
++
 +# Sanity check
 +deviceSanityCheckCompiler()
 +
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index 0ea15c2..f44da31 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -75,6 +75,10 @@  endif
 ifeq ($(BR2_PACKAGE_QT5BASE_EGLFS),y)
 QT5BASE_CONFIGURE_OPTS += -opengl es2 -eglfs
 QT5BASE_DEPENDENCIES   += libgles libegl
+ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
+QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES = \
+	$(@D)/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
+endif
 else
 QT5BASE_CONFIGURE_OPTS += -no-opengl -no-eglfs
 endif
@@ -125,6 +129,8 @@  define QT5BASE_CONFIGURE_CMDS
 	$(call QT5BASE_CONFIG_SET,CROSS_COMPILE,$(TARGET_CROSS))
 	$(call QT5BASE_CONFIG_SET,COMPILER_CFLAGS,$(TARGET_CFLAGS))
 	$(call QT5BASE_CONFIG_SET,COMPILER_CXXFLAGS,$(TARGET_CXXFLAGS))
+	$(call QT5BASE_CONFIG_SET,EGLFS_PLATFORM_HOOKS_SOURCES, \
+		$(QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES))
 	(cd $(@D); \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
 		PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \