Kevin Kofler 973f90
From: Fabian Vogt <fabian@ritter-vogt.de>
Kevin Kofler 973f90
Subject: Fix build with ICU >= 59
Kevin Kofler 973f90
Kevin Kofler 973f90
ICU >= 59 requires C++11 for its header files.
Kevin Kofler 973f90
Qt can't be compiled with -std=c++11 as a whole, so only enable
Kevin Kofler 973f90
it for qlocale_icu.cpp.
Kevin Kofler 973f90
Kevin Kofler 973f90
Index: qt-everywhere-opensource-src-4.8.7/src/corelib/tools/tools.pri
Kevin Kofler 973f90
===================================================================
Kevin Kofler 973f90
--- qt-everywhere-opensource-src-4.8.7.orig/src/corelib/tools/tools.pri
Kevin Kofler 973f90
+++ qt-everywhere-opensource-src-4.8.7/src/corelib/tools/tools.pri
Kevin Kofler 973f90
@@ -102,7 +102,15 @@ contains(QT_CONFIG, zlib):include($$PWD/
Kevin Kofler 973f90
 else:include($$PWD/../../3rdparty/zlib_dependency.pri)
Kevin Kofler 973f90
 
Kevin Kofler 973f90
 contains(QT_CONFIG,icu) {
Kevin Kofler 973f90
-    SOURCES += tools/qlocale_icu.cpp
Kevin Kofler 973f90
+    cpp11.name = cpp11
Kevin Kofler 973f90
+    cpp11.input = SOURCES_CPP11
Kevin Kofler 973f90
+    cpp11.dependency_type = TYPE_C
Kevin Kofler 973f90
+    cpp11.variable_out = OBJECTS
Kevin Kofler 973f90
+    cpp11.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_IN_BASE}$${first(QMAKE_EXT_OBJ)}
Kevin Kofler 973f90
+    cpp11.commands = $${QMAKE_CXX} $(CXXFLAGS) -std=c++11 $(INCPATH) -c ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
Kevin Kofler 973f90
+    QMAKE_EXTRA_COMPILERS += cpp11
Kevin Kofler 973f90
+
Kevin Kofler 973f90
+    SOURCES_CPP11 += tools/qlocale_icu.cpp
Kevin Kofler 973f90
     DEFINES += QT_USE_ICU
Kevin Kofler 973f90
 }
Kevin Kofler 973f90