Skip to content

Commit

Permalink
[Qt6|6.1.0] Add new ports. (microsoft#14333)
Browse files Browse the repository at this point in the history
* wip commit

* refactor openssl ports.

* fix issues due to the file movement

* qt build succesful.

* qtbase finished?

* add qttools and qtdeclarative

* add EntryPoints to fixup_cmake_targets

* add todo

* more config fixup

* correct entrypoint and remove winmain

* format manifest

* fix module issues

* add extra vars

* make qtdeclarative work (x64-windows). -static has problems

* some extra cleanup tools start building

* refactor code to use common script across ports

* remove patch applied twice

* remove copy pasta

* add remaining qt6 ports

* fix a few details

* fix the rest

* format manifests

* add features to qt5compat.

* small modification to directories

* copy plugins

* a bit of cleanup

* smaller fixes

* format manifest

* fix_linux_configure_issue

* adding linux features.

* dont use quotes around INSTALL_ vars to fix linux build

* fix script install on linux

* remove bin if empty on all platforms otherwise let vcpkg throw an error

* fix syncqt path

* fix assimp feature

* try to figure you ci failures

* fix manifest format

* change the head ref to dev
add three required upstream cmake patches
allow single config builds

* fix typo

* switch to use FEATURE_ instead of QT_FEATURE

* [ZSTD] Update to 1.4.5

* [zstd] fix wrong assert to fix uwp regressions

* always install *.pc file. Correct -l flag in pc file

* remove any changes to vcpkg_copy_tools

* fix orc regression

* fix arrow regressions

* fix zstd target suffix

* fix orc zstd linkage

* fix find_package(ZSTD)

* fix icu linkage in harfbuzz

* install zstd dlls.

* skip qt5-base in ci to test qtbase due to conflicts

* fix the patch due to a replacement error

* add a way for vcpkg_from_github to only download the source archive and return the archive file name.

* update everything to beta4.
maybe qtdeclarative:x64-windows-static works now?

* remove outdated patches

* Print the failed condition

* more debug messages

* fix condition patch

* update to beta5

* update vcpkg_from_git to support tags and make output of ref possible.

* update ports

* add missing qt ports, fix qtbase build

* regenerate docs

* fix typo

* fix imageformats webp

* fix qtdeclarative static builds msvc

* more fixes

* make the rest of qt build succesfully. (only tested x64-windows)

* format manifest.

* [vcpkg_from_git] new options TAG and OUT_REF
- TAG github tag to checkout
- OUT_REF github commit id related to tag or ref
(useable for automatic updates of ports if used with a version tag)

* fix importprefix in qml plugin targets in static builds

* fix static qttools build on windows

* move qml plugin fix into qtbase

* try fixing staqtic build issues.

* make comment in qtquickcontrols2

* dont promote targets

* fix missing limits include

* fix patch

* pass options in qtopcua

* fix freetype linkage

* fix freetype a bit different

* fix promotion patch

* fix freetype wrapper without "

* fix typo in patch

* enable build of qtopcua

* format manifest for ci to run

* retry promotion

* try again but explicity not promote Threads::Threads

* push patch

* [fontconfig] add vcpkg cmake wrapper.

* fix empty statement in the wrapper

* show files in bin if any

* Apply suggestions from code review

Co-authored-by: Robert Schumacher <[email protected]>

* additional changes due to CR

* regenerate docs

* qdoc is build if llvm is present.

* fix merge issues

* fix wayland deps

* add qt5-base to skip for static-md

* format manifest.

* update all qt ports. Lets see which patches need to be fixed/removed

* fix some regressions by removing patches no longer necessary.
(needs further cleanup to actually remove the patches)

* fix qtopcua

* make qttools build on osx

* fix dependency of qttranslations

* fix qtwayland

* fix typo

* fix case

* adjust ci baseline for qtwayland on osx due to missing system libs.

* create directory before rename

* trying to make osx work

* create the directory and move the files

* move the removing outside the foreach ....

* update to 6.0.2

* remove some outdated patches

* qt 6.1.0-beta1 ci testing

* remove unused patches

* fix a few issues with qt 6.1.0-beta1
qtvirtualkeyboard needs some features.
+ need to install cmake wrappers from qtimageformats.
+ move QtAxServer to manual-link

* Fix missing qt cmake wrappers for qttools and qtshadertools.

* block qt beta ports in CI

* turn off beta build in CI

* remove outdated patches

* skip qt6 beta ports in CI

* [gettext] add feature tools.

* switch hunspell to configure_make for pc files

* switch to manifest

* hunspell remove port debug and add comment about tools

* setup qtvirtualkeyboard features.

* fix manifest format CI

* only run wayland on linux

* disable pthread detection in gettext on windows

* fix hunspell host dependency

* formant manifest

* - add qt6 prefix
- add qt.conf.in
- make qtbase depend on itself (host dependency)
and see what breaks.

* cannot add qt6 to bin folder currently.

* try the prefix method
- add tools-path to vcpkg_fixup_cmake_targets
- add destination to vcpkg_copy_tools

* feature refinement

* fix tools issues

* update baseline

* more feature refinement.

* be less noise in logs

* update version in gettext
format-manifest.

* add version details

* move on to qt version 6.0.3

* build cmake test port against qt6

* move qt5 includes into include/qt5

* ws change in cmake to force rebuild

* version stuff

* add plugin_config patch

* version stuff

* use upstream plugin patch for 6.1

* version stuff

* update to qt 6.1.0-beta3

* add alignment patch

* fix hunspell include path

* make the patch depend on architecture

* add qbittorrent as a test port

* downgrade qbittorrent a bit so that in can run in CI

* remove bin in static builds

* remove debug folder completly (since it is empty)

* copy additional deps required by qtshadertools and qtdeclarative in qtbase to avoid issues with binary chaching.

* fix logic

* try upstream alignment patch

* update baseline

* add feature options to qt5compat

* update to qt 6.1.0

* version stuff

* fix qt.conf (for release builds only)

* fix install of missing FindX modules in qtimageformats which where supposed to be fixed upstream but aren't

* remove unnecessary patch

* version stuff

* fix some qt.conf stuff

* install some wrappers for debug builds.

* fine tuning qt.conf

* fix debug windeployqt install but somebody is linking release icudt in debug

* fix arm crossbuilds on windows

* remove tools default line

* version stuff

* add missing host dependencies.

* fix windeploy target correctly for debug

* fix cmake arm builds.

* some batch improvements

* run qmake.debug.bat for debug builds.

* version stuff

* unconditionally include the patch in qtvirtualkeyboard

* version stuff

* more host dependencies

* version stuff

* more host deps

* version stuff

* fix qtactiveqt

* version stuff

* suppress batch skript output

* version stuff

* Apply CR changes

* version stuff

* newline attack

* update qbittorrent test port and newline...

* version stuff again

* switch to version-semver

* version stuff

* remove qbittorrent test_port because
- easier than rewriting history
- qt6svg usage will probably be tested by paraview/vtk in the future

Co-authored-by: Billy Robert O'Neal III <[email protected]>
Co-authored-by: Robert Schumacher <[email protected]>
  • Loading branch information
3 people authored Jun 1, 2021
1 parent 7bc5b8c commit 36000a1
Show file tree
Hide file tree
Showing 97 changed files with 2,827 additions and 18 deletions.
1 change: 1 addition & 0 deletions ports/qt/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
50 changes: 50 additions & 0 deletions ports/qt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "qt",
"version-semver": "6.1.0",
"description": "Qt",
"homepage": "https://www.qt.io/",
"dependencies": [
"qt5compat",
{
"name": "qtbase",
"default-features": false
},
"qtcharts",
"qtcoap",
"qtdatavis3d",
"qtdeclarative",
"qtdoc",
"qtimageformats",
"qtlottie",
"qtmqtt",
"qtnetworkauth",
"qtopcua",
"qtquick3d",
"qtquickcontrols2",
"qtquicktimeline",
"qtscxml",
"qtshadertools",
"qtsvg",
"qttools",
"qttranslations",
"qtvirtualkeyboard"
],
"default-features": [
"default-features"
],
"features": {
"default-features": {
"description": "Platform-dependent default features",
"dependencies": [
{
"name": "qtactiveqt",
"platform": "windows"
},
{
"name": "qtwayland",
"platform": "linux"
}
]
}
}
}
28 changes: 28 additions & 0 deletions ports/qt5compat/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
include("${SCRIPT_PATH}/qt_install_submodule.cmake")

set(${PORT}_PATCHES)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"textcodec" FEATURE_textcodec
"codecs" FEATURE_codecs
"big-codecs" FEATURE_big_codecs
"iconv" FEATURE_iconv
"iconv" CMAKE_DISABLE_FIND_PACKAGE_ICU
INVERTED_FEATURES
"iconv" CMAKE_DISABLE_FIND_PACKAGE_WrapIconv
)

#For iconv feature to work the following must be true:
#CONDITION NOT FEATURE_icu AND FEATURE_textcodec AND NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND WrapIconv_FOUND
#TODO: check if qtbase was built with ICU and fail if iconv is given here.

set(TOOL_NAMES)
qt_install_submodule(PATCHES ${${PORT}_PATCHES}
TOOL_NAMES ${TOOL_NAMES}
CONFIGURE_OPTIONS
${FEATURE_OPTIONS}
CONFIGURE_OPTIONS_RELEASE
CONFIGURE_OPTIONS_DEBUG
)
63 changes: 63 additions & 0 deletions ports/qt5compat/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "qt5compat",
"version-semver": "6.1.0",
"description": "The module contains unsupported Qt 5 APIs",
"homepage": "https://www.qt.io/",
"dependencies": [
{
"name": "qtbase",
"default-features": false
}
],
"default-features": [
"big-codecs",
"codecs",
"default-features",
"textcodec"
],
"features": {
"big-codecs": {
"description": "Supports big codecs, e.g. CJK.",
"dependencies": [
{
"name": "qt5compat",
"default-features": false,
"features": [
"textcodec"
]
}
]
},
"codecs": {
"description": "Supports non-unicode text conversions.",
"dependencies": [
{
"name": "qt5compat",
"default-features": false,
"features": [
"textcodec"
]
}
]
},
"default-features": {
"description": "Platform-dependent default features"
},
"iconv": {
"description": "Provides internationalization on Unix.",
"dependencies": [
"libiconv",
{
"name": "qt5compat",
"default-features": false,
"features": [
"textcodec"
]
}
]
},
"textcodec": {
"description": "Supports conversions between text encodings."
}
}
}
1 change: 1 addition & 0 deletions ports/qt6betablock/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
12 changes: 12 additions & 0 deletions ports/qt6betablock/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "qt6betablock",
"version-semver": "6.2.0-beta",
"description": "Port to block qt6 ports not in the current release to be build in CI",
"homepage": "https://www.qt.io/",
"dependencies": [
{
"name": "qtbase",
"default-features": false
}
]
}
29 changes: 29 additions & 0 deletions ports/qtactiveqt/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
include("${SCRIPT_PATH}/qt_install_submodule.cmake")

set(${PORT}_PATCHES)

set(NO_BIN_AND_TOOLS FALSE)
if(VCPKG_TARGET_ARCHITECTURE MATCHES "^arm" AND VCPKG_TARGET_IS_WINDOWS)
set(NO_BIN_AND_TOOLS TRUE)
endif()

if(NOT NO_BIN_AND_TOOLS)
set(TOOL_NAMES
dumpcpp
dumpdoc
idc
testcon
)
endif()

qt_install_submodule(PATCHES ${${PORT}_PATCHES}
TOOL_NAMES ${TOOL_NAMES}
CONFIGURE_OPTIONS
CONFIGURE_OPTIONS_RELEASE
CONFIGURE_OPTIONS_DEBUG
)

if(NO_BIN_AND_TOOLS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/tools")
endif()
22 changes: 22 additions & 0 deletions ports/qtactiveqt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "qtactiveqt",
"version-semver": "6.1.0",
"description": "ActiveQt",
"homepage": "https://www.qt.io/",
"supports": "windows",
"dependencies": [
{
"name": "qtactiveqt",
"host": true,
"default-features": false
},
{
"name": "qtbase",
"default-features": false
},
{
"name": "qttools",
"default-features": false
}
]
}
22 changes: 22 additions & 0 deletions ports/qtbase/allow_outside_prefix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index bd186c28b..2c1994d2e 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -28,11 +28,13 @@ function(qt_configure_process_path name default docstring)
elseif(rel_path MATCHES "^\.\./")
# INSTALL_SYSCONFDIR is allowed to be outside the prefix.
if(NOT name STREQUAL "INSTALL_SYSCONFDIR")
- message(FATAL_ERROR
- "Path component '${name}' is outside computed install prefix: ${rel_path} ")
- return()
+ #message(FATAL_ERROR
+ # "Path component '${name}' is outside computed install prefix: ${rel_path} ")
+ #return()
+ set("${name}" "${rel_path}" CACHE STRING "${docstring}" FORCE)
+ else()
+ set("${name}" "${${name}}" CACHE STRING "${docstring}" FORCE)
endif()
- set("${name}" "${${name}}" CACHE STRING "${docstring}" FORCE)
else()
set("${name}" "${rel_path}" CACHE STRING "${docstring}" FORCE)
endif()
41 changes: 41 additions & 0 deletions ports/qtbase/buildcmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index d08126731..efd1ada92 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -387,7 +387,7 @@ set(QT_KNOWN_MODULES_WITH_TOOLS "" CACHE INTERNAL "Known Qt modules with tools"

# Reset syncqt cache variable, to make sure it gets recomputed on reconfiguration, otherwise
# it might not get installed.
-unset(QT_SYNCQT CACHE)
+# unset(QT_SYNCQT CACHE)

# For adjusting variables when running tests, we need to know what
# the correct variable is for separating entries in PATH-alike
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in
index 9eb913f4d..286f3287e 100644
--- a/cmake/QtBuildInternalsExtra.cmake.in
+++ b/cmake/QtBuildInternalsExtra.cmake.in
@@ -35,8 +35,8 @@ endif()
set(QT_WILL_INSTALL @QT_WILL_INSTALL@ CACHE BOOL
"Boolean indicating if doing a Qt prefix build (vs non-prefix build)." FORCE)

-set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH
-"A path to the source tree of the previously configured QtBase project." FORCE)
+# set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH
+# "A path to the source tree of the previously configured QtBase project." FORCE)

# Propagate decision of building tests and examples to other repositories.
set(QT_BUILD_TESTS @QT_BUILD_TESTS@ CACHE BOOL "Build the testing tree.")
diff --git a/cmake/QtPrlHelpers.cmake b/cmake/QtPrlHelpers.cmake
index 30d3bd6d3..80bb2bf46 100644
--- a/cmake/QtPrlHelpers.cmake
+++ b/cmake/QtPrlHelpers.cmake
@@ -222,7 +222,7 @@ function(qt_internal_walk_libs
qt_internal_should_not_promote_package_target_to_global(
"${lib_target_unaliased}" should_not_promote)
if(NOT is_global AND is_imported AND NOT should_not_promote)
- set_property(TARGET ${lib_target_unaliased} PROPERTY IMPORTED_GLOBAL TRUE)
+ #set_property(TARGET ${lib_target_unaliased} PROPERTY IMPORTED_GLOBAL TRUE)
endif()
endif()
else()
18 changes: 18 additions & 0 deletions ports/qtbase/cmake/qt_install_copyright.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#Could probably be the beginning of a vcpkg_install_copyright?
function(qt_install_copyright SOURCE_PATH)
#Find the relevant license file and install it
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT")
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT")
elseif(EXISTS "${SOURCE_PATH}/LICENSE.FDL")
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.FDL")
endif()
file(INSTALL "${LICENSE_PATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endfunction()
Loading

0 comments on commit 36000a1

Please sign in to comment.