From e527f179b10208896e983337aac4cfccfd45e3f9 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 31 May 2023 22:49:39 +0300 Subject: [PATCH] [kf5parts] Add new port (#31544) * [kf5parts] New package * [kf5parts] Apply suggestions from code review Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> * [kf5parts] vcpkg x-add-version kf5parts --------- Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> --- ports/kf5parts/portfile.cmake | 31 ++++++++++++++++++++++++++++++ ports/kf5parts/vcpkg.json | 36 +++++++++++++++++++++++++++++++++++ versions/baseline.json | 4 ++++ versions/k-/kf5parts.json | 9 +++++++++ 4 files changed, 80 insertions(+) create mode 100644 ports/kf5parts/portfile.cmake create mode 100644 ports/kf5parts/vcpkg.json create mode 100644 versions/k-/kf5parts.json diff --git a/ports/kf5parts/portfile.cmake b/ports/kf5parts/portfile.cmake new file mode 100644 index 00000000000000..1f09bc00a2ceba --- /dev/null +++ b/ports/kf5parts/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kparts + REF "v${VERSION}" + SHA512 07ba359faf15f6bc398b64e0534842532e1a3ade94caa6b8dc7886417aa49526b7e0f54bd29805e64b8661f4c402e022bd211a932ee13b0ac4b97e516ae6dbef + HEAD_REF master +) + +# Prevent KDEClangFormat from writing to source effectively blocking parallel configure +file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: false\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Parts CONFIG_PATH lib/cmake/KF5Parts) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(GLOB LICENSE_FILES "${SOURCE_PATH}/LICENSES/*") +vcpkg_install_copyright(FILE_LIST ${LICENSE_FILES}) diff --git a/ports/kf5parts/vcpkg.json b/ports/kf5parts/vcpkg.json new file mode 100644 index 00000000000000..2b0bea7de9abd6 --- /dev/null +++ b/ports/kf5parts/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "kf5parts", + "version": "5.98.0", + "description": "Plugin framework for user interface component", + "homepage": "https://api.kde.org/frameworks/kparts/html/index.html", + "license": "LGPL-2.0-or-later", + "dependencies": [ + "ecm", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "kf5config", + "kf5coreaddons", + "kf5i18n", + "kf5iconthemes", + "kf5jobwidgets", + "kf5kio", + "kf5service", + "kf5textwidgets", + "kf5widgetsaddons", + "kf5xmlgui", + "qt5-base", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 240e878af600ee..4fbd34a0166951 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3640,6 +3640,10 @@ "baseline": "5.98.0", "port-version": 0 }, + "kf5parts": { + "baseline": "5.98.0", + "port-version": 0 + }, "kf5plotting": { "baseline": "5.98.0", "port-version": 0 diff --git a/versions/k-/kf5parts.json b/versions/k-/kf5parts.json new file mode 100644 index 00000000000000..f03d4688a912cc --- /dev/null +++ b/versions/k-/kf5parts.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "6d66ab25d03620f9df39a90fd00d00b0d6271620", + "version": "5.98.0", + "port-version": 0 + } + ] +}