mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 21:18:59 +08:00
Replaced everything concerning MD5 with SHA512
This commit is contained in:
parent
764afd8619
commit
8cee9c6e07
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "http://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.bz2"
|
||||
FILENAME "boost_1_61_0.tar.bz2"
|
||||
MD5 6095876341956f65f9d35939ccea1a9f
|
||||
SHA512 a1c7338e2d2dbac8552ede7c554640d22cbb2fda7fbc325dc3cdcb51e769713626695426ffc158cbe0e1729dd9a7b5ad18af4800d74e24539e8d8564268c2b9d
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "https://curl.haxx.se/download/curl-7.48.0.tar.bz2"
|
||||
FILENAME "curl-7.48.0.tar.bz2"
|
||||
MD5 d42e0fc34a5cace5739631cc040974fe
|
||||
SHA512 9bb554eaf4ccaced0fa9b38de4f381eab84b96c1aa07a45d83ddfd38a925044d0fe9fac517263f67f009d2294a31c33dedb2267defbab0cb14f96091bbed5f92
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://bitbucket.org/eigen/eigen/get/3.2.9.tar.bz2"
|
||||
FILENAME "eigen-3.2.9.tar.bz2"
|
||||
MD5 de11bfbfe2fd2dc4b32e8f416f58ee98
|
||||
SHA512 2734ce70e0b04dc5839715a3cc9b8f90e05b341cfca42a7d586df213a9a14fe5642c76ccf36c16d020ae167c0d6e4d5cc306f0b3bf1f519c58372b0736ca7e63
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "http://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2"
|
||||
FILENAME "expat-2.1.1.tar.bz2"
|
||||
MD5 7380a64a8e3a9d66a9887b01d0d7ea81
|
||||
SHA512 088e2ef3434f2affd4fc79fe46f0e9826b9b4c3931ddc780cd18892f1cd1e11365169c6807f45916a56bb6abcc627dcd17a23f970be0bf464f048f5be2713628
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
|
@ -3,7 +3,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "https://github.com/fmtlib/fmt/archive/3.0.0.tar.gz"
|
||||
FILENAME "fmt-3.0.0.tar.gz"
|
||||
MD5 deeac02aa6d00d6d04502087fdf88b6f
|
||||
SHA512 20c9b1ffe8b46cb5d22015122fc698a75ad854709d3de1a1316b6040d86f54bada4e6d7263f2f1fd94cb13ac37ee9447c162c6aec3f3af650455e8a8a9804871
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://download.savannah.gnu.org/releases/freetype/freetype-2.6.3.tar.bz2"
|
||||
FILENAME "freetype-2.6.3.tar.bz2"
|
||||
MD5 0037b25a8c090bc8a1218e867b32beb1
|
||||
SHA512 e1f9018835fc88beeb4479537b59f866c52393ae18d24a1e0710a464cf948ab02b35c2c6043bc20c1db3a04871ee4eb0bb1d210550c0ea2780c8b1aea98fbf0d
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URL "http://downloads.sourceforge.net/project/glew/glew/1.13.0/glew-1.13.0.tgz"
|
||||
FILENAME "glew-1.13.0.tgz"
|
||||
MD5 7cbada3166d2aadfc4169c4283701066
|
||||
SHA512 8fc8d7c0d2cd9235ea51db9972f492701827bff40642fdb3cc54c10b0737dba8e6d8d0dcd8c5aa5bfaaae39c6198ba3d4292cd1662fbe1977eb9a5d187ba635f
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip"
|
||||
FILENAME "glfw-3.1.2.zip"
|
||||
MD5 8023327bfe979b3fe735e449e2f54842
|
||||
SHA512 c199137b32182182123869fe69ab991a296feb80dcf3db3cf5e070cdaef31ed958148d9b87e724c1937fa535960122bdceb92ea9dd38f7ef41e4e08e36210fe5
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/g-truc/glm/releases/download/0.9.8.0/glm-0.9.8.0.zip"
|
||||
FILENAME "glm-0.9.8.0.zip"
|
||||
MD5 b24613c1f7e16f504d936ae3ac1f4917
|
||||
SHA512 5fe9d1f582e7bbef37fd23c9d10fd9cf7696bb7c6f8086a250248e97f84b0205a89a195c8838a1ddc4c0a4cb4c69d1764f90db6513a9691a94877b7ec6b2befb
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/Microsoft/GSL/archive/fd5ad87bf25cb5e87104ee58106dee9bc809cd93.zip"
|
||||
FILENAME "gsl-fd5ad87bf.zip"
|
||||
MD5 30935befb50eb3742131ad1056d2d498
|
||||
SHA512 81887be57e12bfc4e67353713478e1638bf1bffb8f523cf7241acf5415c2e3fe82ea0c0128380dcb2008afb5f53ac0d4893660626a8cd1eb501da536e6af5692
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
|
@ -4,7 +4,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libjpeg-turbo-1.4.90)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.4.90.zip"
|
||||
FILENAME "libjpeg-turbo-1.4.90.zip"
|
||||
MD5 dcd49a7100e41870faae988f608471af
|
||||
SHA512 43c3d26c70a7356bb0832276fe82eead040c3f4aa17df118f91a38615bfacfdfb25fab41965f9ca2b69d18e0b937a1bb753e93fa2c114e01d5174fc1100010b4
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
vcpkg_apply_patches(
|
||||
|
@ -4,7 +4,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.24)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "http://download.sourceforge.net/libpng/libpng-1.6.24.tar.xz"
|
||||
FILENAME "libpng-1.6.24.tar.xz"
|
||||
MD5 ffcdbd549814787fa8010c372e35ff25
|
||||
SHA512 7eccb90f530a9c728e280b2b1776304a808b5deea559632e7bcf4ea219c7cb5e453aa810215465304501127595000717d4b7c5b26a9f8e22e236ec04af53a90f
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
vcpkg_apply_patches(
|
||||
|
@ -1,20 +1,20 @@
|
||||
# Usage: vcpkg_download_distfile(<VAR> URL <http://...> FILENAME <output.zip> MD5 <5981de...>)
|
||||
# Usage: vcpkg_download_distfile(<VAR> URL <http://...> FILENAME <output.zip> SHA512 <5981de...>)
|
||||
function(vcpkg_download_distfile VAR)
|
||||
set(oneValueArgs URL FILENAME MD5)
|
||||
set(oneValueArgs URL FILENAME SHA512)
|
||||
cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "" ${ARGN})
|
||||
|
||||
if(EXISTS ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME})
|
||||
message(STATUS "Using cached ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}")
|
||||
file(MD5 ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} FILE_HASH)
|
||||
if(NOT FILE_HASH MATCHES ${vcpkg_download_distfile_MD5})
|
||||
file(SHA512 ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} FILE_HASH)
|
||||
if(NOT FILE_HASH STREQUAL "${vcpkg_download_distfile_SHA512}")
|
||||
message(FATAL_ERROR
|
||||
"File does not have expected hash: ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}\n"
|
||||
" ${FILE_HASH} <> ${vcpkg_download_distfile_MD5}\n"
|
||||
" '${FILE_HASH}' <> '${vcpkg_download_distfile_SHA512}'\n"
|
||||
"Please delete the file and try again if this file should be downloaded again.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Downloading ${vcpkg_download_distfile_URL}")
|
||||
file(DOWNLOAD ${vcpkg_download_distfile_URL} ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} EXPECTED_HASH MD5=${vcpkg_download_distfile_MD5})
|
||||
file(DOWNLOAD ${vcpkg_download_distfile_URL} ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} EXPECTED_HASH SHA512=${vcpkg_download_distfile_SHA512})
|
||||
endif()
|
||||
set(${VAR} ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
@ -10,20 +10,20 @@ function(vcpkg_find_acquire_program VAR)
|
||||
set(PATHS ${DOWNLOADS}/tools/perl/perl/bin)
|
||||
set(URL "http://strawberryperl.com/download/5.20.2.1/strawberry-perl-5.20.2.1-64bit-portable.zip")
|
||||
set(ARCHIVE "strawberry-perl-5.20.2.1-64bit-portable.zip")
|
||||
set(HASH 5fca4b3cfa7c9cc95e0c4fd8652eba80)
|
||||
set(HASH 6e14e5580e52da5d35f29b67a52ef9db0e021af1575b4bbd84ebdbf18580522287890bdc21c0d21ddc1b2529d888f8e159dcaa017a3ff06d8fd23d16901bcc8b)
|
||||
elseif(VAR MATCHES "NASM")
|
||||
set(PROGNAME nasm)
|
||||
set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.11.08)
|
||||
set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.11.08/win32/nasm-2.11.08-win32.zip")
|
||||
set(ARCHIVE "nasm-2.11.08-win32.zip")
|
||||
set(HASH 46a31e22be69637f7a9ccba12874133f)
|
||||
set(HASH cd80b540530d3995d15dc636e97673f1d34f471baadf1dac993165232c61efefe7f8ec10625f8f718fc89f0dd3dcb6a4595e0cf40c5fd7cbac1b71672b644d2d)
|
||||
elseif(VAR MATCHES "YASM")
|
||||
set(PROGNAME yasm)
|
||||
set(PATHS ${DOWNLOADS}/tools/yasm)
|
||||
set(URL "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe")
|
||||
set(ARCHIVE "yasm.exe")
|
||||
set(NOEXTRACT ON)
|
||||
set(HASH 51e967dceddd1f84e67bff255df977b3)
|
||||
set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720)
|
||||
else()
|
||||
message(FATAL "unknown tool ${VAR} -- unable to acquire.")
|
||||
endif()
|
||||
@ -31,7 +31,7 @@ function(vcpkg_find_acquire_program VAR)
|
||||
find_program(${VAR} ${PROGNAME} PATHS ${PATHS})
|
||||
if(${VAR} MATCHES "-NOTFOUND")
|
||||
file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE}
|
||||
EXPECTED_MD5 ${HASH}
|
||||
EXPECTED_HASH SHA512=${HASH}
|
||||
SHOW_PROGRESS
|
||||
)
|
||||
file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME})
|
||||
|
@ -56,7 +56,7 @@ if(CMD MATCHES "^SCAFFOLD$")
|
||||
message(FATAL_ERROR "Error downloading file: ${error_code}")
|
||||
endif()
|
||||
endif()
|
||||
file(MD5 ${DOWNLOADS}/${FILENAME} MD5)
|
||||
file(SHA512 ${DOWNLOADS}/${FILENAME} SHA512)
|
||||
|
||||
file(MAKE_DIRECTORY ports/${PORT})
|
||||
configure_file(scripts/templates/portfile.in.cmake ports/${PORT}/portfile.cmake @ONLY)
|
||||
|
@ -2,7 +2,7 @@ include(vcpkg_common_functions)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URL "@URL@"
|
||||
FILENAME "@FILENAME@"
|
||||
MD5 @MD5@
|
||||
SHA512 @SHA512@
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user