From ef6588394c4baf0630861bf316da5a896356abf3 Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Tue, 17 Dec 2024 21:08:00 +0100 Subject: [PATCH] [kdstatemachineeditor] new port (#42664) --- ports/kdstatemachineeditor/portfile.cmake | 43 +++++++++++++++++++++++ ports/kdstatemachineeditor/usage | 11 ++++++ ports/kdstatemachineeditor/vcpkg.json | 30 ++++++++++++++++ versions/baseline.json | 4 +++ versions/k-/kdstatemachineeditor.json | 9 +++++ 5 files changed, 97 insertions(+) create mode 100644 ports/kdstatemachineeditor/portfile.cmake create mode 100644 ports/kdstatemachineeditor/usage create mode 100644 ports/kdstatemachineeditor/vcpkg.json create mode 100644 versions/k-/kdstatemachineeditor.json diff --git a/ports/kdstatemachineeditor/portfile.cmake b/ports/kdstatemachineeditor/portfile.cmake new file mode 100644 index 0000000000..fcfc30d32d --- /dev/null +++ b/ports/kdstatemachineeditor/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDAB/KDStateMachineEditor + REF v${VERSION} + SHA512 dedd7166f434689cd5acf4ee3172169d3f77182269d3187f0a7a12966467dd5c7733e3ff64cd1fd03b0f3866c2aafa37cc3f2d7b8a3f4a5d8a7592da039de7af + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" VCPKG_BUILD_SHARED_LIBS) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DKDSME_QT6=ON + -DKDSME_INTERNAL_GRAPHVIZ=OFF + -DKDSME_DOCS=OFF + -DKDSME_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DBUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(PACKAGE_NAME KDSME-qt6 CONFIG_PATH lib/cmake/KDSME-qt6) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc") +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" + "${SOURCE_PATH}/LICENSES/BSD-3-Clause.txt" + "${SOURCE_PATH}/LICENSES/GPL-3.0-or-later.txt" + "${SOURCE_PATH}/LICENSES/LicenseRef-CISST.txt" + "${SOURCE_PATH}/LICENSES/LicenseRef-Qt-Commercial.txt" + "${SOURCE_PATH}/LICENSES/GPL-3.0-only.txt" + "${SOURCE_PATH}/LICENSES/LGPL-2.1-only.txt" + "${SOURCE_PATH}/LICENSES/LicenseRef-KDAB-KDStateMachineEditor.txt" + "${SOURCE_PATH}/LICENSES/MIT.txt" +) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/kdstatemachineeditor/usage b/ports/kdstatemachineeditor/usage new file mode 100644 index 0000000000..46ac26996c --- /dev/null +++ b/ports/kdstatemachineeditor/usage @@ -0,0 +1,11 @@ +kdstatemachineeditor provides CMake targets: + + find_package(KDSME-qt6 CONFIG REQUIRED) + # Core library + target_link_libraries(main PRIVATE KDSME::Core) + # View library + target_link_libraries(main PRIVATE KDSME::View) + # Debug interface client library + target_link_libraries(main PRIVATE KDSME::DebugInterfaceClient) + # Debug interface server library + target_link_libraries(main PRIVATE KDSME::DebugInterfaceSource) diff --git a/ports/kdstatemachineeditor/vcpkg.json b/ports/kdstatemachineeditor/vcpkg.json new file mode 100644 index 0000000000..a8486d983f --- /dev/null +++ b/ports/kdstatemachineeditor/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "kdstatemachineeditor", + "version": "2.0.0", + "description": "KDStateMachineEditor is a library for visualizing and editing state charts.", + "homepage": "https://github.com/KDAB/KDStateMachineEditor", + "license": "LGPL-2.1-only", + "dependencies": [ + "graphviz", + "qt5compat", + { + "name": "qtbase", + "default-features": false, + "features": [ + "testlib", + "widgets" + ] + }, + "qtdeclarative", + "qtremoteobjects", + "qtscxml", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 8bfbbe9401..1f11ff8cdf 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3956,6 +3956,10 @@ "baseline": "2.2.0", "port-version": 1 }, + "kdstatemachineeditor": { + "baseline": "2.0.0", + "port-version": 0 + }, "kealib": { "baseline": "1.6.0", "port-version": 0 diff --git a/versions/k-/kdstatemachineeditor.json b/versions/k-/kdstatemachineeditor.json new file mode 100644 index 0000000000..2419bde32b --- /dev/null +++ b/versions/k-/kdstatemachineeditor.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "698e2dfa9c5950117cc66ad7a800d692d8c9a99e", + "version": "2.0.0", + "port-version": 0 + } + ] +}