From 6bbee1c30022d33ccf9d9003cdeb55aecb6016fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wr=C3=B3bel?= Date: Tue, 28 Sep 2021 03:15:18 +0300 Subject: [kf5bookmarks] new port (#19780) * Add kf5bookmarks port * Fixed kf5bookmarks in windows * [kf5*] update to 5.75.0 * [kf5bookmarks] WIP * [kf5bookmarks] remove redundant kf5guiaddons dependnecy * [kf5bookmarks] remove redundant options * [kf5bookmarks] only remove what's needed * [kf5bookmarks] wrap paths in quotes * [kf5bookmarks] use semVer * [kf5bookmarks] update to 5.84 * [kf5bookmarks] add missing gettext dep * [kf5bookmarks] add PACKAGE_NAME to vcpkg_cmake_config_fixup * [kf5bookmarks] update versions * [kf5bookmarks] remove static bin files * [kf5bookmarks] update versions * [kf5bookmarks] fix config cmake file * [kf5bookmarks] update versions * [kf5bookmarks] remote meta info from patch * [kf5bookmarks] use generic, non-semver versioning * [kf5bookmarks] update versions Co-authored-by: Kuntal Majumder --- ports/kf5bookmarks/fix_config_cmake.patch | 25 ++++++++++++++++++++++++ ports/kf5bookmarks/portfile.cmake | 29 ++++++++++++++++++++++++++++ ports/kf5bookmarks/vcpkg.json | 32 +++++++++++++++++++++++++++++++ versions/baseline.json | 4 ++++ versions/k-/kf5bookmarks.json | 9 +++++++++ 5 files changed, 99 insertions(+) create mode 100644 ports/kf5bookmarks/fix_config_cmake.patch create mode 100644 ports/kf5bookmarks/portfile.cmake create mode 100644 ports/kf5bookmarks/vcpkg.json create mode 100644 versions/k-/kf5bookmarks.json diff --git a/ports/kf5bookmarks/fix_config_cmake.patch b/ports/kf5bookmarks/fix_config_cmake.patch new file mode 100644 index 000000000..1a034ccc5 --- /dev/null +++ b/ports/kf5bookmarks/fix_config_cmake.patch @@ -0,0 +1,25 @@ +diff --git a/KF5BookmarksConfig.cmake.in b/KF5BookmarksConfig.cmake.in +index 0c4494a..de973f7 100644 +--- a/KF5BookmarksConfig.cmake.in ++++ b/KF5BookmarksConfig.cmake.in +@@ -6,6 +6,17 @@ find_dependency(KF5WidgetsAddons "@KF_DEP_VERSION@") + find_dependency(Qt5Widgets @REQUIRED_QT_VERSION@) + find_dependency(Qt5Xml @REQUIRED_QT_VERSION@) + ++if (NOT @BUILD_SHARED_LIBS@) ++ if (@Qt5DBus_FOUND@) ++ find_dependency(Qt5DBus @REQUIRED_QT_VERSION@) ++ endif() ++ ++ find_dependency(KF5CoreAddons "@KF_DEP_VERSION@") ++ find_dependency(KF5Codecs "@KF_DEP_VERSION@") ++ find_dependency(KF5Config "@KF_DEP_VERSION@") ++ find_dependency(KF5ConfigWidgets "@KF_DEP_VERSION@") ++ find_dependency(KF5XmlGui "@KF_DEP_VERSION@") ++endif() + + include("${CMAKE_CURRENT_LIST_DIR}/KF5BookmarksTargets.cmake") + @PACKAGE_INCLUDE_QCHTARGETS@ +-- +GitLab + diff --git a/ports/kf5bookmarks/portfile.cmake b/ports/kf5bookmarks/portfile.cmake new file mode 100644 index 000000000..5d509a4bf --- /dev/null +++ b/ports/kf5bookmarks/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kbookmarks + REF v5.84.0 + SHA512 3ba70c7fb312cd7715f0c14f78a4380150fd8716e93186302c39692609dbedda96d5e82d316ea683ffc9338cc5b4f2c689b24e06d66c3d5d735bae57f36ccad0 + HEAD_REF master + PATCHES + fix_config_cmake.patch +) + +vcpkg_cmake_configure( + DISABLE_PARALLEL_CONFIGURE + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME KF5Bookmarks CONFIG_PATH lib/cmake/KF5Bookmarks) +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(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") \ No newline at end of file diff --git a/ports/kf5bookmarks/vcpkg.json b/ports/kf5bookmarks/vcpkg.json new file mode 100644 index 000000000..e07d04569 --- /dev/null +++ b/ports/kf5bookmarks/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "kf5bookmarks", + "version": "5.84.0", + "description": "Bookmarks management library", + "homepage": "https://api.kde.org/frameworks/kbookmarks/html/index.html", + "dependencies": [ + "ecm", + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "kf5codecs", + "kf5config", + "kf5configwidgets", + "kf5coreaddons", + "kf5widgetsaddons", + "kf5xmlgui", + "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 c50289847..0d3073791 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2976,6 +2976,10 @@ "baseline": "5.84.0", "port-version": 2 }, + "kf5bookmarks": { + "baseline": "5.84.0", + "port-version": 0 + }, "kf5codecs": { "baseline": "5.84.0", "port-version": 2 diff --git a/versions/k-/kf5bookmarks.json b/versions/k-/kf5bookmarks.json new file mode 100644 index 000000000..b98605df0 --- /dev/null +++ b/versions/k-/kf5bookmarks.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "64191caa589d36090d34e4f699e7c90d836a6726", + "version": "5.84.0", + "port-version": 0 + } + ] +} -- cgit v1.2.3