From 8a84f1abf8f8b0d25b705ef9359b7e299c85f6fb Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 19 Nov 2024 06:30:24 +0100 Subject: [PATCH] [kdbindings,kddockwidgets] Update, de-vendor deps (#42207) --- ports/kdbindings/portfile.cmake | 6 ++--- ports/kdbindings/vcpkg.json | 2 +- ports/kddockwidgets/dependencies.diff | 38 +++++++++++++++++++++++++++ ports/kddockwidgets/portfile.cmake | 25 ++++++++++++------ ports/kddockwidgets/vcpkg.json | 4 +++ versions/baseline.json | 4 +-- versions/k-/kdbindings.json | 5 ++++ versions/k-/kddockwidgets.json | 5 ++++ 8 files changed, 75 insertions(+), 14 deletions(-) create mode 100644 ports/kddockwidgets/dependencies.diff diff --git a/ports/kdbindings/portfile.cmake b/ports/kdbindings/portfile.cmake index df5f2dd170..5946d75bc1 100644 --- a/ports/kdbindings/portfile.cmake +++ b/ports/kdbindings/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KDAB/KDBindings - REF "v${VERSION}" - SHA512 a1a672cdf8b51d12bd8dea2feb0aae310914874012edbf91f66a0020682e8b7f525e4000ff41102b056f4fca968f0bca021d28eefd81a52d1dfb007afb62ad4c + REF "v${VERSION}" + SHA512 6316f2a8009e47d513fc85d7fa7ad135daf1495ce392aa7852601ae62a09dede022cfa05d9d990041e1abab08b577c86a5ac548128a550c0e1a4bb0a295818e9 HEAD_REF main ) @@ -21,4 +21,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/" ) -file(INSTALL "${SOURCE_PATH}/LICENSES/MIT.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSES/MIT.txt") diff --git a/ports/kdbindings/vcpkg.json b/ports/kdbindings/vcpkg.json index 4d3ab3101c..8465cf21e8 100644 --- a/ports/kdbindings/vcpkg.json +++ b/ports/kdbindings/vcpkg.json @@ -1,6 +1,6 @@ { "name": "kdbindings", - "version": "1.0.5", + "version": "1.1.0", "description": "Reactive programming & data binding in C++", "homepage": "https://github.com/KDAB/KDBindings", "license": "MIT OR BSD-3-Clause", diff --git a/ports/kddockwidgets/dependencies.diff b/ports/kddockwidgets/dependencies.diff new file mode 100644 index 0000000000..2d3ceb4285 --- /dev/null +++ b/ports/kddockwidgets/dependencies.diff @@ -0,0 +1,38 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 02895b0..c36650f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -566,7 +566,7 @@ endif() + + if(KDDW_FRONTEND_QT) + install( +- TARGETS kddockwidgets kdbindings ++ TARGETS kddockwidgets + EXPORT kddockwidgetsTargets + RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} + LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR} +diff --git a/src/KDDockWidgetsConfig.cmake.in b/src/KDDockWidgetsConfig.cmake.in +index fbec60a..31d45e5 100644 +--- a/src/KDDockWidgetsConfig.cmake.in ++++ b/src/KDDockWidgetsConfig.cmake.in +@@ -24,5 +24,8 @@ if (NOT WIN32 AND NOT APPLE AND NOT EMSCRIPTEN AND NOT @KDDockWidgets_QT6@ AND @ + find_dependency(Qt5X11Extras REQUIRED) + endif() + ++find_dependency(KDBindings CONFIG) ++find_dependency(nlohmann_json) ++ + # Add the targets file + include("${CMAKE_CURRENT_LIST_DIR}/KDDockWidgets@KDDockWidgets_LIBRARY_QTID@Targets.cmake") +diff --git a/src/kdbindings.cmake b/src/kdbindings.cmake +index c923cd9..da7ad32 100644 +--- a/src/kdbindings.cmake ++++ b/src/kdbindings.cmake +@@ -11,5 +11,5 @@ + # Use a separate target for our kdbindings/signal.h header as it doesn't compile + # with -Wweak-vtables + +-add_library(kdbindings INTERFACE) +-target_include_directories(kdbindings SYSTEM INTERFACE $) ++find_package(KDBindings CONFIG REQUIRED GLOBAL) ++add_library(kdbindings ALIAS KDAB::KDBindings) diff --git a/ports/kddockwidgets/portfile.cmake b/ports/kddockwidgets/portfile.cmake index 443369e994..d0048f4365 100644 --- a/ports/kddockwidgets/portfile.cmake +++ b/ports/kddockwidgets/portfile.cmake @@ -4,16 +4,20 @@ vcpkg_from_github( REF "v${VERSION}" SHA512 7b88f354e2aca4ac4c0f59874b6a7d6baaf77f5b54dd57b981ec7831e40acc0e2f6d3c6300af3d93c594bf34c7072c6a8a19a50c65039ccae22a9e47b90499d8 HEAD_REF master + PATCHES + dependencies.diff +) +file(REMOVE_RECURSE + "${SOURCE_PATH}/src/3rdparty" ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KD_STATIC) if(VCPKG_CROSSCOMPILING) - list(APPEND _qarg_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}) - list(APPEND _qarg_OPTIONS -DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS) # Remove if PR #16111 is merged - list(APPEND _qarg_OPTIONS -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 -DCMAKE_SYSTEM_NAME:STRING=Windows) - endif() + list(APPEND _qarg_OPTIONS + "-DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}" + "-DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share" + ) endif() vcpkg_cmake_configure( @@ -21,7 +25,7 @@ vcpkg_cmake_configure( OPTIONS ${_qarg_OPTIONS} -DKDDockWidgets_QT6=ON - "-DKDDockWidgets_FRONTENDS=qtwidgets" + -DKDDockWidgets_FRONTENDS=qtwidgets -DKDDockWidgets_STATIC=${KD_STATIC} -DKDDockWidgets_PYTHON_BINDINGS=OFF -DKDDockWidgets_TESTS=OFF @@ -29,10 +33,11 @@ vcpkg_cmake_configure( # https://github.com/KDAB/KDDockWidgets/blob/v2.1.0/CMakeLists.txt#L301 -DCMAKE_DISABLE_FIND_PACKAGE_spdlog=ON -DCMAKE_DISABLE_FIND_PACKAGE_fmt=ON + -DCMAKE_REQUIRE_FIND_PACKAGE_nlohmann_json=ON ) vcpkg_cmake_install() -vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/KDDockWidgets-qt6" PACKAGE_NAME "KDDockWidgets-qt6") +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/KDDockWidgets-qt6" PACKAGE_NAME kddockwidgets-qt6) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") @@ -41,4 +46,8 @@ endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") +vcpkg_install_copyright(FILE_LIST + "${SOURCE_PATH}/LICENSE.txt" + "${SOURCE_PATH}/LICENSES/GPL-2.0-only.txt" + "${SOURCE_PATH}/LICENSES/GPL-3.0-only.txt" +) diff --git a/ports/kddockwidgets/vcpkg.json b/ports/kddockwidgets/vcpkg.json index 2b34a951f5..70545ca966 100644 --- a/ports/kddockwidgets/vcpkg.json +++ b/ports/kddockwidgets/vcpkg.json @@ -1,9 +1,13 @@ { "name": "kddockwidgets", "version": "2.1.0", + "port-version": 1, "description": "KDAB's Dock Widget Framework for Qt", "homepage": "https://www.kdab.com/development-resources/qt-tools/kddockwidgets/", + "license": "GPL-2.0-only OR GPL-3.0-only", "dependencies": [ + "kdbindings", + "nlohmann-json", { "name": "qtbase", "default-features": false, diff --git a/versions/baseline.json b/versions/baseline.json index fab7a833de..aebea4fc89 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3941,12 +3941,12 @@ "port-version": 0 }, "kdbindings": { - "baseline": "1.0.5", + "baseline": "1.1.0", "port-version": 0 }, "kddockwidgets": { "baseline": "2.1.0", - "port-version": 0 + "port-version": 1 }, "kdsoap": { "baseline": "2.2.0", diff --git a/versions/k-/kdbindings.json b/versions/k-/kdbindings.json index d8cb8a01e7..4264d3317f 100644 --- a/versions/k-/kdbindings.json +++ b/versions/k-/kdbindings.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4e61446d34a9a2a00ba822d66e6d9eba487cafb9", + "version": "1.1.0", + "port-version": 0 + }, { "git-tree": "d3d455128bf7e06fd1b30a961c62bd33dd56f8ad", "version": "1.0.5", diff --git a/versions/k-/kddockwidgets.json b/versions/k-/kddockwidgets.json index 866e5b44e2..89c231e0fa 100644 --- a/versions/k-/kddockwidgets.json +++ b/versions/k-/kddockwidgets.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c841c3a78eee0afc5376e39977217a497475089a", + "version": "2.1.0", + "port-version": 1 + }, { "git-tree": "d9644c9741f94c097fba186a4111f1dfcd68063e", "version": "2.1.0",