From 1ecfb6ef31c42a00ea845fcdeec29b0df0f41365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= Date: Fri, 10 Mar 2023 22:32:07 +0100 Subject: [PATCH] qbs: update to 1.24.1 Disable clang environments, as both failed to build with an `Access violation`. --- ...ostosinfo.h-to-installed-headers.1.4.patch | 27 --- mingw-w64-qbs/0001-find-qdoc.patch | 12 + ...-remove-lib-prefix-from-plugin-names.patch | 14 ++ ...03-add-generator-header-installs.1.4.patch | 24 -- ...toolchains-Pretend-msys-is-mingw.1.4.patch | 37 ---- .../0006-Add-some-missing-files.1.4.patch | 205 ------------------ ...dechomode.h-to-installed-headers.1.4.patch | 27 --- ...-many-files-to-installed-headers.1.4.patch | 31 --- mingw-w64-qbs/PKGBUILD | 100 +++++---- 9 files changed, 75 insertions(+), 402 deletions(-) delete mode 100644 mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.1.4.patch create mode 100644 mingw-w64-qbs/0001-find-qdoc.patch create mode 100644 mingw-w64-qbs/0002-remove-lib-prefix-from-plugin-names.patch delete mode 100644 mingw-w64-qbs/0003-add-generator-header-installs.1.4.patch delete mode 100644 mingw-w64-qbs/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch delete mode 100644 mingw-w64-qbs/0006-Add-some-missing-files.1.4.patch delete mode 100644 mingw-w64-qbs/0007-add-commandechomode.h-to-installed-headers.1.4.patch delete mode 100644 mingw-w64-qbs/0008-add-many-files-to-installed-headers.1.4.patch diff --git a/mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.1.4.patch b/mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.1.4.patch deleted file mode 100644 index 6a6bd9fb5c..0000000000 --- a/mingw-w64-qbs/0001-add-hostosinfo.h-to-installed-headers.1.4.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4a36af369f678ff512aebd903c30ec8e8eecea43 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Mon, 18 Aug 2014 12:19:52 +0100 -Subject: [PATCH 1/6] add hostosinfo.h to installed headers - -.. if you build Qt Creator with system qbs then this -header is needed by: -src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp ---- - src/lib/corelib/tools/tools.pri | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri -index 35bc9c8..431eb27 100644 ---- a/src/lib/corelib/tools/tools.pri -+++ b/src/lib/corelib/tools/tools.pri -@@ -85,6 +85,7 @@ qbs_enable_unit_tests { - $$PWD/cleanoptions.h \ - $$PWD/codelocation.h \ - $$PWD/error.h \ -+ $$PWD/hostosinfo.h \ - $$PWD/settings.h \ - $$PWD/settingsmodel.h \ - $$PWD/preferences.h \ --- -2.3.5 - diff --git a/mingw-w64-qbs/0001-find-qdoc.patch b/mingw-w64-qbs/0001-find-qdoc.patch new file mode 100644 index 0000000000..4732e7f172 --- /dev/null +++ b/mingw-w64-qbs/0001-find-qdoc.patch @@ -0,0 +1,12 @@ + +--- a/cmake/QbsDocumentation.cmake ++++ b/cmake/QbsDocumentation.cmake +@@ -246,7 +246,7 @@ + function(_qbs_qdoc_build_qdocconf_file _qdocconf_file) + _qbs_setup_doc_targets() + +- _qbs_doc_find_program(_qdoc NAMES qdoc qdoc-qt5) ++ _qbs_doc_find_program(_qdoc NAMES qdoc qdoc-qt5 qdoc-qt6) + if (_qdoc STREQUAL "_prg__qdoc-NOTFOUND") + message(WARNING "No qdoc binary found: No documentation targets were generated") + return() diff --git a/mingw-w64-qbs/0002-remove-lib-prefix-from-plugin-names.patch b/mingw-w64-qbs/0002-remove-lib-prefix-from-plugin-names.patch new file mode 100644 index 0000000000..50af217d6f --- /dev/null +++ b/mingw-w64-qbs/0002-remove-lib-prefix-from-plugin-names.patch @@ -0,0 +1,14 @@ + +--- a/cmake/QbsBuildConfig.cmake ++++ b/cmake/QbsBuildConfig.cmake +@@ -201,6 +201,9 @@ + INSTALL_RPATH "${QBS_PLUGINS_RPATH}" + MACOSX_RPATH ${QBS_MACOSX_RPATH} + ) ++ if(MINGW) ++ set_target_properties(${target_name} PROPERTIES PREFIX "") ++ endif() + install(TARGETS ${target_name} + LIBRARY DESTINATION ${QBS_PLUGINS_INSTALL_DIR} + RUNTIME DESTINATION ${QBS_PLUGINS_INSTALL_DIR} + diff --git a/mingw-w64-qbs/0003-add-generator-header-installs.1.4.patch b/mingw-w64-qbs/0003-add-generator-header-installs.1.4.patch deleted file mode 100644 index d0ffce34f9..0000000000 --- a/mingw-w64-qbs/0003-add-generator-header-installs.1.4.patch +++ /dev/null @@ -1,24 +0,0 @@ -From f27372b2f20583eb40723f382f8932782631626f Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Mon, 18 Aug 2014 00:12:36 +0100 -Subject: [PATCH 3/6] add generator header installs - ---- - src/lib/corelib/api/api.pri | 1 + - 1 files changed, 1 insertions(+) - -diff --git a/src/lib/corelib/api/api.pri b/src/lib/corelib/api/api.pri -index 18b3b47..10d9bf8 100644 ---- a/src/lib/corelib/api/api.pri -+++ b/src/lib/corelib/api/api.pri -@@ -27,6 +27,7 @@ SOURCES += \ - - !qbs_no_dev_install { - api_headers.files = \ -+ $$PWD/generator.h \ - $$PWD/jobs.h \ - $$PWD/languageinfo.h \ - $$PWD/project.h \ --- -2.3.5 - diff --git a/mingw-w64-qbs/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch b/mingw-w64-qbs/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch deleted file mode 100644 index 8410032ab0..0000000000 --- a/mingw-w64-qbs/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 99b73c2d8964aa95fc439defa0588751f080cf90 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Sat, 29 Nov 2014 18:29:20 +0000 -Subject: [PATCH 5/6] setup-toolchains: Pretend msys is mingw - -It's close enough and the best we've got. ---- - src/app/qbs-setup-toolchains/gccprobe.cpp | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/app/qbs-setup-toolchains/gccprobe.cpp b/src/app/qbs-setup-toolchains/gccprobe.cpp -index 0ae9f6c..3d5e03c 100644 ---- a/src/app/qbs-setup-toolchains/gccprobe.cpp -+++ b/src/app/qbs-setup-toolchains/gccprobe.cpp -@@ -89,7 +89,9 @@ - QStringLiteral("i686-w64-mingw32.static"), - QStringLiteral("x86_64-w64-mingw32.static"), - QStringLiteral("i586-mingw32msvc"), -- QStringLiteral("amd64-mingw32msvc")}; -+ QStringLiteral("amd64-mingw32msvc"), -+ QStringLiteral("i686-pc-msys"), -+ QStringLiteral("x86_64-pc-msys")}; - } - - static QString gccMachineName(const QFileInfo &compiler) -@@ -458,7 +460,7 @@ - { - const QString machineName = gccMachineName(compiler); - -- if (toolchainType == QLatin1String("mingw")) { -+ if (toolchainType == QLatin1String("mingw") || toolchainType == QLatin1String("msys")) { - if (!validMinGWMachines().contains(machineName)) { - throw ErrorInfo(Tr::tr("Detected gcc platform '%1' is not supported.") - .arg(machineName)); --- -2.3.5 - diff --git a/mingw-w64-qbs/0006-Add-some-missing-files.1.4.patch b/mingw-w64-qbs/0006-Add-some-missing-files.1.4.patch deleted file mode 100644 index ec6ca95478..0000000000 --- a/mingw-w64-qbs/0006-Add-some-missing-files.1.4.patch +++ /dev/null @@ -1,205 +0,0 @@ -From 0dd092f366077f2392b9faeae3d92cab12ac194d Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Sun, 26 Apr 2015 11:54:25 +0100 -Subject: [PATCH 6/6] Add some missing files. - -Seems 1.4.0 was created without: -src/lib/corelib/tools/generateoptions.{cpp,h} - -.. which were added originally in: -5447c5 : * Add an API to support build system generators. ---- - src/lib/corelib/tools/generateoptions.cpp | 92 +++++++++++++++++++++++++++++++ - src/lib/corelib/tools/generateoptions.h | 62 +++++++++++++++++++++ - 2 files changed, 154 insertions(+) - create mode 100644 src/lib/corelib/tools/generateoptions.cpp - create mode 100644 src/lib/corelib/tools/generateoptions.h - -diff --git a/src/lib/corelib/tools/generateoptions.cpp b/src/lib/corelib/tools/generateoptions.cpp -new file mode 100644 -index 0000000..406cf88 ---- /dev/null -+++ b/src/lib/corelib/tools/generateoptions.cpp -@@ -0,0 +1,102 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2016 The Qt Company Ltd. -+** Copyright (C) 2015 Jake Petroules. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the Qbs. -+** -+** $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 "generateoptions.h" -+ -+#include -+#include -+ -+namespace qbs { -+namespace Internal { -+ -+class GenerateOptionsPrivate : public QSharedData -+{ -+public: -+ GenerateOptionsPrivate() -+ : generatorName() -+ {} -+ -+ QString generatorName; -+}; -+ -+} // namespace Internal -+ -+/*! -+ * \class GenerateOptions -+ * \brief The \c GenerateOptions class comprises parameters that influence the behavior of -+ * generate operations. -+ */ -+ -+GenerateOptions::GenerateOptions() : d(new Internal::GenerateOptionsPrivate) -+{ -+} -+ -+GenerateOptions::GenerateOptions(const GenerateOptions &other) : d(other.d) -+{ -+} -+ -+GenerateOptions &GenerateOptions::operator=(const GenerateOptions &other) -+{ -+ d = other.d; -+ return *this; -+} -+ -+GenerateOptions::~GenerateOptions() -+{ -+} -+ -+/*! -+ * Returns the name of the generator used to create the external build system files. -+ * The default is empty. -+ */ -+QString GenerateOptions::generatorName() const -+{ -+ return d->generatorName; -+} -+ -+/*! -+ * \brief Sets the name of the generator used to create the external build system files. -+ */ -+void GenerateOptions::setGeneratorName(const QString &generatorName) -+{ -+ d->generatorName = generatorName; -+} -+ -+} // namespace qbs -diff --git a/src/lib/corelib/tools/generateoptions.h b/src/lib/corelib/tools/generateoptions.h -new file mode 100644 -index 0000000..06d08ba ---- /dev/null -+++ b/src/lib/corelib/tools/generateoptions.h -@@ -0,0 +1,71 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2016 The Qt Company Ltd. -+** Copyright (C) 2015 Jake Petroules. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the Qbs. -+** -+** $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$ -+** -+****************************************************************************/ -+#ifndef QBS_GENERATEOPTIONS_H -+#define QBS_GENERATEOPTIONS_H -+ -+#include "qbs_export.h" -+ -+#include -+ -+QT_BEGIN_NAMESPACE -+class QString; -+QT_END_NAMESPACE -+ -+namespace qbs { -+namespace Internal { class GenerateOptionsPrivate; } -+ -+class QBS_EXPORT GenerateOptions -+{ -+public: -+ GenerateOptions(); -+ GenerateOptions(const GenerateOptions &other); -+ GenerateOptions &operator=(const GenerateOptions &other); -+ ~GenerateOptions(); -+ -+ QString generatorName() const; -+ void setGeneratorName(const QString &generatorName); -+ -+private: -+ QSharedDataPointer d; -+}; -+ -+} // namespace qbs -+ -+#endif // QBS_GENERATEOPTIONS_H --- -2.3.5 - diff --git a/mingw-w64-qbs/0007-add-commandechomode.h-to-installed-headers.1.4.patch b/mingw-w64-qbs/0007-add-commandechomode.h-to-installed-headers.1.4.patch deleted file mode 100644 index ea2672dbd6..0000000000 --- a/mingw-w64-qbs/0007-add-commandechomode.h-to-installed-headers.1.4.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 69585f66548103a8d8d18e1183839fa6fa2d903d Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Tue, 28 Apr 2015 20:46:39 +0100 -Subject: [PATCH 1/2] add commandechomode.h to installed headers - -.. this header is needed by qbs/tools/buildoptions.h ---- - src/lib/corelib/tools/tools.pri | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/lib/corelib/tools/tools.pri b/src/lib/corelib/tools/tools.pri -index a77926c..4106aee 100644 ---- a/src/lib/corelib/tools/tools.pri -+++ b/src/lib/corelib/tools/tools.pri -@@ -97,7 +97,8 @@ qbs_enable_unit_tests { - $$PWD/generatorpluginmanager.h \ - $$PWD/installoptions.h \ - $$PWD/generateoptions.h \ -- $$PWD/setupprojectparameters.h -+ $$PWD/setupprojectparameters.h \ -+ $$PWD/commandechomode.h - tools_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/tools - INSTALLS += tools_headers - } --- -2.3.5 - diff --git a/mingw-w64-qbs/0008-add-many-files-to-installed-headers.1.4.patch b/mingw-w64-qbs/0008-add-many-files-to-installed-headers.1.4.patch deleted file mode 100644 index b98b9779e1..0000000000 --- a/mingw-w64-qbs/0008-add-many-files-to-installed-headers.1.4.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7b028bd667664bf2bc5c681929f90c2c5fbf7c44 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Tue, 28 Apr 2015 21:43:17 +0100 -Subject: [PATCH 07/10] add many files to installed headers - -diff --git a/src/lib/corelib/language/language.pri b/src/lib/corelib/language/language.pri ---- a/src/lib/corelib/language/language.pri -+++ b/src/lib/corelib/language/language.pri -@@ -76,7 +76,8 @@ - $$PWD/value.cpp - - !qbs_no_dev_install { -- language_headers.files = $$PWD/forward_decls.h -+ language_headers.files = $$PWD/forward_decls.h \ -+ $$PWD/filetags.h - language_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/language - INSTALLS += language_headers - } -diff --git a/src/lib/corelib/logging/logging.pri b/src/lib/corelib/logging/logging.pri ---- a/src/lib/corelib/logging/logging.pri -+++ b/src/lib/corelib/logging/logging.pri -@@ -12,7 +12,8 @@ - $$PWD/ilogsink.cpp - - !qbs_no_dev_install { -- logging_headers.files = $$PWD/ilogsink.h -+ logging_headers.files = $$PWD/ilogsink.h \ -+ $$PWD/logger.h - logging_headers.path = $${QBS_INSTALL_PREFIX}/include/qbs/logging - INSTALLS += logging_headers - } diff --git a/mingw-w64-qbs/PKGBUILD b/mingw-w64-qbs/PKGBUILD index 86a60bfdae..4d61231438 100644 --- a/mingw-w64-qbs/PKGBUILD +++ b/mingw-w64-qbs/PKGBUILD @@ -22,82 +22,80 @@ _realname=qbs pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=1.18.0 -pkgrel=3 -_pkgfqn="${_realname}-src-${pkgver}" +pkgver=1.24.1 +pkgrel=1 pkgdesc="Qt Build Suite (mingw-w64)" url='https://www.qt.io/' arch=('any') -mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') +mingw_arch=('mingw32' 'mingw64' 'ucrt64') license=('LGPL') -depends=("${MINGW_PACKAGE_PREFIX}-qt5-script") -makedepends=("${MINGW_PACKAGE_PREFIX}-clang" - "${MINGW_PACKAGE_PREFIX}-qt5-tools" - "${MINGW_PACKAGE_PREFIX}-cc" - "git") # clang for qdoc -options=('docs' 'staticlibs') # '!strip' 'debug') +depends=($([[ ${CARCH} != i686 ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-qt6-base" \ + "${MINGW_PACKAGE_PREFIX}-qt6-5compat" || echo \ + "${MINGW_PACKAGE_PREFIX}-qt5-script")) +makedepends=("${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-cmake" + "${MINGW_PACKAGE_PREFIX}-ninja" + "${MINGW_PACKAGE_PREFIX}-clang" + "${MINGW_PACKAGE_PREFIX}-python-beautifulsoup4" + "${MINGW_PACKAGE_PREFIX}-python-lxml" + $([[ ${CARCH} != i686 ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-qt6-declarative" \ + "${MINGW_PACKAGE_PREFIX}-qt6-tools" || echo \ + "${MINGW_PACKAGE_PREFIX}-qt5-tools")) # clang for qdoc +_pkgfqn="${_realname}-src-${pkgver}" source=("https://download.qt.io/official_releases/qbs/${pkgver}/${_pkgfqn}.tar.gz" - #${_pkgfqn}::git+https://code.qt.io/qbs/qbs.git#tag="v${pkgver}" "manifest" - "0003-add-generator-header-installs.1.4.patch" - "0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch" - "0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch" - "0006-Add-some-missing-files.1.4.patch" - "0008-add-many-files-to-installed-headers.1.4.patch") -sha256sums=('3d0211e021bea3e56c4d5a65c789d11543cc0b6e88f1bfe23c2f8ebf0f89f8d4' + "0001-find-qdoc.patch" + "0002-remove-lib-prefix-from-plugin-names.patch" + "0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch") +sha256sums=('1f1a92c840e708bbbc30705e3b0bb1d0cd47ffcf679d566dd071a1768ee65992' '838098b25a8044176b3139b4003594570c62a8d64f5470fbbd769f3bf44e0855' - '540ff56b72e56d6ede1420e66f94e1ea0348ce172bf71f153b7381632a19a305' - 'b6d51c58e96ac4fd957ccedcff7812de6f84ccfc9f996e30cf2e75fb5b4e5f02' - '320c57d7989038203998957962840e9a66698e7419238017c8c73c6e0dfd3da9' - '6c8285f0e274ccede48d7e2f9bead02d1ef34225753a627974b32dce68b6d28d' - '95306d788a375935bcd5227eefbd73850b9c2554edd1b1757090f6a59c608e88') + 'e0ccca7131e0b58ad37a6287a5e6d82a2bea0b3973adc2a2617342b75040bc02' + 'f1c8edc641a8738a4e14925970b64912c412cad83213647f18719e852440be7c' + 'b6d51c58e96ac4fd957ccedcff7812de6f84ccfc9f996e30cf2e75fb5b4e5f02') prepare() { cd ${_pkgfqn} - #[[ -d src/plugins/generator ]] && rm -rf src/plugins/generator - #rm -rf src/lib/corelib/api/generator.* - rm -rf src/lib/corelib/tools/generat* - patch -p1 -i "${srcdir}"/0003-add-generator-header-installs.1.4.patch + patch -p1 -i "${srcdir}"/0001-find-qdoc.patch + patch -p1 -i "${srcdir}"/0002-remove-lib-prefix-from-plugin-names.patch patch -p1 -i "${srcdir}"/0004-Use-.dll.a-instead-of-.a-for-mingw-import-librar.1.4.patch - patch -p1 -i "${srcdir}"/0005-setup-toolchains-Pretend-msys-is-mingw.1.4.patch - patch -p1 -i "${srcdir}"/0006-Add-some-missing-files.1.4.patch - patch -p1 -i "${srcdir}"/0008-add-many-files-to-installed-headers.1.4.patch } build() { - local _config + mkdir -p ${srcdir}/build-${MSYSTEM} && cd ${srcdir}/build-${MSYSTEM} + + declare -a _extra_config if check_option "debug" "n"; then - _config="release" + _extra_config+=("-DCMAKE_BUILD_TYPE=Release") else - _config="debug" + _extra_config+=("-DCMAKE_BUILD_TYPE=Debug") fi - cd ${srcdir} - [[ -d build-${MSYSTEM} ]] && rm -rf build-${MSYSTEM} - mkdir build-${MSYSTEM} - cd build-${MSYSTEM} + CXXFLAGS+=" -Wno-attributes" \ + MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ + ${MINGW_PREFIX}/bin/cmake \ + -G"Ninja" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + "${_extra_config[@]}" \ + -DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python \ + -DWITH_TESTS=OFF \ + -DQBS_LIB_INSTALL_DIR=lib \ + -DQBS_DLL_INSTALL_DIR=bin \ + -DQBS_INSTALL_HTML_DOCS=ON \ + -DQBS_INSTALL_QCH_DOCS=ON \ + -DQBS_INSTALL_MAN_PAGE=ON \ + ../${_pkgfqn} - export MSYS2_ARG_CONV_EXCL="QBS_INSTALL_PREFIX=" - ${MINGW_PREFIX}/bin/qmake.exe \ - QBS_INSTALL_PREFIX="${MINGW_PREFIX}" \ - CONFIG+=${_config} \ - CONFIG+=qbs_enable_project_file_updates \ - ../${_pkgfqn}/qbs.pro - - # Because xcodeprojectgenerator has a build order problem. - make - make docs + cp ${srcdir}/manifest ${srcdir}/build-${MSYSTEM}/bin/qbs.exe.manifest + ${MINGW_PREFIX}/bin/cmake --build . } package() { cd ${srcdir}/build-${MSYSTEM} - export MSYS2_ARG_CONV_EXCL="QBS_INSTALL_PREFIX=" - make INSTALL_ROOT=${pkgdir} install - make INSTALL_ROOT=${pkgdir} install_docs - - rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.dll + DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install . for ff in qbs-setup-toolchains qbs-setup-qt; do cp ${srcdir}/manifest ${pkgdir}${MINGW_PREFIX}/bin/${ff}.exe.manifest