diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/qtapplicationmanager | |
Diffstat (limited to 'vcpkg/ports/qtapplicationmanager')
| -rw-r--r-- | vcpkg/ports/qtapplicationmanager/portfile.cmake | 109 | ||||
| -rw-r--r-- | vcpkg/ports/qtapplicationmanager/stack-walker-arm64.patch | 19 | ||||
| -rw-r--r-- | vcpkg/ports/qtapplicationmanager/vcpkg.json | 75 | ||||
| -rw-r--r-- | vcpkg/ports/qtapplicationmanager/wrapper-fixes.patch | 60 |
4 files changed, 263 insertions, 0 deletions
diff --git a/vcpkg/ports/qtapplicationmanager/portfile.cmake b/vcpkg/ports/qtapplicationmanager/portfile.cmake new file mode 100644 index 0000000..d09a208 --- /dev/null +++ b/vcpkg/ports/qtapplicationmanager/portfile.cmake @@ -0,0 +1,109 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES + wrapper-fixes.patch + stack-walker-arm64.patch + ) + +set(TOOL_NAMES appman + appman-controller + appman-dumpqmltypes + appman-packager + appman-qmltestrunner + appman-launcher-qml + appman-package-server + 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_libbacktrace=no + -DINPUT_libdbus=no # disable bundled libdbus + -DINPUT_libyaml=system + -DINPUT_stackwalker=no + TOOL_NAMES ${TOOL_NAMES} +) + +### 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") + endif() +endif() +vcpkg_cmake_install(ADD_BIN_TO_PATH) + +qt_fixup_and_cleanup(TOOL_NAMES ${TOOL_NAMES}) + +qt_install_copyright("${SOURCE_PATH}") + +### ^^^ 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 +# ... +# CONFIGURE_OPTIONS_RELEASE +# CONFIGURE_OPTIONS_DEBUG +# ) + + +file(GLOB_RECURSE qttools "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/*") +if(NOT qttools AND VCPKG_CROSSCOMPILING) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/") + endif() + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CROSSCOMPILING AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin/" + "${CURRENT_PACKAGES_DIR}/debug/bin/" + "${CURRENT_PACKAGES_DIR}/tools/" + ) +endif() + +set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled) #Debug tracing libraries are only build if CMAKE_BUILD_TYPE is equal to Debug diff --git a/vcpkg/ports/qtapplicationmanager/stack-walker-arm64.patch b/vcpkg/ports/qtapplicationmanager/stack-walker-arm64.patch new file mode 100644 index 0000000..4dd674e --- /dev/null +++ b/vcpkg/ports/qtapplicationmanager/stack-walker-arm64.patch @@ -0,0 +1,19 @@ +diff --git a/src/3rdparty/stackwalker/stackwalker.cpp b/src/3rdparty/stackwalker/stackwalker.cpp +index 7008ac6..cfa0d0e 100644 +--- a/src/3rdparty/stackwalker/stackwalker.cpp ++++ b/src/3rdparty/stackwalker/stackwalker.cpp +@@ -1121,6 +1121,14 @@ BOOL StackWalker::ShowCallstack(HANDLE hThread, + s.AddrBStore.Mode = AddrModeFlat; + s.AddrStack.Offset = c.IntSp; + s.AddrStack.Mode = AddrModeFlat; ++#elif _M_ARM64 ++ imageType = IMAGE_FILE_MACHINE_ARM64; ++ s.AddrPC.Offset = c.Pc; ++ s.AddrPC.Mode = AddrModeFlat; ++ s.AddrFrame.Offset = c.Fp; ++ s.AddrFrame.Mode = AddrModeFlat; ++ s.AddrStack.Offset = c.Sp; ++ s.AddrStack.Mode = AddrModeFlat; + #else + #error "Platform not supported!" + #endif diff --git a/vcpkg/ports/qtapplicationmanager/vcpkg.json b/vcpkg/ports/qtapplicationmanager/vcpkg.json new file mode 100644 index 0000000..dd6959e --- /dev/null +++ b/vcpkg/ports/qtapplicationmanager/vcpkg.json @@ -0,0 +1,75 @@ +{ + "name": "qtapplicationmanager", + "version": "6.9.1", + "description": "Qt component for application lifecycle management", + "homepage": "https://www.qt.io/", + "license": null, + "supports": "android | ios | linux | osx | qnx | (windows & !uwp & (arm64 | x64))", + "dependencies": [ + "libyaml", + { + "name": "qtbase", + "default-features": false, + "features": [ + "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" + ] + } + ] + }, + "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/vcpkg/ports/qtapplicationmanager/wrapper-fixes.patch b/vcpkg/ports/qtapplicationmanager/wrapper-fixes.patch new file mode 100644 index 0000000..72d4c93 --- /dev/null +++ b/vcpkg/ports/qtapplicationmanager/wrapper-fixes.patch @@ -0,0 +1,60 @@ +diff --git a/cmake/FindWrapLibArchive.cmake b/cmake/FindWrapLibArchive.cmake +index 58c13f4..7be4931 100644 +--- a/cmake/FindWrapLibArchive.cmake ++++ b/cmake/FindWrapLibArchive.cmake +@@ -16,3 +16,24 @@ add_library(WrapLibArchive::WrapLibArchive INTERFACE IMPORTED) + target_link_libraries(WrapLibArchive::WrapLibArchive INTERFACE ${LibArchive_LIBRARIES}) + target_include_directories(WrapLibArchive::WrapLibArchive INTERFACE ${LibArchive_INCLUDE_DIRS}) + set(WrapLibArchive_FOUND TRUE) ++if(TARGET BZip2::BZip2) ++ set_property(TARGET BZip2::BZip2 PROPERTY _qt_no_promote_global TRUE) ++endif() ++if(TARGET Threads::Threads) ++ set_property(TARGET Threads::Threads PROPERTY _qt_no_promote_global TRUE) ++endif() ++if(TARGET OpenSSL::Crypto) ++ set_property(TARGET OpenSSL::Crypto PROPERTY _qt_no_promote_global TRUE) ++endif() ++if(TARGET zstd::libzstd) ++ set_property(TARGET zstd::libzstd PROPERTY _qt_no_promote_global TRUE) ++endif() ++if(TARGET zstd::libzstd_shared) ++ set_property(TARGET zstd::libzstd_shared PROPERTY _qt_no_promote_global TRUE) ++endif() ++if(TARGET zstd::libzstd_static) ++ set_property(TARGET zstd::libzstd_static PROPERTY _qt_no_promote_global TRUE) ++endif() ++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 c2a2c62..80285b5 100644 +--- a/cmake/FindWrapLibYaml.cmake ++++ b/cmake/FindWrapLibYaml.cmake +@@ -5,6 +5,14 @@ if(TARGET WrapLibYaml::WrapLibYaml) + return() + endif() + ++find_package(yaml CONFIG) ++if(yaml_FOUND) ++ add_library(WrapLibYaml::WrapLibYaml INTERFACE IMPORTED) ++ 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) + |