From f7f06c516d5c7b6e5ff48db3452bdf2c744f02a4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 8 Nov 2018 19:03:39 -0800 Subject: [PATCH] [vcpkg_from_git] Use tar.gz because .zip has different hash in different timezones --- ports/fdlibm/portfile.cmake | 2 +- scripts/cmake/vcpkg_from_git.cmake | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/fdlibm/portfile.cmake b/ports/fdlibm/portfile.cmake index fb616db7b0a..6e528f36869 100644 --- a/ports/fdlibm/portfile.cmake +++ b/ports/fdlibm/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_git( OUT_SOURCE_PATH SOURCE_PATH URL https://android.googlesource.com/platform/external/fdlibm REF 59f7335e4dd8275a7dc2f8aeb4fd00758fde37ac - SHA512 08c16ff7cc6f24d962090bf5ab192d3c8ab33d9f60390ca510898c918cefa1b19572ad6bbf49c327bb09d8a9ab52d8341ec14c44abe169d2d319523567f1300f + SHA512 bc788c840a57716f996513980d31b203bd86ce9af1ac3656a187266bfdc2fbb22a9ddf88f79ffc91dd75f3f1f1e4fd3449a42b566ffe5e49e9384efd91a68613 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/scripts/cmake/vcpkg_from_git.cmake b/scripts/cmake/vcpkg_from_git.cmake index 5f693041207..2fc66b279ea 100644 --- a/scripts/cmake/vcpkg_from_git.cmake +++ b/scripts/cmake/vcpkg_from_git.cmake @@ -65,9 +65,10 @@ function(vcpkg_from_git) message(FATAL_ERROR "vcpkg_from_git requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") endif() + # using .tar.gz instead of .zip because the hash of the latter is affected by timezone. string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") - set(TEMP_ARCHIVE "${DOWNLOADS}/temp/${PORT}-${SANITIZED_REF}.zip") - set(ARCHIVE "${DOWNLOADS}/${PORT}-${SANITIZED_REF}.zip") + set(TEMP_ARCHIVE "${DOWNLOADS}/temp/${PORT}-${SANITIZED_REF}.tar.gz") + set(ARCHIVE "${DOWNLOADS}/${PORT}-${SANITIZED_REF}.tar.gz") set(TEMP_SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${SANITIZED_REF}") function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE)