Fixes for the OpenGL detection needed by changes in Qt v5.8.0
authorDmitry Shachnev <mitya57@gmail.com>
Sat, 22 Jul 2017 07:11:07 +0000 (10:11 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Tue, 22 Aug 2017 11:41:04 +0000 (12:41 +0100)
Origin: upstream, changeset bf6caed84fd3 (from 5.8.2 release)
Patch-Name: opengl_detection.diff

Gbp-Pq: Name opengl_detection.diff

configure.py

index 474aafce59fa896cb0d3ed4044a8b0203e672926..c84c58a847ba14c1b5c3a5153ebc47488db40bba 100644 (file)
@@ -618,7 +618,7 @@ class TargetConfiguration:
 
         out_file = 'qtdetail.out'
 
-        source = '''#include <QCoreApplication>
+        source = '''#include <QGuiApplication>
 #include <QFile>
 #include <QLibraryInfo>
 #include <QTextStream>
@@ -676,7 +676,7 @@ int main(int argc, char **argv)
 #if defined(QT_NO_OPENGL)
     out << "PyQt_OpenGL\\n";
     out << "PyQt_Desktop_OpenGL\\n";
-#elif defined(QT_OPENGL_ES_2)
+#elif defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_ES_3)
     out << "PyQt_Desktop_OpenGL\\n";
 #endif
 
@@ -696,7 +696,7 @@ int main(int argc, char **argv)
 }
 ''' % out_file
 
-        cmd = compile_qt_program(self, verbose, 'qtdetail', source, 'QtCore',
+        cmd = compile_qt_program(self, verbose, 'qtdetail', source, 'QtGui',
                 debug=debug)
 
         if cmd is None: