aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libmount
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/libmount')
-rw-r--r--vcpkg/ports/libmount/hide-private-symbols.diff15
-rw-r--r--vcpkg/ports/libmount/portfile.cmake52
-rw-r--r--vcpkg/ports/libmount/vcpkg.json23
3 files changed, 90 insertions, 0 deletions
diff --git a/vcpkg/ports/libmount/hide-private-symbols.diff b/vcpkg/ports/libmount/hide-private-symbols.diff
new file mode 100644
index 0000000..6527be0
--- /dev/null
+++ b/vcpkg/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/vcpkg/ports/libmount/portfile.cmake b/vcpkg/ports/libmount/portfile.cmake
new file mode 100644
index 0000000..6c607d2
--- /dev/null
+++ b/vcpkg/ports/libmount/portfile.cmake
@@ -0,0 +1,52 @@
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v${VERSION}/util-linux-${VERSION}.tar.xz"
+ FILENAME "util-linux-${VERSION}.tar.xz"
+ SHA512 f06e61d4ee0e196223f7341ec75a16a6671f82d6e353823490ecff17e947bb169a6b65177e3ab0da6e733e079b24d6a77905a0e8bbfed82ca9aa22a3facb6180
+)
+
+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()
+
+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/vcpkg/ports/libmount/vcpkg.json b/vcpkg/ports/libmount/vcpkg.json
new file mode 100644
index 0000000..de5c885
--- /dev/null
+++ b/vcpkg/ports/libmount/vcpkg.json
@@ -0,0 +1,23 @@
+{
+ "name": "libmount",
+ "version": "2.40",
+ "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"
+ ]
+ }
+ }
+}