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/kdreports | |
Diffstat (limited to 'vcpkg/ports/kdreports')
| -rw-r--r-- | vcpkg/ports/kdreports/fix-cmake-config.patch | 19 | ||||
| -rw-r--r-- | vcpkg/ports/kdreports/fix-license-text.patch | 10 | ||||
| -rw-r--r-- | vcpkg/ports/kdreports/portfile.cmake | 39 | ||||
| -rw-r--r-- | vcpkg/ports/kdreports/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/kdreports/vcpkg.json | 24 |
5 files changed, 96 insertions, 0 deletions
diff --git a/vcpkg/ports/kdreports/fix-cmake-config.patch b/vcpkg/ports/kdreports/fix-cmake-config.patch new file mode 100644 index 0000000..9bca8c4 --- /dev/null +++ b/vcpkg/ports/kdreports/fix-cmake-config.patch @@ -0,0 +1,19 @@ +diff --git a/src/KDReportsConfig.cmake.in b/src/KDReportsConfig.cmake.in +index fa26517..49b9054 100644 +--- a/src/KDReportsConfig.cmake.in ++++ b/src/KDReportsConfig.cmake.in +@@ -9,10 +9,10 @@ + + include(CMakeFindDependencyMacro) + +-find_dependency(Qt@Qt_VERSION_MAJOR@Core @QT_MIN_VERSION@) +-find_dependency(Qt@Qt_VERSION_MAJOR@Widgets @QT_MIN_VERSION@) +-find_dependency(Qt@Qt_VERSION_MAJOR@PrintSupport @QT_MIN_VERSION@) +-find_dependency(Qt@Qt_VERSION_MAJOR@Xml @QT_MIN_VERSION@) ++find_dependency(Qt@QT_VERSION_MAJOR@Core @QT_MIN_VERSION@) ++find_dependency(Qt@QT_VERSION_MAJOR@Widgets @QT_MIN_VERSION@) ++find_dependency(Qt@QT_VERSION_MAJOR@PrintSupport @QT_MIN_VERSION@) ++find_dependency(Qt@QT_VERSION_MAJOR@Xml @QT_MIN_VERSION@) + + if (@KDChart_FOUND@) + find_dependency(KDChart) diff --git a/vcpkg/ports/kdreports/fix-license-text.patch b/vcpkg/ports/kdreports/fix-license-text.patch new file mode 100644 index 0000000..83062a3 --- /dev/null +++ b/vcpkg/ports/kdreports/fix-license-text.patch @@ -0,0 +1,10 @@ +diff --git a/LICENSE.txt b/LICENSE.txt +index 110b884..db69306 100644 +--- a/LICENSE.txt ++++ b/LICENSE.txt +@@ -3,4 +3,4 @@ License + The KD Reports Software is © 2007 Klarälvdalens Datakonsult AB (KDAB), + and is available under the terms of the MIT license. + +-See the full license text in the LICENSES folder. ++See the full license text provided below in this file. diff --git a/vcpkg/ports/kdreports/portfile.cmake b/vcpkg/ports/kdreports/portfile.cmake new file mode 100644 index 0000000..dc3afdb --- /dev/null +++ b/vcpkg/ports/kdreports/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDAB/KDReports + REF "kdreports-${VERSION}" + SHA512 f9b3785d71c68d032a0e1420ba3adae517994d257a02df69aaffcff4a8909b24d081c91b4cc9e1cc00311768f92e63b9288a99cfaac8422ebd1cae7321b3edbb + HEAD_REF master + PATCHES + "fix-cmake-config.patch" + "fix-license-text.patch" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KDReports_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DKDReports_QT6=ON + -DKDReports_STATIC=${KDReports_STATIC} + -DKDReports_TESTS=OFF + -DKDReports_EXAMPLES=OFF + -DKDReports_DOCS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_KDChart-qt6=ON +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(PACKAGE_NAME KDReports-qt6 CONFIG_PATH lib/cmake/KDReports-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/MIT.txt" +) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/vcpkg/ports/kdreports/usage b/vcpkg/ports/kdreports/usage new file mode 100644 index 0000000..eeb3be5 --- /dev/null +++ b/vcpkg/ports/kdreports/usage @@ -0,0 +1,4 @@ +kdreports provides CMake targets: + + find_package(KDReports-qt6 CONFIG REQUIRED) + target_link_libraries(main PRIVATE KDReports::kdreports) diff --git a/vcpkg/ports/kdreports/vcpkg.json b/vcpkg/ports/kdreports/vcpkg.json new file mode 100644 index 0000000..3e954b3 --- /dev/null +++ b/vcpkg/ports/kdreports/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "kdreports", + "version": "2.3.0", + "description": "KD Reports is a Qt tool that lets you easily create printable reports by providing all of the necessary features for a variety of applications.", + "homepage": "https://github.com/KDAB/KDReports", + "license": "MIT", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "widgets" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |