Skip to contentSkip to conversation

qt5base: fix build when egl headers need a definition

PATCH Superseded Fatih Aşıcı 1 participant 1 message Sep 18, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 qt5base: fix build when egl headers need a definition

The build with gpu-viv-bin-mx6q libraries was broken since it wasn't using "-DEGL_API_FB=1" flag which is found in egl.pc.

---
Changes v1 -> v2:
- Add description and Signed-off-by line to the patch (suggested by Thomas Petazzoni)

 package/qt5/qt5base/qt5base-egl-cflags.patch |   28 
++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/qt5/qt5base/qt5base-egl-cflags.patch
(quoted diff) +0 -0

b/package/qt5/qt5base/qt5base-egl-cflags.patch
new file mode 100644
index 0000000..a483997

package/qt5/qt5base/qt5base-egl-cflags.patch new file +28 -0
@@ -0,0 +1,28 @@
+egl.prf: Append egl CFLAGS to QMAKE_C[XX]FLAGS
+
+Projects including egl in their config (e.g. with CONFIG += egl) cannot get
+egl CFLAGS without this.
+
+Signed-off-by: Fatih A??c? <[email protected]>
+
+--- a/configure
++++ b/configure
+@@ -5391,6 +5391,7 @@
+         QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
+         QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
+         QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
++        QMakeVar set QMAKE_CFLAGS_EGL "$QMAKE_CFLAGS_EGL"
+     fi       # detect EGL support
+     if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
+         CFG_EGL=yes
+--- a/mkspecs/features/egl.prf
++++ b/mkspecs/features/egl.prf
+@@ -14,6 +14,8 @@
+ } else {
+     INCLUDEPATH += $$QMAKE_INCDIR_EGL
+     LIBS_PRIVATE += $$QMAKE_LIBS_EGL
++    QMAKE_CFLAGS += $$QMAKE_CFLAGS_EGL
++    QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_EGL
+     LIBS += $$QMAKE_LFLAGS_EGL
+     for(p, QMAKE_LIBDIR_EGL) {
+         exists($$p):LIBS_PRIVATE += -L$$p
Signature · 1 line
1.7.10.4