2018-10-22 19:25:37 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/orc
|
2020-09-25 02:38:35 +08:00
|
|
|
REF 23ecc03e87548f6d6783c2d8af2b46672c52214c # rel/release-1.6.4
|
|
|
|
SHA512 907984c7e036ddaa90e7cbfabb9af4f6fd3520820b9a8732b304f2213030f7d67cef89ad87d50e028a51bff06f68ff359345ad6894850e299b2fca343d7c0c3e
|
2018-10-22 19:25:37 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2020-09-25 02:38:35 +08:00
|
|
|
0003-dependencies-from-vcpkg.patch
|
|
|
|
0005-disable-tzdata.patch
|
2019-06-19 04:34:43 +08:00
|
|
|
)
|
2018-10-22 19:25:37 +08:00
|
|
|
|
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake_modules/FindGTest.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake_modules/FindLZ4.cmake")
|
2019-03-19 03:26:29 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake_modules/FindZSTD.cmake")
|
2018-10-22 19:25:37 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake_modules/FindProtobuf.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake_modules/FindSnappy.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake_modules/FindZLIB.cmake")
|
|
|
|
|
2022-04-28 09:12:48 +08:00
|
|
|
set(PROTOBUF_EXECUTABLE "${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
2018-10-22 19:25:37 +08:00
|
|
|
|
2020-09-25 02:38:35 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2018-10-22 19:25:37 +08:00
|
|
|
set(BUILD_TOOLS OFF)
|
2022-04-30 02:40:30 +08:00
|
|
|
# when cross compiling, we can't run their test. however:
|
|
|
|
# - Windows doesn't support time_t < 0 => HAS_PRE_1970 test returns false
|
|
|
|
# - Windows doesn't support setenv => HAS_POST_2038 test fails to compile
|
|
|
|
set(time_t_checks "-DHAS_PRE_1970=OFF" "-DHAS_POST_2038=OFF")
|
2018-10-22 19:25:37 +08:00
|
|
|
else()
|
|
|
|
set(BUILD_TOOLS ON)
|
2022-04-30 02:40:30 +08:00
|
|
|
set(time_t_checks "")
|
2018-10-22 19:25:37 +08:00
|
|
|
endif()
|
|
|
|
|
2022-04-28 09:12:48 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
|
|
set(configure_opts WINDOWS_USE_MSBUILD)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
${configure_opts}
|
2018-10-22 19:25:37 +08:00
|
|
|
OPTIONS
|
2022-04-30 02:40:30 +08:00
|
|
|
${time_t_checks}
|
2019-11-20 02:59:07 +08:00
|
|
|
-DBUILD_TOOLS=${BUILD_TOOLS}
|
|
|
|
-DBUILD_CPP_TESTS=OFF
|
|
|
|
-DBUILD_JAVA=OFF
|
|
|
|
-DINSTALL_VENDORED_LIBS=OFF
|
|
|
|
-DBUILD_LIBHDFSPP=OFF
|
|
|
|
-DPROTOBUF_EXECUTABLE:FILEPATH=${PROTOBUF_EXECUTABLE}
|
|
|
|
-DSTOP_BUILD_ON_WARNING=OFF
|
|
|
|
-DENABLE_TEST=OFF
|
2022-04-30 02:40:30 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
ENABLE_TEST
|
2018-10-22 19:25:37 +08:00
|
|
|
)
|
|
|
|
|
2022-04-28 09:12:48 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-11-20 02:59:07 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2018-10-22 19:25:37 +08:00
|
|
|
|
|
|
|
file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/bin/orc-*)
|
|
|
|
if(TOOLS)
|
2022-04-28 09:12:48 +08:00
|
|
|
file(COPY ${TOOLS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/orc")
|
2018-10-22 19:25:37 +08:00
|
|
|
file(REMOVE ${TOOLS})
|
|
|
|
endif()
|
|
|
|
|
2022-04-28 09:12:48 +08:00
|
|
|
file(GLOB BINS "${CURRENT_PACKAGES_DIR}/bin/*")
|
2018-10-22 19:25:37 +08:00
|
|
|
if(NOT BINS)
|
2022-04-28 09:12:48 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2018-10-22 19:25:37 +08:00
|
|
|
endif()
|
|
|
|
|
2022-04-28 09:12:48 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2018-10-22 19:25:37 +08:00
|
|
|
|
|
|
|
|
2022-04-28 09:12:48 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|