diff --git a/ports/qt/vcpkg.json b/ports/qt/vcpkg.json index 40041872092965..ecaff4ece4d410 100644 --- a/ports/qt/vcpkg.json +++ b/ports/qt/vcpkg.json @@ -1,6 +1,7 @@ { "name": "qt", "version": "6.8.2", + "port-version": 1, "description": "A cross-platform application and UI framework.", "homepage": "https://www.qt.io/", "license": null, @@ -29,7 +30,22 @@ "textcodec" ] }, - "qtapplicationmanager", + { + "name": "qtapplicationmanager", + "default-features": false, + "features": [ + "systemd-watchdog" + ], + "platform": "linux" + }, + { + "name": "qtapplicationmanager", + "features": [ + "installer", + "package-server" + ], + "platform": "android | ios | linux | osx | qnx | (windows & !uwp & (arm64 | x64))" + }, { "name": "qtbase", "default-features": false diff --git a/ports/qtapplicationmanager/portfile.cmake b/ports/qtapplicationmanager/portfile.cmake index e85126cd56f7dd..d09a2089f8c750 100644 --- a/ports/qtapplicationmanager/portfile.cmake +++ b/ports/qtapplicationmanager/portfile.cmake @@ -16,32 +16,63 @@ set(TOOL_NAMES appman package-uploader ) +# cf. src/common-lib/configure.cmake +set(options "") +if("installer" IN_LIST FEATURES) + list(APPEND options -DINPUT_installer=yes -DINPUT_libarchive=system) +else() + list(APPEND options -DINPUT_installer=no -DINPUT_libarchive=no) +endif() +if("multi-process" IN_LIST FEATURES) + list(APPEND options -DINPUT_force_mode=multi) +else() + list(APPEND options -DINPUT_force_mode=single) +endif() +if("package-server" IN_LIST FEATURES) + list(APPEND options -DINPUT_package_server=yes) +else() + list(APPEND options -DINPUT_package_server=no) +endif() +if("systemd-watchdog" IN_LIST FEATURES) + list(APPEND options -DINPUT_systemd_watchdog=yes) + vcpkg_find_acquire_program(PKGCONFIG) + list(APPEND options "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}") +else() + list(APPEND options -DINPUT_systemd_watchdog=no) +endif() + qt_download_submodule(PATCHES ${${PORT}_PATCHES}) if(QT_UPDATE_VERSION) return() endif() +file(REMOVE_RECURSE + "${SOURCE_PATH}/src/3rdparty/libarchive" + "${SOURCE_PATH}/src/3rdparty/libbacktrace" + "${SOURCE_PATH}/src/3rdparty/libdbus" + "${SOURCE_PATH}/src/3rdparty/libyaml" + "${SOURCE_PATH}/src/3rdparty/stackwalker" +) + set(qt_plugindir ${QT6_DIRECTORY_PREFIX}plugins) set(qt_qmldir ${QT6_DIRECTORY_PREFIX}qml) qt_cmake_configure(OPTIONS + ${options} -DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON - -DINPUT_libarchive='system' - -DINPUT_libyaml='system' - -DFEATURE_am_system_libyaml=ON - -DFEATURE_am_system_libarchive=ON - -DINPUT_libdbus='no' - -DINPUT_libbacktrace='no' - -DINPUT_systemd_watchdog='no' - -DINPUT_widgets_support=ON + -DINPUT_libbacktrace=no + -DINPUT_libdbus=no # disable bundled libdbus + -DINPUT_libyaml=system + -DINPUT_stackwalker=no TOOL_NAMES ${TOOL_NAMES} ) -### Need to fix one post-build.bat; Couldn't find the place where it gets generated! +### Fix debug post-build.bat generated by CMake. +### Maybe related: https://gitlab.kitware.com/cmake/cmake/-/issues/22124. if(VCPKG_TARGET_IS_WINDOWS) set(scriptfile "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/tools/dumpqmltypes/CMakeFiles/appman-dumpqmltypes.dir/post-build.bat") file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" CURRENT_INSTALLED_DIR_NATIVE) if(EXISTS "${scriptfile}") - vcpkg_replace_string("${scriptfile}" "${CURRENT_INSTALLED_DIR_NATIVE}\\bin" "${CURRENT_INSTALLED_DIR_NATIVE}\\debug\\bin" IGNORE_UNCHANGED) + vcpkg_replace_string("${scriptfile}" "${CURRENT_INSTALLED_DIR_NATIVE}\\bin" "${CURRENT_INSTALLED_DIR_NATIVE}\\debug\\bin") endif() endif() vcpkg_cmake_install(ADD_BIN_TO_PATH) @@ -50,16 +81,13 @@ qt_fixup_and_cleanup(TOOL_NAMES ${TOOL_NAMES}) qt_install_copyright("${SOURCE_PATH}") -# Switch to a more complicated script due to the one post-build script which needed fixing after configure. -# If somebody finds out how/where post-build.bat gets generated please fix it there instead. +### ^^^ Using the more verbose code due to the post-build.bat script fixup. +### vvv Usual short version follows. + #qt_install_submodule(PATCHES ${${PORT}_PATCHES} # TOOL_NAMES ${TOOL_NAMES} # CONFIGURE_OPTIONS -# --trace-expand -# -DINPUT_libarchive=system -# -DINPUT_libyaml=system -# -DFEATURE_am_system_libyaml=ON -# -DFEATURE_am_system_libarchive=ON +# ... # CONFIGURE_OPTIONS_RELEASE # CONFIGURE_OPTIONS_DEBUG # ) diff --git a/ports/qtapplicationmanager/vcpkg.json b/ports/qtapplicationmanager/vcpkg.json index 222b2571753880..1ee1cc7117a437 100644 --- a/ports/qtapplicationmanager/vcpkg.json +++ b/ports/qtapplicationmanager/vcpkg.json @@ -1,34 +1,76 @@ { "name": "qtapplicationmanager", "version": "6.8.2", + "port-version": 1, "description": "Qt component for application lifecycle management", "homepage": "https://www.qt.io/", "license": null, - "supports": "!(windows & x86)", + "supports": "android | ios | linux | osx | qnx | (windows & !uwp & (arm64 | x64))", "dependencies": [ - "libarchive", "libyaml", - { - "name": "qtapplicationmanager", - "host": true, - "default-features": false - }, { "name": "qtbase", "default-features": false, "features": [ - "widgets" + "concurrent" ] }, { "name": "qtdeclarative", "default-features": false + } + ], + "features": { + "installer": { + "description": "Enable the installer component.", + "supports": "!ios", + "dependencies": [ + { + "name": "libarchive", + "default-features": false + }, + { + "name": "qtapplicationmanager", + "host": true, + "default-features": false, + "features": [ + "installer" + ] + } + ] }, - "qthttpserver", - { - "name": "qtwayland", - "default-features": false, - "platform": "!windows" + "multi-process": { + "description": "Support running system UI and applications in individual processes.", + "supports": "linux & !static", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "dbus" + ] + }, + "qtwayland" + ] + }, + "package-server": { + "description": "Build the package-server.", + "dependencies": [ + { + "name": "qtapplicationmanager", + "default-features": false, + "features": [ + "installer" + ] + }, + "qthttpserver" + ] + }, + "systemd-watchdog": { + "description": "Enable the systemd-watchdog component.", + "dependencies": [ + "libsystemd" + ] } - ] + } } diff --git a/ports/qtapplicationmanager/wrapper-fixes.patch b/ports/qtapplicationmanager/wrapper-fixes.patch index 194e35f816a0e9..72d4c93a184e6b 100644 --- a/ports/qtapplicationmanager/wrapper-fixes.patch +++ b/ports/qtapplicationmanager/wrapper-fixes.patch @@ -1,5 +1,5 @@ diff --git a/cmake/FindWrapLibArchive.cmake b/cmake/FindWrapLibArchive.cmake -index 67e4ce0..887b766 100644 +index 58c13f4..7be4931 100644 --- a/cmake/FindWrapLibArchive.cmake +++ b/cmake/FindWrapLibArchive.cmake @@ -16,3 +16,24 @@ add_library(WrapLibArchive::WrapLibArchive INTERFACE IMPORTED) @@ -27,30 +27,34 @@ index 67e4ce0..887b766 100644 +if(TARGET ZLIB::ZLIB) + set_property(TARGET ZLIB::ZLIB PROPERTY _qt_no_promote_global TRUE) +endif() +diff --git a/cmake/FindWrapLibSystemd.cmake b/cmake/FindWrapLibSystemd.cmake +index c681dae..c6252b1 100644 +--- a/cmake/FindWrapLibSystemd.cmake ++++ b/cmake/FindWrapLibSystemd.cmake +@@ -15,5 +15,6 @@ if (NOT pc_libsystemd_FOUND) + endif() + + add_library(WrapLibSystemd::WrapLibSystemd INTERFACE IMPORTED) +-target_link_libraries(WrapLibSystemd::WrapLibSystemd INTERFACE ${pc_libsystemd_LIBRARIES}) ++target_link_libraries(WrapLibSystemd::WrapLibSystemd INTERFACE ${pc_libsystemd_LINK_LIBRARIES}) ++target_include_directories(WrapLibSystemd::WrapLibSystemd INTERFACE ${pc_libsystemd_INCLUDE_DIRS}) + set(WrapLibSystemd_FOUND TRUE) diff --git a/cmake/FindWrapLibYaml.cmake b/cmake/FindWrapLibYaml.cmake -index 1dab912..c09e97f 100644 +index c2a2c62..80285b5 100644 --- a/cmake/FindWrapLibYaml.cmake +++ b/cmake/FindWrapLibYaml.cmake -@@ -10,10 +10,17 @@ pkg_check_modules(pc_libyaml yaml-0.1 IMPORTED_TARGET) - +@@ -5,6 +5,14 @@ if(TARGET WrapLibYaml::WrapLibYaml) + return() + endif() - if (NOT pc_libyaml_FOUND) -- set(WrapLibYaml_FOUND FALSE) -- return() -+ find_package(yaml) -+ if(yaml_FOUND) -+ add_library(WrapLibYaml::WrapLibYaml INTERFACE IMPORTED) -+ target_link_libraries(WrapLibYaml::WrapLibYaml INTERFACE ${yaml_LIBRARIES}) -+ else() -+ set(WrapLibYaml_FOUND FALSE) -+ return() -+ endif() -+else() ++find_package(yaml CONFIG) ++if(yaml_FOUND) + add_library(WrapLibYaml::WrapLibYaml INTERFACE IMPORTED) -+ target_link_libraries(WrapLibYaml::WrapLibYaml INTERFACE PkgConfig::pc_libyaml) - endif() -- --add_library(WrapLibYaml::WrapLibYaml INTERFACE IMPORTED) --target_link_libraries(WrapLibYaml::WrapLibYaml INTERFACE ${pc_libyaml_LIBRARIES}) - set(WrapLibYaml_FOUND TRUE) ++ target_link_libraries(WrapLibYaml::WrapLibYaml INTERFACE yaml) ++ set(WrapLibYaml_FOUND TRUE) ++ return() ++endif() + + find_package(PkgConfig) + pkg_check_modules(pc_libyaml yaml-0.1>=0.2.2 IMPORTED_TARGET) + diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index c3616b5ea27476..f3b3bcfeb355dd 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1139,14 +1139,15 @@ gtk:x64-windows-release=pass gtk:x64-windows-static-md=pass gtk:x64-windows=pass gtk:x86-windows=pass +qt:arm64-osx=pass +qt:arm64-windows-static-md=pass qt:arm64-windows=pass qt:x64-linux=pass +qt:x64-osx=pass qt:x64-windows-release=pass +qt:x64-windows-static-md=pass qt:x64-windows-static=pass qt:x64-windows=pass -# qt:x64-windows-static-md=pass # hunspell is fail so this cannot pass. -# qt:arm64-windows-static-md=pass # hunspell is fail so this cannot pass. -# qt:x64-osx=pass # gstreamer issues preventing qtmultimedia vcpkg-ci-arrow:x64-linux=pass vcpkg-ci-arrow:x64-osx=pass vcpkg-ci-arrow:x64-windows-release=pass diff --git a/versions/baseline.json b/versions/baseline.json index d66bbff51fcb1b..67ade4bd9d9f0d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7498,7 +7498,7 @@ }, "qt": { "baseline": "6.8.2", - "port-version": 0 + "port-version": 1 }, "qt-advanced-docking-system": { "baseline": "4.4.0", @@ -7690,7 +7690,7 @@ }, "qtapplicationmanager": { "baseline": "6.8.2", - "port-version": 0 + "port-version": 1 }, "qtbase": { "baseline": "6.8.2", diff --git a/versions/q-/qt.json b/versions/q-/qt.json index 37a9910b45521d..8d3572a5168468 100644 --- a/versions/q-/qt.json +++ b/versions/q-/qt.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3d67b4821aa478a505cd419d119b457c45b2f77a", + "version": "6.8.2", + "port-version": 1 + }, { "git-tree": "dacb9035aaa0d03ec3a05d8f136274ce6a8f1c3e", "version": "6.8.2", diff --git a/versions/q-/qtapplicationmanager.json b/versions/q-/qtapplicationmanager.json index cd58f641f0ab20..bc266af3edade8 100644 --- a/versions/q-/qtapplicationmanager.json +++ b/versions/q-/qtapplicationmanager.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "cd92529b6d854bdb9dde5696f5db2001fe2ef2b7", + "version": "6.8.2", + "port-version": 1 + }, { "git-tree": "482983d975cbd273b10d57c57e3224eeb57d0377", "version": "6.8.2",