 -} else {
 -        SUBDIRS *= codecs
 -}
+-!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats iconengines
 +# SUBDIRS	*= sqldrivers
 +# unix:!symbian {
 +#        contains(QT_CONFIG,iconv)|contains(QT_CONFIG,gnu-libiconv)|contains(QT_CONFIG,sun-libiconv):SUBDIRS *= codecs
 +# } else {
 +#         SUBDIRS *= codecs
 +# }
- !contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats iconengines
++!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats
  !embedded:!qpa:!contains(QT_CONFIG, no-gui):SUBDIRS *= graphicssystems
  embedded:SUBDIRS *=  gfxdrivers decorations mousedrivers kbddrivers
 -!win32:!embedded:!mac:!symbian:!contains(QT_CONFIG, no-gui):SUBDIRS *= inputmethods

diff -burN qt-everywhere-opensource-src-4.8.7.orig/src/plugins/graphicssystems/graphicssystems.pro qt-everywhere-opensource-src-4.8.7/src/plugins/graphicssystems/graphicssystems.pro
--- qt-everywhere-opensource-src-4.8.7.orig/src/plugins/graphicssystems/graphicssystems.pro	2017-08-17 11:59:00.122963214 +0200
+++ qt-everywhere-opensource-src-4.8.7/src/plugins/graphicssystems/graphicssystems.pro	2017-08-17 12:00:04.699387068 +0200
@@ -1,5 +1,4 @@
 TEMPLATE = subdirs
-SUBDIRS += trace
 !wince*:contains(QT_CONFIG, opengl):SUBDIRS += opengl
 contains(QT_CONFIG, openvg):contains(QT_CONFIG, egl) {
     SUBDIRS += openvg
diff -burN qt-everywhere-opensource-src-4.8.7.orig/src/plugins/plugins.pro qt-everywhere-opensource-src-4.8.7/src/plugins/plugins.pro
--- qt-everywhere-opensource-src-4.8.7.orig/src/plugins/plugins.pro	2017-08-17 11:59:00.138963317 +0200
+++ qt-everywhere-opensource-src-4.8.7/src/plugins/plugins.pro	2017-08-17 12:02:45.716444268 +0200
@@ -1,16 +1,16 @@
 TEMPLATE = subdirs
 

 nacl: SRC_SUBDIRS -= src_network src_testlib
 !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus
 !contains(QT_CONFIG, no-gui): SRC_SUBDIRS += src_gui
