view src/qtimageformats-1.patch @ 5099:9d35f8eb1e76

qt5: update to 5.13.0 * src/qttools.mk, src/qtbase.mk, src/qtsvg.mk src/qtimageformats.mk: update checksum, version * src/qtbase-1-fixes.patch, src/qtimageformats-1.patch, src/qttools-1.patch: update patch
author John Donoghue
date Fri, 21 Jun 2019 14:28:30 -0400
parents 22937c7fe60d
children f0fb4aebfcd0
line wrap: on
line source

This file is part of MXE. See LICENSE.md for licensing information.
From b3504d8f2ce90aeaf3c84ffb6716ee14d173de17 Mon Sep 17 00:00:00 2001
From: Joerg Bornemann <joerg.bornemann@qt.io>
Date: Tue, 7 May 2019 11:30:05 +0200
Subject: [PATCH 1/2] Fix feature and library checks for tiff and mng

This amends commit a33e3aea.

Change-Id: I03304f5bf300e5e52476c3f3d6b06b0815009720
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 626c3053efd7905080ac4a65fca55551391a36e3)

diff --git a/src/plugins/imageformats/mng/mng.pro b/src/plugins/imageformats/mng/mng.pro
index 4641110..f509fa8 100644
--- a/src/plugins/imageformats/mng/mng.pro
+++ b/src/plugins/imageformats/mng/mng.pro
@@ -5,8 +5,10 @@ SOURCES += main.cpp \
            qmnghandler.cpp
 OTHER_FILES += mng.json
 
-msvc: LIBS += libmng.lib
-else: LIBS += -lmng
+include($$OUT_PWD/../../../imageformats/qtimageformats-config.pri)
+QT_FOR_CONFIG += imageformats-private
+
+QMAKE_USE_PRIVATE += mng
 
 PLUGIN_TYPE = imageformats
 PLUGIN_CLASS_NAME = QMngPlugin
diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro
index 04cfbdb..0c42749 100644
--- a/src/plugins/imageformats/tiff/tiff.pro
+++ b/src/plugins/imageformats/tiff/tiff.pro
@@ -4,9 +4,11 @@ HEADERS += qtiffhandler_p.h
 SOURCES += main.cpp qtiffhandler.cpp
 OTHER_FILES += tiff.json
 
-config_libtiff {
-    unix|mingw: LIBS += -ltiff
-    else:win32: LIBS += libtiff.lib
+include($$OUT_PWD/../../../imageformats/qtimageformats-config.pri)
+QT_FOR_CONFIG += imageformats-private
+
+qtConfig(system-tiff) {
+    QMAKE_USE_PRIVATE += tiff
 } else {
     include($$PWD/../../../3rdparty/libtiff.pri)
 }
-- 
2.20.1


From 9daaac5a219fb55628f0542e905d7157c2c68296 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 17 Jun 2019 13:54:23 +0200
Subject: [PATCH 2/2] use pkgconfig


diff --git a/src/imageformats/configure.json b/src/imageformats/configure.json
index 03d59d3..0cd3715 100644
--- a/src/imageformats/configure.json
+++ b/src/imageformats/configure.json
@@ -51,9 +51,6 @@
                         "stdio.h",
                         "libmng.h"
                     ],
-                    "qmake": [
-                        "LIBS += -lmng"
-                    ],
                     "main": [
                         "mng_handle hMNG;",
                         "mng_cleanup(&hMNG);",
@@ -67,6 +64,7 @@
                 }
             },
             "sources": [
+                { "type": "pkgConfig", "args": "libmng" },
                 "-lmng"
             ]
         },
@@ -77,10 +75,6 @@
                 "type": "compile",
                 "test": {
                     "include": "tiffio.h",
-                    "qmake": [
-                        "unix|mingw: LIBS += -ltiff",
-                        "else:win32: LIBS += libtiff.lib"
-                    ],
                     "main": [
                         "#if !defined(TIFF_VERSION) && defined(TIFF_VERSION_CLASSIC)",
                         "// libtiff 4.0 splits it into TIFF_VERSION_CLASSIC and TIFF_VERSION_BIG",
@@ -105,6 +99,7 @@
                 }
             },
             "sources": [
+                { "type": "pkgConfig", "args": "libtiff-4" },
                 "-ltiff"
             ]
         },
@@ -119,9 +114,6 @@
                         "webp/encode.h",
                         "webp/demux.h"
                     ],
-                    "qmake": [
-                        "LIBS += -lwebp -lwebpdemux"
-                    ],
                     "main": [
                         "#if WEBP_ABI_IS_INCOMPATIBLE(WEBP_DECODER_ABI_VERSION, 0x0203) || WEBP_ABI_IS_INCOMPATIBLE(WEBP_ENCODER_ABI_VERSION, 0x0202)",
                         "#error \"Incompatible libwebp version\"",
@@ -144,6 +136,7 @@
                 }
             },
             "sources": [
+                { "type": "pkgConfig", "args": "libwebp libwebpdemux" },
                 "-lwebp -lwebpdemux"
             ]
         }
-- 
2.20.1