diff options
| author | Dawid Wróbel <me@dawidwrobel.com> | 2021-09-04 01:41:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-03 16:41:20 -0700 |
| commit | 960264885a52c1fb5e954ab30ccc02ccccf366d8 (patch) | |
| tree | 88fac91e764899bafc6e7d9d09cfdfec174a82ab | |
| parent | 7ad9757560c522544f3470c0a08acb486139df05 (diff) | |
| download | vcpkg-960264885a52c1fb5e954ab30ccc02ccccf366d8.tar.gz vcpkg-960264885a52c1fb5e954ab30ccc02ccccf366d8.zip | |
[kf5crash] fix cmake.in to allow consumption by static builds (#19179)
* [kf5crash] fix cmake.in to allow consumption by static builds
* [kf5crash] update versions
* [kf5crash] kcrash is supported on Win and macOS, too
* [kf5crash] update versions
* [kf5crash] replace deprecated functions
* [kf5crash] update versions
* [kf5crash] don't overzealously delete folders
* [kf5crash] update versions
* [kf5crash] proactively disable docs
* [kf5crash] use semVer
* [kf5crash] update versions
* [kf5crash] remove extraneous options
* [kf5crash] update versions
* [kf5crash] wrap paths in quotes
* [kf5crash] update versions
* [kf5crash] remove bin folders in static build
* [kf5crash] update versions
* [kf5crash] rename patch file
* [kf5crash] update versions
* [kf5crash] add PACKAGE_NAME to vcpkg_cmake_config_fixup
* [kf5crash] update versions
| -rw-r--r-- | ports/kf5crash/portfile.cmake | 25 | ||||
| -rw-r--r-- | ports/kf5crash/support_static_builds.patch | 31 | ||||
| -rw-r--r-- | ports/kf5crash/vcpkg.json | 12 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/k-/kf5crash.json | 5 |
5 files changed, 61 insertions, 14 deletions
diff --git a/ports/kf5crash/portfile.cmake b/ports/kf5crash/portfile.cmake index 96837708e..32dc7ff8e 100644 --- a/ports/kf5crash/portfile.cmake +++ b/ports/kf5crash/portfile.cmake @@ -4,25 +4,28 @@ vcpkg_from_github( REF v5.84.0 SHA512 db37a481e0d34e0024cabd77c22680171fa383ea300c56c73f807380fd818263d27f36fb012fc6604b462dbf9374db39bab94c4dc2c3bff488ac9812d01eb2dd HEAD_REF master + PATCHES + support_static_builds.patch # https://invent.kde.org/frameworks/kcrash/-/merge_requests/23 ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} DISABLE_PARALLEL_CONFIGURE - PREFER_NINJA OPTIONS -DBUILD_TESTING=OFF ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Crash) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Crash CONFIG_PATH lib/cmake/KF5Crash) vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/data") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc") -file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5crash/support_static_builds.patch b/ports/kf5crash/support_static_builds.patch new file mode 100644 index 000000000..4c5eb8e52 --- /dev/null +++ b/ports/kf5crash/support_static_builds.patch @@ -0,0 +1,31 @@ +From dc45a01fec854b5e2a49196e82e1a336ab642764 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com> +Date: Wed, 28 Jul 2021 03:04:39 +0200 +Subject: [PATCH] Support static builds + +--- + KF5CrashConfig.cmake.in | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/KF5CrashConfig.cmake.in b/KF5CrashConfig.cmake.in +index 0222495..494c810 100644 +--- a/KF5CrashConfig.cmake.in ++++ b/KF5CrashConfig.cmake.in +@@ -5,6 +5,14 @@ + include(CMakeFindDependencyMacro) + find_dependency(Qt5Core @REQUIRED_QT_VERSION@) + ++if (NOT @BUILD_SHARED_LIBS@) ++ find_dependency(KF5CoreAddons REQUIRED) ++ find_dependency(KF5WindowSystem REQUIRED) ++ ++ if (@X11_FOUND@) ++ find_dependency(Qt5X11Extras REQUIRED) ++ endif() ++endif() + + include("${CMAKE_CURRENT_LIST_DIR}/KF5CrashTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ +-- +GitLab + diff --git a/ports/kf5crash/vcpkg.json b/ports/kf5crash/vcpkg.json index 3e60efd0d..6976bb5d4 100644 --- a/ports/kf5crash/vcpkg.json +++ b/ports/kf5crash/vcpkg.json @@ -1,9 +1,9 @@ { "name": "kf5crash", - "version": "5.84.0", + "version-semver": "5.84.0", + "port-version": 1, "description": "KCrash provides support for intercepting and handling application crashes.", "homepage": "https://api.kde.org/frameworks/kcrash/html/index.html", - "supports": "linux", "dependencies": [ "ecm", "kf5coreaddons", @@ -11,6 +11,14 @@ { "name": "qt5-x11extras", "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ] } diff --git a/versions/baseline.json b/versions/baseline.json index 60c44c92b..08cd9a94d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2918,7 +2918,7 @@ }, "kf5crash": { "baseline": "5.84.0", - "port-version": 0 + "port-version": 1 }, "kf5dbusaddons": { "baseline": "5.84.0", diff --git a/versions/k-/kf5crash.json b/versions/k-/kf5crash.json index f11132939..6260690df 100644 --- a/versions/k-/kf5crash.json +++ b/versions/k-/kf5crash.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "9b4122c60d561d232fbd5294a304be12509b736d", + "version-semver": "5.84.0", + "port-version": 1 + }, + { "git-tree": "e316c8fc3bd2c92825a198615d99b61ede2986cb", "version": "5.84.0", "port-version": 0 |
