From ef0c3036fcb540957c381b2a8d21448062ac23ae Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Thu, 3 Dec 2020 13:24:26 -0800 Subject: [vcpkg baseline][vtk-m] fix the sha512 (#14884) * [vtk-m] fix the sha512 * Bump version * add FILE_DISAMBIGUATOR to vcpkg_from_gitlab * actually use the file disambiguator * regenerate docs * [moos-core] Add DISABLE_PARALLEL_CONFIGURE Co-authored-by: NancyLi1013 --- scripts/cmake/vcpkg_from_github.cmake | 1 + scripts/cmake/vcpkg_from_gitlab.cmake | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index f52538c8e..1c1b71679 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -14,6 +14,7 @@ vcpkg_from_github( [PATCHES ...] [GITHUB_HOST ] [AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>] + [FILE_DISAMBIGUATOR ] ) ``` diff --git a/scripts/cmake/vcpkg_from_gitlab.cmake b/scripts/cmake/vcpkg_from_gitlab.cmake index 354ff85b9..865c5326e 100644 --- a/scripts/cmake/vcpkg_from_gitlab.cmake +++ b/scripts/cmake/vcpkg_from_gitlab.cmake @@ -13,6 +13,7 @@ vcpkg_from_gitlab( [SHA512 <45d0d7f8cc350...>] [HEAD_REF ] [PATCHES ...] + [FILE_DISAMBIGUATOR ] ) ``` @@ -52,6 +53,9 @@ A list of patches to be applied to the extracted sources. Relative paths are based on the port directory. +### FILE_DISAMBIGUATOR +A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name. + ## Notes: At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. @@ -66,7 +70,7 @@ This exports the `VCPKG_HEAD_VERSION` variable during head builds. include(vcpkg_execute_in_download_mode) function(vcpkg_from_gitlab) - set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF) + set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF FILE_DISAMBIGUATOR) set(multipleValuesArgs PATCHES) # parse parameters such that semicolons in options arguments to COMMAND don't get erased cmake_parse_arguments(PARSE_ARGV 0 _vdud "" "${oneValueArgs}" "${multipleValuesArgs}") @@ -119,11 +123,17 @@ function(vcpkg_from_gitlab) endif() string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}") + if (_vdud_FILE_DISAMBIGUATOR) + set(downloaded_file_name "${downloaded_file_name}-${_vdud_FILE_DISAMBIGUATOR}") + endif() + + set(downloaded_file_name "${downloaded_file_name}.tar.gz") vcpkg_download_distfile(ARCHIVE URLS "${GITLAB_LINK}/-/archive/${_vdud_REF}/${REPO_NAME}-${_vdud_REF}.tar.gz" SHA512 "${_vdud_SHA512}" - FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" + FILENAME "${downloaded_file_name}" ) vcpkg_extract_source_archive_ex( -- cgit v1.2.3