Skip to content

Commit

Permalink
[modp-base64] Update to current github instead of web.archive.org (mi…
Browse files Browse the repository at this point in the history
…crosoft#13763)

Co-authored-by: Robert Schumacher <[email protected]>
  • Loading branch information
ras0219 and ras0219-msft authored Oct 6, 2020
1 parent 8fe1851 commit 97b58ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 36 deletions.
14 changes: 4 additions & 10 deletions ports/modp-base64/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ if(MSVC)
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
endif()

configure_file(config.h.cmake config.h @ONLY)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)


include_directories(src ${CMAKE_CURRENT_BINARY_DIR})


add_library(libmodpbase64 src/modp_b64.c libmodpbase64.def)
include_directories(. ${SOURCE_PATH}/src ${CMAKE_CURRENT_BINARY_DIR})

add_library(libmodpbase64 ${SOURCE_PATH}/src/modp_b64.c libmodpbase64.def)

install(
TARGETS libmodpbase64
Expand All @@ -23,10 +18,9 @@ install(
ARCHIVE DESTINATION lib
)


if(NOT DISABLE_INSTALL_HEADERS)
install(
FILES src/modp_b64.h
FILES ${SOURCE_PATH}/src/modp_b64.h
DESTINATION include
)
endif()
4 changes: 2 additions & 2 deletions ports/modp-base64/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: modp-base64
Version: v2.0.0
Description:
Version: 2020-09-26
Description: High performance base64 encoder/decoder
33 changes: 9 additions & 24 deletions ports/modp-base64/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
include(vcpkg_common_functions)

vcpkg_download_distfile(ARCHIVE
URLS "https://web.archive.org/web/20060620024518/http://modp.com:80/release/base64/modp-base64-v2.0.0.tar.bz2"
FILENAME "modp-base64-v2.0.0.tar.bz2"
SHA512 474e20cbbc47f31af5e981a6a9028fcec57e3ae9bb5ba979aa5c5c4cab6f301208fe6f441a0106df4c223d89fb6f18b19ab8812cf9f3c9900e54524e35b45720
)

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_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO client9/stringencoders
REF e1448a9415f4ebf6f559c86718193ba067cbb99d
SHA512 68c9b9a9eb09075c792cfc0a8ce1959c60a86e5256de8568b0cb6934f748fd9e95c5f1801a8982fecac65850a8f2d633a64dc98e4505ee8e6914bd0b0fb996cf
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
PREFER_NINJA
OPTIONS -DSOURCE_PATH=${SOURCE_PATH}
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
)

vcpkg_install_cmake()

# 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)

0 comments on commit 97b58ea

Please sign in to comment.