From 89bc0ad2d10f2c866a111965cd3805b70a9fd728 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Tue, 19 Sep 2017 16:12:51 +0200
Subject: [PATCH] Fix system-harfbuzz and system-png detection

Import gui-private to check for system-png and system-harfbuzz.

Change-Id: I26fe98ce3de1f6af8015228260e8ef74952e816e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
 configure.json            | 5 +++--
 src/core/config/linux.pri | 9 ++-------
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/configure.json b/configure.json
index c89012352..3210c60fb 100644
--- a/configure.json
+++ b/configure.json
@@ -1,6 +1,7 @@
 {
     "module": "webengine",
     "depends": [
+        "gui-private",
         "printsupport"
     ],
 
@@ -290,7 +291,7 @@
         },
         "webengine-system-harfbuzz": {
             "label": "harfbuzz",
-            "condition": "libs.harfbuzz",
+            "condition": "config.unix && features.system-harfbuzz && libs.harfbuzz",
             "output": [ "privateFeature" ]
         },
         "system-glib" : {
@@ -325,7 +326,7 @@
         },
         "webengine-system-png" : {
             "label": "png",
-            "condition": "config.unix && libs.png",
+            "condition": "config.unix && features.system-png && libs.png",
             "output": [ "privateFeature" ]
         },
         "python2": {
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
index fae157060..a2361b02f 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
@@ -116,15 +116,10 @@ host_build {
     }
 
     qtConfig(system-zlib): qtConfig(system-minizip): gn_args += use_system_zlib=true use_system_minizip=true
-
-    # FIXME: make system-png a public feature in gui
-    qtConfig(system-png): qtConfig(webengine-system-png): gn_args += use_system_libpng=true
-
+    qtConfig(webengine-system-png): gn_args += use_system_libpng=true
     qtConfig(system-jpeg): gn_args += use_system_libjpeg=true
     qtConfig(system-freetype): gn_args += use_system_freetype=true
-
-    # FIXME: make system-harfbuzz a public feautre in gui
-    qtConfig(system-harfbuzz): qtConfig(webengine-system-harfbuzz): gn_args += use_system_harfbuzz=true
+    qtConfig(webengine-system-harfbuzz): gn_args += use_system_harfbuzz=true
     qtConfig(system-glib): gn_args += use_glib=false
     qtConfig(pulseaudio) {
         gn_args += use_pulseaudio=true
-- 
GitLab