diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_download_distfile.cmake | 12 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 8 | ||||
| -rw-r--r-- | scripts/ports.cmake | 2 | ||||
| -rw-r--r-- | scripts/templates/portfile.in.cmake | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 7c36f5d97..3145c8851 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -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() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index ce2cdaa26..8f974240f 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -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}) diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 6a744a0b6..eeb7b254c 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -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) diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index b29e2b682..99a3ac3e8 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -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}) |
