Skip to contentSkip to conversation

qt-mobility: fix build in the absence of opengl

PATCH Superseded Ciprian Ciubotariu 2 participants 4 messages Mar 12, 2012 – Mar 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qt-mobility: fix build in the absence of opengl

QMake pro files don't explicitly define QT_NO_OPENGL if the configuration lacks opengl, but example code relies on this define.

---
 .../qt4/files/qt-mobility-no-opengl.patch          |   36 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc          |    3 +-
 2 files changed, 38 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch
meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch new file +36 -0
new file mode 100644
index 0000000..aa15683
@@ -0,0 +1,36 @@
+diff --git a/examples/declarative-camera/declarative-camera.pro b/examples/declarative-camera/declarative-camera.pro
+index 8164fbc..54fd8ad 100644
+--- a/examples/declarative-camera/declarative-camera.pro
++++ b/examples/declarative-camera/declarative-camera.pro
+@@ -5,10 +5,10 @@ TEMPLATE=app
+ 
+ QT += declarative network
+ 
+-!maemo5 {
+-    contains(QT_CONFIG, opengl) {
+-        QT += opengl
+-    }
++contains(QT_CONFIG, opengl): !maemo5 {
++   QT += opengl
++} else {
++   DEFINES += QT_NO_OPENGL
+ }
+ 
+ win32 {
+diff --git a/examples/videographicsitem/videographicsitem.pro b/examples/videographicsitem/videographicsitem.pro
+index 8461beb..eedee2f 100644
+--- a/examples/videographicsitem/videographicsitem.pro
++++ b/examples/videographicsitem/videographicsitem.pro
+@@ -9,7 +9,11 @@ MOBILITY = multimedia
+ 
+ QMAKE_RPATHDIR += $$DESTDIR
+ 
+-!symbian:contains(QT_CONFIG, opengl): QT += opengl
++contains(QT_CONFIG, opengl): !symbian {
++   QT += opengl
++} else {
++   DEFINES += QT_NO_OPENGL
++}
+ 
+ HEADERS   += videoplayer.h \
+              videoitem.h
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +2 -1
index 593cbd6..fe9c812 100644
@@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
 
 SRC_URI = "http://get.qt.nokia.com/qt/add-ons/qt-mobility-opensource-src-${PV}.tar.gz \
            file://qt-mobility-configure.patch \
-           file://0001-gstvideoconnector-fixed-buffers-allocation.patch"
+           file://0001-gstvideoconnector-fixed-buffers-allocation.patch \
+           file://qt-mobility-no-opengl.patch"
 
 SRC_URI[md5sum]="ea5db5a8d3dd4709c2926dceda646bd8"
 SRC_URI[sha256sum]="ee3c88975e04139ac9589f76d4be646d44fcbc4c8c1cf2db621abc154cf0ba44"
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 14 lines · Ciprian Ciubotariu

QMake pro files don't explicitly define QT_NO_OPENGL if the configuration lacks opengl, but example code relies on this define.

---
  .../qt4/files/qt-mobility-no-opengl.patch          |   36 ++++++++++++++++++++
  meta/recipes-qt/qt4/qt-mobility_1.2.0.inc          |    3 +-
  2 files changed, 38 insertions(+), 1 deletions(-)

create mode 100644 meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch

meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch new file +0 -0
new file mode 100644
index 0000000..aa15683

meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch line 4

Quoted 4 lines
meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch new file +4 -0
@@ -0,0 +1,36 @@
+diff --git a/examples/declarative-camera/declarative-camera.pro b/examples/declarative-camera/declarative-camera.pro
+index 8164fbc..54fd8ad 100644
+--- a/examples/declarative-camera/declarative-camera.pro
++++ b/examples/declarative-camera/declarative-camera.pro

This patch needs an Upstream-Status Tag and a Signed-off-by.

Might also help to have an explaintion here.

Quoted 37 lines
meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch new file +32 -0
+@@ -5,10 +5,10 @@ TEMPLATE=app
+
+ QT += declarative network
+
+-!maemo5 {
+-    contains(QT_CONFIG, opengl) {
+-        QT += opengl
+-    }
++contains(QT_CONFIG, opengl): !maemo5 {
++   QT += opengl
++} else {
++   DEFINES += QT_NO_OPENGL
+ }
+
+ win32 {
+diff --git a/examples/videographicsitem/videographicsitem.pro b/examples/videographicsitem/videographicsitem.pro
+index 8461beb..eedee2f 100644
+--- a/examples/videographicsitem/videographicsitem.pro
++++ b/examples/videographicsitem/videographicsitem.pro
+@@ -9,7 +9,11 @@ MOBILITY = multimedia
+
+ QMAKE_RPATHDIR += $$DESTDIR
+
+-!symbian:contains(QT_CONFIG, opengl): QT += opengl
++contains(QT_CONFIG, opengl): !symbian {
++   QT += opengl
++} else {
++   DEFINES += QT_NO_OPENGL
++}
+
+ HEADERS   += videoplayer.h \
+              videoitem.h
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +0 -0
index 593cbd6..fe9c812 100644

meta/recipes-qt/qt4/qt-mobility_1.2.0.inc LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \ · line 14

Quoted 9 lines
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +2 -1
@@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
 
  SRC_URI = "http://get.qt.nokia.com/qt/add-ons/qt-mobility-opensource-src-${PV}.tar.gz \
             file://qt-mobility-configure.patch \
-           file://0001-gstvideoconnector-fixed-buffers-allocation.patch"
+           file://0001-gstvideoconnector-fixed-buffers-allocation.patch \
+           file://qt-mobility-no-opengl.patch"
 
  SRC_URI[md5sum]="ea5db5a8d3dd4709c2926dceda646bd8"
  SRC_URI[sha256sum]="ee3c88975e04139ac9589f76d4be646d44fcbc4c8c1cf2db621abc154cf0ba44"

You need a PR bump for this please

Thanks

Sau!

#2 lore raw

PATCH v2 1/1 qt-mobility: fix build in the absence of opengl

QMake pro files don't explicitly define QT_NO_OPENGL if the configuration lacks opengl, but example code relies on this define.

---
 .../qt4/files/qt-mobility-no-opengl.patch          |   36 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc          |    5 ++-
 2 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch
meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch new file +36 -0
new file mode 100644
index 0000000..aa15683
@@ -0,0 +1,36 @@
+diff --git a/examples/declarative-camera/declarative-camera.pro b/examples/declarative-camera/declarative-camera.pro
+index 8164fbc..54fd8ad 100644
+--- a/examples/declarative-camera/declarative-camera.pro
++++ b/examples/declarative-camera/declarative-camera.pro
+@@ -5,10 +5,10 @@ TEMPLATE=app
+ 
+ QT += declarative network
+ 
+-!maemo5 {
+-    contains(QT_CONFIG, opengl) {
+-        QT += opengl
+-    }
++contains(QT_CONFIG, opengl): !maemo5 {
++   QT += opengl
++} else {
++   DEFINES += QT_NO_OPENGL
+ }
+ 
+ win32 {
+diff --git a/examples/videographicsitem/videographicsitem.pro b/examples/videographicsitem/videographicsitem.pro
+index 8461beb..eedee2f 100644
+--- a/examples/videographicsitem/videographicsitem.pro
++++ b/examples/videographicsitem/videographicsitem.pro
+@@ -9,7 +9,11 @@ MOBILITY = multimedia
+ 
+ QMAKE_RPATHDIR += $$DESTDIR
+ 
+-!symbian:contains(QT_CONFIG, opengl): QT += opengl
++contains(QT_CONFIG, opengl): !symbian {
++   QT += opengl
++} else {
++   DEFINES += QT_NO_OPENGL
++}
+ 
+ HEADERS   += videoplayer.h \
+              videoitem.h
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +3 -2
index 593cbd6..2ac2253 100644
@@ -7,12 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
 
 SRC_URI = "http://get.qt.nokia.com/qt/add-ons/qt-mobility-opensource-src-${PV}.tar.gz \
            file://qt-mobility-configure.patch \
-           file://0001-gstvideoconnector-fixed-buffers-allocation.patch"
+           file://0001-gstvideoconnector-fixed-buffers-allocation.patch \
+           file://qt-mobility-no-opengl.patch"
 
 SRC_URI[md5sum]="ea5db5a8d3dd4709c2926dceda646bd8"
 SRC_URI[sha256sum]="ee3c88975e04139ac9589f76d4be646d44fcbc4c8c1cf2db621abc154cf0ba44"
 
-PR = "r2"
+PR = "r3"
 
 S = "${WORKDIR}/qt-mobility-opensource-src-${PV}"
 
Signature · 1 line
1.7.3.4
Applied
#3 lore raw
Quoted 60 lines · Ciprian Ciubotariu

QMake pro files don't explicitly define QT_NO_OPENGL if the configuration lacks opengl, but example code relies on this define.

---
  .../qt4/files/qt-mobility-no-opengl.patch          |   36 ++++++++++++++++++++
  meta/recipes-qt/qt4/qt-mobility_1.2.0.inc          |    5 ++-
  2 files changed, 39 insertions(+), 2 deletions(-)

create mode 100644 meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch

meta/recipes-qt/qt4/files/qt-mobility-no-opengl.patch new file +36 -0
new file mode 100644
index 0000000..aa15683
@@ -0,0 +1,36 @@
+diff --git a/examples/declarative-camera/declarative-camera.pro b/examples/declarative-camera/declarative-camera.pro
+index 8164fbc..54fd8ad 100644
+--- a/examples/declarative-camera/declarative-camera.pro
++++ b/examples/declarative-camera/declarative-camera.pro
+@@ -5,10 +5,10 @@ TEMPLATE=app
+
+ QT += declarative network
+
+-!maemo5 {
+-    contains(QT_CONFIG, opengl) {
+-        QT += opengl
+-    }
++contains(QT_CONFIG, opengl): !maemo5 {
++   QT += opengl
++} else {
++   DEFINES += QT_NO_OPENGL
+ }
+
+ win32 {
+diff --git a/examples/videographicsitem/videographicsitem.pro b/examples/videographicsitem/videographicsitem.pro
+index 8461beb..eedee2f 100644
+--- a/examples/videographicsitem/videographicsitem.pro
++++ b/examples/videographicsitem/videographicsitem.pro
+@@ -9,7 +9,11 @@ MOBILITY = multimedia
+
+ QMAKE_RPATHDIR += $$DESTDIR
+
+-!symbian:contains(QT_CONFIG, opengl): QT += opengl
++contains(QT_CONFIG, opengl): !symbian {
++   QT += opengl
++} else {
++   DEFINES += QT_NO_OPENGL
++}
+
+ HEADERS   += videoplayer.h \
+              videoitem.h
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +1 -1
index 593cbd6..2ac2253 100644
@@ -7,12 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
 
  SRC_URI = "http://get.qt.nokia.com/qt/add-ons/qt-mobility-opensource-src-${PV}.tar.gz \
             file://qt-mobility-configure.patch \
-           file://0001-gstvideoconnector-fixed-buffers-allocation.patch"
+           file://0001-gstvideoconnector-fixed-buffers-allocation.patch \

meta/recipes-qt/qt4/qt-mobility_1.2.0.inc LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \ · line 19

Quoted 10 lines
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +2 -1
+           file://qt-mobility-no-opengl.patch"
 
  SRC_URI[md5sum]="ea5db5a8d3dd4709c2926dceda646bd8"
  SRC_URI[sha256sum]="ee3c88975e04139ac9589f76d4be646d44fcbc4c8c1cf2db621abc154cf0ba44"
 
-PR = "r2"
+PR = "r3"
 
  S = "${WORKDIR}/qt-mobility-opensource-src-${PV}"
 

Merged into OE-Core

Thanks
Sau!