early-access version 2853
This commit is contained in:
148
externals/vcpkg/ports/qtinterfaceframework/49b44d4.diff
vendored
Executable file
148
externals/vcpkg/ports/qtinterfaceframework/49b44d4.diff
vendored
Executable file
@@ -0,0 +1,148 @@
|
||||
From 49b44d45c9eb5b5b98697f9ebb74204d45f0db38 Mon Sep 17 00:00:00 2001
|
||||
From: Dominik Holland <dominik.holland@qt.io>
|
||||
Date: Wed, 06 Apr 2022 15:43:23 +0200
|
||||
Subject: [PATCH] ifcodegen: Add a fallback mechanism for too recent python packages
|
||||
|
||||
After the virtualenv is created the generator is now verified to be
|
||||
working correctly. In case the generator doesn't work, an error
|
||||
message is shown, which suggests to reconfigure with
|
||||
|
||||
-DQT_USE_MINIMAL_QFACE_PACKAGES=TRUE
|
||||
|
||||
The new option will install the minimum required dependencies for
|
||||
qface.
|
||||
|
||||
Fixes: QTBUG-102348
|
||||
Pick-to: 6.2 6.3
|
||||
Change-Id: I59aca5848da8928e94c0d33a108735847d9260a2
|
||||
---
|
||||
|
||||
diff --git a/src/tools/ifcodegen/CMakeLists.txt b/src/tools/ifcodegen/CMakeLists.txt
|
||||
index 2d9e3a4..317d77f 100644
|
||||
--- a/src/tools/ifcodegen/CMakeLists.txt
|
||||
+++ b/src/tools/ifcodegen/CMakeLists.txt
|
||||
@@ -22,11 +22,13 @@
|
||||
if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
|
||||
set(VIRTUALENV_ACTIVATE ${VIRTUALENV_PATH}/Scripts/activate.bat)
|
||||
set(VIRTUALENV_ACTIVATE_COMMAND ${VIRTUALENV_ACTIVATE})
|
||||
+ set(VIRTUALENV_PYTHON ${VIRTUALENV_PATH}/Scripts/python.exe)
|
||||
set(IFCODEGEN_BIN ${VIRTUALENV_PATH}/Scripts/qface.exe)
|
||||
set(DEPLOY_VIRTUALENV ${CMAKE_CURRENT_SOURCE_DIR}/deploy-virtualenv.bat)
|
||||
else()
|
||||
set(VIRTUALENV_ACTIVATE ${VIRTUALENV_PATH}/bin/activate)
|
||||
set(VIRTUALENV_ACTIVATE_COMMAND . ${VIRTUALENV_ACTIVATE})
|
||||
+ set(VIRTUALENV_PYTHON ${VIRTUALENV_PATH}/bin/python)
|
||||
set(IFCODEGEN_BIN ${VIRTUALENV_PATH}/bin/qface)
|
||||
set(DEPLOY_VIRTUALENV ${CMAKE_CURRENT_SOURCE_DIR}/deploy-virtualenv.sh)
|
||||
endif()
|
||||
@@ -63,6 +65,15 @@
|
||||
# someone is working on the qface sources
|
||||
file(GLOB_RECURSE IFCODEGEN_SOURCE_FILES ${IFCODEGEN_SOURCE_DIR}/*.py)
|
||||
|
||||
+ # If the upstream python packages introduce a regression this option can be used to install
|
||||
+ # the minimum version for all required python package and produce a working setup
|
||||
+ # Those packages might be outdated and may contain security holes, but they are known to be
|
||||
+ # working.
|
||||
+ set(INSTALL_MINIMAL_QFACE_PACKAGES_COMMAND)
|
||||
+ if (QT_USE_MINIMAL_QFACE_PACKAGES)
|
||||
+ set(INSTALL_MINIMAL_QFACE_PACKAGES_COMMAND COMMAND pip3 install -r ${IFCODEGEN_SOURCE_DIR}/requirements_minimal.txt)
|
||||
+ endif()
|
||||
+
|
||||
# On the CI we use the special wheel folder when available to not download all packages again on each build
|
||||
set(PYTHON3_WHEEL_CACHE "$ENV{PYTHON3_WHEEL_CACHE}" CACHE PATH "Python3 wheel cache")
|
||||
if (EXISTS "${PYTHON3_WHEEL_CACHE}")
|
||||
@@ -74,6 +85,7 @@
|
||||
|
||||
add_custom_command(OUTPUT ${IFCODEGEN_BIN}
|
||||
COMMAND ${VIRTUALENV_ACTIVATE_COMMAND}
|
||||
+ ${INSTALL_MINIMAL_QFACE_PACKAGES_COMMAND}
|
||||
COMMAND ${PIP3_INSTALL_COMMAND}
|
||||
DEPENDS ${VIRTUALENV_ACTIVATE}
|
||||
${IFCODEGEN_SOURCE_DIR}/requirements.txt
|
||||
@@ -82,16 +94,23 @@
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/.stamp-deploy_virtualenv
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/.stamp-cmake-rerun
|
||||
COMMAND ${DEPLOY_VIRTUALENV} qtif_qface_virtualenv
|
||||
COMMAND ${CMAKE_COMMAND} -E touch .stamp-deploy_virtualenv
|
||||
- COMMAND ${CMAKE_COMMAND} -E touch .stamp-cmake-rerun
|
||||
DEPENDS ${IFCODEGEN_BIN}
|
||||
)
|
||||
|
||||
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/.stamp-generator-verified
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/.stamp-cmake-rerun
|
||||
+ COMMAND ${VIRTUALENV_PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/verify_generator.py
|
||||
+ COMMAND ${CMAKE_COMMAND} -E touch .stamp-generator-verified
|
||||
+ COMMAND ${CMAKE_COMMAND} -E touch .stamp-cmake-rerun
|
||||
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/.stamp-deploy_virtualenv
|
||||
+ COMMENT "Verifying generator"
|
||||
+ )
|
||||
+
|
||||
# main target which just relies on the stamp file to be uptodate
|
||||
add_custom_target(ifcodegen ALL
|
||||
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/.stamp-deploy_virtualenv
|
||||
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/.stamp-generator-verified
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/.stamp-cmake-rerun
|
||||
)
|
||||
# Create the rerun cmake stamp file here to be able to add cmake configure dependency
|
||||
@@ -109,6 +128,7 @@
|
||||
#####################################################################
|
||||
|
||||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/.stamp-generator-verified
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.stamp-deploy_virtualenv
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.stamp-cmake-rerun
|
||||
${VIRTUALENV_PATH}
|
||||
diff --git a/src/tools/ifcodegen/verify_generator.py b/src/tools/ifcodegen/verify_generator.py
|
||||
new file mode 100755
|
||||
index 0000000..c3f85d6
|
||||
--- /dev/null
|
||||
+++ b/src/tools/ifcodegen/verify_generator.py
|
||||
@@ -0,0 +1,46 @@
|
||||
+#!/usr/bin/env python3
|
||||
+#############################################################################
|
||||
+##
|
||||
+## Copyright (C) 2022 The Qt Company Ltd.
|
||||
+## Contact: https://www.qt.io/licensing/
|
||||
+##
|
||||
+## This file is part of the QtInterfaceFramework module of the Qt Toolkit.
|
||||
+##
|
||||
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
|
||||
+## 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 General Public License Usage
|
||||
+## Alternatively, this file may be used under the terms of the GNU
|
||||
+## General Public License version 3 as published by the Free Software
|
||||
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
+## 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-3.0.html.
|
||||
+##
|
||||
+## $QT_END_LICENSE$
|
||||
+##
|
||||
+#############################################################################
|
||||
+
|
||||
+try:
|
||||
+ import generate
|
||||
+except Exception as e:
|
||||
+ raise SystemExit("""
|
||||
+ Verifying the generator failed!
|
||||
+
|
||||
+ This might be caused by a too recent python version or
|
||||
+ too recent python packages. You can try installing older
|
||||
+ python packages by running configure again with the the
|
||||
+ following option:
|
||||
+
|
||||
+ -DQT_USE_MINIMAL_QFACE_PACKAGES=TRUE
|
||||
+
|
||||
+ The python error was:
|
||||
+
|
||||
+ {}
|
||||
+ """.format(e))
|
13
externals/vcpkg/ports/qtinterfaceframework/fix-taglib-search.patch
vendored
Executable file
13
externals/vcpkg/ports/qtinterfaceframework/fix-taglib-search.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/FindWrapSystemTagLib.cmake b/cmake/FindWrapSystemTagLib.cmake
|
||||
index e82d2c1a9..14463c791 100644
|
||||
--- a/cmake/FindWrapSystemTagLib.cmake
|
||||
+++ b/cmake/FindWrapSystemTagLib.cmake
|
||||
@@ -4,7 +4,7 @@ if(TARGET WrapSystemTagLib::WrapSystemTagLib)
|
||||
set(WrapSystemTagLib_FOUND ON)
|
||||
return()
|
||||
endif()
|
||||
-
|
||||
+unset(PKG_CONFIG_EXECUTABLE CACHE)
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(TagLib taglib IMPORTED_TARGET)
|
49
externals/vcpkg/ports/qtinterfaceframework/portfile.cmake
vendored
Executable file
49
externals/vcpkg/ports/qtinterfaceframework/portfile.cmake
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
|
||||
include("${SCRIPT_PATH}/qt_install_submodule.cmake")
|
||||
|
||||
set(${PORT}_PATCHES fix-taglib-search.patch # Strictly this is only required if qt does not use pkg-config since it forces it to off.
|
||||
49b44d4.diff)
|
||||
set(TOOL_NAMES
|
||||
ifmedia-simulation-server
|
||||
ifvehiclefunctions-simulation-server
|
||||
)
|
||||
|
||||
qt_download_submodule(PATCHES ${${PORT}_PATCHES})
|
||||
if(QT_UPDATE_VERSION)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(_qis_DISABLE_NINJA)
|
||||
set(_opt DISABLE_NINJA)
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
|
||||
x_vcpkg_get_python_packages(PYTHON_VERSION "3"
|
||||
REQUIREMENTS_FILE "${CURRENT_PORT_DIR}/requirements_minimal.txt"
|
||||
PACKAGES qface==2.0.5
|
||||
OUT_PYTHON_VAR "PYTHON3")
|
||||
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
list(APPEND FEATURE_OPTIONS "-DVCPKG_HOST_TRIPLET=${_HOST_TRIPLET}")
|
||||
endif()
|
||||
|
||||
set(qt_plugindir ${QT6_DIRECTORY_PREFIX}plugins)
|
||||
set(qt_qmldir ${QT6_DIRECTORY_PREFIX}qml)
|
||||
qt_cmake_configure(${_opt}
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
"-DPython3_EXECUTABLE=${PYTHON3}" # Otherwise a VS installation might be found.
|
||||
"-DQT_USE_MINIMAL_QFACE_PACKAGES=TRUE"
|
||||
OPTIONS_DEBUG ${_qis_CONFIGURE_OPTIONS_DEBUG}
|
||||
OPTIONS_RELEASE ${_qis_CONFIGURE_OPTIONS_RELEASE})
|
||||
|
||||
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
||||
|
||||
qt_fixup_and_cleanup(TOOL_NAMES ${TOOL_NAMES})
|
||||
|
||||
qt_install_copyright("${SOURCE_PATH}")
|
||||
|
||||
if(NOT VCPKG_CROSSCOMPILING)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/ifcodegen")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/ifcodegen" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/ifcodegen")
|
||||
endif()
|
14
externals/vcpkg/ports/qtinterfaceframework/requirements_minimal.txt
vendored
Executable file
14
externals/vcpkg/ports/qtinterfaceframework/requirements_minimal.txt
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
antlr4-python3-runtime==4.7.1
|
||||
argh==0.26.2
|
||||
click==6.7
|
||||
coloredlogs==10.0
|
||||
humanfriendly==4.15.1
|
||||
Jinja2==2.11.3
|
||||
MarkupSafe==1.1
|
||||
path.py==11.0.1
|
||||
pathtools==0.1.2
|
||||
PyYAML==5.4
|
||||
six==1.11.0
|
||||
watchdog==2.1.7
|
||||
pytest==5.3.5
|
||||
pytest-cov==2.8.1
|
40
externals/vcpkg/ports/qtinterfaceframework/vcpkg.json
vendored
Executable file
40
externals/vcpkg/ports/qtinterfaceframework/vcpkg.json
vendored
Executable file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "qtinterfaceframework",
|
||||
"version": "6.3.0",
|
||||
"description": "Qt Interface Framework",
|
||||
"homepage": "https://www.qt.io/",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "pkgconf",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "qtdeclarative",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "qtinterfaceframework",
|
||||
"host": true,
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "qtmultimedia",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "qtremoteobjects",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "qttools",
|
||||
"default-features": false
|
||||
},
|
||||
"taglib",
|
||||
{
|
||||
"name": "vcpkg-get-python-packages",
|
||||
"host": true,
|
||||
"default-features": false
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user