From c532857cb5565a1746c05a97ba4a52b95d9eb466 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Wed, 1 Sep 2021 21:27:54 +0200 Subject: [PATCH 1/2] Remove files not needed --- CHANGELOG.md | 53 --- LICENSE.md | 19 - azure-pipelines.yml | 15 - ...5cb0b99d919d8ad17f4c6feed8236d7e6177e.diff | 92 ----- patches/138a720.diff | 67 ---- patches/3f9c9db.diff | 23 -- patches/3f9c9db_.diff | 23 -- patches/5d2026c.diff | 43 --- patches/a9cc8aa.diff | 25 -- patches/b619f2a.diff | 38 -- patches/c994a33.diff | 27 -- patches/e2eb6e9.diff | 27 -- patches/fbde9c7.diff | 48 --- qtmodules.conf | 326 ------------------ test_package/cmake/CMakeLists.txt | 26 -- .../cmake_find_package_multi/CMakeLists.txt | 25 -- 16 files changed, 877 deletions(-) delete mode 100644 CHANGELOG.md delete mode 100644 LICENSE.md delete mode 100644 azure-pipelines.yml delete mode 100644 patches/0435cb0b99d919d8ad17f4c6feed8236d7e6177e.diff delete mode 100644 patches/138a720.diff delete mode 100644 patches/3f9c9db.diff delete mode 100644 patches/3f9c9db_.diff delete mode 100644 patches/5d2026c.diff delete mode 100644 patches/a9cc8aa.diff delete mode 100644 patches/b619f2a.diff delete mode 100644 patches/c994a33.diff delete mode 100644 patches/e2eb6e9.diff delete mode 100644 patches/fbde9c7.diff delete mode 100644 qtmodules.conf delete mode 100644 test_package/cmake/CMakeLists.txt delete mode 100644 test_package/cmake_find_package_multi/CMakeLists.txt diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index ef05743..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,53 +0,0 @@ -# Changelog - -This changelog describes interface changes (options and requirements) in the conan package. For qt's changelogs, please go to https://wiki.qt.io/Template:Release_Information - -## [5.15.2](https://bintray.com/bincrafters/public-conan/qt%3Abincrafters/5.15.2%3Astable) -- upgrade to `glib/2.67.0` [2020-11-14](https://github.com/bincrafters/conan-qt/commit/b5b8f20955d93ec0835416acefdb6cb1b647b9f3) -- upgrade to `fontconfig/2.13.92` [2020-11-14](https://github.com/bincrafters/conan-qt/commit/b5b8f20955d93ec0835416acefdb6cb1b647b9f3) -- upgrade to `icu/68.1` [2020-11-14](https://github.com/bincrafters/conan-qt/commit/b5b8f20955d93ec0835416acefdb6cb1b647b9f3) -## [5.15.1](https://bintray.com/bincrafters/public-conan/qt%3Abincrafters/5.15.1%3Astable) -- upgrade to `xkbcommon/1.0.1` [2020-11-04](https://github.com/bincrafters/conan-qt/commit/52f848cd837a4fe90db0d8447215edcb6a17476b) -- upgrade to `glib/2.66.2` [2020-10-30](https://github.com/bincrafters/conan-qt/commit/982a1b9ec6e53b2d1d54880e1adcfa131b7902fd) -- upgrade to `freetype/2.10.4` [2020-10-30](https://github.com/bincrafters/conan-qt/commit/982a1b9ec6e53b2d1d54880e1adcfa131b7902fd) -- add optional dependency on `libjpeg-turbo` [2020-10-28](https://github.com/bincrafters/conan-qt/commit/d504e0907eeb20c407e893f817df4c2c3c9fa08b) -- upgrade to `harfbuzz/2.7.2` [2020-10-16](https://github.com/bincrafters/conan-qt/commit/481728f315c18fb544e34776d5ccc91a6fe79c12) -- upgrade to `expat/2.2.10` [2020-10-11](https://github.com/bincrafters/conan-qt/commit/8e142d657dfcc7b6eca91eba0831bc80d6cacf8b) -- upgrade to `openssl/1.1.1h` [2020-09-30](https://github.com/bincrafters/conan-qt/commit/a43350e71c19f1c7dec4cab41e0aa512024eee86) -- upgrade to build requirement `ninja/1.10.1` [2020-09-30](https://github.com/bincrafters/conan-qt/commit/a43350e71c19f1c7dec4cab41e0aa512024eee86) -- upgrade to `glib/2.66.0` [2020-09-23](https://github.com/bincrafters/conan-qt/commit/a8726297ac049b81b2cae2d2e17fb22e22ece582) -- linux: upgrade to build requirement `pkgconf/1.7.3` [2020-09-23](https://github.com/bincrafters/conan-qt/commit/a8726297ac049b81b2cae2d2e17fb22e22ece582) -- upgrade to `glib/2.65.1` [2020-09-03](https://github.com/bincrafters/conan-qt/commit/761813f2db4e24d098276e6724be405dcfbacb73) -## [5.15.0](https://bintray.com/bincrafters/public-conan/qt%3Abincrafters/5.15.0%3Astable) -- linux: add requirement on `xkbcommon/0.10.0` [2020-07-20](https://github.com/bincrafters/conan-qt/commit/6dadca2c03feaf0a18d8e2b5efc44db8cdf99f3f) -- upgrade to `freetype/2.10.2` [2020-07-20](https://github.com/bincrafters/conan-qt/commit/50e706f02a6654037074ce2a5a3b25e63d482c05) -- upgrade to `harfbuzz/2.6.8` [2020-07-10](https://github.com/bincrafters/conan-qt/commit/16628e59004350230eec8bb62a17b4ae59dc7d11) -- qtwebengine: only require `ninja/1.10.0` if ninja not available in PATH [2020-06-29](https://github.com/bincrafters/conan-qt/commit/d5610e837036337be1487118cdfa887dfaf2b495) -- linux: migrate x11 requirements to `xorg/system` [2020-06-23](https://github.com/bincrafters/conan-qt/commit/d504c309fe8a551b72a580157d5fe47915f8aa74) -- qtwebengine: upgrade to build requirement `ninja/1.10.0` [2020-06-13](https://github.com/bincrafters/conan-qt/commit/52490d71b8a2d6df62d01cecd7d3358536961ca7) -- migrate to `opengl/system` [2020-06-13](https://github.com/bincrafters/conan-qt/commit/52490d71b8a2d6df62d01cecd7d3358536961ca7) -- upgrade to `harfbuzz/2.6.7@bincrafters/stable` [2020-06-09](https://github.com/bincrafters/conan-qt/commit/1a3d13e2e92c81c774a194dc6457e62b4f31bb79) -- linux: make `xlib` requirement shared by default - [2020-06-08](https://github.com/bincrafters/conan-qt/commit/cb1d1e914c0191803e21da9c81ef71de0d7e52c7) -- linux: migrate to `fontconfig/2.13.91` - [2020-06-04](https://github.com/bincrafters/conan-qt/commit/2fe7f984af734fb175a9ecffa14e81ae49a22dbd) -- linux/macos: migrate to build requirement `flex/2.6.4` - [2020-05-21](https://github.com/bincrafters/conan-qt/commit/750851425c3f4217365f5a9aaa9d856e6533fdfd#diff-2b1d42f71f22b7ea0412d7602dec166f) -## [5.14.2](https://bintray.com/bincrafters/public-conan/qt%3Abincrafters/5.14.2%3Astable) -- upgrade to `openssl/1.1.1g` - [2020-05-06](https://github.com/bincrafters/conan-qt/commit/44c706a3a061f8dabe52eead5ee4d54417b4e863) -- linux/macos: upgrade to build requirement `bison/3.5.3` - [2020-04-28](https://github.com/bincrafters/conan-qt/commit/924d23fa77f54c9751c2345f2f01e939dd3dc856) -- add `with_vulkan` option - [2020-04-25](https://github.com/bincrafters/conan-qt/commit/448470871b2d9523a47937eae66621f01f161a1e) -- linux: remove `with_mesa` option and `mesa` requirement. `opengl/virtual@bincrafters/stable` is required instead - [2020-04-13](https://github.com/bincrafters/conan-qt/commit/36f7702b142244cd503e12891d8bc7ac5d37504e) -- upgrade to `openssl/1.1.1g` - [2020-04-09](https://github.com/bincrafters/conan-qt/commit/5c04b3aac2bed31c5422da93db06a07a92cb2844) -- linux/macos: migrate to build requirement `gperf/3.1` - [2020-03-16](https://github.com/bincrafters/conan-qt/commit/229f375d3c5676ab1616ea6ec5ddd75ae8679a6f) -## [5.14.1](https://bintray.com/bincrafters/public-conan/qt%3Abincrafters/5.14.1%3Astable) -- linux: add `with_mesa` option to allow disabling mesa requirement - [2020-03-11](https://github.com/bincrafters/conan-qt/commit/7c2f5bf147a609fb3ecd40549b3de30c21e63d41) -- upgrade to `harfbuzz/2.6.4@bincrafters/stable` - [2020-03-03](https://github.com/bincrafters/conan-qt/commit/39492329fb95ac2e2e1b9a9b37cfc5f74ef4f81c) -- upgrade to `sqlite/3.31.0` - [2020-03-03](https://github.com/bincrafters/conan-qt/commit/39492329fb95ac2e2e1b9a9b37cfc5f74ef4f81c) -- upgrade to `sdl2/2.0.10@bincrafters/stable` - [2020-03-03](https://github.com/bincrafters/conan-qt/commit/39492329fb95ac2e2e1b9a9b37cfc5f74ef4f81c) -- linux: upgrade to `xkbcommon/0.10.0@bincrafters/stable` - [2020-03-03](https://github.com/bincrafters/conan-qt/commit/39492329fb95ac2e2e1b9a9b37cfc5f74ef4f81c) -- upgrade to `zstd/1.4.4` - [2020-03-03](https://github.com/bincrafters/conan-qt/commit/39492329fb95ac2e2e1b9a9b37cfc5f74ef4f81c) -- upgrade to `glib/2.64.0@bincrafters/stable` - [2020-02-28](https://github.com/bincrafters/conan-qt/commit/2a4167dc1a0a008f3570c7b3ff7c48ca5c6bf30f) -- upgrade to `glib/2.63.6@bincrafters/stable` - [2020-02-26](https://github.com/bincrafters/conan-qt/commit/10c0e0622dac3b5312670c236e6bc54ac682579e) -- upgrade to `libjpeg/9d` - [2020-02-01](https://github.com/bincrafters/conan-qt/commit/a5585a998f863d57a5601b2ab620ba9f8ef06641) -- upgrade to `libfreetype/2.10.1` - [2020-01-27](https://github.com/bincrafters/conan-qt/commit/25b2d262bfbe26a6df45d6edf60e29ab180f59d8) -- linux: migrate to `opus/1.3.1` - [2020-01-22](https://github.com/bincrafters/conan-qt/commit/adff8c0c6e595102561c472f62b4d14f3a99bffc) -- windows: upgrade to build requrement `jom/1.1.3` - [2020-01-13](https://github.com/bincrafters/conan-qt/commit/84168c7db987bdd9b3deeb497f2605bf146d4b65) -- linux: remove system requirement on mesa. `mesa/19.3.1@bincrafters/stable` is required instead - [2020-01-09](https://github.com/bincrafters/conan-qt/commit/c6d8131be32e2b5fd10b509ea6ff574ed89f4b93) \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 2116ac6..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 - 2019 Bincrafters - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index b9970b0..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,15 +0,0 @@ -resources: - repositories: - - repository: templates - type: github - name: bincrafters/templates - endpoint: github - -extends: - template: .ci/azure.yml@templates - parameters: - conanLoginUsername: $(CONAN_LOGIN_USERNAME) - conanPassword: $(CONAN_PASSWORD) - enableAppleClangBuilds: true - splitByBuildTypes: "true" - requireMoreDiskSpace: "true" diff --git a/patches/0435cb0b99d919d8ad17f4c6feed8236d7e6177e.diff b/patches/0435cb0b99d919d8ad17f4c6feed8236d7e6177e.diff deleted file mode 100644 index 2861867..0000000 --- a/patches/0435cb0b99d919d8ad17f4c6feed8236d7e6177e.diff +++ /dev/null @@ -1,92 +0,0 @@ -From 0435cb0b99d919d8ad17f4c6feed8236d7e6177e Mon Sep 17 00:00:00 2001 -From: Eric Lemanissier -Date: Wed, 13 Feb 2019 21:14:56 +0100 -Subject: [PATCH] add linux-arm-gnueabihf-g++ mkspecs - -Change-Id: I2d789e5ee6cf7a9cf1a2d4f52c379992cc66cfbc ---- - mkspecs/linux-arm-gnueabihf-g++/qmake.conf | 24 +++++++++++ - .../linux-arm-gnueabihf-g++/qplatformdefs.h | 40 +++++++++++++++++++ - 2 files changed, 64 insertions(+) - create mode 100644 mkspecs/linux-arm-gnueabihf-g++/qmake.conf - create mode 100644 mkspecs/linux-arm-gnueabihf-g++/qplatformdefs.h - -diff --git a/mkspecs/linux-arm-gnueabihf-g++/qmake.conf b/mkspecs/linux-arm-gnueabihf-g++/qmake.conf -new file mode 100644 -index 0000000000..6470559eac ---- /dev/null -+++ b/mkspecs/linux-arm-gnueabihf-g++/qmake.conf -@@ -0,0 +1,24 @@ -+# -+# qmake configuration for building with arm-linux-gnueabihf-g++ -+# -+ -+MAKEFILE_GENERATOR = UNIX -+CONFIG += incremental -+QMAKE_INCREMENTAL_STYLE = sublib -+ -+include(../common/linux.conf) -+include(../common/gcc-base-unix.conf) -+include(../common/g++-unix.conf) -+ -+# modifications to g++.conf -+QMAKE_CC = arm-linux-gnueabihf-gcc -+QMAKE_CXX = arm-linux-gnueabihf-g++ -+QMAKE_LINK = arm-linux-gnueabihf-g++ -+QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++ -+ -+# modifications to linux.conf -+QMAKE_AR = arm-linux-gnueabihf-ar cqs -+QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy -+QMAKE_NM = arm-linux-gnueabihf-nm -P -+QMAKE_STRIP = arm-linux-gnueabihf-strip -+load(qt_config) -diff --git a/mkspecs/linux-arm-gnueabihf-g++/qplatformdefs.h b/mkspecs/linux-arm-gnueabihf-g++/qplatformdefs.h -new file mode 100644 -index 0000000000..f10d1bc7ea ---- /dev/null -+++ b/mkspecs/linux-arm-gnueabihf-g++/qplatformdefs.h -@@ -0,0 +1,40 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2019 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the qmake spec of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:LGPL$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** GNU Lesser General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU Lesser -+** General Public License version 3 as published by the Free Software -+** Foundation and appearing in the file LICENSE.LGPL3 included in the -+** packaging of this file. Please review the following information to -+** ensure the GNU Lesser General Public License version 3 requirements -+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -+** -+** GNU General Public License Usage -+** Alternatively, this file may be used under the terms of the GNU -+** General Public License version 2.0 or (at your option) the GNU General -+** Public license version 3 or any later version approved by the KDE Free -+** Qt Foundation. The licenses are as published by the Free Software -+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -+** included in the packaging of this file. Please review the following -+** information to ensure the GNU General Public License requirements will -+** be met: https://www.gnu.org/licenses/gpl-2.0.html and -+** https://www.gnu.org/licenses/gpl-3.0.html. -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+#include "../linux-g++/qplatformdefs.h" --- -2.17.1.windows.2 - diff --git a/patches/138a720.diff b/patches/138a720.diff deleted file mode 100644 index 079039f..0000000 --- a/patches/138a720.diff +++ /dev/null @@ -1,67 +0,0 @@ -From 138a7203f16cf356e9d4dac697920a22437014b0 Mon Sep 17 00:00:00 2001 -From: Peter Varga -Date: Fri, 13 Nov 2020 11:09:23 +0100 -Subject: [PATCH] Fix build with msvc2019 16.8.0 - -Fixes: QTBUG-88708 -Change-Id: I3554ceec0437801b4861f68edd504d01fc01cf93 -Reviewed-by: Allan Sandfeld Jensen ---- - -diff --git a/chromium/third_party/angle/src/common/mathutil.cpp b/chromium/third_party/angle/src/common/mathutil.cpp -index 306cde1..d4f1034 100644 ---- a/chromium/third_party/angle/src/common/mathutil.cpp -+++ b/chromium/third_party/angle/src/common/mathutil.cpp -@@ -72,11 +72,11 @@ - const RGB9E5Data *inputData = reinterpret_cast(&input); - - *red = -- inputData->R * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); -+ inputData->R * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); - *green = -- inputData->G * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); -+ inputData->G * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); - *blue = -- inputData->B * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); -+ inputData->B * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); - } - - } // namespace gl -diff --git a/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h b/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h -index 78c316e..136c796 100644 ---- a/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h -+++ b/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h -@@ -130,7 +130,7 @@ - // https://en.wikipedia.org/wiki/CIELAB_color_space#Forward_transformation. - FloatPoint3D toXYZ(const FloatPoint3D& lab) const { - auto invf = [](float x) { -- return x > kSigma ? pow(x, 3) : 3 * kSigma2 * (x - 4.0f / 29.0f); -+ return x > kSigma ? (float)pow(x, 3) : 3 * kSigma2 * (x - 4.0f / 29.0f); - }; - - FloatPoint3D v = {clamp(lab.X(), 0.0f, 100.0f), -diff --git a/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h b/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h -index 02363d0..8860287 100644 ---- a/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h -+++ b/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h -@@ -198,6 +198,20 @@ - return *this; - } - -+#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC) -+ TimestampedTracePiece& operator=(TimestampedTracePiece&& ttp) const -+ { -+ if (this != &ttp) { -+ // First invoke the destructor and then invoke the move constructor -+ // inline via placement-new to implement move-assignment. -+ this->~TimestampedTracePiece(); -+ new (const_cast(this)) TimestampedTracePiece(std::move(ttp)); -+ } -+ -+ return const_cast(*this); -+ } -+#endif // PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC) -+ - ~TimestampedTracePiece() { - switch (type) { - case Type::kInvalid: diff --git a/patches/3f9c9db.diff b/patches/3f9c9db.diff deleted file mode 100644 index 942d9e4..0000000 --- a/patches/3f9c9db.diff +++ /dev/null @@ -1,23 +0,0 @@ -From 3f9c9db15d95fe52438971d8c1d01dfe00c23c6c Mon Sep 17 00:00:00 2001 -From: Kai Koehne -Date: Tue, 30 Jul 2019 11:07:18 +0200 -Subject: [PATCH] Use pkg-config --libs-only-other to resolve e.g. -pthread - -Fixes: QTBUG-77159 -Change-Id: If9ab3797ccfb52c6b96a4ab120c59fd8896d5466 ---- - -diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf -index 242544d..f759d04 100644 ---- a/mkspecs/features/qt_configure.prf -+++ b/mkspecs/features/qt_configure.prf -@@ -760,7 +760,8 @@ - contains($${1}.libs, ".*\\.$${QMAKE_EXTENSION_STATICLIB}$") { - qtRunLoggedCommand("$$pkg_config --static --libs-only-L $$args", libpaths)|return(false) - qtRunLoggedCommand("$$pkg_config --static --libs-only-l $$args", libs)|return(false) -- eval(libs = $$libpaths $$libs) -+ qtRunLoggedCommand("$$pkg_config --static --libs-only-other $$args", libs_other)|return(false) -+ eval(libs = $$libpaths $$libs $$libs_other) - !qtConfResolveLibs($${1}.libs, $$libs): \ - return(false) - } diff --git a/patches/3f9c9db_.diff b/patches/3f9c9db_.diff deleted file mode 100644 index e538517..0000000 --- a/patches/3f9c9db_.diff +++ /dev/null @@ -1,23 +0,0 @@ -From 3f9c9db15d95fe52438971d8c1d01dfe00c23c6c Mon Sep 17 00:00:00 2001 -From: Kai Koehne -Date: Tue, 30 Jul 2019 11:07:18 +0200 -Subject: [PATCH] Use pkg-config --libs-only-other to resolve e.g. -pthread - -Fixes: QTBUG-77159 -Change-Id: If9ab3797ccfb52c6b96a4ab120c59fd8896d5466 ---- - -diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf -index 242544d..f759d04 100644 ---- a/mkspecs/features/qt_configure.prf -+++ b/mkspecs/features/qt_configure.prf -@@ -827,5 +827,8 @@ - contains($${1}.libs, ".*\\.$${QMAKE_EXTENSION_STATICLIB}$") { -- qtRunLoggedCommand("$$pkg_config --static --libs $$args", libs)|return(false) -+ qtRunLoggedCommand("$$pkg_config --static --libs-only-L $$args", libpaths)|return(false) -+ qtRunLoggedCommand("$$pkg_config --static --libs-only-l $$args", libs)|return(false) -+ qtRunLoggedCommand("$$pkg_config --static --libs-only-other $$args", libs_other)|return(false) -+ eval(libs = $$libpaths $$libs $$libs_other) - !qtConfResolveLibs($${1}.libs, $$libs): \ - return(false) - } diff --git a/patches/5d2026c.diff b/patches/5d2026c.diff deleted file mode 100644 index 0147125..0000000 --- a/patches/5d2026c.diff +++ /dev/null @@ -1,43 +0,0 @@ -From 5d2026cb04ef8fd408e5722a84e2affb5b9a3119 Mon Sep 17 00:00:00 2001 -From: Peter Varga -Date: Tue, 07 Apr 2020 10:09:37 +0200 -Subject: [PATCH] Fix macOS build after 10.15.4 - -QMAKE_MAC_SDK_VERSION is set by -/usr/bin/xcrun --sdk macosx --show-sdk-version -in qtbase/mkpecs/features/mac/sdk.prf - -From 10.15.4, xcrun outputs the SDK version in Major.Minor.Patch format -instead of Major.Minor. mac_sdk_min gn arg is expected to be in -Major.Minor format, therefor pass only the first 2 revision numbers to -gn. - -Fixes: QTBUG-83318 -Change-Id: I3af523dd5df8149fb5cd57b259c2bed889db88b5 -Reviewed-by: Allan Sandfeld Jensen ---- - -diff --git a/src/buildtools/config/mac_osx.pri b/src/buildtools/config/mac_osx.pri -index 01aca4c..9373928 100644 ---- a/src/buildtools/config/mac_osx.pri -+++ b/src/buildtools/config/mac_osx.pri -@@ -9,6 +9,10 @@ - isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'") - } - -+# chromium/build/mac/find_sdk.py expects the SDK version (mac_sdk_min) in Major.Minor format. -+# If Patch version is provided it fails with "Exception: No Major.Minor.Patch+ SDK found" -+QMAKE_MAC_SDK_VERSION_MAJOR_MINOR = $$section(QMAKE_MAC_SDK_VERSION, ".", 0, 1) -+ - QMAKE_CLANG_DIR = "/usr" - QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX) - !isEmpty(QMAKE_CLANG_PATH) { -@@ -28,7 +32,7 @@ - clang_base_path=\"$${QMAKE_CLANG_DIR}\" \ - clang_use_chrome_plugins=false \ - mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \ -- mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION}\" \ -+ mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION_MAJOR_MINOR}\" \ - use_external_popup_menu=false - - qtConfig(webengine-spellchecker) { diff --git a/patches/a9cc8aa.diff b/patches/a9cc8aa.diff deleted file mode 100644 index 49ba789..0000000 --- a/patches/a9cc8aa.diff +++ /dev/null @@ -1,25 +0,0 @@ -From d2475bdd4cbb9a70abf19db465ddbdbf29591568 Mon Sep 17 00:00:00 2001 -From: Joerg Bornemann -Date: Mon, 07 Oct 2019 08:23:11 +0200 -Subject: [PATCH] Fix build with ALSA in non-system location - -This amends commit f0ea2641. - -Fixes: QTBUG-79014 -Change-Id: Ib04d844ef64e335785408dc8d7e512a5a3651655 -Reviewed-by: VaL Doroshchuk ---- - -diff --git a/src/plugins/alsa/alsa.pro b/src/plugins/alsa/alsa.pro -index 56657f1..4012bb8 100644 ---- a/src/plugins/alsa/alsa.pro -+++ b/src/plugins/alsa/alsa.pro -@@ -1,7 +1,7 @@ - TARGET = qtaudio_alsa - QT += multimedia-private - --LIBS += -lasound -+QMAKE_USE += alsa - - HEADERS += \ - qalsaplugin.h \ diff --git a/patches/b619f2a.diff b/patches/b619f2a.diff deleted file mode 100644 index f0e0e3d..0000000 --- a/patches/b619f2a.diff +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp -index 3879b48..c380893 100644 ---- a/src/corelib/tools/qarraydata.cpp -+++ b/src/corelib/tools/qarraydata.cpp -@@ -1,7 +1,7 @@ - /**************************************************************************** - ** --** Copyright (C) 2019 The Qt Company Ltd. --** Copyright (C) 2016 Intel Corporation. -+** Copyright (C) 2020 The Qt Company Ltd. -+** Copyright (C) 2020 Intel Corporation. - ** Contact: https://www.qt.io/licensing/ - ** - ** This file is part of the QtCore module of the Qt Toolkit. -@@ -149,19 +149,16 @@ - - // End of qtools_p.h implementation - --QT_WARNING_PUSH --QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers") -- - const QArrayData QArrayData::shared_null[2] = { - { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared null -- /* zero initialized terminator */}; -+ { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 } /* zero initialized terminator */ -+}; - - static const QArrayData qt_array[3] = { - { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared empty - { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, sizeof(QArrayData) }, // unsharable empty -- /* zero initialized terminator */}; -- --QT_WARNING_POP -+ { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 } /* zero initialized terminator */ -+}; - - static const QArrayData &qt_array_empty = qt_array[0]; - static const QArrayData &qt_array_unsharable_empty = qt_array[1]; diff --git a/patches/c994a33.diff b/patches/c994a33.diff deleted file mode 100644 index 0829b02..0000000 --- a/patches/c994a33.diff +++ /dev/null @@ -1,27 +0,0 @@ -From c994a334701ab80fcc154f5330492c751d1e2490 Mon Sep 17 00:00:00 2001 -From: Eric Lemanissier -Date: Tue, 26 May 2020 16:51:08 +0000 -Subject: [PATCH] QMimeDatabase/xml: use xmlstarlet instead of xml - -some distributions (eg Ubuntu) don't provide xml executable, but only xmlstarlet executable - -Change-Id: Icc801ded8d4ec1ec4d1dab93289a2365f8cd9cbd -Pick-to: 5.15 ---- - -diff --git a/src/corelib/mimetypes/mime/generate.pl b/src/corelib/mimetypes/mime/generate.pl -index 0f87d61..4c1cb5b 100644 ---- a/src/corelib/mimetypes/mime/generate.pl -+++ b/src/corelib/mimetypes/mime/generate.pl -@@ -67,9 +67,9 @@ - - # Check if xml (from xmlstarlet) is in $PATH - my $cmd; --if (checkCommand("xml")) { -+if (checkCommand("xmlstarlet")) { - # Minify the data before compressing -- $cmd = "xml sel -D -B -t -c / $fname"; -+ $cmd = "xmlstarlet sel -D -B -t -c / $fname"; - $cmd .= "| $compress" if $compress; - } elsif ($compress) { - $cmd = "$compress < $fname" diff --git a/patches/e2eb6e9.diff b/patches/e2eb6e9.diff deleted file mode 100644 index 588d9d3..0000000 --- a/patches/e2eb6e9.diff +++ /dev/null @@ -1,27 +0,0 @@ -From e2eb6e9bf75957b3139aefc4827d6256458d8836 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira -Date: Tue, 26 May 2020 09:10:39 -0700 -Subject: [PATCH] QMimeDatabase/zstd: use -T1 instead of --single-thread - -Some older versions of the command-line tool don't have --single-thread -but do have -T1. They're slightly different according to the -documentation, but it's not important to us. What we want is to make -sure we consume a single CPU during build. - -Pick-To: 5.15 -Change-Id: Ied637aece2a7427b8a2dfffd16129fe88a0466ee ---- - -diff --git a/src/corelib/mimetypes/mime/generate.pl b/src/corelib/mimetypes/mime/generate.pl -index 0f87d61..8ac4b50 100644 ---- a/src/corelib/mimetypes/mime/generate.pl -+++ b/src/corelib/mimetypes/mime/generate.pl -@@ -60,7 +60,7 @@ - if ($fname eq "--zstd") { - $fname = shift @ARGV; - if (checkCommand("zstd")) { -- $compress = "zstd -cq19 --single-thread"; -+ $compress = "zstd -cq19 -T1"; - $macro = "MIME_DATABASE_IS_ZSTD"; - } - } diff --git a/patches/fbde9c7.diff b/patches/fbde9c7.diff deleted file mode 100644 index e32b72a..0000000 --- a/patches/fbde9c7.diff +++ /dev/null @@ -1,48 +0,0 @@ -From fbde9c70c2e8c44a312aa5d8e18efd0ac81b55c6 Mon Sep 17 00:00:00 2001 -From: Joerg Bornemann -Date: Mon, 18 Nov 2019 15:13:51 +0100 -Subject: [PATCH] Fix passing FOO_LIBS variables to configure - -This amends commit 9864d2c6. Some variables that are set in -qtConfLibrary_inline were not exported. - -Fixes: QTBUG-78873 -Change-Id: I10d766c1f41d2baa61967ee931a6631346cac2e9 ---- - -diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf -index 7ed1f7f..6537d98 100644 ---- a/mkspecs/features/qt_configure.prf -+++ b/mkspecs/features/qt_configure.prf -@@ -666,6 +666,7 @@ - vars += $$eval(config.commandline.rev_assignments.$${iv}) - defined(config.input.$${iv}, var) { - eval($${1}.builds.$${b} = $$eval(config.input.$${iv})) -+ export($${1}.builds.$${b}) - $${1}.builds._KEYS_ *= $${b} - any = true - } else { -@@ -680,11 +681,14 @@ - export($${1}.builds._KEYS_) - # we also reset the generic libs, to avoid surprises. - $${1}.libs = -+ export($${1}.libs) - } - - # direct libs. overwrites inline libs. -- defined(config.input.$${input}.libs, var): \ -+ defined(config.input.$${input}.libs, var) { - eval($${1}.libs = $$eval(config.input.$${input}.libs)) -+ export($${1}.libs) -+ } - - includes = $$eval(config.input.$${input}.incdir) - -@@ -693,6 +697,7 @@ - !isEmpty(prefix) { - includes += $$prefix/include - $${1}.libs = -L$$prefix/lib $$eval($${1}.libs) -+ export($${1}.libs) - } - - libdir = $$eval(config.input.$${input}.libdir) diff --git a/qtmodules.conf b/qtmodules.conf deleted file mode 100644 index 07659ad..0000000 --- a/qtmodules.conf +++ /dev/null @@ -1,326 +0,0 @@ -[submodule "qtbase"] - path = qtbase - url = ../qtbase.git - branch = 5.15.2 - status = essential -[submodule "qtsvg"] - depends = qtbase - path = qtsvg - url = ../qtsvg.git - branch = 5.15.2 - status = addon -[submodule "qtdeclarative"] - depends = qtbase - recommends = qtsvg - path = qtdeclarative - url = ../qtdeclarative.git - branch = 5.15.2 - status = essential -[submodule "qtactiveqt"] - depends = qtbase - path = qtactiveqt - url = ../qtactiveqt.git - branch = 5.15.2 - status = addon -[submodule "qtscript"] - depends = qtbase - recommends = qttools - path = qtscript - url = ../qtscript.git - branch = 5.15.2 - status = deprecated -[submodule "qtmultimedia"] - depends = qtbase - recommends = qtdeclarative - path = qtmultimedia - url = ../qtmultimedia.git - branch = 5.15.2 - status = essential -[submodule "qttools"] - depends = qtbase - recommends = qtdeclarative qtactiveqt - path = qttools - url = ../qttools.git - branch = 5.15.2 - status = essential -[submodule "qtxmlpatterns"] - depends = qtbase - recommends = qtdeclarative - path = qtxmlpatterns - url = ../qtxmlpatterns.git - branch = 5.15.2 - status = deprecated -[submodule "qttranslations"] - depends = qttools - path = qttranslations - url = ../qttranslations.git - branch = 5.15.2 - status = essential - priority = 30 -[submodule "qtdoc"] - depends = qtdeclarative qttools - recommends = qtmultimedia qtquickcontrols qtquickcontrols2 - path = qtdoc - url = ../qtdoc.git - branch = 5.15.2 - status = essential - priority = 40 -[submodule "qtrepotools"] - path = qtrepotools - url = ../qtrepotools.git - branch = master - status = essential - project = - -[submodule "qtqa"] - depends = qtbase - path = qtqa - url = ../qtqa.git - branch = master - status = essential - priority = 50 -[submodule "qtlocation"] - depends = qtbase - recommends = qtdeclarative qtquickcontrols qtquickcontrols2 qtserialport - path = qtlocation - url = ../qtlocation.git - branch = 5.15.2 - status = addon -[submodule "qtsensors"] - depends = qtbase - recommends = qtdeclarative - path = qtsensors - url = ../qtsensors.git - branch = 5.15.2 - status = addon -[submodule "qtsystems"] - depends = qtbase - recommends = qtdeclarative - path = qtsystems - url = ../qtsystems.git - branch = dev - status = ignore -[submodule "qtfeedback"] - depends = qtdeclarative - recommends = qtmultimedia - path = qtfeedback - url = ../qtfeedback.git - branch = master - status = ignore -[submodule "qtdocgallery"] - depends = qtdeclarative - path = qtdocgallery - url = ../qtdocgallery.git - branch = master - status = ignore -[submodule "qtpim"] - depends = qtdeclarative - path = qtpim - url = ../qtpim.git - branch = dev - status = ignore -[submodule "qtconnectivity"] - depends = qtbase - recommends = qtdeclarative qtandroidextras - path = qtconnectivity - url = ../qtconnectivity.git - branch = 5.15.2 - status = addon -[submodule "qtwayland"] - depends = qtbase - recommends = qtdeclarative - path = qtwayland - url = ../qtwayland.git - branch = 5.15.2 - status = addon -[submodule "qt3d"] - depends = qtbase - recommends = qtdeclarative qtimageformats qtgamepad - path = qt3d - url = ../qt3d.git - branch = 5.15.2 - status = addon -[submodule "qtimageformats"] - depends = qtbase - path = qtimageformats - url = ../qtimageformats.git - branch = 5.15.2 - status = addon -[submodule "qtgraphicaleffects"] - depends = qtdeclarative - path = qtgraphicaleffects - url = ../qtgraphicaleffects.git - branch = 5.15.2 - status = essential -[submodule "qtquickcontrols"] - depends = qtdeclarative - recommends = qtgraphicaleffects - path = qtquickcontrols - url = ../qtquickcontrols.git - branch = 5.15.2 - status = addon -[submodule "qtserialbus"] - depends = qtbase - recommends = qtserialport - path = qtserialbus - url = ../qtserialbus.git - branch = 5.15.2 - status = addon -[submodule "qtserialport"] - depends = qtbase - path = qtserialport - url = ../qtserialport.git - branch = 5.15.2 - status = addon -[submodule "qtx11extras"] - depends = qtbase - path = qtx11extras - url = ../qtx11extras.git - branch = 5.15.2 - status = addon -[submodule "qtmacextras"] - depends = qtbase - path = qtmacextras - url = ../qtmacextras.git - branch = 5.15.2 - status = addon -[submodule "qtwinextras"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtwinextras - url = ../qtwinextras.git - branch = 5.15.2 - status = addon -[submodule "qtandroidextras"] - depends = qtbase - path = qtandroidextras - url = ../qtandroidextras.git - branch = 5.15.2 - status = addon -[submodule "qtwebsockets"] - depends = qtbase - recommends = qtdeclarative - path = qtwebsockets - url = ../qtwebsockets.git - branch = 5.15.2 - status = addon -[submodule "qtwebchannel"] - depends = qtbase - recommends = qtdeclarative qtwebsockets - path = qtwebchannel - url = ../qtwebchannel.git - branch = 5.15.2 - status = addon -[submodule "qtwebengine"] - depends = qtdeclarative - recommends = qtquickcontrols qtquickcontrols2 qtlocation qtwebchannel qttools - path = qtwebengine - url = ../qtwebengine.git - branch = 5.15.2 - status = addon - priority = 10 -[submodule "qtcanvas3d"] - depends = qtdeclarative - path = qtcanvas3d - url = ../qtcanvas3d.git - branch = dev - status = ignore -[submodule "qtwebview"] - depends = qtdeclarative - recommends = qtwebengine - path = qtwebview - url = ../qtwebview.git - branch = 5.15.2 - status = addon -[submodule "qtquickcontrols2"] - depends = qtgraphicaleffects - recommends = qtimageformats - path = qtquickcontrols2 - url = ../qtquickcontrols2.git - branch = 5.15.2 - status = essential -[submodule "qtpurchasing"] - depends = qtbase - recommends = qtdeclarative qtandroidextras - path = qtpurchasing - url = ../qtpurchasing.git - branch = 5.15.2 - status = addon -[submodule "qtcharts"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtcharts - url = ../qtcharts.git - branch = 5.15.2 - status = addon -[submodule "qtdatavis3d"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtdatavis3d - url = ../qtdatavis3d.git - branch = 5.15.2 - status = addon -[submodule "qtvirtualkeyboard"] - depends = qtbase qtdeclarative qtsvg - recommends = qtmultimedia qtquickcontrols - path = qtvirtualkeyboard - url = ../qtvirtualkeyboard.git - branch = 5.15.2 - status = addon -[submodule "qtgamepad"] - depends = qtbase - recommends = qtdeclarative - path = qtgamepad - url = ../qtgamepad.git - branch = 5.15.2 - status = addon -[submodule "qtscxml"] - depends = qtbase qtdeclarative - path = qtscxml - url = ../qtscxml.git - branch = 5.15.2 - status = addon -[submodule "qtspeech"] - depends = qtbase - recommends = qtdeclarative qtmultimedia - path = qtspeech - url = ../qtspeech.git - branch = 5.15.2 - status = addon -[submodule "qtnetworkauth"] - depends = qtbase - path = qtnetworkauth - url = ../qtnetworkauth.git - branch = 5.15.2 - status = addon -[submodule "qtremoteobjects"] - depends = qtbase - recommends = qtdeclarative - path = qtremoteobjects - url = ../qtremoteobjects.git - branch = 5.15.2 - status = addon -[submodule "qtwebglplugin"] - depends = qtbase qtwebsockets - recommends = qtdeclarative - path = qtwebglplugin - url = ../qtwebglplugin.git - branch = 5.15.2 - status = addon -[submodule "qtlottie"] - depends = qtbase qtdeclarative - path = qtlottie - url = ../qtlottie.git - branch = 5.15.2 - status = addon -[submodule "qtquicktimeline"] - depends = qtbase qtdeclarative - path = qtquicktimeline - url = ../qtquicktimeline - branch = 5.15.2 - status = addon -[submodule "qtquick3d"] - depends = qtbase qtdeclarative - path = qtquick3d - url = ../qtquick3d.git - branch = 5.15.2 - status = addon diff --git a/test_package/cmake/CMakeLists.txt b/test_package/cmake/CMakeLists.txt deleted file mode 100644 index ba270f7..0000000 --- a/test_package/cmake/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -cmake_minimum_required(VERSION 3.1.0) -project(test_package) - -include(${CMAKE_BINARY_DIR}/../conanbuildinfo.cmake) -conan_set_vs_runtime() -conan_set_libcxx() -conan_output_dirs_setup() - - -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Instruct CMake to run moc automatically when needed -set(CMAKE_AUTOMOC ON) -# Create code from a list of Qt designer ui files -set(CMAKE_AUTOUIC ON) - -# Find the QtCore library -find_package(Qt5Core CONFIG REQUIRED) - -add_executable(${PROJECT_NAME} ../test_package.cpp ../greeter.h) -target_link_libraries(${PROJECT_NAME} Qt5::Core) - -# configure_file(${CMAKE_CURRENT_BINARY_DIR}/qt.conf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf COPYONLY) - -message(">>>>>>>> CMAKE_VERSION ${CMAKE_VERSION}") -message(">>>>>>>> CMAKE_CXX_STANDARD_LIBRARIES ${CMAKE_CXX_STANDARD_LIBRARIES}") diff --git a/test_package/cmake_find_package_multi/CMakeLists.txt b/test_package/cmake_find_package_multi/CMakeLists.txt deleted file mode 100644 index 057cc4a..0000000 --- a/test_package/cmake_find_package_multi/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -cmake_minimum_required(VERSION 3.1.0) - -set(CMAKE_CXX_STANDARD 11) - -#set(CMAKE_POSITION_INDEPENDENT_CODE ON) - -project(test_package) - -include(${CMAKE_BINARY_DIR}/../conanbuildinfo.cmake) -conan_set_vs_runtime() -conan_set_libcxx() -conan_output_dirs_setup() - -find_package(qt REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package.cpp ../greeter.h ../moc_greeter.cpp) -# Must compile with "-fPIC" since Qt was built with -reduce-relocations. -target_compile_options(${PROJECT_NAME} PRIVATE -fPIC) - -target_link_libraries(${PROJECT_NAME} qt::qt) - -# configure_file(${CMAKE_CURRENT_BINARY_DIR}/qt.conf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf COPYONLY) - -message(">>>>>>>> CMAKE_VERSION ${CMAKE_VERSION}") -message(">>>>>>>> CMAKE_CXX_STANDARD_LIBRARIES ${CMAKE_CXX_STANDARD_LIBRARIES}") From 54b863530cce4f3e2f39dff49ca71f77b08bfef4 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Wed, 1 Sep 2021 21:31:33 +0200 Subject: [PATCH 2/2] Add files from conan-center-index sha bf9277c398542394d60c5d97653c38b91727bae7 --- LICENSE | 21 + conandata.yml | 95 +-- conanfile.py | 1012 ++++++++++++++++------- patches/7371d3a.diff | 38 + patches/QTBUG-88625.diff | 58 ++ patches/QTBUG-90395.diff | 38 + patches/declarative_missing_header.diff | 11 + patches/fix-macdeployqt.diff | 66 ++ qtmodules5.15.2.conf | 284 +++++++ test_package/CMakeLists.txt | 21 + test_package/conanfile.py | 38 +- test_package/example.qrc | 5 + test_package/greeter.h | 2 +- test_package/meson.build | 6 +- test_package/resource.txt | 1 + test_package/test_package.cpp | 22 +- test_package/test_package.pro | 9 +- 17 files changed, 1310 insertions(+), 417 deletions(-) create mode 100644 LICENSE create mode 100644 patches/7371d3a.diff create mode 100644 patches/QTBUG-88625.diff create mode 100644 patches/QTBUG-90395.diff create mode 100644 patches/declarative_missing_header.diff create mode 100644 patches/fix-macdeployqt.diff create mode 100644 qtmodules5.15.2.conf create mode 100644 test_package/CMakeLists.txt create mode 100644 test_package/example.qrc create mode 100644 test_package/resource.txt diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2b6d382 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Conan.io + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/conandata.yml b/conandata.yml index 4f8d1d8..eeb8107 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,40 +1,4 @@ sources: - "5.12.5": - url: "https://download.qt.io/archive/qt/5.12/5.12.5/single/qt-everywhere-src-5.12.5.tar.xz" - sha256: "a2299e21db7767caf98242767bffb18a2a88a42fee2d6a393bedd234f8c91298" - "5.13.1": - url: "https://download.qt.io/archive/qt/5.13/5.13.1/single/qt-everywhere-src-5.13.1.tar.xz" - sha256: "adf00266dc38352a166a9739f1a24a1e36f1be9c04bf72e16e142a256436974e" - "5.13.2": - url: "https://download.qt.io/archive/qt/5.13/5.13.2/single/qt-everywhere-src-5.13.2.tar.xz" - sha256: "55e8273536be41f4f63064a79e552a22133848bb419400b6fa8e9fc0dc05de08" - "5.14.0-alpha": - url: "https://download.qt.io/development_releases/qt/5.14/5.14.0-alpha/single/qt-everywhere-src-5.14.0-alpha.tar.xz" - sha256: "5b363eacf6f0d48b568fb38c2168ddb900cfb18a48eaa5e70dac3c3d63563a21" - "5.14.0-beta1": - url: "https://download.qt.io/development_releases/qt/5.14/5.14.0-beta1/single/qt-everywhere-src-5.14.0-beta1.tar.xz" - sha256: "f07cfc26762244bd343190b1b2e8b22708196f017024d6ab59f7fe1c8432f6b3" - "5.14.0-beta3": - url: "https://download.qt.io/development_releases/qt/5.14/5.14.0-beta3/single/qt-everywhere-src-5.14.0-beta3.tar.xz" - sha256: "b75c60644ac26477afabb4997ea55c7d5cefc842bcd3f432f04f1c4fe6d848a3" - "5.14.0-rc": - url: "https://download.qt.io/development_releases/qt/5.14/5.14.0-rc/single/qt-everywhere-src-5.14.0-rc.tar.xz" - sha256: "5d8642b0c5f2f7acd600bc3aac068b7b3455a49e0e3dfc8eaf5883b1d537e1be" - "5.14.0": - url: "https://download.qt.io/archive/qt/5.14/5.14.0/single/qt-everywhere-src-5.14.0.tar.xz" - sha256: "be9a77cd4e1f9d70b58621d0753be19ea498e6b0da0398753e5038426f76a8ba" - "5.14.1": - url: "https://download.qt.io/archive/qt/5.14/5.14.1/single/qt-everywhere-src-5.14.1.tar.xz" - sha256: "6f17f488f512b39c2feb57d83a5e0a13dcef32999bea2e2a8f832f54a29badb8" - "5.14.2": - url: "https://download.qt.io/archive/qt/5.14/5.14.2/single/qt-everywhere-src-5.14.2.tar.xz" - sha256: "c6fcd53c744df89e7d3223c02838a33309bd1c291fcb6f9341505fe99f7f19fa" - "5.15.0": - url: "https://download.qt.io/archive/qt/5.15/5.15.0/single/qt-everywhere-src-5.15.0.tar.xz" - sha256: "22b63d7a7a45183865cc4141124f12b673e7a17b1fe2b91e433f6547c5d548c3" - "5.15.1": - url: "https://download.qt.io/archive/qt/5.15/5.15.1/single/qt-everywhere-src-5.15.1.tar.xz" - sha256: "44da876057e21e1be42de31facd99be7d5f9f07893e1ea762359bcee0ef64ee9" "5.15.2": url: - "https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz" @@ -43,63 +7,20 @@ sources: - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz" sha256: "3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240" patches: - "5.13.1": - - patch_file: "patches/3f9c9db.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/a9cc8aa.diff" - base_path: "qt5/qtmultimedia" - "5.13.2": - - patch_file: "patches/3f9c9db_.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - "5.14.0-beta3": - - patch_file: "patches/fbde9c7.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - "5.14.0-rc": - - patch_file: "patches/fbde9c7.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - "5.14.0": - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - "5.14.1": - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - "5.14.2": + "5.15.2": - patch_file: "patches/aa2a39dea5.diff" base_path: "qt5/qtbase" - - patch_file: "patches/5d2026c.diff" - base_path: "qt5/qtwebengine" - patch_file: "patches/c72097e.diff" base_path: "qt5/qtwebengine" - "5.15.0": - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/c72097e.diff" + - patch_file: "patches/fix-macdeployqt.diff" + base_path: "qt5/qttools" + - patch_file: "patches/QTBUG-88625.diff" base_path: "qt5/qtwebengine" - - patch_file: "patches/e2eb6e9.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/c994a33.diff" + - patch_file: "patches/7371d3a.diff" base_path: "qt5/qtbase" - - patch_file: "patches/b619f2a.diff" + - patch_file: "patches/QTBUG-90395.diff" base_path: "qt5/qtbase" - "5.15.1": - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/c72097e.diff" - base_path: "qt5/qtwebengine" - "5.15.2": - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/c72097e.diff" - base_path: "qt5/qtwebengine" - - patch_file: "patches/138a720.diff" - base_path: "qt5/qtwebengine/src/3rdparty" + - patch_file: "patches/declarative_missing_header.diff" + base_path: "qt5/qtdeclarative" - patch_file: "patches/f830b86.diff" base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/0435cb0b99d919d8ad17f4c6feed8236d7e6177e.diff" - base_path: "qt5/qtbase" diff --git a/conanfile.py b/conanfile.py index e69316b..5115639 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,13 +1,12 @@ -import glob import os import shutil import itertools - +import glob +import textwrap import configparser -from conans import ConanFile, tools, __version__ as conan_version, RunEnvironment +from conans import ConanFile, tools, RunEnvironment from conans.errors import ConanInvalidConfiguration from conans.model import Generator -from conans.tools import Version class qt(Generator): @@ -17,43 +16,40 @@ def filename(self): @property def content(self): - return "[Paths]\nPrefix = %s\n" % self.conanfile.deps_cpp_info["qt"].rootpath.replace("\\", "/") - - -def _getsubmodules(): - config = configparser.ConfigParser() - config.read('qtmodules.conf') - res = {} - assert config.sections() - for s in config.sections(): - section = str(s) - assert section.startswith("submodule ") - assert section.count('"') == 2 - modulename = section[section.find('"') + 1: section.rfind('"')] - status = str(config.get(section, "status")) - if status != "obsolete" and status != "ignore": - res[modulename] = {"branch": str(config.get(section, "branch")), "status": status, - "path": str(config.get(section, "path")), "depends": []} - if config.has_option(section, "depends"): - res[modulename]["depends"] = [str(i) for i in config.get(section, "depends").split()] - return res + return """[Paths] +Prefix = %s +ArchData = bin/archdatadir +HostData = bin/archdatadir +Data = bin/datadir +Sysconf = bin/sysconfdir +LibraryExecutables = bin/archdatadir/bin +Plugins = bin/archdatadir/plugins +Imports = bin/archdatadir/imports +Qml2Imports = bin/archdatadir/qml +Translations = bin/datadir/translations +Documentation = bin/datadir/doc +Examples = bin/datadir/examples""" % self.conanfile.deps_cpp_info["qt"].rootpath.replace("\\", "/") class QtConan(ConanFile): - - _submodules = _getsubmodules() + _submodules = ["qtsvg", "qtdeclarative", "qtactiveqt", "qtscript", "qtmultimedia", "qttools", "qtxmlpatterns", + "qttranslations", "qtdoc", "qtlocation", "qtsensors", "qtconnectivity", "qtwayland", + "qt3d", "qtimageformats", "qtgraphicaleffects", "qtquickcontrols", "qtserialbus", "qtserialport", "qtx11extras", + "qtmacextras", "qtwinextras", "qtandroidextras", "qtwebsockets", "qtwebchannel", "qtwebengine", "qtwebview", + "qtquickcontrols2", "qtpurchasing", "qtcharts", "qtdatavis3d", "qtvirtualkeyboard", "qtgamepad", "qtscxml", + "qtspeech", "qtnetworkauth", "qtremoteobjects", "qtwebglplugin", "qtlottie", "qtquicktimeline", "qtquick3d"] generators = "pkg_config" name = "qt" description = "Qt is a cross-platform framework for graphical user interfaces." topics = ("conan", "qt", "ui") - url = "https://github.com/bincrafters/conan-qt" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.qt.io" license = "LGPL-3.0" - exports = ["qtmodules.conf", "patches/*.diff", "CHANGELOG.md"] + exports = ["patches/*.diff"] settings = "os", "arch", "compiler", "build_type" - options = dict({ + options = { "shared": [True, False], "commercial": [True, False], @@ -62,184 +58,214 @@ class QtConan(ConanFile): "openssl": [True, False], "with_pcre2": [True, False], "with_glib": [True, False], - # "with_libiconv": [True, False], # Qt tests failure "invalid conversion from const char** to char**" + # "with_libiconv": [True, False], # QTBUG-84708 Qt tests failure "invalid conversion from const char** to char**" "with_doubleconversion": [True, False], "with_freetype": [True, False], "with_fontconfig": [True, False], "with_icu": [True, False], "with_harfbuzz": [True, False], - "with_libjpeg": [True, False, "libjpeg-turbo"], + "with_libjpeg": ["libjpeg", "libjpeg-turbo", False], "with_libpng": [True, False], "with_sqlite3": [True, False], "with_mysql": [True, False], "with_pq": [True, False], "with_odbc": [True, False], - "with_sdl2": [True, False], "with_libalsa": [True, False], "with_openal": [True, False], "with_zstd": [True, False], + "with_gstreamer": [True, False], + "with_pulseaudio": [True, False], + "with_dbus": [True, False], - "GUI": [True, False], + "gui": [True, False], "widgets": [True, False], "device": "ANY", "cross_compile": "ANY", "sysroot": "ANY", "config": "ANY", - "multiconfiguration": [True, False], - }, **{module: [True, False] for module in _submodules if module != 'qtbase'} - ) + "multiconfiguration": [True, False] + } + options.update({module: [True, False] for module in _submodules}) + no_copy_source = True - default_options = dict({ - "shared": True, + default_options = { + "shared": False, "commercial": False, "opengl": "desktop", "with_vulkan": False, "openssl": True, "with_pcre2": True, - "with_glib": True, - # "with_libiconv": True, + "with_glib": False, + # "with_libiconv": True, # QTBUG-84708 "with_doubleconversion": True, "with_freetype": True, "with_fontconfig": True, "with_icu": True, - "with_harfbuzz": True, - "with_libjpeg": True, + "with_harfbuzz": False, + "with_libjpeg": "libjpeg", "with_libpng": True, "with_sqlite3": True, "with_mysql": True, "with_pq": True, "with_odbc": True, - "with_sdl2": True, "with_libalsa": False, "with_openal": True, "with_zstd": True, + "with_gstreamer": False, + "with_pulseaudio": False, + "with_dbus": False, - "GUI": True, + "gui": True, "widgets": True, "device": None, "cross_compile": None, "sysroot": None, "config": None, - "multiconfiguration": False, - }, **{module: False for module in _submodules if module != 'qtbase'} - ) - requires = "zlib/1.2.11" + "multiconfiguration": False + } + default_options.update({module: False for module in _submodules}) + short_paths = True + def export(self): + self.copy("qtmodules%s.conf" % self.version) + def build_requirements(self): if tools.os_info.is_windows and self.settings.compiler == "Visual Studio": self.build_requires("jom/1.1.3") - if self.settings.os in ["Linux", "FreeBSD"]: - if not tools.which('pkg-config'): - self.build_requires('pkgconf/1.7.3') if self.options.qtwebengine: - if not tools.which("ninja"): - self.build_requires("ninja/1.10.1") + self.build_requires("ninja/1.10.2") # gperf, bison, flex, python >= 2.7.5 & < 3 if self.settings.os != "Windows": - if not tools.which("bison"): - self.build_requires("bison/3.5.3") - if not tools.which("gperf"): - self.build_requires("gperf/3.1") - if not tools.which("flex"): - self.build_requires("flex/2.6.4") - - def _check_python_version(): - # Check if a valid python2 is available in PATH or it will failflex - # Start by checking if python2 can be found - python_exe = tools.which("python2") - if not python_exe: - # Fall back on regular python - python_exe = tools.which("python") - - if not python_exe: - msg = ("Python2 must be available in PATH " - "in order to build Qt WebEngine") - raise ConanInvalidConfiguration(msg) - # In any case, check its actual version for compatibility - from six import StringIO # Python 2 and 3 compatible - mybuf = StringIO() - cmd_v = "{} --version".format(python_exe) - self.run(cmd_v, output=mybuf) - verstr = mybuf.getvalue().strip().split('Python ')[1] - if verstr.endswith('+'): - verstr = verstr[:-1] - version = tools.Version(verstr) - # >= 2.7.5 & < 3 - v_min = "2.7.5" - v_max = "3.0.0" - if (version >= v_min) and (version < v_max): - msg = ("Found valid Python 2 required for QtWebengine:" - " version={}, path={}".format(mybuf.getvalue(), python_exe)) - self.output.success(msg) - else: - msg = ("Found Python 2 in path, but with invalid version {}" - " (QtWebEngine requires >= {} & < " - "{})".format(verstr, v_min, v_max)) - raise ConanInvalidConfiguration(msg) - - try: - _check_python_version() - except ConanInvalidConfiguration as e: - if tools.os_info.is_windows: - raise e - self.output.info("Python 2 not detected in path. Trying to install it") - tools.SystemPackageTool().install(["python2", "python"]) - _check_python_version() + self.build_requires("bison/3.7.1") + self.build_requires("gperf/3.1") + self.build_requires("flex/2.6.4") + + # Check if a valid python2 is available in PATH or it will failflex + # Start by checking if python2 can be found + python_exe = tools.which("python2") + if not python_exe: + # Fall back on regular python + python_exe = tools.which("python") + + if not python_exe: + msg = ("Python2 must be available in PATH " + "in order to build Qt WebEngine") + raise ConanInvalidConfiguration(msg) + + # In any case, check its actual version for compatibility + from six import StringIO # Python 2 and 3 compatible + mybuf = StringIO() + cmd_v = "\"{}\" --version".format(python_exe) + self.run(cmd_v, output=mybuf) + verstr = mybuf.getvalue().strip().split("Python ")[1] + if verstr.endswith("+"): + verstr = verstr[:-1] + version = tools.Version(verstr) + # >= 2.7.5 & < 3 + v_min = "2.7.5" + v_max = "3.0.0" + if (version >= v_min) and (version < v_max): + msg = ("Found valid Python 2 required for QtWebengine:" + " version={}, path={}".format(mybuf.getvalue(), python_exe)) + self.output.success(msg) + else: + msg = ("Found Python 2 in path, but with invalid version {}" + " (QtWebEngine requires >= {} & < " + "{})\nIf you have both Python 2 and 3 installed, copy the python 2 executable to" + "python2(.exe)".format(verstr, v_min, v_max)) + raise ConanInvalidConfiguration(msg) def config_options(self): - if self.settings.os not in ["Linux", "FreeBSD"]: - self.options.with_icu = False + if self.settings.os != "Linux": + del self.options.with_icu + del self.options.with_fontconfig + del self.options.with_libalsa if self.settings.compiler == "apple-clang": if tools.Version(self.settings.compiler.version) < "10.0": raise ConanInvalidConfiguration("Old versions of apple sdk are not supported by Qt (QTBUG-76777)") - - def configure(self): if self.settings.compiler in ["gcc", "clang"]: if tools.Version(self.settings.compiler.version) < "5.0": - raise ConanInvalidConfiguration("qt 5.15.0 is not support on GCC or clang before 5.0") - if conan_version < Version("1.20.0"): - raise ConanInvalidConfiguration("This recipe needs at least conan 1.20.0, please upgrade.") - if self.settings.os not in ["Linux", "FreeBSD"]: - # self.options.with_libiconv = False - self.options.with_fontconfig = False - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version.value) < "5.3": - self.options.with_mysql = False + raise ConanInvalidConfiguration("qt 5.15.X does not support GCC or clang before 5.0") + if self.settings.compiler in ["gcc", "clang"] and tools.Version(self.settings.compiler.version) < "5.3": + del self.options.with_mysql if self.settings.os == "Windows": self.options.with_mysql = False - if not self.options.shared and self.options.with_icu: - raise ConanInvalidConfiguration("icu option is not supported on windows in static build. see QTBUG-77120.") - - if self.options.widgets and not self.options.GUI: - raise ConanInvalidConfiguration("using option qt:widgets without option qt:GUI is not possible. " - "You can either disable qt:widgets or enable qt:GUI") - if not self.options.GUI: - self.options.opengl = "no" - self.options.with_vulkan = False - self.options.with_freetype = False - self.options.with_fontconfig = False - self.options.with_harfbuzz = False - self.options.with_libjpeg = False - self.options.with_libpng = False - - if not self.options.qtgamepad: - self.options.with_sdl2 = False + self.options.opengl = "dynamic" + + def configure(self): + # if self.settings.os != "Linux": + # self.options.with_libiconv = False # QTBUG-84708 + + if not self.options.gui: + del self.options.opengl + del self.options.with_vulkan + del self.options.with_freetype + del self.options.with_fontconfig + del self.options.with_harfbuzz + del self.options.with_libjpeg + del self.options.with_libpng if not self.options.qtmultimedia: - self.options.with_libalsa = False - self.options.with_openal = False + del self.options.with_libalsa + del self.options.with_openal + del self.options.with_gstreamer + del self.options.with_pulseaudio + + if self.settings.os in ("FreeBSD", "Linux"): + if self.options.qtwebengine: + self.options.with_fontconfig = True + else: + del self.options.qtx11extras + + if self.options.multiconfiguration: + del self.settings.build_type - if self.options.qtmultimedia and not self.options.GUI: - raise ConanInvalidConfiguration("Qt multimedia cannot be used without GUI") + config = configparser.ConfigParser() + config.read(os.path.join(self.recipe_folder, "qtmodules%s.conf" % self.version)) + submodules_tree = {} + assert config.sections() + for s in config.sections(): + section = str(s) + assert section.startswith("submodule ") + assert section.count('"') == 2 + modulename = section[section.find('"') + 1: section.rfind('"')] + status = str(config.get(section, "status")) + if status != "obsolete" and status != "ignore": + submodules_tree[modulename] = {"status": status, + "path": str(config.get(section, "path")), "depends": []} + if config.has_option(section, "depends"): + submodules_tree[modulename]["depends"] = [str(i) for i in config.get(section, "depends").split()] + + for m in submodules_tree: + assert m in ["qtbase", "qtqa", "qtrepotools"] or m in self._submodules, "module %s is not present in recipe options : (%s)" % (m, ",".join(self._submodules)) + + for m in self._submodules: + assert m in submodules_tree, "module %s is not present in qtmodules%s.conf : (%s)" % (m, self.version, ",".join(submodules_tree)) - if self.settings.os not in ["Linux", "FreeBSD"]: - self.options.with_libalsa = False + def _enablemodule(mod): + if mod != "qtbase": + setattr(self.options, mod, True) + for req in submodules_tree[mod]["depends"]: + _enablemodule(req) + + for module in self._submodules: + if self.options.get_safe(module): + _enablemodule(module) + + def validate(self): + if self.options.widgets and not self.options.gui: + raise ConanInvalidConfiguration("using option qt:widgets without option qt:gui is not possible. " + "You can either disable qt:widgets or enable qt:gui") if self.options.qtwebengine: if not self.options.shared: - raise ConanInvalidConfiguration("Static builds of Qt Webengine are not supported") + raise ConanInvalidConfiguration("Static builds of Qt WebEngine are not supported") + + if not (self.options.gui and self.options.qtdeclarative and self.options.qtlocation and self.options.qtwebchannel): + raise ConanInvalidConfiguration("option qt:qtwebengine requires also qt:gui, qt:qtdeclarative, qt:qtlocation and qt:qtwebchannel") if tools.cross_building(self.settings, skip_x64_x86=True): raise ConanInvalidConfiguration("Cross compiling Qt WebEngine is not supported") @@ -247,134 +273,113 @@ def configure(self): if self.settings.compiler == "gcc" and tools.Version(self.settings.compiler.version) < "5": raise ConanInvalidConfiguration("Compiling Qt WebEngine with gcc < 5 is not supported") - if self.settings.os == "Android" and self.options.opengl == "desktop": + if self.settings.os == "Android" and self.options.get_safe("opengl", "no") == "desktop": raise ConanInvalidConfiguration("OpenGL desktop is not supported on Android. Consider using OpenGL es2") - if self.settings.os != "Windows" and self.options.opengl == "dynamic": + if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") == "dynamic": raise ConanInvalidConfiguration("Dynamic OpenGL is supported only on Windows.") - if self.options.with_fontconfig and not self.options.with_freetype: + if self.options.get_safe("with_fontconfig", False) and not self.options.get_safe("with_freetype", False): raise ConanInvalidConfiguration("with_fontconfig cannot be enabled if with_freetype is disabled.") - if self.settings.os == "Macos": - del self.settings.os.version - - if self.options.multiconfiguration: - del self.settings.build_type - if not self.options.with_doubleconversion and str(self.settings.compiler.libcxx) != "libc++": - raise ConanInvalidConfiguration('Qt without libc++ needs qt:with_doubleconversion. ' - 'Either enable qt:with_doubleconversion or switch to libc++') - - if tools.os_info.is_linux: - if self.options.qtwebengine: - self.options.with_fontconfig = True + raise ConanInvalidConfiguration("Qt without libc++ needs qt:with_doubleconversion. " + "Either enable qt:with_doubleconversion or switch to libc++") - assert self.version == self._submodules['qtbase']['branch'] + if "MT" in self.settings.get_safe("compiler.runtime", default="") and self.options.shared: + raise ConanInvalidConfiguration("Qt cannot be built as shared library with static runtime") - def _enablemodule(mod): - if mod != 'qtbase': - setattr(self.options, mod, True) - for req in self._submodules[mod]["depends"]: - _enablemodule(req) + if self.settings.compiler == "apple-clang": + if tools.Version(self.settings.compiler.version) < "10.0": + raise ConanInvalidConfiguration("Old versions of apple sdk are not supported by Qt (QTBUG-76777)") + if self.settings.compiler in ["gcc", "clang"]: + if tools.Version(self.settings.compiler.version) < "5.0": + raise ConanInvalidConfiguration("qt 5.15.X does not support GCC or clang before 5.0") - for module in self._submodules: - if module != 'qtbase' and getattr(self.options, module): - _enablemodule(module) + if self.options.get_safe("with_pulseaudio", default=False) and not self.options["pulseaudio"].with_glib: + # https://bugreports.qt.io/browse/QTBUG-95952 + raise ConanInvalidConfiguration("Pulseaudio needs to be built with glib option or qt's configure script won't detect it") def requirements(self): + self.requires("zlib/1.2.11") if self.options.openssl: - self.requires("openssl/1.1.1h") + self.requires("openssl/1.1.1k") if self.options.with_pcre2: - self.requires("pcre2/10.33") + self.requires("pcre2/10.37") + if self.options.get_safe("with_vulkan"): + self.requires("vulkan-loader/1.2.172") if self.options.with_glib: - self.requires("glib/2.67.0") - # if self.options.with_libiconv: - # self.requires("libiconv/1.16") + self.requires("glib/2.69.2") + # if self.options.with_libiconv: # QTBUG-84708 + # self.requires("libiconv/1.16")# QTBUG-84708 if self.options.with_doubleconversion and not self.options.multiconfiguration: self.requires("double-conversion/3.1.5") - if self.options.with_freetype and not self.options.multiconfiguration: + if self.options.get_safe("with_freetype", False) and not self.options.multiconfiguration: self.requires("freetype/2.10.4") - if self.options.with_fontconfig: - self.requires("fontconfig/2.13.92") - if self.options.with_icu: - self.requires("icu/68.1") - if self.options.with_harfbuzz and not self.options.multiconfiguration: - self.requires("harfbuzz/2.7.2") - if self.options.with_libjpeg and not self.options.multiconfiguration: + if self.options.get_safe("with_fontconfig", False): + self.requires("fontconfig/2.13.93") + if self.options.get_safe("with_icu", False): + self.requires("icu/69.1") + if self.options.get_safe("with_harfbuzz", False) and not self.options.multiconfiguration: + self.requires("harfbuzz/2.8.1") + if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.0.5") + self.requires("libjpeg-turbo/2.1.0") else: self.requires("libjpeg/9d") - if self.options.with_libpng and not self.options.multiconfiguration: + if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: self.requires("libpng/1.6.37") if self.options.with_sqlite3 and not self.options.multiconfiguration: - self.requires("sqlite3/3.31.0") + self.requires("sqlite3/3.36.0") self.options["sqlite3"].enable_column_metadata = True - if self.options.with_mysql: - self.requires("libmysqlclient/8.0.17") + if self.options.get_safe("with_mysql", False): + self.requires("libmysqlclient/8.0.25") if self.options.with_pq: - self.requires("libpq/11.5") + self.requires("libpq/13.2") if self.options.with_odbc: if self.settings.os != "Windows": - self.requires("odbc/2.3.7") - if self.options.with_sdl2: - self.requires("sdl2/2.0.10@bincrafters/stable") - if self.options.with_openal: - self.requires("openal/1.19.1") - if self.options.with_libalsa: - self.requires("libalsa/1.1.9") - if self.options.GUI and self.settings.os in ["Linux", "FreeBSD"]: + self.requires("odbc/2.3.9") + if self.options.get_safe("with_openal", False): + self.requires("openal/1.21.0") + if self.options.get_safe("with_libalsa", False): + self.requires("libalsa/1.2.4") + if self.options.gui and self.settings.os == "Linux": self.requires("xorg/system") if not tools.cross_building(self, skip_x64_x86=True): - self.requires("xkbcommon/1.0.1") + self.requires("xkbcommon/1.3.0") + if self.options.get_safe("opengl", "no") != "no": + self.requires("opengl/system") if self.options.with_zstd: - self.requires("zstd/1.4.4") - if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: - self.requires("xorg/system") - self.requires("expat/2.2.10") - #self.requires("ffmpeg/4.2@bincrafters/stable") + self.requires("zstd/1.5.0") + if self.options.qtwebengine and self.settings.os == "Linux": + self.requires("expat/2.4.1") self.requires("opus/1.3.1") - self.requires("egl/system") - - if self.options.opengl in ["desktop", "es2"]: - self.requires('opengl/system') - - def system_requirements(self): - pack_names = [] - if tools.os_info.is_linux: - if tools.os_info.with_apt: - if self.options.qtwebengine: - pack_names.append("libnss3-dev") - pack_names.append("libdbus-1-dev") - if self.options.with_vulkan: - pack_names.append("libvulkan-dev") - - if pack_names: - installer = tools.SystemPackageTool() - for item in pack_names: - installer.install(item) + if self.options.get_safe("with_gstreamer", False): + raise ConanInvalidConfiguration("gst-plugins-base is not yet available on Conan-Center-Index, please use option with_gstreamer=False") + self.requires("gst-plugins-base/1.19.1") + if self.options.get_safe("with_pulseaudio", False): + self.requires("pulseaudio/14.2") + if self.options.with_dbus: + self.requires("dbus/1.12.20") def source(self): tools.get(**self.conan_data["sources"][self.version]) shutil.move("qt-everywhere-src-%s" % self.version, "qt5") - for p in self.conan_data["patches"][self.version]: - tools.patch(**p) + for patch in self.conan_data.get("patches", {}).get(self.version, []): + tools.patch(**patch) for f in ["renderer", os.path.join("renderer", "core"), os.path.join("renderer", "platform")]: tools.replace_in_file(os.path.join(self.source_folder, "qt5", "qtwebengine", "src", "3rdparty", "chromium", "third_party", "blink", f, "BUILD.gn"), - " if (enable_precompiled_headers) {\n if (is_win) {", - " if (enable_precompiled_headers) {\n if (false) {" - ) + " if (enable_precompiled_headers) {\n if (is_win) {", + " if (enable_precompiled_headers) {\n if (false) {" + ) def _make_program(self): if self.settings.compiler == "Visual Studio": return "jom" elif tools.os_info.is_windows: return "mingw32-make" - elif self.settings.os == "FreeBSD": - return "gmake" else: return "make" @@ -384,7 +389,7 @@ def _xplatform(self): return {"x86": "linux-g++-32", "armv6": "linux-arm-gnueabi-g++", "armv7": "linux-arm-gnueabi-g++", - "armv7hf": "linux-arm-gnueabihf-g++", + "armv7hf": "linux-arm-gnueabi-g++", "armv8": "linux-aarch64-gnu-g++"}.get(str(self.settings.arch), "linux-g++") elif self.settings.compiler == "clang": if self.settings.arch == "x86": @@ -410,8 +415,8 @@ def _xplatform(self): return "macx-tvos-clang" elif self.settings.os == "Android": - return {"clang": "android-clang", - "gcc": "android-g++"}.get(str(self.settings.compiler)) + if self.settings.compiler == "clang": + return "android-clang" elif self.settings.os == "Windows": return {"Visual Studio": "win32-msvc", @@ -425,7 +430,10 @@ def _xplatform(self): "x86_64": "winrt-x64-msvc2015"}, "15": {"armv7": "winrt-arm-msvc2017", "x86": "winrt-x86-msvc2017", - "x86_64": "winrt-x64-msvc2017"} + "x86_64": "winrt-x64-msvc2017"}, + "16": {"armv7": "winrt-arm-msvc2019", + "x86": "winrt-x86-msvc2019", + "x86_64": "winrt-x64-msvc2019"} }.get(str(self.settings.compiler.version)).get(str(self.settings.arch)) elif self.settings.os == "FreeBSD": @@ -459,11 +467,14 @@ def build(self): args = ["-confirm-license", "-silent", "-nomake examples", "-nomake tests", "-prefix %s" % self.package_folder] args.append("-v") + args.append("-archdatadir %s" % os.path.join(self.package_folder, "bin", "archdatadir")) + args.append("-datadir %s" % os.path.join(self.package_folder, "bin", "datadir")) + args.append("-sysconfdir %s" % os.path.join(self.package_folder, "bin", "sysconfdir")) if self.options.commercial: args.append("-commercial") else: args.append("-opensource") - if not self.options.GUI: + if not self.options.gui: args.append("-no-gui") if not self.options.widgets: args.append("-no-widgets") @@ -488,23 +499,23 @@ def build(self): args.append("-optimize-size") for module in self._submodules: - if module != 'qtbase' and not getattr(self.options, module) \ - and os.path.isdir(os.path.join(self.source_folder, 'qt5', self._submodules[module]['path'])): + if not self.options.get_safe(module): args.append("-skip " + module) args.append("--zlib=system") # openGL - if self.options.opengl == "no": + opengl = self.options.get_safe("opengl", "no") + if opengl == "no": args += ["-no-opengl"] - elif self.options.opengl == "es2": + elif opengl == "es2": args += ["-opengl es2"] - elif self.options.opengl == "desktop": + elif opengl == "desktop": args += ["-opengl desktop"] - elif self.options.opengl == "dynamic": + elif opengl == "dynamic": args += ["-opengl dynamic"] - if self.options.with_vulkan: + if self.options.get_safe("with_vulkan", False): args.append("-vulkan") else: args.append("-no-vulkan") @@ -518,19 +529,26 @@ def build(self): else: args += ["-openssl-linked"] - # args.append("--iconv=" + ("gnu" if self.options.with_libiconv else "no")) + # args.append("--iconv=" + ("gnu" if self.options.with_libiconv else "no"))# QTBUG-84708 args.append("--glib=" + ("yes" if self.options.with_glib else "no")) args.append("--pcre=" + ("system" if self.options.with_pcre2 else "qt")) - args.append("--fontconfig=" + ("yes" if self.options.with_fontconfig else "no")) - args.append("--icu=" + ("yes" if self.options.with_icu else "no")) - args.append("--sql-mysql=" + ("yes" if self.options.with_mysql else "no")) + args.append("--fontconfig=" + ("yes" if self.options.get_safe("with_fontconfig", False) else "no")) + args.append("--icu=" + ("yes" if self.options.get_safe("with_icu", False) else "no")) + args.append("--sql-mysql=" + ("yes" if self.options.get_safe("with_mysql", False) else "no")) args.append("--sql-psql=" + ("yes" if self.options.with_pq else "no")) args.append("--sql-odbc=" + ("yes" if self.options.with_odbc else "no")) args.append("--zstd=" + ("yes" if self.options.with_zstd else "no")) if self.options.qtmultimedia: - args.append("--alsa=" + ("yes" if self.options.with_libalsa else "no")) + args.append("--alsa=" + ("yes" if self.options.get_safe("with_libalsa", False) else "no")) + args.append("--gstreamer" if self.options.get_safe("with_gstreamer", False) else "--no-gstreamer") + args.append("--pulseaudio" if self.options.get_safe("with_pulseaudio", False) else "--no-pulseaudio") + + if self.options.with_dbus: + args.append("-dbus-linked") + else: + args.append("-no-dbus") for opt, conf_arg in [ ("with_doubleconversion", "doubleconversion"), @@ -539,7 +557,7 @@ def build(self): ("with_libjpeg", "libjpeg"), ("with_libpng", "libpng"), ("with_sqlite3", "sqlite")]: - if getattr(self.options, opt): + if self.options.get_safe(opt, False): if self.options.multiconfiguration: args += ["-qt-" + conf_arg] else: @@ -551,7 +569,7 @@ def build(self): ("openssl", "OPENSSL"), ("pcre2", "PCRE2"), ("glib", "GLIB"), - # ("libiconv", "ICONV"), + # ("libiconv", "ICONV"),# QTBUG-84708 ("double-conversion", "DOUBLECONVERSION"), ("freetype", "FREETYPE"), ("fontconfig", "FONTCONFIG"), @@ -571,7 +589,7 @@ def build(self): ("xkbcommon", "XKBCOMMON")] for package, var in libmap: if package in self.deps_cpp_info.deps: - if package == 'freetype': + if package == "freetype": args.append("\"%s_INCDIR=%s\"" % (var, self.deps_cpp_info[package].include_paths[-1])) args.append("\"%s_LIBS=%s\"" % (var, " ".join(self._gather_libs(package)))) @@ -579,12 +597,13 @@ def build(self): for package in self.deps_cpp_info.deps: args += ["-I \"%s\"" % s for s in self.deps_cpp_info[package].include_paths] args += ["-D %s" % s for s in self.deps_cpp_info[package].defines] - args += ["-L \"%s\"" % s for s in self.deps_cpp_info[package].lib_paths] + lib_arg = "/LIBPATH:" if self.settings.compiler == "Visual Studio" else "-L" + args.append("QMAKE_LFLAGS+=\"%s\"" % " ".join("%s%s" % (lib_arg, l) for package in self.deps_cpp_info.deps for l in self.deps_cpp_info[package].lib_paths)) - if 'libmysqlclient' in self.deps_cpp_info.deps: - args.append("-mysql_config \"%s\"" % os.path.join(self.deps_cpp_info['libmysqlclient'].rootpath, "bin", "mysql_config")) - if 'libpq' in self.deps_cpp_info.deps: - args.append("-psql_config \"%s\"" % os.path.join(self.deps_cpp_info['libpq'].rootpath, "bin", "pg_config")) + if "libmysqlclient" in self.deps_cpp_info.deps: + args.append("-mysql_config \"%s\"" % os.path.join(self.deps_cpp_info["libmysqlclient"].rootpath, "bin", "mysql_config")) + if "libpq" in self.deps_cpp_info.deps: + args.append("-psql_config \"%s\"" % os.path.join(self.deps_cpp_info["libpq"].rootpath, "bin", "pg_config")) if self.settings.os == "Macos": args += ["-no-framework"] elif self.settings.os == "Android": @@ -625,7 +644,7 @@ def _getenvpath(var): os.environ[var] = val return val - value = _getenvpath('CC') + value = _getenvpath("CC") if value: args += ['QMAKE_CC="' + value + '"', 'QMAKE_LINK_C="' + value + '"', @@ -640,48 +659,140 @@ def _getenvpath(var): if tools.os_info.is_linux and self.settings.compiler == "clang": args += ['QMAKE_CXXFLAGS+="-ftemplate-depth=1024"'] - if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: - args += ['-qt-webengine-ffmpeg', - '-system-webengine-opus'] + if self.options.qtwebengine and self.settings.os == "Linux": + args += ["-qt-webengine-ffmpeg", + "-system-webengine-opus"] if self.options.config: args.append(str(self.options.config)) - with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op(): - build_env = { - "MAKEFLAGS": "-j%d" % tools.cpu_count(), - "JOMFLAGS": "j%d" % tools.cpu_count(), - "PKG_CONFIG_PATH": [os.getcwd()]} - if self.settings.os == "Windows": - build_env["PATH"] = [os.path.join(self.source_folder, "qt5", "gnuwin32", "bin")] - - if tools.os_info.is_macos: - open(self.build_folder + "/.qmake.stash" , 'w').close() - open(self.build_folder + "/.qmake.super" , 'w').close() - - with tools.environment_append(build_env): - self.run("%s/qt5/configure %s" % (self.source_folder, " ".join(args)), run_environment=True) - if tools.os_info.is_macos: - with open("bash_env", "w") as f: - f.write('export DYLD_LIBRARY_PATH="%s"' % ":".join(RunEnvironment(self).vars["DYLD_LIBRARY_PATH"])) - with tools.environment_append({ - "BASH_ENV": os.path.abspath("bash_env") + os.mkdir("build_folder") + with tools.chdir("build_folder"): + with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op(): + build_env = {"MAKEFLAGS": "j%d" % tools.cpu_count(), "PKG_CONFIG_PATH": [self.build_folder]} + if self.settings.os == "Windows": + build_env["PATH"] = [os.path.join(self.source_folder, "qt5", "gnuwin32", "bin")] + + with tools.environment_append(build_env): + + if tools.os_info.is_macos: + open(".qmake.stash" , "w").close() + open(".qmake.super" , "w").close() + + self.run("%s/qt5/configure %s" % (self.source_folder, " ".join(args)), run_environment=True) + if tools.os_info.is_macos: + with open("bash_env", "w") as f: + f.write('export DYLD_LIBRARY_PATH="%s"' % ":".join(RunEnvironment(self).vars["DYLD_LIBRARY_PATH"])) + with tools.environment_append({ + "BASH_ENV": os.path.abspath("bash_env") }) if tools.os_info.is_macos else tools.no_op(): - self.run(self._make_program(), run_environment=True) + self.run(self._make_program(), run_environment=True) + + @property + def _cmake_executables_file(self): + return os.path.join("lib", "cmake", "Qt5Core", "conan_qt_executables_variables.cmake") + + def _cmake_qt5_private_file(self, module): + return os.path.join("lib", "cmake", "Qt5{0}".format(module), "conan_qt_qt5_{0}private.cmake".format(module.lower())) def package(self): - self.run("%s install" % self._make_program()) - with open(os.path.join(self.package_folder, "bin", "qt.conf"), 'w') as f: - f.write('[Paths]\nPrefix = ..\n') + with tools.chdir("build_folder"): + self.run("%s install" % self._make_program()) + with open(os.path.join(self.package_folder, "bin", "qt.conf"), "w") as f: + f.write("""[Paths] +Prefix = .. +ArchData = bin/archdatadir +HostData = bin/archdatadir +Data = bin/datadir +Sysconf = bin/sysconfdir +LibraryExecutables = bin/archdatadir/bin +Plugins = bin/archdatadir/plugins +Imports = bin/archdatadir/imports +Qml2Imports = bin/archdatadir/qml +Translations = bin/datadir/translations +Documentation = bin/datadir/doc +Examples = bin/datadir/examples""") self.copy("*LICENSE*", src="qt5/", dst="licenses") for module in self._submodules: - if module != 'qtbase' and not getattr(self.options, module): + if not self.options.get_safe(module): tools.rmdir(os.path.join(self.package_folder, "licenses", module)) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + for mask in ["Find*.cmake", "*Config.cmake", "*-config.cmake"]: + tools.remove_files_by_mask(self.package_folder, mask) + tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la*") + tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.pdb*") + tools.remove_files_by_mask(os.path.join(self.package_folder, "bin"), "*.pdb") # "Qt5Bootstrap" is internal Qt library - removing it to avoid linking error, since it contains # symbols that are also in "Qt5Core.lib". It looks like there is no "Qt5Bootstrap.dll". for fl in glob.glob(os.path.join(self.package_folder, "lib", "*Qt5Bootstrap*")): os.remove(fl) + for m in os.listdir(os.path.join(self.package_folder, "lib", "cmake")): + module = os.path.join(self.package_folder, "lib", "cmake", m, "%sMacros.cmake" % m) + if not os.path.isfile(module): + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake", m)) + + extension = "" + if self.settings.os == "Windows": + extension = ".exe" + v = tools.Version(self.version) + filecontents = textwrap.dedent("""\ + set(QT_CMAKE_EXPORT_NAMESPACE Qt5) + set(QT_VERSION_MAJOR {major}) + set(QT_VERSION_MINOR {minor}) + set(QT_VERSION_PATCH {patch}) + """.format(major=v.major, minor=v.minor, patch=v.patch)) + targets = {} + targets["Core"] = ["moc", "rcc", "qmake"] + targets["DBus"] = ["qdbuscpp2xml", "qdbusxml2cpp"] + if self.options.widgets: + targets["Widgets"] = ["uic"] + if self.options.qttools: + targets["Tools"] = ["qhelpgenerator", "qcollectiongenerator", "qdoc", "qtattributionsscanner"] + targets[""] = ["lconvert", "lrelease", "lupdate"] + if self.options.qtremoteobjects: + targets["RemoteObjects"] = ["repc"] + if self.options.qtscxml: + targets["Scxml"] = ["qscxmlc"] + for namespace, targets in targets.items(): + for target in targets: + filecontents += textwrap.dedent("""\ + if(NOT TARGET ${{QT_CMAKE_EXPORT_NAMESPACE}}::{target}) + add_executable(${{QT_CMAKE_EXPORT_NAMESPACE}}::{target} IMPORTED) + set_target_properties(${{QT_CMAKE_EXPORT_NAMESPACE}}::{target} PROPERTIES IMPORTED_LOCATION ${{CMAKE_CURRENT_LIST_DIR}}/../../../bin/{target}{ext}) + set(Qt5{namespace}_{uppercase_target}_EXECUTABLE ${{QT_CMAKE_EXPORT_NAMESPACE}}::{target}) + endif() + """.format(target=target, ext=extension, namespace=namespace, uppercase_target=target.upper())) + + tools.save(os.path.join(self.package_folder, self._cmake_executables_file), filecontents) + + def _create_private_module(module, dependencies=[]): + dependencies_string = ';'.join('Qt5::%s' % dependency for dependency in dependencies) + contents = textwrap.dedent("""\ + if(NOT TARGET Qt5::{0}Private) + add_library(Qt5::{0}Private INTERFACE IMPORTED) + set_target_properties(Qt5::{0}Private PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${{CMAKE_CURRENT_LIST_DIR}}/../../../include/Qt{0}/{1};${{CMAKE_CURRENT_LIST_DIR}}/../../../include/Qt{0}/{1}/Qt{0}" + INTERFACE_LINK_LIBRARIES "{2}" + ) + + add_library(Qt::{0}Private INTERFACE IMPORTED) + set_target_properties(Qt::{0}Private PROPERTIES + INTERFACE_LINK_LIBRARIES "Qt5::{0}Private" + _qt_is_versionless_target "TRUE" + ) + endif()""".format(module, self.version, dependencies_string)) + + tools.save(os.path.join(self.package_folder, self._cmake_qt5_private_file(module)), contents) + + _create_private_module("Core", ["Core"]) + + if self.options.gui: + _create_private_module("Gui", ["CorePrivate", "Gui"]) + + if self.options.qtdeclarative: + _create_private_module("Qml", ["CorePrivate", "Qml"]) + def package_id(self): del self.info.options.cross_compile del self.info.options.sysroot @@ -692,30 +803,345 @@ def package_id(self): self.info.settings.compiler.runtime = "MT/MTd" def package_info(self): - self.env_info.CMAKE_PREFIX_PATH.append(self.package_folder) + self.cpp_info.names["cmake_find_package"] = "Qt5" + self.cpp_info.names["cmake_find_package_multi"] = "Qt5" - self.cpp_info.libs = tools.collect_libs(self) + libsuffix = "" + if self.settings.build_type == "Debug": + if self.settings.os == "Windows": + libsuffix = "d" + elif tools.is_apple_os(self.settings.os): + libsuffix = "_debug" + + def _get_corrected_reqs(requires): + reqs = [] + for r in requires: + reqs.append(r if "::" in r else "qt%s" % r) + return reqs + + def _create_module(module, requires=[]): + componentname = "qt%s" % module + assert componentname not in self.cpp_info.components, "Module %s already present in self.cpp_info.components" % module + self.cpp_info.components[componentname].names["cmake_find_package"] = module + self.cpp_info.components[componentname].names["cmake_find_package_multi"] = module + self.cpp_info.components[componentname].libs = ["Qt5%s%s" % (module, libsuffix)] + self.cpp_info.components[componentname].includedirs = ["include", os.path.join("include", "Qt%s" % module)] + self.cpp_info.components[componentname].defines = ["QT_%s_LIB" % module.upper()] + if module != "Core" and "Core" not in requires: + requires.append("Core") + self.cpp_info.components[componentname].requires = _get_corrected_reqs(requires) + + def _create_plugin(pluginname, libname, type, requires): + componentname = "qt%s" % pluginname + assert componentname not in self.cpp_info.components, "Plugin %s already present in self.cpp_info.components" % pluginname + self.cpp_info.components[componentname].names["cmake_find_package"] = pluginname + self.cpp_info.components[componentname].names["cmake_find_package_multi"] = pluginname + if not self.options.shared: + self.cpp_info.components[componentname].libs = [libname + libsuffix] + self.cpp_info.components[componentname].libdirs = [os.path.join("bin", "archdatadir", "plugins", type)] + self.cpp_info.components[componentname].includedirs = [] + if "Core" not in requires: + requires.append("Core") + self.cpp_info.components[componentname].requires = _get_corrected_reqs(requires) + + core_reqs = ["zlib::zlib"] + if self.options.with_pcre2: + core_reqs.append("pcre2::pcre2") + if self.options.with_doubleconversion: + core_reqs.append("double-conversion::double-conversion") + if self.options.get_safe("with_icu", False): + core_reqs.append("icu::icu") + if self.options.with_zstd: + core_reqs.append("zstd::zstd") + if self.options.with_glib: + core_reqs.append("glib::glib-2.0") - # Add top level include directory, so code compile if someone uses - # includes with prefixes (e.g. "#include ") - self.cpp_info.includedirs = ['include'] + _create_module("Core", core_reqs) + if self.settings.compiler == "Visual Studio": + self.cpp_info.components["qtCore"].exelinkflags.append("-ENTRY:mainCRTStartup") + + if self.options.gui: + gui_reqs = [] + if self.options.with_dbus: + gui_reqs.append("DBus") + if self.options.with_freetype: + gui_reqs.append("freetype::freetype") + if self.options.with_libpng: + gui_reqs.append("libpng::libpng") + if self.options.get_safe("with_fontconfig", False): + gui_reqs.append("fontconfig::fontconfig") + if self.settings.os in ["Linux", "FreeBSD"]: + gui_reqs.append("xorg::xorg") + if not tools.cross_building(self, skip_x64_x86=True): + gui_reqs.append("xkbcommon::xkbcommon") + if self.options.get_safe("opengl", "no") != "no": + gui_reqs.append("opengl::opengl") + if self.options.with_harfbuzz: + gui_reqs.append("harfbuzz::harfbuzz") + if self.options.with_libjpeg == "libjpeg-turbo": + gui_reqs.append("libjpeg-turbo::libjpeg-turbo") + if self.options.with_libjpeg == "libjpeg": + gui_reqs.append("libjpeg::libjpeg") + _create_module("Gui", gui_reqs) + if self.options.with_sqlite3: + _create_plugin("QSQLiteDriverPlugin", "qsqlite", "sqldrivers", ["sqlite3::sqlite3"]) + if self.options.with_pq: + _create_plugin("QPSQLDriverPlugin", "qsqlpsql", "sqldrivers", ["libpq::libpq"]) + if self.options.get_safe("with_mysql", False): + _create_plugin("QMySQLDriverPlugin", "qsqlmysql", "sqldrivers", ["libmysqlclient::libmysqlclient"]) + if self.options.with_odbc: + if self.settings.os != "Windows": + _create_plugin("QODBCDriverPlugin", "qsqlodbc", "sqldrivers", ["odbc::odbc"]) + networkReqs = [] + if self.options.openssl: + networkReqs.append("openssl::openssl") + _create_module("Network", networkReqs) + _create_module("Sql") + _create_module("Test") + if self.options.widgets: + _create_module("Widgets", ["Gui"]) + if self.options.gui and self.options.widgets: + _create_module("PrintSupport", ["Gui", "Widgets"]) + if self.options.get_safe("opengl", "no") != "no" and self.options.gui: + _create_module("OpenGL", ["Gui"]) + if self.options.widgets and self.options.get_safe("opengl", "no") != "no": + _create_module("OpenGLExtensions", ["Gui"]) + if self.options.with_dbus: + _create_module("DBus", ["dbus::dbus"]) + _create_module("Concurrent") + _create_module("Xml") + + if self.options.qtdeclarative: + _create_module("Qml", ["Network"]) + self.cpp_info.components["qtQml"].build_modules["cmake_find_package"].append(self._cmake_qt5_private_file("Qml")) + self.cpp_info.components["qtQml"].build_modules["cmake_find_package_multi"].append(self._cmake_qt5_private_file("Qml")) + _create_module("QmlModels", ["Qml"]) + self.cpp_info.components["qtQmlImportScanner"].names["cmake_find_package"] = "QmlImportScanner" # this is an alias for Qml and there to integrate with existing consumers + self.cpp_info.components["qtQmlImportScanner"].names["cmake_find_package_multi"] = "QmlImportScanner" + self.cpp_info.components["qtQmlImportScanner"].requires = _get_corrected_reqs(["Qml"]) + if self.options.gui: + _create_module("Quick", ["Gui", "Qml", "QmlModels"]) + if self.options.widgets: + _create_module("QuickWidgets", ["Gui", "Qml", "Quick", "Widgets"]) + _create_module("QuickShapes", ["Gui", "Qml", "Quick"]) + _create_module("QmlWorkerScript", ["Qml"]) + _create_module("QuickTest", ["Test"]) + + if self.options.qttools and self.options.gui and self.options.widgets: + self.cpp_info.components["qtLinguistTools"].names["cmake_find_package"] = "LinguistTools" + self.cpp_info.components["qtLinguistTools"].names["cmake_find_package_multi"] = "LinguistTools" + _create_module("UiPlugin", ["Gui", "Widgets"]) + self.cpp_info.components["qtUiPlugin"].libs = [] # this is a collection of abstract classes, so this is header-only + self.cpp_info.components["qtUiPlugin"].libdirs = [] + _create_module("UiTools", ["UiPlugin", "Gui", "Widgets"]) + _create_module("Designer", ["Gui", "UiPlugin", "Widgets", "Xml"]) + _create_module("Help", ["Gui", "Sql", "Widgets"]) + + if self.options.qtquick3d and self.options.gui: + _create_module("Quick3DUtils", ["Gui"]) + _create_module("Quick3DAssetImport", ["Gui", "Qml", "Quick3DUtils"]) + _create_module("Quick3DRuntimeRender", ["Gui", "Quick", "Quick3DAssetImport", "Quick3DUtils", "ShaderTools"]) + _create_module("Quick3D", ["Gui", "Qml", "Quick", "Quick3DRuntimeRender"]) + + if self.options.qtquickcontrols2 and self.options.gui: + _create_module("QuickControls2", ["Gui", "Quick"]) + _create_module("QuickTemplates2", ["Gui", "Quick"]) + + if self.options.qtsvg and self.options.gui: + _create_module("Svg", ["Gui"]) + + if self.options.qtwayland and self.options.gui: + _create_module("WaylandClient", ["Gui", "wayland::wayland-client"]) + _create_module("WaylandCompositor", ["Gui", "wayland::wayland-server"]) + + if self.options.qtlocation: + _create_module("Positioning") + _create_module("Location", ["Gui", "Quick"]) + _create_plugin("QGeoServiceProviderFactoryMapbox", "qtgeoservices_mapbox", "geoservices", []) + _create_plugin("QGeoServiceProviderFactoryMapboxGL", "qtgeoservices_mapboxgl", "geoservices", []) + _create_plugin("GeoServiceProviderFactoryEsri", "qtgeoservices_esri", "geoservices", []) + _create_plugin("QGeoServiceProviderFactoryItemsOverlay", "qtgeoservices_itemsoverlay", "geoservices", []) + _create_plugin("QGeoServiceProviderFactoryNokia", "qtgeoservices_nokia", "geoservices", []) + _create_plugin("QGeoServiceProviderFactoryOsm", "qtgeoservices_osm", "geoservices", []) + _create_plugin("QGeoPositionInfoSourceFactoryGeoclue", "qtposition_geoclue", "position", []) + _create_plugin("QGeoPositionInfoSourceFactoryGeoclue2", "qtposition_geoclue2", "position", []) + _create_plugin("QGeoPositionInfoSourceFactoryPoll", "qtposition_positionpoll", "position", []) + _create_plugin("QGeoPositionInfoSourceFactorySerialNmea", "qtposition_serialnmea", "position", []) + + if self.options.qtwebchannel: + _create_module("WebChannel", ["Qml"]) + + if self.options.qtwebengine: + _create_module("WebEngineCore", ["Gui", "Quick", "WebChannel", "Positioning", "expat::expat", "opus::libopus"]) + _create_module("WebEngine", ["WebEngineCore"]) + _create_module("WebEngineWidgets", ["WebEngineCore", "Quick", "PrintSupport", "Widgets", "Gui", "Network"]) + + if self.options.qtserialport: + _create_module("SerialPort") + + if self.options.qtserialbus: + _create_module("SerialBus", ["SerialPort"]) + _create_plugin("PassThruCanBusPlugin", "qtpassthrucanbus", "canbus", []) + _create_plugin("PeakCanBusPlugin", "qtpeakcanbus", "canbus", []) + _create_plugin("SocketCanBusPlugin", "qtsocketcanbus", "canbus", []) + _create_plugin("TinyCanBusPlugin", "qttinycanbus", "canbus", []) + _create_plugin("VirtualCanBusPlugin", "qtvirtualcanbus", "canbus", []) + + if self.options.qtsensors: + _create_module("Sensors") + _create_plugin("genericSensorPlugin", "qtsensors_generic", "sensors", []) + _create_plugin("IIOSensorProxySensorPlugin", "qtsensors_iio-sensor-proxy", "sensors", []) + if self.settings.os == "Linux": + _create_plugin("LinuxSensorPlugin", "qtsensors_linuxsys", "sensors", []) + _create_plugin("QtSensorGesturePlugin", "qtsensorgestures_plugin", "sensorgestures", []) + _create_plugin("QShakeSensorGesturePlugin", "qtsensorgestures_shakeplugin", "sensorgestures", []) + + if self.options.qtscxml: + _create_module("Scxml", ["Qml"]) + + if self.options.qtpurchasing: + _create_module("Purchasing") + + if self.options.qtcharts: + _create_module("Charts", ["Gui", "Widgets"]) + + if self.options.qt3d: + _create_module("3DCore", ["Gui", "Network"]) + + _create_module("3DRender", ["3DCore"]) + _create_plugin("DefaultGeometryLoaderPlugin", "defaultgeometryloader", "geometryloaders", []) + _create_plugin("GLTFGeometryLoaderPlugin", "gltfgeometryloader", "geometryloaders", []) + _create_plugin("GLTFSceneExportPlugin", "gltfsceneexport", "sceneparsers", []) + _create_plugin("GLTFSceneImportPlugin", "gltfsceneimport", "sceneparsers", []) + _create_plugin("OpenGLRendererPlugin", "openglrenderer", "renderers", []) + _create_plugin("Scene2DPlugin", "scene2d", "renderplugins", []) + + _create_module("3DAnimation", ["3DRender", "3DCore", "Gui"]) + _create_module("3DInput", ["3DCore", "GamePad", "Gui"]) + _create_module("3DLogic", ["3DCore", "Gui"]) + _create_module("3DExtras", ["3DRender", "3DInput", "3DLogic", "3DCore", "Gui"]) + _create_module("3DQuick", ["3DCore", "Quick", "Gui", "Qml"]) + _create_module("3DQuickAnimation", ["3DAnimation", "3DRender", "3DQuick", "3DCore", "Gui", "Qml"]) + _create_module("3DQuickExtras", ["3DExtras", "3DInput", "3DQuick", "3DRender", "3DLogic", "3DCore", "Gui", "Qml"]) + _create_module("3DQuickInput", ["3DInput", "3DQuick", "3DCore", "Gui", "Qml"]) + _create_module("3DQuickRender", ["3DRender", "3DQuick", "3DCore", "Gui", "Qml"]) + _create_module("3DQuickScene2D", ["3DRender", "3DQuick", "3DCore", "Gui", "Qml"]) + + if self.options.qtgamepad: + _create_module("Gamepad", ["Gui"]) + if self.settings.os == "Linux": + _create_plugin("QEvdevGamepadBackendPlugin", "evdevgamepad", "gamepads", []) + if self.settings.os == "Macos": + _create_plugin("QDarwinGamepadBackendPlugin", "darwingamepad", "gamepads", []) + if self.settings.os =="Windows": + _create_plugin("QXInputGamepadBackendPlugin", "xinputgamepad", "gamepads", []) + + if self.options.qtmultimedia: + multimedia_reqs = ["Network", "Gui"] + if self.options.get_safe("with_libalsa", False): + multimedia_reqs.append("libalsa::libalsa") + if self.options.with_openal: + multimedia_reqs.append("openal::openal") + if self.options.get_safe("with_pulseaudio", False): + multimedia_reqs.append("pulseaudio::pulse") + _create_module("Multimedia", multimedia_reqs) + _create_module("MultimediaWidgets", ["Multimedia", "Widgets", "Gui"]) + if self.options.qtdeclarative and self.options.gui: + _create_module("MultimediaQuick", ["Multimedia", "Quick"]) + _create_plugin("QM3uPlaylistPlugin", "qtmultimedia_m3u", "playlistformats", []) + if self.options.with_gstreamer: + _create_module("MultimediaGstTools", ["Multimedia", "MultimediaWidgets", "Gui", "gstreamer::gstreamer"]) + _create_plugin("QGstreamerAudioDecoderServicePlugin", "gstaudiodecoder", "mediaservice", []) + _create_plugin("QGstreamerCaptureServicePlugin", "gstmediacapture", "mediaservice", []) + _create_plugin("QGstreamerPlayerServicePlugin", "gstmediaplayer", "mediaservice", []) + if self.settings.os == "Linux": + _create_plugin("CameraBinServicePlugin", "gstcamerabin", "mediaservice", []) + _create_plugin("QAlsaPlugin", "qtaudio_alsa", "audio", []) + if self.settings.os == "Windows": + _create_plugin("AudioCaptureServicePlugin", "qtmedia_audioengine", "mediaservice", []) + _create_plugin("DSServicePlugin", "dsengine", "mediaservice", []) + _create_plugin("QWindowsAudioPlugin", "qtaudio_windows", "audio", []) + if self.settings.os == "Macos": + _create_plugin("AudioCaptureServicePlugin", "qtmedia_audioengine", "mediaservice", []) + _create_plugin("AVFMediaPlayerServicePlugin", "qavfmediaplayer", "mediaservice", []) + _create_plugin("AVFServicePlugin", "qavfcamera", "mediaservice", []) + _create_plugin("CoreAudioPlugin", "qtaudio_coreaudio", "audio", []) + + if self.options.qtwebsockets: + _create_module("WebSockets", ["Network"]) + + if self.options.qtconnectivity: + _create_module("Bluetooth", ["Network"]) + _create_module("Nfc", []) + + if self.options.qtdatavis3d: + _create_module("DataVisualization", ["Gui"]) + + if self.options.qtnetworkauth: + _create_module("NetworkAuth", ["Network"]) - # Add all Qt module directories (QtCore, QtGui, QtWidgets and so on), so prefix - # can be omited in includes (e.g. "#include " => "#include ") - fu = ['include/' + f.name for f in os.scandir('include') if f.is_dir()] - self.cpp_info.includedirs.extend(fu) + if self.settings.os != "Windows": + self.cpp_info.components["qtCore"].cxxflags.append("-fPIC") + + if self.options.get_safe("qtx11extras"): + _create_module("X11Extras") + + if self.options.qtremoteobjects: + _create_module("RemoteObjects") + + if self.options.qtwinextras: + _create_module("WinExtras") + + if self.options.qtxmlpatterns: + _create_module("XmlPatterns", ["Network"]) if not self.options.shared: - if self.settings.os == 'Windows': - self.cpp_info.system_libs.append('Version') # 'Qt5Cored.lib' require 'GetFileVersionInfoW' and 'VerQueryValueW' which are in 'Version.lib' library - self.cpp_info.system_libs.append('Winmm') # 'Qt5Cored.lib' require '__imp_timeSetEvent' which is in 'Winmm.lib' library - self.cpp_info.system_libs.append('Netapi32') # 'Qt5Cored.lib' require 'NetApiBufferFree' which is in 'Netapi32.lib' library - self.cpp_info.system_libs.append('UserEnv') # 'Qt5Cored.lib' require '__imp_GetUserProfileDirectoryW ' which is in 'UserEnv.Lib' library - - if self.settings.os == 'Macos': - self.cpp_info.frameworks.extend(["IOKit"]) # 'libQt5Core.a' require '_IORegistryEntryCreateCFProperty', '_IOServiceGetMatchingService' and much more which are in 'IOKit' framework - self.cpp_info.frameworks.extend(["Cocoa"]) # 'libQt5Core.a' require '_OBJC_CLASS_$_NSApplication' and more, which are in 'Cocoa' framework - self.cpp_info.frameworks.extend(["Security"]) # 'libQt5Core.a' require '_SecRequirementCreateWithString' and more, which are in 'Security' framework + if self.settings.os == "Windows": + self.cpp_info.components["qtCore"].system_libs.append("version") # qtcore requires "GetFileVersionInfoW" and "VerQueryValueW" which are in "Version.lib" library + self.cpp_info.components["qtCore"].system_libs.append("winmm") # qtcore requires "__imp_timeSetEvent" which is in "Winmm.lib" library + self.cpp_info.components["qtCore"].system_libs.append("netapi32") # qtcore requires "NetApiBufferFree" which is in "Netapi32.lib" library + self.cpp_info.components["qtCore"].system_libs.append("userenv") # qtcore requires "__imp_GetUserProfileDirectoryW " which is in "UserEnv.Lib" library + self.cpp_info.components["qtCore"].system_libs.append("ws2_32") # qtcore requires "WSAStartup " which is in "Ws2_32.Lib" library + self.cpp_info.components["qtNetwork"].system_libs.append("dnsapi") # qtnetwork from qtbase requires "DnsFree" which is in "Dnsapi.lib" library + self.cpp_info.components["qtNetwork"].system_libs.append("iphlpapi") + if self.options.qtwinextras: + self.cpp_info.components["qtWinExtras"].system_libs.append("dwmapi") # qtwinextras requires "DwmGetColorizationColor" which is in "dwmapi.lib" library + + + if self.settings.os == "Macos": + self.cpp_info.components["qtCore"].frameworks.append("IOKit") # qtcore requires "_IORegistryEntryCreateCFProperty", "_IOServiceGetMatchingService" and much more which are in "IOKit" framework + self.cpp_info.components["qtCore"].frameworks.append("Cocoa") # qtcore requires "_OBJC_CLASS_$_NSApplication" and more, which are in "Cocoa" framework + self.cpp_info.components["qtCore"].frameworks.append("Security") # qtcore requires "_SecRequirementCreateWithString" and more, which are in "Security" framework + self.cpp_info.components["qtNetwork"].frameworks.append("SystemConfiguration") + self.cpp_info.components["qtNetwork"].frameworks.append("GSS") + + self.cpp_info.components["qtCore"].builddirs.append(os.path.join("bin","archdatadir","bin")) + self.cpp_info.components["qtCore"].build_modules["cmake_find_package"].append(self._cmake_executables_file) + self.cpp_info.components["qtCore"].build_modules["cmake_find_package_multi"].append(self._cmake_executables_file) + self.cpp_info.components["qtCore"].build_modules["cmake_find_package"].append(self._cmake_qt5_private_file("Core")) + self.cpp_info.components["qtCore"].build_modules["cmake_find_package_multi"].append(self._cmake_qt5_private_file("Core")) + + self.cpp_info.components["qtGui"].build_modules["cmake_find_package"].append(self._cmake_qt5_private_file("Gui")) + self.cpp_info.components["qtGui"].build_modules["cmake_find_package_multi"].append(self._cmake_qt5_private_file("Gui")) + + for m in os.listdir(os.path.join("lib", "cmake")): + module = os.path.join("lib", "cmake", m, "%sMacros.cmake" % m) + component_name = m.replace("Qt5", "qt") + if os.path.isfile(module): + self.cpp_info.components[component_name].build_modules["cmake_find_package"].append(module) + self.cpp_info.components[component_name].build_modules["cmake_find_package_multi"].append(module) + self.cpp_info.components[component_name].builddirs.append(os.path.join("lib", "cmake", m)) + + objects_dirs = glob.glob(os.path.join(self.package_folder, "lib", "objects-*/")) + for object_dir in objects_dirs: + for m in os.listdir(object_dir): + submodules_dir = os.path.join(object_dir, m) + component = "qt" + m[:m.find("_")] + for sub_dir in os.listdir(submodules_dir): + submodule_dir = os.path.join(submodules_dir, sub_dir) + obj_files = [os.path.join(submodule_dir, file) for file in os.listdir(submodule_dir)] + self.cpp_info.components[component].exelinkflags.extend(obj_files) + self.cpp_info.components[component].sharedlinkflags.extend(obj_files) @staticmethod def _remove_duplicate(l): diff --git a/patches/7371d3a.diff b/patches/7371d3a.diff new file mode 100644 index 0000000..9488a6a --- /dev/null +++ b/patches/7371d3a.diff @@ -0,0 +1,38 @@ +Parent: 30151e20 (Fix misidentification of some shearing QTransforms as only rotating) +Author: Zhang Yu +AuthorDate: 2020-11-17 21:05:39 +0800 +Commit: Zhang Yu +CommitDate: 2020-11-18 07:41:48 +0000 + +Fix QGraphicsItem crash if click right button of mouse + +In this case, the 'parent' is QGraphicsTextItem which isn't a object +inheriting from QWidget. Converting QGraphicsTextItem to QWidget +by static_cast and using it as QWidget leads to crash. + +Fixes: QTBUG-88309 +Change-Id: I3c583f43125eb36841848434d1fa9a135b0e9f57 +Reviewed-by: Volker Hilsheimer +(cherry picked from commit 4df5f93018344f6cdc6cd5a08a084b1c61e0c076) + +diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp +index 40b8af6..e2a07c0 100644 +--- a/src/widgets/widgets/qwidgettextcontrol.cpp ++++ b/src/widgets/widgets/qwidgettextcontrol.cpp +@@ -1942,10 +1942,14 @@ + if (!menu) + return; + menu->setAttribute(Qt::WA_DeleteOnClose); +- if (auto *window = static_cast(parent)->window()->windowHandle()) { +- QMenuPrivate::get(menu)->topData()->initialScreenIndex = ++ ++ if (auto *widget = qobject_cast(parent)) { ++ if (auto *window = widget->window()->windowHandle()) { ++ QMenuPrivate::get(menu)->topData()->initialScreenIndex = + QGuiApplication::screens().indexOf(window->screen()); ++ } + } ++ + menu->popup(screenPos); + #endif + } diff --git a/patches/QTBUG-88625.diff b/patches/QTBUG-88625.diff new file mode 100644 index 0000000..ed0c1fd --- /dev/null +++ b/patches/QTBUG-88625.diff @@ -0,0 +1,58 @@ +Fix compile errors in QtWebEngine when building with VS2019 >= 16.8.0 . +See https://bugreports.qt.io/browse/QTBUG-88625 and +https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/321741 . + +diff -u -r a/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp b/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp +--- a/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp 2021-05-20 13:38:32.243947800 +0200 ++++ b/src/3rdparty/chromium/third_party/angle/src/common/mathutil.cpp 2021-05-20 12:25:30.392900700 +0200 +@@ -72,11 +72,11 @@ + const RGB9E5Data *inputData = reinterpret_cast(&input); + + *red = +- inputData->R * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); ++ inputData->R * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); + *green = +- inputData->G * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); ++ inputData->G * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); + *blue = +- inputData->B * pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); ++ inputData->B * (float)pow(2.0f, (int)inputData->E - g_sharedexp_bias - g_sharedexp_mantissabits); + } + + } // namespace gl +diff -u -r a/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h b/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h +--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h 2020-11-07 02:22:36.000000000 +0100 ++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/lab_color_space.h 2021-05-20 13:39:42.890109500 +0200 +@@ -130,7 +130,7 @@ + // https://en.wikipedia.org/wiki/CIELAB_color_space#Forward_transformation. + FloatPoint3D toXYZ(const FloatPoint3D& lab) const { + auto invf = [](float x) { +- return x > kSigma ? pow(x, 3) : 3 * kSigma2 * (x - 4.0f / 29.0f); ++ return x > kSigma ? (float)pow(x, 3) : 3 * kSigma2 * (x - 4.0f / 29.0f); + }; + + FloatPoint3D v = {clamp(lab.X(), 0.0f, 100.0f), +diff -u -r a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h +--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h 2020-11-07 02:22:36.000000000 +0100 ++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h 2021-05-20 13:41:08.983902900 +0200 +@@ -197,6 +197,20 @@ + } + return *this; + } ++ ++ #if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC) ++ TimestampedTracePiece& operator=(TimestampedTracePiece&& ttp) const ++ { ++ if (this != &ttp) { ++ // First invoke the destructor and then invoke the move constructor ++ // inline via placement-new to implement move-assignment. ++ this->~TimestampedTracePiece(); ++ new (const_cast(this)) TimestampedTracePiece(std::move(ttp)); ++ } ++ ++ return const_cast(*this); ++ } ++#endif // PERFETTO_BUILDFLAG(PERFETTO_COMPILER_MSVC) + + ~TimestampedTracePiece() { + switch (type) { diff --git a/patches/QTBUG-90395.diff b/patches/QTBUG-90395.diff new file mode 100644 index 0000000..9d39131 --- /dev/null +++ b/patches/QTBUG-90395.diff @@ -0,0 +1,38 @@ +Description: include to fix some GCC 11 build issues +Origin: upstream, commits: + https://code.qt.io/cgit/qt/qtbase.git/commit/?id=813a928c7c3cf986 + https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9c56d4da2ff631a8 +Last-Update: 2021-01-26 + +--- a/src/corelib/global/qendian.h ++++ b/src/corelib/global/qendian.h +@@ -44,6 +44,8 @@ + #include + #include + ++#include ++ + // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems + #include + #include +--- a/src/corelib/global/qfloat16.h ++++ b/src/corelib/global/qfloat16.h +@@ -43,6 +43,7 @@ + + #include + #include ++#include + #include + + #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__) +--- a/src/corelib/text/qbytearraymatcher.h ++++ b/src/corelib/text/qbytearraymatcher.h +@@ -42,6 +42,8 @@ + + #include + ++#include ++ + QT_BEGIN_NAMESPACE + + diff --git a/patches/declarative_missing_header.diff b/patches/declarative_missing_header.diff new file mode 100644 index 0000000..3422534 --- /dev/null +++ b/patches/declarative_missing_header.diff @@ -0,0 +1,11 @@ +--- a/src/qmldebug/qqmlprofilerevent_p.h ++++ b/src/qmldebug/qqmlprofilerevent_p.h +@@ -49,7 +49,7 @@ + + #include + #include +- ++#include + // + // W A R N I N G + // ------------- diff --git a/patches/fix-macdeployqt.diff b/patches/fix-macdeployqt.diff new file mode 100644 index 0000000..a6e5f96 --- /dev/null +++ b/patches/fix-macdeployqt.diff @@ -0,0 +1,66 @@ +From 03abcbabbd4caa11048d19d95b23f165cd7a5361 Mon Sep 17 00:00:00 2001 +From: Seth Parker +Date: Wed, 31 Mar 2021 15:34:10 -0400 +Subject: [PATCH] macdeployqt: Fix plugin resolution bugs for non-standard + installs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Uses QLibraryInfo to resolve plugins at installed locations. + +[ChangeLog][macOS][macdeployqt] Uses QLibraryInfo to resolve plugins at install locations. + +Fixes: QTBUG-91644 +Change-Id: Ie309061024abd7a58ea62d707716342c99897c26 +Reviewed-by: Morten Johan Sørvig +--- + src/macdeployqt/macdeployqt/main.cpp | 30 ++++++++++++++++++++++------ + 1 file changed, 24 insertions(+), 6 deletions(-) + +diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp +index 8914e835b..628a71378 100644 +--- a/src/macdeployqt/macdeployqt/main.cpp ++++ b/src/macdeployqt/macdeployqt/main.cpp +@@ -27,6 +27,7 @@ + ****************************************************************************/ + #include + #include ++#include + + #include "../shared/shared.h" + +@@ -236,10 +237,28 @@ int main(int argc, char **argv) + } + +- if (plugins && !deploymentInfo.qtPath.isEmpty()) { +- deploymentInfo.pluginPath = deploymentInfo.qtPath + "/plugins"; +- LogNormal(); +- deployPlugins(appBundlePath, deploymentInfo, useDebugLibs); +- createQtConf(appBundlePath); ++ // Handle plugins ++ if (plugins) { ++ // Set the plugins search directory ++ deploymentInfo.pluginPath = QLibraryInfo::location(QLibraryInfo::PluginsPath); ++ ++ // Sanity checks ++ if (deploymentInfo.pluginPath.isEmpty()) { ++ LogError() << "Missing Qt plugins path\n"; ++ return 1; ++ } ++ ++ if (!QDir(deploymentInfo.pluginPath).exists()) { ++ LogError() << "Plugins path does not exist" << deploymentInfo.pluginPath << "\n"; ++ return 1; ++ } ++ ++ // Deploy plugins ++ Q_ASSERT(!deploymentInfo.pluginPath.isEmpty()); ++ if (!deploymentInfo.pluginPath.isEmpty()) { ++ LogNormal(); ++ deployPlugins(appBundlePath, deploymentInfo, useDebugLibs); ++ createQtConf(appBundlePath); ++ } + } + + if (runStripEnabled) diff --git a/qtmodules5.15.2.conf b/qtmodules5.15.2.conf new file mode 100644 index 0000000..788b31c --- /dev/null +++ b/qtmodules5.15.2.conf @@ -0,0 +1,284 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtsvg + path = qtdeclarative + url = ../qtdeclarative.git + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + status = addon +[submodule "qtscript"] + depends = qtbase + recommends = qttools + path = qtscript + url = ../qtscript.git + status = deprecated +[submodule "qtmultimedia"] + depends = qtbase + recommends = qtdeclarative + path = qtmultimedia + url = ../qtmultimedia.git + status = essential +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + status = deprecated +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtquickcontrols qtquickcontrols2 + path = qtdoc + url = ../qtdoc.git + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = master + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase + recommends = qtdeclarative qtquickcontrols qtquickcontrols2 qtserialport + path = qtlocation + url = ../qtlocation.git + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtdocgallery"] + depends = qtdeclarative + path = qtdocgallery + url = ../qtdocgallery.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative qtandroidextras + path = qtconnectivity + url = ../qtconnectivity.git + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtimageformats qtgamepad + path = qt3d + url = ../qt3d.git + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + status = addon +[submodule "qtgraphicaleffects"] + depends = qtdeclarative + path = qtgraphicaleffects + url = ../qtgraphicaleffects.git + status = essential +[submodule "qtquickcontrols"] + depends = qtdeclarative + recommends = qtgraphicaleffects + path = qtquickcontrols + url = ../qtquickcontrols.git + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + status = addon +[submodule "qtx11extras"] + depends = qtbase + path = qtx11extras + url = ../qtx11extras.git + status = addon +[submodule "qtmacextras"] + depends = qtbase + path = qtmacextras + url = ../qtmacextras.git + status = addon +[submodule "qtwinextras"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtwinextras + url = ../qtwinextras.git + status = addon +[submodule "qtandroidextras"] + depends = qtbase + path = qtandroidextras + url = ../qtandroidextras.git + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtquickcontrols qtquickcontrols2 qtlocation qtwebchannel qttools + path = qtwebengine + url = ../qtwebengine.git + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + status = addon +[submodule "qtquickcontrols2"] + depends = qtgraphicaleffects + recommends = qtimageformats + path = qtquickcontrols2 + url = ../qtquickcontrols2.git + status = essential +[submodule "qtpurchasing"] + depends = qtbase + recommends = qtdeclarative qtandroidextras + path = qtpurchasing + url = ../qtpurchasing.git + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia qtquickcontrols + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + status = addon +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + status = addon +[submodule "qtspeech"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtspeech + url = ../qtspeech.git + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + status = addon +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative + path = qtquick3d + url = ../qtquick3d.git + status = addon diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt new file mode 100644 index 0000000..0f36d47 --- /dev/null +++ b/test_package/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.1.0) + +set(CMAKE_CXX_STANDARD 11) + +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_set_vs_runtime() +conan_set_libcxx() +conan_output_dirs_setup() + +find_package(Qt5 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(SOURCES test_package.cpp greeter.h example.qrc) + +add_executable(${PROJECT_NAME} WIN32 ${SOURCES}) + +target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Network Qt5::Sql Qt5::Concurrent Qt5::Xml) diff --git a/test_package/conanfile.py b/test_package/conanfile.py index c4b1fd9..39b3ed2 100644 --- a/test_package/conanfile.py +++ b/test_package/conanfile.py @@ -1,19 +1,19 @@ import os import shutil -from conans import ConanFile, CMake, tools, Meson, RunEnvironment +from conans import ConanFile, tools, Meson, RunEnvironment, CMake from conans.errors import ConanException class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "qt", "cmake", "cmake_find_package_multi" + generators = "qt", "cmake", "cmake_find_package_multi", "qmake" def build_requirements(self): if tools.os_info.is_windows and self.settings.compiler == "Visual Studio": self.build_requires("jom/1.1.3") if self._meson_supported(): - self.build_requires("meson/0.54.2") + self.build_requires("meson/0.57.1") def _is_mingw(self): return self.settings.os == "Windows" and self.settings.compiler == "gcc" @@ -24,10 +24,6 @@ def _meson_supported(self): not tools.os_info.is_macos and\ not self._is_mingw() - def _cmake_supported(self): - return self.options["qt"].shared or\ - not self._is_mingw() - def _build_with_qmake(self): tools.mkdir("qmake_folder") with tools.chdir("qmake_folder"): @@ -77,17 +73,6 @@ def _build_with_meson(self): raise meson.build() - def _build_with_cmake(self): - if self._cmake_supported(): - self.output.info("Building with CMake") - env_build = RunEnvironment(self) - with tools.environment_append(env_build.vars): - cmake = CMake(self, set_cmake_flags=True) - if self.settings.os == "Macos": - cmake.definitions['CMAKE_OSX_DEPLOYMENT_TARGET'] = '10.14' - cmake.configure(source_folder="cmake", build_folder="cmake_folder") - cmake.build() - def _build_with_cmake_find_package_multi(self): self.output.info("Building with cmake_find_package_multi") env_build = RunEnvironment(self) @@ -96,14 +81,12 @@ def _build_with_cmake_find_package_multi(self): if self.settings.os == "Macos": cmake.definitions['CMAKE_OSX_DEPLOYMENT_TARGET'] = '10.14' - self.run("moc %s -o moc_greeter.cpp" % os.path.join(self.source_folder, "greeter.h"), run_environment=True) - cmake.configure(source_folder="cmake_find_package_multi", build_folder="cmake_find_package_multi_folder") + cmake.configure() cmake.build() def build(self): self._build_with_qmake() self._build_with_meson() - self._build_with_cmake() self._build_with_cmake_find_package_multi() def _test_with_qmake(self): @@ -119,21 +102,14 @@ def _test_with_meson(self): self.output.info("Testing Meson") shutil.copy("qt.conf", "meson_folder") self.run(os.path.join("meson_folder", "test_package"), run_environment=True) - - def _test_with_cmake(self): - if self._cmake_supported(): - self.output.info("Testing CMake") - shutil.copy("qt.conf", os.path.join("cmake_folder", "bin")) - self.run(os.path.join("cmake_folder", "bin", "test_package"), run_environment=True) - + def _test_with_cmake_find_package_multi(self): self.output.info("Testing CMake_find_package_multi") - shutil.copy("qt.conf", os.path.join("cmake_find_package_multi_folder", "bin")) - self.run(os.path.join("cmake_find_package_multi_folder", "bin", "test_package"), run_environment=True) + shutil.copy("qt.conf", "bin") + self.run(os.path.join("bin", "test_package"), run_environment=True) def test(self): if not tools.cross_building(self.settings, skip_x64_x86=True): self._test_with_qmake() self._test_with_meson() - self._test_with_cmake() self._test_with_cmake_find_package_multi() diff --git a/test_package/example.qrc b/test_package/example.qrc new file mode 100644 index 0000000..7060adf --- /dev/null +++ b/test_package/example.qrc @@ -0,0 +1,5 @@ + + + resource.txt + + diff --git a/test_package/greeter.h b/test_package/greeter.h index ba45733..85052e0 100644 --- a/test_package/greeter.h +++ b/test_package/greeter.h @@ -23,4 +23,4 @@ public slots: private: const QString& mName; -}; \ No newline at end of file +}; diff --git a/test_package/meson.build b/test_package/meson.build index 148f559..9ca197c 100644 --- a/test_package/meson.build +++ b/test_package/meson.build @@ -1,6 +1,6 @@ project('test_package', 'cpp') qt5 = import('qt5') -qt5_dep = dependency('qt5', modules: ['Core']) -moc_files = qt5.preprocess(moc_headers : 'greeter.h') +qt5_dep = dependency('qt5', modules: ['Core', 'Network', 'Sql', 'Concurrent', 'Xml']) +moc_files = qt5.preprocess(moc_headers : 'greeter.h', qresources : 'example.qrc') executable('test_package', 'test_package.cpp', moc_files, - dependencies : qt5_dep) \ No newline at end of file + dependencies : qt5_dep) diff --git a/test_package/resource.txt b/test_package/resource.txt new file mode 100644 index 0000000..ab281a2 --- /dev/null +++ b/test_package/resource.txt @@ -0,0 +1 @@ +Hello World From Resource diff --git a/test_package/test_package.cpp b/test_package/test_package.cpp index 9448b54..75ebe16 100644 --- a/test_package/test_package.cpp +++ b/test_package/test_package.cpp @@ -3,6 +3,12 @@ #include #include #include "greeter.h" +#include + +#include +#include +#include +#include int main(int argc, char *argv[]){ QCoreApplication app(argc, argv); @@ -18,5 +24,19 @@ int main(int argc, char *argv[]){ QObject::connect(greeter, SIGNAL(finished()), &app, SLOT(quit())); QTimer::singleShot(0, greeter, SLOT(run())); + QFile f(":/resource.txt"); + if(!f.open(QIODevice::ReadOnly)) + qFatal("Could not open resource file"); + qDebug() << "Resource content:" << f.readAll(); + f.close(); + + QNetworkAccessManager networkTester; + + QSqlDatabase sqlTester; + + QFuture future = QtConcurrent::run([](){}); + + QDomText xmlTester; + return app.exec(); -} \ No newline at end of file +} diff --git a/test_package/test_package.pro b/test_package/test_package.pro index 13996ae..58325c6 100644 --- a/test_package/test_package.pro +++ b/test_package/test_package.pro @@ -2,6 +2,13 @@ SOURCES += test_package.cpp HEADERS += greeter.h +RESOURCES = example.qrc + QT -= gui +QT += network sql concurrent xml + +CONFIG += console -CONFIG += console \ No newline at end of file +CONFIG += conan_basic_setup +include($$OUT_PWD/../conanbuildinfo.pri) +LIBS -= $$CONAN_LIBS_QT