aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libhdfs3
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libhdfs3
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libhdfs3')
-rw-r--r--vcpkg/ports/libhdfs3/fix_dependency_uuid.patch25
-rw-r--r--vcpkg/ports/libhdfs3/libhdfs3Config.cmake17
-rw-r--r--vcpkg/ports/libhdfs3/portfile.cmake37
-rw-r--r--vcpkg/ports/libhdfs3/usage4
-rw-r--r--vcpkg/ports/libhdfs3/vcpkg.json25
5 files changed, 108 insertions, 0 deletions
diff --git a/vcpkg/ports/libhdfs3/fix_dependency_uuid.patch b/vcpkg/ports/libhdfs3/fix_dependency_uuid.patch
new file mode 100644
index 0000000..4056a4c
--- /dev/null
+++ b/vcpkg/ports/libhdfs3/fix_dependency_uuid.patch
@@ -0,0 +1,25 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1a8b109..6ea24f8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,7 +21,9 @@ FIND_PACKAGE(KERBEROS REQUIRED)
+ FIND_PACKAGE(GSasl REQUIRED)
+
+ IF(OS_LINUX)
+- FIND_PACKAGE(LibUUID REQUIRED)
++ find_package(unofficial-libuuid CONFIG REQUIRED)
++ set(LIBUUID_LIBRARIES unofficial::UUID::uuid)
++ add_library(uuid ALIAS unofficial::UUID::uuid)
+ ENDIF(OS_LINUX)
+
+ ADD_SUBDIRECTORY(mock)
+diff --git a/hdfs_benchmark/CMakeLists.txt b/hdfs_benchmark/CMakeLists.txt
+index dcb4c0a..f4274b6 100644
+--- a/hdfs_benchmark/CMakeLists.txt
++++ b/hdfs_benchmark/CMakeLists.txt
+@@ -10,4 +10,4 @@ set(SOURCE_FILES main.cpp)
+ add_executable(hdfs_benchmark ${SOURCE_FILES})
+ add_dependencies(hdfs_benchmark libhdfs3-shared)
+
+-target_link_libraries(hdfs_benchmark uuid pthread libhdfs3-shared)
++target_link_libraries(hdfs_benchmark pthread libhdfs3-shared)
diff --git a/vcpkg/ports/libhdfs3/libhdfs3Config.cmake b/vcpkg/ports/libhdfs3/libhdfs3Config.cmake
new file mode 100644
index 0000000..ed67257
--- /dev/null
+++ b/vcpkg/ports/libhdfs3/libhdfs3Config.cmake
@@ -0,0 +1,17 @@
+
+FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR)
+ ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED)
+ SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES
+ IMPORTED_CONFIGURATIONS "RELEASE;DEBUG"
+ IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}"
+ IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}"
+ INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}"
+ )
+ SET(${NAMESPACE}_${LIB_NAME}_FOUND 1)
+ENDFUNCTION()
+
+GET_FILENAME_COMPONENT(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH)
+GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH)
+GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH)
+
+SET_LIBRARY_TARGET("HDFS" "hdfs3" "${ROOT}/debug/lib/libhdfs3.a" "${ROOT}/lib/libhdfs3.a" "${ROOT}/include/hdfs")
diff --git a/vcpkg/ports/libhdfs3/portfile.cmake b/vcpkg/ports/libhdfs3/portfile.cmake
new file mode 100644
index 0000000..9ad42a5
--- /dev/null
+++ b/vcpkg/ports/libhdfs3/portfile.cmake
@@ -0,0 +1,37 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO erikmuttersbach/libhdfs3
+ REF 9a60d79812d6dee72455f61bff57a93c3c7d56f5
+ SHA512 2b635ab979230c251243f01717105872245d7948f75832e58f50a09b0b06d1b366b3c5f3a3253fa538076e9f199003f28d10b9958293144dbc301276073a0633
+ HEAD_REF apache-rpc-9
+ PATCHES
+ fix_dependency_uuid.patch
+)
+
+if(VCPKG_TARGET_IS_LINUX )
+ message(STATUS [[
+To build libhdfs3, the following libraries are needed.
+ libgsasl
+This development package can be installed on the system by
+ apt install libgsasl-dev
+]])
+elseif(VCPKG_TARGET_IS_OSX)
+ message(WARNING [[
+To build libhdfs3, the following libraries are needed.
+ libgsasl
+These development packages can be installed on the system via
+ git clone https://gitlab.com/gsasl/gsasl.git]])
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
+file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+FILE(INSTALL "${CMAKE_CURRENT_LIST_DIR}/libhdfs3Config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+FILE(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/libhdfs3/usage b/vcpkg/ports/libhdfs3/usage
new file mode 100644
index 0000000..780d82d
--- /dev/null
+++ b/vcpkg/ports/libhdfs3/usage
@@ -0,0 +1,4 @@
+The package libhdfs3 is compatible with built-in CMake targets:
+
+ FIND_PACKAGE(libhdfs3 REQUIRED)
+ TARGET_LINK_LIBRARIES(main PRIVATE HDFS::hdfs3)
diff --git a/vcpkg/ports/libhdfs3/vcpkg.json b/vcpkg/ports/libhdfs3/vcpkg.json
new file mode 100644
index 0000000..0a8e190
--- /dev/null
+++ b/vcpkg/ports/libhdfs3/vcpkg.json
@@ -0,0 +1,25 @@
+{
+ "name": "libhdfs3",
+ "version-date": "2019-11-05",
+ "port-version": 6,
+ "description": "Native Hadoop RPC protocol and HDFS data transfer protocol implementation",
+ "homepage": "https://github.com/erikmuttersbach/libhdfs3",
+ "supports": "!windows",
+ "dependencies": [
+ "boost-atomic",
+ "boost-chrono",
+ "boost-iostreams",
+ "boost-system",
+ "boost-thread",
+ {
+ "name": "libuuid",
+ "platform": "!windows & !osx"
+ },
+ "libxml2",
+ "protobuf",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}