2024-09-17 08:40:40 +08:00
|
|
|
vcpkg_download_distfile(MSVC_ARM64_INTRINSICS_FIX
|
|
|
|
URLS https://github.com/ngtcp2/nghttp3/commit/2c4a3816bbeab45e7c9092aecc915b54a3c88ccb.patch?full_index=1
|
|
|
|
SHA512 ccdd14a71bfa51f3480252faf2a4664544e1e11f3c5b6be9bfe577d46f0fc6c22e22f86b721987d6d1ca17d96ba2e55e32b0d01a6c291ab9ba2fc2279275aeae
|
|
|
|
FILENAME nghttp3-msvc-arm64-intrinsicis-2c4a3816bbeab45e7c9092aecc915b54a3c88ccb.patch.patch
|
|
|
|
)
|
|
|
|
|
2022-08-30 07:26:10 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ngtcp2/nghttp3
|
2023-03-03 04:03:57 +08:00
|
|
|
REF v${VERSION}
|
2024-09-04 03:29:36 +08:00
|
|
|
SHA512 d8b6db7a1323e036cd2d1aab1ded299e83024ce451cddbfe0ea102d968bdcb57221dbcc231b73880e0987cf3ed7ecd2c2b5f53b10947d9accb7603d7c3fcbb95
|
2022-08-30 07:26:10 +08:00
|
|
|
HEAD_REF main
|
2024-09-04 03:29:36 +08:00
|
|
|
PATCHES
|
|
|
|
fix-include-usage.patch
|
2024-09-17 08:40:40 +08:00
|
|
|
"${MSVC_ARM64_INTRINSICS_FIX}"
|
2022-08-30 07:26:10 +08:00
|
|
|
)
|
|
|
|
|
2024-06-27 12:04:42 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SFPARSE_SOURCE_PATH
|
|
|
|
REPO ngtcp2/sfparse
|
2024-09-04 03:29:36 +08:00
|
|
|
REF c2e010d064d58f7775aca1aa29df20dd2f534a9a
|
|
|
|
SHA512 5556878d9bfd190e537064e069ca71e76aa0e3bc9fc1d5eef24f1b413a6d3abc584024fb81e188d8ae148673db279e665064cb9971cf04568148782152bd9702
|
2024-06-27 12:04:42 +08:00
|
|
|
HEAD_REF main
|
|
|
|
)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/lib/sfparse")
|
|
|
|
file(MAKE_DIRECTORY "${SOURCE_PATH}/lib")
|
|
|
|
file(RENAME "${SFPARSE_SOURCE_PATH}" "${SOURCE_PATH}/lib/sfparse")
|
|
|
|
|
|
|
|
|
2022-08-30 07:26:10 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" ENABLE_STATIC_CRT)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIB)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIB)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DENABLE_LIB_ONLY=ON
|
2022-09-01 04:48:17 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2022-08-30 07:26:10 +08:00
|
|
|
"-DENABLE_STATIC_CRT=${ENABLE_STATIC_CRT}"
|
|
|
|
"-DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB}"
|
|
|
|
"-DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB}"
|
2022-09-01 04:48:17 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
BUILD_TESTING
|
2022-08-30 07:26:10 +08:00
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2024-09-04 03:29:36 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/nghttp3")
|
2022-08-30 07:26:10 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/man"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/doc"
|
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/bin"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/bin"
|
|
|
|
)
|
|
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/include/nghttp3/version.h" [[
|
|
|
|
]])
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2024-09-04 03:29:36 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|