Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion ports/qt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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
Expand Down
62 changes: 45 additions & 17 deletions ports/qtapplicationmanager/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
# )
Expand Down
70 changes: 56 additions & 14 deletions ports/qtapplicationmanager/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
]
}
}
48 changes: 26 additions & 22 deletions ports/qtapplicationmanager/wrapper-fixes.patch
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)

7 changes: 4 additions & 3 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7498,7 +7498,7 @@
},
"qt": {
"baseline": "6.8.2",
"port-version": 0
"port-version": 1
},
"qt-advanced-docking-system": {
"baseline": "4.4.0",
Expand Down Expand Up @@ -7690,7 +7690,7 @@
},
"qtapplicationmanager": {
"baseline": "6.8.2",
"port-version": 0
"port-version": 1
},
"qtbase": {
"baseline": "6.8.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qt.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3d67b4821aa478a505cd419d119b457c45b2f77a",
"version": "6.8.2",
"port-version": 1
},
{
"git-tree": "dacb9035aaa0d03ec3a05d8f136274ce6a8f1c3e",
"version": "6.8.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qtapplicationmanager.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cd92529b6d854bdb9dde5696f5db2001fe2ef2b7",
"version": "6.8.2",
"port-version": 1
},
{
"git-tree": "482983d975cbd273b10d57c57e3224eeb57d0377",
"version": "6.8.2",
Expand Down