diff --git a/ports/libhdfs3/CONTROL b/ports/libhdfs3/CONTROL new file mode 100644 index 0000000000..d2b646e088 --- /dev/null +++ b/ports/libhdfs3/CONTROL @@ -0,0 +1,5 @@ +Source: libhdfs3 +Version: 2019-11-05 +Homepage: https://github.com/erikmuttersbach/libhdfs3 +Description: Native Hadoop RPC protocol and HDFS data transfer protocol implementation +Build-Depends: libxml2, protobuf, libuuid, boost diff --git a/ports/libhdfs3/libhdfs3Config.cmake b/ports/libhdfs3/libhdfs3Config.cmake new file mode 100644 index 0000000000..ed672579e1 --- /dev/null +++ b/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/ports/libhdfs3/portfile.cmake b/ports/libhdfs3/portfile.cmake new file mode 100644 index 0000000000..4bbc7621e8 --- /dev/null +++ b/ports/libhdfs3/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO erikmuttersbach/libhdfs3 + REF 9a60d79812d6dee72455f61bff57a93c3c7d56f5 + SHA512 2b635ab979230c251243f01717105872245d7948f75832e58f50a09b0b06d1b366b3c5f3a3253fa538076e9f199003f28d10b9958293144dbc301276073a0633 + HEAD_REF apache-rpc-9 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +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/ports/libhdfs3/usage b/ports/libhdfs3/usage new file mode 100644 index 0000000000..780d82d256 --- /dev/null +++ b/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/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 0bfa26ad44..3b58c70c57 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -761,6 +761,12 @@ libgpod:x64-uwp=fail libgpod:x64-windows=fail libgpod:x64-windows-static=fail libgpod:x86-windows=fail +libhdfs3:arm64-windows=fail +libhdfs3:arm-uwp=fail +libhdfs3:x64-uwp=fail +libhdfs3:x64-windows=fail +libhdfs3:x64-windows-static=fail +libhdfs3:x86-windows=fail libhydrogen:arm64-windows=fail libics:arm-uwp=fail libics:x64-uwp=fail