From 7cbdcd0c4bc87230f81fc22566ee26463370cee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 11:53:40 +0100 Subject: [PATCH 01/13] [libmount] new port --- ports/libmount/portfile.cmake | 40 +++++++++++++++++++++++++++++++++++ ports/libmount/vcpkg.json | 7 ++++++ 2 files changed, 47 insertions(+) create mode 100644 ports/libmount/portfile.cmake create mode 100644 ports/libmount/vcpkg.json diff --git a/ports/libmount/portfile.cmake b/ports/libmount/portfile.cmake new file mode 100644 index 00000000000000..3feac3d30ce8c6 --- /dev/null +++ b/ports/libmount/portfile.cmake @@ -0,0 +1,40 @@ +set(VERSION_MAJOR 2) +set(VERSION_MINOR 37) +set(VERSION_PATCH 2) +set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v${VERSION_MAJOR}.${VERSION_MINOR}/util-linux-${VERSION}.tar.xz" + FILENAME "util-linux-${VERSION}.tar.xz" + SHA512 38f0fe820445e3bfa79550e6581c230f98c7661566ccc4daa51c7208a5f972c61b4e57dfc86bed074fdbc7c40bc79f856be8f6a05a8860c1c0cecc4208e8b81d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF ${VERSION} +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + --disable-asciidoc + --disable-all-programs + --enable-libmount + --enable-libblkid +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/sbin" "${CURRENT_PACKAGES_DIR}/debug/sbin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools") # empty folder + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libmount/vcpkg.json b/ports/libmount/vcpkg.json new file mode 100644 index 00000000000000..7b5383c8958332 --- /dev/null +++ b/ports/libmount/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libmount", + "version": "2.37.2", + "description": "Block device identification library from util-linux", + "homepage": "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/about/", + "supports": "linux" +} From b1a43a0002e77eefbd03a2f2bdfbbf817580ea6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 11:55:16 +0100 Subject: [PATCH 02/13] [libmount] update versions --- versions/baseline.json | 4 ++++ versions/l-/libmount.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/l-/libmount.json diff --git a/versions/baseline.json b/versions/baseline.json index 84e33d858d41cf..9714c3f8898e2e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3652,6 +3652,10 @@ "baseline": "0.2.8", "port-version": 0 }, + "libmount": { + "baseline": "2.37.2", + "port-version": 0 + }, "libmpeg2": { "baseline": "0.5.1", "port-version": 1 diff --git a/versions/l-/libmount.json b/versions/l-/libmount.json new file mode 100644 index 00000000000000..72797a339565fc --- /dev/null +++ b/versions/l-/libmount.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "0f746b3d702445fd2de54c25c08491cdaae45810", + "version": "2.37.2", + "port-version": 0 + } + ] +} From 37314e554e0fec34bc41029b4ff450b2f43a1d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 11:56:58 +0100 Subject: [PATCH 03/13] [kf5solid] add libmount feature --- ports/kf5solid/portfile.cmake | 6 +++++- ports/kf5solid/vcpkg.json | 13 +++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ports/kf5solid/portfile.cmake b/ports/kf5solid/portfile.cmake index ae63332f793e29..09619b5e8a0320 100644 --- a/ports/kf5solid/portfile.cmake +++ b/ports/kf5solid/portfile.cmake @@ -37,11 +37,15 @@ vcpkg_add_to_path(PREPEND "${BISON_DIR}") # Prevent KDEClangFormat from writing to source effectively blocking parallel configure file(WRITE ${SOURCE_PATH}/.clang-format "DisableFormat: true\nSortIncludes: false\n") +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "libmount" CMAKE_DISABLE_FIND_PACKAGE_LibMount +) + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DBUILD_TESTING=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_LibMount=ON ) vcpkg_cmake_install() diff --git a/ports/kf5solid/vcpkg.json b/ports/kf5solid/vcpkg.json index f2924d6642acc6..ee5cf481220ebe 100644 --- a/ports/kf5solid/vcpkg.json +++ b/ports/kf5solid/vcpkg.json @@ -1,7 +1,7 @@ { "name": "kf5solid", "version": "5.84.0", - "port-version": 3, + "port-version": 4, "description": "Desktop hardware abstraction", "homepage": "https://api.kde.org/frameworks/solid/html/index.html", "dependencies": [ @@ -16,5 +16,14 @@ "name": "vcpkg-cmake-config", "host": true } - ] + ], + "features": { + "libmount": { + "description": "Used by the UDisks backend on Linux", + "supports": "linux", + "dependencies": [ + "libmount" + ] + } + } } From 264840fb7c499350684f50c0ab0e459e72bbe6a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 11:57:15 +0100 Subject: [PATCH 04/13] [kf5solid] update versions --- versions/baseline.json | 2 +- versions/k-/kf5solid.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 9714c3f8898e2e..0bfb4f9cdd2f2b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3138,7 +3138,7 @@ }, "kf5solid": { "baseline": "5.84.0", - "port-version": 3 + "port-version": 4 }, "kf5sonnet": { "baseline": "5.84.0", diff --git a/versions/k-/kf5solid.json b/versions/k-/kf5solid.json index 0691de71027e47..864a5fa70a3e8a 100644 --- a/versions/k-/kf5solid.json +++ b/versions/k-/kf5solid.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "82d550bea0a40cdf57439c7ce177185e18337c5b", + "version": "5.84.0", + "port-version": 4 + }, { "git-tree": "77af969f1b19c937d7f41651b657a774cd3802c7", "version": "5.84.0", From 180d8720bd0705918308199379adc1662832e68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 11:55:37 +0100 Subject: [PATCH 05/13] [kf5kio] add libmount dependency --- ports/kf5kio/vcpkg.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ports/kf5kio/vcpkg.json b/ports/kf5kio/vcpkg.json index 1c0cc8f73f3810..cf4571cbad55a3 100644 --- a/ports/kf5kio/vcpkg.json +++ b/ports/kf5kio/vcpkg.json @@ -1,6 +1,7 @@ { "name": "kf5kio", "version": "5.84.0", + "port-version": 1, "description": "Network transparent access to files and data", "homepage": "https://api.kde.org/frameworks/kio/html/index.html", "dependencies": [ @@ -31,6 +32,13 @@ "kf5jobwidgets", "kf5service", "kf5solid", + { + "name": "kf5solid", + "features": [ + "libmount" + ], + "platform": "linux" + }, "kf5textwidgets", "kf5widgetsaddons", "kf5windowsystem", @@ -39,6 +47,10 @@ "name": "libiconv", "platform": "windows & static" }, + { + "name": "libmount", + "platform": "linux" + }, "qt5-base", { "name": "qt5-macextras", From 2324926ab7fb663088f7c747af736f8cea976cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 11:56:07 +0100 Subject: [PATCH 06/13] [kf5kio] update versions --- versions/baseline.json | 2 +- versions/k-/kf5kio.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 0bfb4f9cdd2f2b..6c83918e0ffba4 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3114,7 +3114,7 @@ }, "kf5kio": { "baseline": "5.84.0", - "port-version": 0 + "port-version": 1 }, "kf5newstuff": { "baseline": "5.84.0", diff --git a/versions/k-/kf5kio.json b/versions/k-/kf5kio.json index b3e07774dfb2cf..d6058842d77c57 100644 --- a/versions/k-/kf5kio.json +++ b/versions/k-/kf5kio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7c6c9f884db8c976becefc1e3c745a3feef231e7", + "version": "5.84.0", + "port-version": 1 + }, { "git-tree": "4a9411ad4abdf7acb9b7a7ef98dd9b966f8b58d5", "version": "5.84.0", From 8c3a05a1b67e612596c50dbc88d7fa7c6d050436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 11:59:16 +0100 Subject: [PATCH 07/13] [libmount] Remove libmount-dev from Linux CI image --- scripts/azure-pipelines/linux/provision-image.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/azure-pipelines/linux/provision-image.sh b/scripts/azure-pipelines/linux/provision-image.sh index 4b1910e885a046..fc3199f44ec2b3 100755 --- a/scripts/azure-pipelines/linux/provision-image.sh +++ b/scripts/azure-pipelines/linux/provision-image.sh @@ -54,9 +54,6 @@ APT_PACKAGES="$APT_PACKAGES guile-2.2-dev" # Additionally required by gtk APT_PACKAGES="$APT_PACKAGES libxdamage-dev" -# Additionally required by kf5kio -APT_PACKAGES="$APT_PACKAGES libmount-dev" - # Additionally required/installed by Azure DevOps Scale Set Agents APT_PACKAGES="$APT_PACKAGES liblttng-ust0 libkrb5-3 zlib1g libicu66" From 4c4d726acfe20a308cdaaccb4ff7c12c4760d4af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 12:05:45 +0100 Subject: [PATCH 08/13] [glib] Add libmount feature --- ports/glib/portfile.cmake | 7 ++++++- ports/glib/vcpkg.json | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index b686970253584b..3fe401c06f66e8 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -33,6 +33,12 @@ else() list(APPEND OPTIONS -Dselinux=disabled) endif() +if (libmount IN_LIST FEATURES) + list(APPEND OPTIONS -Dlibmount=enabled) +else() + list(APPEND OPTIONS -Dlibmount=disabled) +endif() + if(VCPKG_TARGET_IS_WINDOWS) list(APPEND OPTIONS -Diconv=external) else() @@ -49,7 +55,6 @@ vcpkg_configure_meson( ) #-Dnls=true #-Dlibelf=false -#-Dlibmount=false #-Dxattr=true? vcpkg_install_meson(ADD_BIN_TO_PATH) diff --git a/ports/glib/vcpkg.json b/ports/glib/vcpkg.json index 5095a59b823866..0fc11043f5cc49 100644 --- a/ports/glib/vcpkg.json +++ b/ports/glib/vcpkg.json @@ -1,7 +1,7 @@ { "name": "glib", "version": "2.66.4", - "port-version": 1, + "port-version": 2, "description": "Portable, general-purpose utility library.", "homepage": "https://developer.gnome.org/glib/", "supports": "!uwp & !(windows & static)", @@ -15,6 +15,13 @@ "zlib" ], "features": { + "libmount": { + "description": "Build with libmount support.", + "supports": "linux", + "dependencies": [ + "libmount" + ] + }, "selinux": { "description": "Build with selinux support." } From f2161dca18d92869760591d89e346b133f70f499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 12:07:07 +0100 Subject: [PATCH 09/13] [glib] update versions --- versions/baseline.json | 2 +- versions/g-/glib.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 6c83918e0ffba4..56770a2ea4584f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2462,7 +2462,7 @@ }, "glib": { "baseline": "2.66.4", - "port-version": 1 + "port-version": 2 }, "glibmm": { "baseline": "2.68.1", diff --git a/versions/g-/glib.json b/versions/g-/glib.json index 5b2f3b0012477c..e7c94ff7826b46 100644 --- a/versions/g-/glib.json +++ b/versions/g-/glib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c8d7eeabc89610c8b583c319b572b16e07f3f035", + "version": "2.66.4", + "port-version": 2 + }, { "git-tree": "6207d9439567fbbc29f4468c831ef7c1fa2e6181", "version": "2.66.4", From 695470e2ebc26ea4f802933589cf7f4334f068ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 13:36:08 +0100 Subject: [PATCH 10/13] [ECM] fix linking against static LibMount --- ports/ecm/fix_libmount.patch | 23 +++++++++++++++++++++++ ports/ecm/portfile.cmake | 3 ++- ports/ecm/vcpkg.json | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 ports/ecm/fix_libmount.patch diff --git a/ports/ecm/fix_libmount.patch b/ports/ecm/fix_libmount.patch new file mode 100644 index 00000000000000..8f2f480ac6d0fb --- /dev/null +++ b/ports/ecm/fix_libmount.patch @@ -0,0 +1,23 @@ +diff --git a/find-modules/FindLibMount.cmake b/find-modules/FindLibMount.cmake +index 3fcde4c5435a79c61c53bbd27e1932441a056d98..1f53f0218faa82fdf9713ab768080ab7c1d72b4a 100644 +--- a/find-modules/FindLibMount.cmake ++++ b/find-modules/FindLibMount.cmake +@@ -30,7 +30,7 @@ Since 5.83.0 + #]=======================================================================] + + find_package(PkgConfig QUIET) +-pkg_check_modules(PC_LIBMOUNT QUIET mount) ++pkg_check_modules(PC_LIBMOUNT QUIET IMPORTED_TARGET mount) + + find_path(LibMount_INCLUDE_DIRS NAMES libmount/libmount.h HINTS ${PC_LIBMOUNT_INCLUDE_DIRS}) + find_library(LibMount_LIBRARIES NAMES mount HINTS ${PC_LIBMOUNT_LIBRARY_DIRS}) +@@ -62,6 +62,9 @@ if(LibMount_FOUND AND NOT TARGET LibMount::LibMount) + INTERFACE_INCLUDE_DIRECTORIES "${LibMount_INCLUDE_DIRS}" + INTERFACE_COMPILE_DEFINITIONS "${PC_LIBMOUNT_CFLAGS_OTHER}" + ) ++ if (TARGET PkgConfig::PC_LIBMOUNT) ++ target_link_libraries(LibMount::LibMount INTERFACE PkgConfig::PC_LIBMOUNT) ++ endif() + endif() + + include(FeatureSummary) diff --git a/ports/ecm/portfile.cmake b/ports/ecm/portfile.cmake index 19105838303a6e..5791fce50730e2 100644 --- a/ports/ecm/portfile.cmake +++ b/ports/ecm/portfile.cmake @@ -5,7 +5,8 @@ vcpkg_from_github( SHA512 d49397bcf0d49a95c86c9d9a4e653015ee8b3ef1261b2842439bba7ff3363ac06351fa2df4035c2cb36397d2fc64375a14966ada29f231df51ba26d8e196d6ef HEAD_REF master PATCHES - fix_canberra.patch + fix_canberra.patch # https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/187 + fix_libmount.patch # https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/200 fix_python_version.patch # Remove on next release ) diff --git a/ports/ecm/vcpkg.json b/ports/ecm/vcpkg.json index 11a544924b15ae..6cc48bbdaddebf 100644 --- a/ports/ecm/vcpkg.json +++ b/ports/ecm/vcpkg.json @@ -1,7 +1,7 @@ { "name": "ecm", "version": "5.84.0", - "port-version": 2, + "port-version": 3, "description": "Extra CMake Modules (ECM), extra modules and scripts for CMake", "homepage": "https://github.com/KDE/extra-cmake-modules", "dependencies": [ From ff0ce73f20aa7a326bc453c263941d3cf4e61f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Wed, 17 Nov 2021 13:36:18 +0100 Subject: [PATCH 11/13] [ECM] update versions --- versions/baseline.json | 2 +- versions/e-/ecm.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 56770a2ea4584f..bc8772d744bda4 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1962,7 +1962,7 @@ }, "ecm": { "baseline": "5.84.0", - "port-version": 2 + "port-version": 3 }, "ecos": { "baseline": "2.0.8", diff --git a/versions/e-/ecm.json b/versions/e-/ecm.json index 82859b55a4dbab..8ecaa41f3d751d 100644 --- a/versions/e-/ecm.json +++ b/versions/e-/ecm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "edf27dcd688fc8cfd8a1c6dedddc3cfb0cb1556e", + "version": "5.84.0", + "port-version": 3 + }, { "git-tree": "e01bd7b91852c7fa2dffc588bad45167d8d45c6b", "version": "5.84.0", From 080b5dead478eab49f7c6e40ba1d362f602fdb36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Thu, 18 Nov 2021 13:04:31 +0100 Subject: [PATCH 12/13] [kf5solid] make libmount feature a default on Linux --- ports/kf5kio/vcpkg.json | 7 ------- ports/kf5solid/vcpkg.json | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ports/kf5kio/vcpkg.json b/ports/kf5kio/vcpkg.json index cf4571cbad55a3..5283364d25197d 100644 --- a/ports/kf5kio/vcpkg.json +++ b/ports/kf5kio/vcpkg.json @@ -32,13 +32,6 @@ "kf5jobwidgets", "kf5service", "kf5solid", - { - "name": "kf5solid", - "features": [ - "libmount" - ], - "platform": "linux" - }, "kf5textwidgets", "kf5widgetsaddons", "kf5windowsystem", diff --git a/ports/kf5solid/vcpkg.json b/ports/kf5solid/vcpkg.json index ee5cf481220ebe..480feda1040893 100644 --- a/ports/kf5solid/vcpkg.json +++ b/ports/kf5solid/vcpkg.json @@ -17,6 +17,9 @@ "host": true } ], + "default-features": [ + "platform-default-features" + ], "features": { "libmount": { "description": "Used by the UDisks backend on Linux", @@ -24,6 +27,18 @@ "dependencies": [ "libmount" ] + }, + "platform-default-features": { + "description": "Enable platform-dependent default features", + "dependencies": [ + { + "name": "kf5solid", + "features": [ + "libmount" + ], + "platform": "linux" + } + ] } } } From df834c38f22010b0adbde0755aaa5cb2e2fd381f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Thu, 18 Nov 2021 13:04:46 +0100 Subject: [PATCH 13/13] [kf5solid, kf5kio] update versions --- versions/k-/kf5kio.json | 2 +- versions/k-/kf5solid.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/k-/kf5kio.json b/versions/k-/kf5kio.json index d6058842d77c57..438a09f3fa6036 100644 --- a/versions/k-/kf5kio.json +++ b/versions/k-/kf5kio.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7c6c9f884db8c976becefc1e3c745a3feef231e7", + "git-tree": "624eb17608cec7afe4c30bef29e16e18fe8d973e", "version": "5.84.0", "port-version": 1 }, diff --git a/versions/k-/kf5solid.json b/versions/k-/kf5solid.json index 864a5fa70a3e8a..3e00fd3eb4282a 100644 --- a/versions/k-/kf5solid.json +++ b/versions/k-/kf5solid.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "82d550bea0a40cdf57439c7ce177185e18337c5b", + "git-tree": "8b7f9e0e31cd5fd3a2720a8e71b1aa52b123cf98", "version": "5.84.0", "port-version": 4 },