[modp-base64] Update to current github instead of web.archive.org (#13763)

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
ras0219 2020-10-06 12:48:45 -07:00 committed by GitHub
parent 8fe1851e1e
commit 97b58ea5da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 36 deletions

View File

@ -5,16 +5,11 @@ if(MSVC)
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
endif() endif()
configure_file(config.h.cmake config.h @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake" include_directories(. ${SOURCE_PATH}/src ${CMAKE_CURRENT_BINARY_DIR})
"${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
include_directories(src ${CMAKE_CURRENT_BINARY_DIR})
add_library(libmodpbase64 src/modp_b64.c libmodpbase64.def)
add_library(libmodpbase64 ${SOURCE_PATH}/src/modp_b64.c libmodpbase64.def)
install( install(
TARGETS libmodpbase64 TARGETS libmodpbase64
@ -23,10 +18,9 @@ install(
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
) )
if(NOT DISABLE_INSTALL_HEADERS) if(NOT DISABLE_INSTALL_HEADERS)
install( install(
FILES src/modp_b64.h FILES ${SOURCE_PATH}/src/modp_b64.h
DESTINATION include DESTINATION include
) )
endif() endif()

View File

@ -1,3 +1,3 @@
Source: modp-base64 Source: modp-base64
Version: v2.0.0 Version: 2020-09-26
Description: Description: High performance base64 encoder/decoder

View File

@ -1,34 +1,19 @@
include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
vcpkg_download_distfile(ARCHIVE REPO client9/stringencoders
URLS "https://web.archive.org/web/20060620024518/http://modp.com:80/release/base64/modp-base64-v2.0.0.tar.bz2" REF e1448a9415f4ebf6f559c86718193ba067cbb99d
FILENAME "modp-base64-v2.0.0.tar.bz2" SHA512 68c9b9a9eb09075c792cfc0a8ce1959c60a86e5256de8568b0cb6934f748fd9e95c5f1801a8982fecac65850a8f2d633a64dc98e4505ee8e6914bd0b0fb996cf
SHA512 474e20cbbc47f31af5e981a6a9028fcec57e3ae9bb5ba979aa5c5c4cab6f301208fe6f441a0106df4c223d89fb6f18b19ab8812cf9f3c9900e54524e35b45720 HEAD_REF master
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
)
file(COPY
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
${CMAKE_CURRENT_LIST_DIR}/config.h.cmake
${CMAKE_CURRENT_LIST_DIR}/libmodpbase64.def
DESTINATION ${SOURCE_PATH}
)
file(COPY
${CMAKE_CURRENT_LIST_DIR}/modp_b64_data.h
DESTINATION ${SOURCE_PATH}/src
) )
vcpkg_configure_cmake( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
PREFER_NINJA PREFER_NINJA
OPTIONS -DSOURCE_PATH=${SOURCE_PATH}
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
) )
vcpkg_install_cmake() vcpkg_install_cmake()
# Handle copyright # Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/modp-base64 RENAME copyright) configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)