From bfa4cea3a8b0f655d8aef5ef604076182e80d505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wr=C3=B3bel?= Date: Thu, 29 Jul 2021 20:09:33 +0200 Subject: [PATCH] [kf5sonnet] new port (#19199) * Add kf5sonnet port * [kf5sonnet] remove binaries * Fixed kf5sonnet for windows * [kf5sonnet] fix windows build * [kf5sonnet] update to 5.75.0 * [kf5sonnet] update to 5.84.0 * [kf5sonnet] update versions * [kf5sonnet] use semver Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> * [kf5sonnet] replace deprecated functions Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> * [kf5sonnet] update versions * [kf5sonnet] DISABLE_PARALLEL_CONFIGURE * [kf5sonnet] update versions * [kf5sonnet] fix MAYBE_UNUSED_VARIABLES usage * [kf5sonnet] update versions Co-authored-by: Kuntal Majumder Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> --- ports/kf5sonnet/portfile.cmake | 52 ++++++++++++++++++++++++++++++++++ ports/kf5sonnet/vcpkg.json | 19 +++++++++++++ versions/baseline.json | 4 +++ versions/k-/kf5sonnet.json | 9 ++++++ 4 files changed, 84 insertions(+) create mode 100644 ports/kf5sonnet/portfile.cmake create mode 100644 ports/kf5sonnet/vcpkg.json create mode 100644 versions/k-/kf5sonnet.json diff --git a/ports/kf5sonnet/portfile.cmake b/ports/kf5sonnet/portfile.cmake new file mode 100644 index 00000000000000..5710d63b7a5baf --- /dev/null +++ b/ports/kf5sonnet/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/sonnet + REF v5.84.0 + SHA512 9e7d121f447e3320c27c3708f5d1d4cc735e775749cded268502b593a0b1f6ea703e68ce1d2d4f1806e0adb73aafaedf660586f8ee740f4a9a834e23cb9880e4 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins + -DKDE_INSTALL_DATAROOTDIR=data + -DKDE_INSTALL_QTPLUGINDIR=plugins + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + MAYBE_UNUSED_VARIABLES + BUILD_HTML_DOCS + BUILD_MAN_DOCS + BUILD_QTHELP_DOCS +) + +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") + +vcpkg_cmake_install() + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/gentrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/gentrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/parsetrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/parsetrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}") + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5Sonnet) + +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}") +file(APPEND "${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf" "Data = ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/data") + +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/etc") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/gentrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/parsetrigrams${VCPKG_HOST_EXECUTABLE_SUFFIX}") + +file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5sonnet/vcpkg.json b/ports/kf5sonnet/vcpkg.json new file mode 100644 index 00000000000000..8f4b783ce3c483 --- /dev/null +++ b/ports/kf5sonnet/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "kf5sonnet", + "version-semver": "5.84.0", + "description": "Multi-language spell checker", + "homepage": "https://api.kde.org/frameworks/sonnet/html/index.html", + "dependencies": [ + "ecm", + "qt5-base", + "qt5-tools", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index e441a4e1595465..ca3a138fee15a7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2916,6 +2916,10 @@ "baseline": "5.84.0", "port-version": 0 }, + "kf5sonnet": { + "baseline": "5.84.0", + "port-version": 0 + }, "kf5syntaxhighlighting": { "baseline": "5.84.0", "port-version": 0 diff --git a/versions/k-/kf5sonnet.json b/versions/k-/kf5sonnet.json new file mode 100644 index 00000000000000..78e3c649f27d9b --- /dev/null +++ b/versions/k-/kf5sonnet.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "7f6d9ebeec45c6354fd96f1ee04b9e34063e33b0", + "version-semver": "5.84.0", + "port-version": 0 + } + ] +}