[meta-freescale] [PATCH 3/5] qtbase: Reimplement i.MX configuration changes with patches

Tom Hochstein tom.hochstein at nxp.com
Tue Jan 10 15:39:24 PST 2017


Changing source should be done during the patch phase, not
the configure stage.

Signed-off-by: Tom Hochstein <tom.hochstein at nxp.com>
---
 .../qt5/qtbase/0014-Add-IMX-GPU-support.patch      | 13 ++++++++++
 .../qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch     | 13 ++++++++++
 .../qt5-layer/recipes-qt/qt5/qtbase_%.bbappend     | 29 +++++-----------------
 3 files changed, 32 insertions(+), 23 deletions(-)
 create mode 100644 dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0014-Add-IMX-GPU-support.patch
 create mode 100644 dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch

diff --git a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0014-Add-IMX-GPU-support.patch b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0014-Add-IMX-GPU-support.patch
new file mode 100644
index 0000000..beeb92c
--- /dev/null
+++ b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0014-Add-IMX-GPU-support.patch
@@ -0,0 +1,13 @@
+Index: git/mkspecs/linux-oe-g++/qmake.conf
+===================================================================
+--- git.orig/mkspecs/linux-oe-g++/qmake.conf	2016-12-14 16:51:48.468955533 -0600
++++ git/mkspecs/linux-oe-g++/qmake.conf	2016-12-14 17:03:17.000000000 -0600
+@@ -39,4 +39,8 @@
+ 
+ include(../oe-device-extra.pri)
+ 
++QMAKE_LIBS_EGL        += -lEGL
++QMAKE_LIBS_OPENGL_ES2 += -lEGL -lGLESv2
++QMAKE_LIBS_OPENVG     += -lEGL -lOpenVG
++
+ load(qt_config)
diff --git a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch
new file mode 100644
index 0000000..794fa62
--- /dev/null
+++ b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch
@@ -0,0 +1,13 @@
+Index: git/mkspecs/linux-oe-g++/qmake.conf
+===================================================================
+--- git.orig/mkspecs/linux-oe-g++/qmake.conf	2016-12-14 17:03:17.000000000 -0600
++++ git/mkspecs/linux-oe-g++/qmake.conf	2016-12-14 17:06:23.000000000 -0600
+@@ -39,6 +39,8 @@
+ 
+ include(../oe-device-extra.pri)
+ 
++EGLFS_DEVICE_INTEGRATION = eglfs_viv
++
+ QMAKE_LIBS_EGL        += -lEGL
+ QMAKE_LIBS_OPENGL_ES2 += -lEGL -lGLESv2
+ QMAKE_LIBS_OPENVG     += -lEGL -lOpenVG
diff --git a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
index 19dd991..0374871 100644
--- a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
+++ b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
@@ -1,10 +1,13 @@
 # Copyright (C) 2013 Eric Bénard - Eukréa Electromatique
 # Copyright (C) 2016 O.S. Systems Software LTDA.
+# Copyright (C) 2016 Freescale Semiconductor
 
-HAS_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 1, 0, d)}"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-IMXGPU_imxgpu3d = "3d"
-IMXGPU_imxgpu2d = "2d"
+SRC_URI_append_imxgpu2d = "file://0014-Add-IMX-GPU-support.patch"
+SRC_URI_append_imxgpu3d = " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://0015-Add-eglfs-to-IMX-GPU.patch', d)} \
+"
 
 PACKAGECONFIG_GL_imxpxp   = "gles2"
 PACKAGECONFIG_GL_imxgpu3d = "gles2"
@@ -15,23 +18,3 @@ QT_CONFIG_FLAGS_APPEND_imxpxp = "${@base_contains('DISTRO_FEATURES', 'x11', ' -n
 QT_CONFIG_FLAGS_APPEND_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -no-opengl -linuxfb -no-eglfs', d)}"
 QT_CONFIG_FLAGS_APPEND_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
 QT_CONFIG_FLAGS_append = " ${QT_CONFIG_FLAGS_APPEND}"
-
-do_configure_prepend_mx6() {
-    # adapt qmake.conf to our needs
-    sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
-    if test ${HAS_X11} -eq 0; then
-        if [ "${IMXGPU}" = "3d" ]; then
-            cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-EGLFS_DEVICE_INTEGRATION = eglfs_viv
-EOF
-        fi
-    fi
-    cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
-QMAKE_LIBS_EGL         += -lEGL
-QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL
-QMAKE_LIBS_OPENVG      += -lOpenVG -lEGL
-
-load(qt_config)
-
-EOF
-}
-- 
1.9.1



More information about the meta-freescale mailing list