diff options
| -rw-r--r-- | recipes-qt/qt5/qtbase/0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch | 98 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase_git.bb | 1 |
2 files changed, 99 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch b/recipes-qt/qt5/qtbase/0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch new file mode 100644 index 00000000..3c0b9e61 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | From d623d2c2ed49c4dc57fb0dde1faab20976dfc3dc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Julien Gueytat <contact@jgueytat.fr> | ||
| 3 | Date: Wed, 27 Apr 2016 19:24:39 +0200 | ||
| 4 | Subject: [PATCH] Reorder EGL libraries from pkgconfig and defaults: | ||
| 5 | |||
| 6 | https://bugreports.qt.io/browse/QTBUG-50838 | ||
| 7 | https://bugreports.qt.io/browse/QTBUG-52739 | ||
| 8 | |||
| 9 | The modification is the less intrusive possible. It only swaps LIBS and QMAKE_LIBS_EGL. | ||
| 10 | The reason behind that was that for the RaspberryPi: | ||
| 11 | * -lEGL -GLESv2 can link | ||
| 12 | * -lGLESv2 -lEGL can't | ||
| 13 | |||
| 14 | Adding -lEGL -lGLESv2 and then -lEGL gives -lGLESv2 -lEGL ... the libraries swaped. | ||
| 15 | |||
| 16 | Signed-off-by: Julien Gueytat <contact@jgueytat.fr> | ||
| 17 | --- | ||
| 18 | config.tests/qpa/egl/egl.pro | 5 ++++- | ||
| 19 | config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 12 +++++++----- | ||
| 20 | configure | 16 ++++++++++++++-- | ||
| 21 | 3 files changed, 25 insertions(+), 8 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/config.tests/qpa/egl/egl.pro b/config.tests/qpa/egl/egl.pro | ||
| 24 | index b5396da..828b674 100644 | ||
| 25 | --- a/config.tests/qpa/egl/egl.pro | ||
| 26 | +++ b/config.tests/qpa/egl/egl.pro | ||
| 27 | @@ -5,6 +5,9 @@ for(p, QMAKE_LIBDIR_EGL) { | ||
| 28 | } | ||
| 29 | |||
| 30 | !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL | ||
| 31 | -!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL | ||
| 32 | + | ||
| 33 | +BACKUP_LIBS = $$LIBS | ||
| 34 | +!isEmpty(QMAKE_LIBS_EGL): LIBS = $$QMAKE_LIBS_EGL | ||
| 35 | +LIBS += $$BACKUP_LIBS | ||
| 36 | |||
| 37 | CONFIG -= qt | ||
| 38 | diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | ||
| 39 | index d8b1c3e..06f7241 100644 | ||
| 40 | --- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | ||
| 41 | +++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | ||
| 42 | @@ -1,11 +1,13 @@ | ||
| 43 | SOURCES = eglfs-brcm.cpp | ||
| 44 | |||
| 45 | -CONFIG -= qt | ||
| 46 | - | ||
| 47 | -INCLUDEPATH += $$QMAKE_INCDIR_EGL | ||
| 48 | - | ||
| 49 | for(p, QMAKE_LIBDIR_EGL) { | ||
| 50 | LIBS += -L$$p | ||
| 51 | } | ||
| 52 | |||
| 53 | -LIBS += -lEGL -lGLESv2 -lbcm_host | ||
| 54 | +INCLUDEPATH += $$QMAKE_INCDIR_EGL | ||
| 55 | + | ||
| 56 | +BACKUP_LIBS = $$LIBS | ||
| 57 | +LIBS = -lEGL -lGLESv2 -lbcm_host | ||
| 58 | +LIBS += $$BACKUP_LIBS | ||
| 59 | + | ||
| 60 | +CONFIG -= qt | ||
| 61 | diff --git a/configure b/configure | ||
| 62 | index 2e99d39..072838b 100755 | ||
| 63 | --- a/configure | ||
| 64 | +++ b/configure | ||
| 65 | @@ -5803,7 +5803,9 @@ if [ "$CFG_EGL" != "no" ]; then | ||
| 66 | QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL" | ||
| 67 | QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" | ||
| 68 | QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`" | ||
| 69 | - fi # detect EGL support | ||
| 70 | + fi | ||
| 71 | + | ||
| 72 | + # detect EGL support | ||
| 73 | if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then | ||
| 74 | CFG_EGL=yes | ||
| 75 | if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then | ||
| 76 | @@ -5826,8 +5828,18 @@ fi | ||
| 77 | if [ "$CFG_EGLFS" != "no" ]; then | ||
| 78 | if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then | ||
| 79 | CFG_EGLFS="$CFG_EGL" | ||
| 80 | + | ||
| 81 | + if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then | ||
| 82 | + QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'` | ||
| 83 | + QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null` | ||
| 84 | + QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null` | ||
| 85 | + QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL" | ||
| 86 | + QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" | ||
| 87 | + QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`" | ||
| 88 | + fi | ||
| 89 | + | ||
| 90 | # Detect eglfs backends. | ||
| 91 | - if compileTest qpa/eglfs-brcm "eglfs-brcm"; then | ||
| 92 | + if compileTest qpa/eglfs-brcm "eglfs-brcm" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then | ||
| 93 | CFG_EGLFS_BRCM=yes | ||
| 94 | else | ||
| 95 | CFG_EGLFS_BRCM=no | ||
| 96 | -- | ||
| 97 | 1.9.1 | ||
| 98 | |||
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index 766424e9..ee926f8f 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb | |||
| @@ -20,6 +20,7 @@ SRC_URI += "\ | |||
| 20 | file://0006-QOpenGLPaintDevice-sub-area-support.patch \ | 20 | file://0006-QOpenGLPaintDevice-sub-area-support.patch \ |
| 21 | file://0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \ | 21 | file://0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \ |
| 22 | file://0008-configure-paths-for-target-qmake-properly.patch \ | 22 | file://0008-configure-paths-for-target-qmake-properly.patch \ |
| 23 | file://0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch \ | ||
| 23 | " | 24 | " |
| 24 | 25 | ||
| 25 | DEPENDS += "qtbase-native" | 26 | DEPENDS += "qtbase-native" |
