From 0f9a751c5af36c17f9d93496b14984b4676e181f Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Fri, 9 Jan 2026 07:45:22 +0100 Subject: [PATCH] Test updated libmount library Signed-off-by: Vitalii Koshura --- .../ports/libmount/hide-private-symbols.diff | 15 +++++ .../vcpkg_ports/ports/libmount/portfile.cmake | 57 +++++++++++++++++++ .../vcpkg_ports/ports/libmount/vcpkg.json | 23 ++++++++ 3 files changed, 95 insertions(+) create mode 100644 3rdParty/vcpkg_ports/ports/libmount/hide-private-symbols.diff create mode 100644 3rdParty/vcpkg_ports/ports/libmount/portfile.cmake create mode 100644 3rdParty/vcpkg_ports/ports/libmount/vcpkg.json diff --git a/3rdParty/vcpkg_ports/ports/libmount/hide-private-symbols.diff b/3rdParty/vcpkg_ports/ports/libmount/hide-private-symbols.diff new file mode 100644 index 00000000000..6527be02b4e --- /dev/null +++ b/3rdParty/vcpkg_ports/ports/libmount/hide-private-symbols.diff @@ -0,0 +1,15 @@ +diff --git a/include/strutils.h b/include/strutils.h +index e9f8a0c..2f6d285 100644 +--- a/include/strutils.h ++++ b/include/strutils.h +@@ -16,6 +16,10 @@ + + #include "c.h" + ++// private, and clashing with libsystemd. ++#define parse_size ul__parse_size ++#define parse_range ul__parse_range ++ + /* initialize a custom exit code for all *_or_err functions */ + extern void strutils_set_exitcode(int exit_code); + diff --git a/3rdParty/vcpkg_ports/ports/libmount/portfile.cmake b/3rdParty/vcpkg_ports/ports/libmount/portfile.cmake new file mode 100644 index 00000000000..ad286697d6f --- /dev/null +++ b/3rdParty/vcpkg_ports/ports/libmount/portfile.cmake @@ -0,0 +1,57 @@ +string(REGEX MATCH "^([0-9]+\\.[0-9]+)" VERSION_SHORT "${VERSION}") + +vcpkg_download_distfile(ARCHIVE + URLS "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v${VERSION_SHORT}/util-linux-${VERSION}.tar.xz" + FILENAME "util-linux-${VERSION}.tar.xz" + SHA512 3d299f0e05a4c982a04dbcbaaeff1222152feedf51c56c5dbdeb75999c68269d652a994f5cdf4c1ee42bb7b28475dd0792192c299fd9bc3b45198c5b153dad00 +) + +vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE "${ARCHIVE}" + SOURCE_BASE ${VERSION} + PATCHES + hide-private-symbols.diff +) + +set(ENV{GTKDOCIZE} true) + +vcpkg_list(SET options) +if("nls" IN_LIST FEATURES) + vcpkg_list(APPEND options "--enable-nls") +else() + set(ENV{AUTOPOINT} true) # true, the program + vcpkg_list(APPEND options "--disable-nls") +endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + vcpkg_list(APPEND options "--disable-year2038") +endif() + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${options} + --disable-asciidoc + --disable-all-programs + --disable-dependency-tracking + --enable-libmount + --enable-libblkid + "--mandir=${CURRENT_PACKAGES_DIR}/share/man" +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/bin" + "${CURRENT_PACKAGES_DIR}/debug/sbin" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/sbin" + "${CURRENT_PACKAGES_DIR}/share" + "${CURRENT_PACKAGES_DIR}/tools" +) + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/README.licensing" "${SOURCE_PATH}/COPYING") diff --git a/3rdParty/vcpkg_ports/ports/libmount/vcpkg.json b/3rdParty/vcpkg_ports/ports/libmount/vcpkg.json new file mode 100644 index 00000000000..06e92505585 --- /dev/null +++ b/3rdParty/vcpkg_ports/ports/libmount/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "libmount", + "version": "2.41.3", + "description": "Block device identification library from util-linux", + "homepage": "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/about/", + "license": null, + "supports": "linux", + "features": { + "nls": { + "description": "Enable native language support", + "dependencies": [ + { + "name": "gettext", + "host": true, + "features": [ + "tools" + ] + }, + "gettext-libintl" + ] + } + } +}