mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 04:53:02 +08:00
[scripts-audit] Rollup 2021-05-21 (#18112)
* [scripts-audit] vcpkg_acquire_msys (#17687) * [vcpkg.cmake] Change find_package function -> macro in order to shorten trace (#17997) switch from function to macro * [scripts-audit] z_vcpkg_apply_patches (#18013) * [scripts-audit] z_vcpkg_escape_regex_control_characters (#18013) * [scripts-audit] vcpkg_fail_port_install (#18054) Note that this change allows existing failures; it changes MATCHES to STREQUAL, meaning that vcpkg_fail_port_install(ON_ARCH "arm") now succeeds on arm64; this change in behavior is fine (IMO) since it strictly succeeds when it used to fail.
This commit is contained in:
parent
f2f9f7993a
commit
0e914ba681
@ -25,6 +25,12 @@ jobs:
|
||||
# Note: D: is the Azure machines' temporary disk.
|
||||
- script: .\bootstrap-vcpkg.bat
|
||||
displayName: 'Bootstrap vcpkg'
|
||||
- script: |
|
||||
dir ${{ variables.VCPKG_DOWNLOADS }} 2>&1 || (call )
|
||||
dir ${{ variables.VCPKG_DOWNLOADS }}\tools 2>&1 || (call )
|
||||
dir ${{ variables.VCPKG_DOWNLOADS }}\tools\msys2 2>&1 || (call )
|
||||
rmdir /S /Q ${{ variables.VCPKG_DOWNLOADS }}\tools\msys2 2>&1 || (call )
|
||||
displayName: 'Clean msys2 downloads'
|
||||
- task: PowerShell@2
|
||||
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
|
||||
inputs:
|
||||
|
@ -166,112 +166,6 @@ macro(z_vcpkg_function_arguments OUT_VAR)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#[===[.md:
|
||||
# z_vcpkg_*_parent_scope_export
|
||||
If you need to re-export variables to a parent scope from a call,
|
||||
you can put these around the call to re-export those variables that have changed locally
|
||||
to parent scope.
|
||||
|
||||
## Usage:
|
||||
```cmake
|
||||
z_vcpkg_start_parent_scope_export(
|
||||
[PREFIX <PREFIX>]
|
||||
)
|
||||
z_vcpkg_complete_parent_scope_export(
|
||||
[PREFIX <PREFIX>]
|
||||
[IGNORE_REGEX <REGEX>]
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
### PREFIX
|
||||
The prefix to use to store the old variable values; defaults to `Z_VCPKG_PARENT_SCOPE_EXPORT`.
|
||||
The value of each variable `<VAR>` will be stored in `${PREFIX}_<VAR>` by `start`,
|
||||
and then every variable which is different from `${PREFIX}_VAR` will be re-exported by `complete`.
|
||||
|
||||
### IGNORE_REGEX
|
||||
Variables with names matching this regex will not be exported even if their value has changed.
|
||||
|
||||
## Example:
|
||||
```cmake
|
||||
z_vcpkg_start_parent_scope_export()
|
||||
_find_package(blah)
|
||||
z_vcpkg_complete_parent_scope_export()
|
||||
```
|
||||
#]===]
|
||||
# Notes: these do not use `cmake_parse_arguments` in order to support older versions of cmake,
|
||||
# pre-3.7 and PARSE_ARGV
|
||||
macro(z_vcpkg_start_parent_scope_export)
|
||||
if("${ARGC}" EQUAL "0")
|
||||
set(z_vcpkg_parent_scope_export_PREFIX "Z_VCPKG_PARENT_SCOPE_EXPORT")
|
||||
elseif("${ARGC}" EQUAL "2" AND "${ARGV0}" STREQUAL "PREFIX")
|
||||
set(z_vcpkg_parent_scope_export_PREFIX "${ARGV1}")
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid parameters to z_vcpkg_start_parent_scope_export: (${ARGV})")
|
||||
endif()
|
||||
get_property(z_vcpkg_parent_scope_export_VARIABLE_LIST
|
||||
DIRECTORY PROPERTY "VARIABLES")
|
||||
foreach(z_vcpkg_parent_scope_export_VARIABLE IN LISTS z_vcpkg_parent_scope_export_VARIABLE_LIST)
|
||||
set("${z_vcpkg_parent_scope_export_PREFIX}_${z_vcpkg_parent_scope_export_VARIABLE}" "${${z_vcpkg_parent_scope_export_VARIABLE}}")
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(z_vcpkg_complete_parent_scope_export)
|
||||
set(z_vcpkg_parent_scope_export_PREFIX_FILLED OFF)
|
||||
if("${ARGC}" EQUAL "0")
|
||||
# do nothing, replace with default values
|
||||
elseif("${ARGC}" EQUAL "2")
|
||||
if("${ARGV0}" STREQUAL "PREFIX")
|
||||
set(z_vcpkg_parent_scope_export_PREFIX_FILLED ON)
|
||||
set(z_vcpkg_parent_scope_export_PREFIX "${ARGV1}")
|
||||
elseif("${ARGV0}" STREQUAL "IGNORE_REGEX")
|
||||
set(z_vcpkg_parent_scope_export_IGNORE_REGEX "${ARGV1}")
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid arguments to z_vcpkg_complete_parent_scope_export: (${ARGV})")
|
||||
endif()
|
||||
elseif("${ARGC}" EQUAL "4")
|
||||
if("${ARGV0}" STREQUAL "PREFIX" AND "${ARGV2}" STREQUAL "IGNORE_REGEX")
|
||||
set(z_vcpkg_parent_scope_export_PREFIX_FILLED ON)
|
||||
set(z_vcpkg_parent_scope_export_PREFIX "${ARGV1}")
|
||||
set(z_vcpkg_parent_scope_export_IGNORE_REGEX "${ARGV3}")
|
||||
elseif("${ARGV0}" STREQUAL "IGNORE_REGEX" AND "${ARGV2}" STREQUAL "PREFIX")
|
||||
set(z_vcpkg_parent_scope_export_IGNORE_REGEX "${ARGV1}")
|
||||
set(z_vcpkg_parent_scope_export_PREFIX_FILLED ON)
|
||||
set(z_vcpkg_parent_scope_export_PREFIX "${ARGV3}")
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid arguments to z_vcpkg_start_parent_scope_export: (${ARGV})")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid arguments to z_vcpkg_complete_parent_scope_export: (${ARGV})")
|
||||
endif()
|
||||
|
||||
if(NOT z_vcpkg_parent_scope_export_PREFIX)
|
||||
set(z_vcpkg_parent_scope_export_PREFIX "Z_VCPKG_PARENT_SCOPE_EXPORT")
|
||||
endif()
|
||||
|
||||
get_property(z_vcpkg_parent_scope_export_VARIABLE_LIST
|
||||
DIRECTORY PROPERTY "VARIABLES")
|
||||
foreach(z_vcpkg_parent_scope_export_VARIABLE IN LISTS z_vcpkg_parent_scope_export_VARIABLE_LIST)
|
||||
if("${z_vcpkg_parent_scope_export_VARIABLE}" MATCHES "^${z_vcpkg_parent_scope_export_PREFIX}_")
|
||||
# skip the backup variables
|
||||
continue()
|
||||
endif()
|
||||
if("${z_vcpkg_parent_scope_export_VARIABLE}" MATCHES "^${z_vcpkg_parent_scope_export_PREFIX}_")
|
||||
# skip the backup variables
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(DEFINED "${z_vcpkg_parent_scope_export_IGNORE_REGEX}" AND "${z_vcpkg_parent_scope_export_VARIABLE}" MATCHES "${z_vcpkg_parent_scope_export_IGNORE_REGEX}")
|
||||
# skip those variables which should be ignored
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(NOT "${${z_vcpkg_parent_scope_export_PREFIX}_${z_vcpkg_parent_scope_export_VARIABLE}}" STREQUAL "${${z_vcpkg_parent_scope_export_VARIABLE}}")
|
||||
set("${z_vcpkg_parent_scope_export_VARIABLE}" "${${z_vcpkg_parent_scope_export_VARIABLE}}" PARENT_SCOPE)
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
#[===[.md:
|
||||
# z_vcpkg_set_powershell_path
|
||||
|
||||
@ -419,7 +313,7 @@ else()
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH ppc64le)
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$")
|
||||
set(Z_VCPKG_TARGET_TRIPLET_ARCH arm64)
|
||||
else()
|
||||
if(Z_VCPKG_CMAKE_IN_TRY_COMPILE)
|
||||
@ -793,48 +687,66 @@ endif()
|
||||
if(NOT DEFINED VCPKG_OVERRIDE_FIND_PACKAGE_NAME)
|
||||
set(VCPKG_OVERRIDE_FIND_PACKAGE_NAME find_package)
|
||||
endif()
|
||||
function("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}")
|
||||
# NOTE: this is not a function, which means that arguments _are not_ perfectly forwarded
|
||||
# this is fine for `find_package`, since there are no usecases for `;` in arguments,
|
||||
# so perfect forwarding is not important
|
||||
macro("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}" z_vcpkg_find_package_package_name)
|
||||
set(z_vcpkg_find_package_package_name "${z_vcpkg_find_package_package_name}")
|
||||
set(z_vcpkg_find_package_ARGN "${ARGN}")
|
||||
set(z_vcpkg_find_package_backup_vars)
|
||||
|
||||
# Workaround to set the ROOT_PATH until upstream CMake stops overriding
|
||||
# the ROOT_PATH at apple OS initialization phase.
|
||||
# See https://gitlab.kitware.com/cmake/cmake/merge_requests/3273
|
||||
# Fixed in CMake 3.15
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL iOS)
|
||||
# this is not a mutating operation,
|
||||
# this just creates a new variable named CMAKE_FIND_ROOT_PATH with value
|
||||
# "${CMAKE_FIND_ROOT_PATH};${VCPKG_CMAKE_FIND_ROOT_PATH}"
|
||||
# therefore, we don't have to worry about restoring its old value
|
||||
list(APPEND z_vcpkg_find_package_backup_vars "CMAKE_FIND_ROOT_PATH")
|
||||
if(DEFINED CMAKE_FIND_ROOT_PATH)
|
||||
set(z_vcpkg_find_package_backup_CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}")
|
||||
else()
|
||||
set(z_vcpkg_find_package_backup_CMAKE_FIND_ROOT_PATH)
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_FIND_ROOT_PATH "${VCPKG_CMAKE_FIND_ROOT_PATH}")
|
||||
endif()
|
||||
z_vcpkg_function_arguments(ARGS)
|
||||
set(PACKAGE_NAME "${ARGV0}")
|
||||
string(TOLOWER "${PACKAGE_NAME}" LOWERCASE_PACKAGE_NAME)
|
||||
string(TOLOWER "${z_vcpkg_find_package_package_name}" z_vcpkg_find_package_lowercase_package_name)
|
||||
|
||||
set(VCPKG_CMAKE_WRAPPER_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${LOWERCASE_PACKAGE_NAME}/vcpkg-cmake-wrapper.cmake")
|
||||
set(z_vcpkg_find_package_vcpkg_cmake_wrapper_path
|
||||
"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${z_vcpkg_find_package_lowercase_package_name}/vcpkg-cmake-wrapper.cmake")
|
||||
|
||||
z_vcpkg_start_parent_scope_export()
|
||||
if(EXISTS "${VCPKG_CMAKE_WRAPPER_PATH}")
|
||||
include("${VCPKG_CMAKE_WRAPPER_PATH}")
|
||||
elseif("${PACKAGE_NAME}" STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost")
|
||||
if(EXISTS "${z_vcpkg_find_package_vcpkg_cmake_wrapper_path}")
|
||||
list(APPEND z_vcpkg_find_package_backup_vars "ARGS")
|
||||
if(DEFINED ARGS)
|
||||
set(z_vcpkg_find_package_backup_ARGS "${ARGS}")
|
||||
else()
|
||||
set(z_vcpkg_find_package_backup_ARGS)
|
||||
endif()
|
||||
|
||||
set(ARGS "${z_vcpkg_find_package_package_name};${z_vcpkg_find_package_ARGN}")
|
||||
include("${z_vcpkg_find_package_vcpkg_cmake_wrapper_path}")
|
||||
elseif(z_vcpkg_find_package_package_name STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost")
|
||||
# Checking for the boost headers disables this wrapper unless the user has installed at least one boost library
|
||||
# these intentionally are not backed up
|
||||
set(Boost_USE_STATIC_LIBS OFF)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
unset(Boost_USE_STATIC_RUNTIME)
|
||||
set(Boost_NO_BOOST_CMAKE ON)
|
||||
set(Boost_USE_STATIC_RUNTIME)
|
||||
unset(Boost_USE_STATIC_RUNTIME CACHE)
|
||||
if("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v120")
|
||||
if(CMAKE_VS_PLATFORM_TOOLSET STREQUAL "v120")
|
||||
set(Boost_COMPILER "-vc120")
|
||||
else()
|
||||
set(Boost_COMPILER "-vc140")
|
||||
endif()
|
||||
_find_package(${ARGS})
|
||||
elseif("${PACKAGE_NAME}" STREQUAL "ICU" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/unicode/utf.h")
|
||||
list(FIND ARGS "COMPONENTS" COMPONENTS_IDX)
|
||||
if(NOT COMPONENTS_IDX EQUAL -1)
|
||||
_find_package(${ARGS} COMPONENTS data)
|
||||
_find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN})
|
||||
elseif(z_vcpkg_find_package_package_name STREQUAL "ICU" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/unicode/utf.h")
|
||||
list(FIND z_vcpkg_find_package_ARGN "COMPONENTS" z_vcpkg_find_package_COMPONENTS_IDX)
|
||||
if(NOT z_vcpkg_find_package_COMPONENTS_IDX EQUAL -1)
|
||||
_find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN} COMPONENTS data)
|
||||
else()
|
||||
_find_package(${ARGS})
|
||||
_find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN})
|
||||
endif()
|
||||
elseif("${PACKAGE_NAME}" STREQUAL "GSL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/gsl")
|
||||
_find_package(${ARGS})
|
||||
elseif(z_vcpkg_find_package_package_name STREQUAL "GSL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/gsl")
|
||||
_find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN})
|
||||
if(GSL_FOUND AND TARGET GSL::gsl)
|
||||
set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Release )
|
||||
set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Release )
|
||||
@ -845,8 +757,8 @@ function("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}")
|
||||
set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" )
|
||||
endif()
|
||||
endif()
|
||||
elseif("${PACKAGE_NAME}" STREQUAL "CURL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/curl")
|
||||
_find_package(${ARGS})
|
||||
elseif("${z_vcpkg_find_package_package_name}" STREQUAL "CURL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/curl")
|
||||
_find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN})
|
||||
if(CURL_FOUND)
|
||||
if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib")
|
||||
list(APPEND CURL_LIBRARIES
|
||||
@ -854,15 +766,20 @@ function("${VCPKG_OVERRIDE_FIND_PACKAGE_NAME}")
|
||||
"optimized" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib")
|
||||
endif()
|
||||
endif()
|
||||
elseif("${LOWERCASE_PACKAGE_NAME}" STREQUAL "grpc" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/grpc")
|
||||
list(REMOVE_AT ARGS 0)
|
||||
_find_package(gRPC ${ARGS})
|
||||
elseif("${z_vcpkg_find_package_lowercase_package_name}" STREQUAL "grpc" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/grpc")
|
||||
_find_package(gRPC ${z_vcpkg_find_package_ARGN})
|
||||
else()
|
||||
_find_package(${ARGS})
|
||||
_find_package("${z_vcpkg_find_package_package_name}" ${z_vcpkg_find_package_ARGN})
|
||||
endif()
|
||||
|
||||
z_vcpkg_complete_parent_scope_export(IGNORE_REGEX "(^Z_VCPKG_)|(^ARGS$)|(^COMPONENTS_IDX$)")
|
||||
endfunction()
|
||||
foreach(z_vcpkg_find_package_backup_var IN LISTS z_vcpkg_find_package_backup_vars)
|
||||
if(DEFINED z_vcpkg_find_package_backup_${z_vcpkg_find_package_backup_var})
|
||||
set("${z_vcpkg_find_package_backup_var}" "${z_vcpkg_find_package_backup_${z_vcpkg_find_package_backup_var}}")
|
||||
else()
|
||||
set("${z_vcpkg_find_package_backup_var}")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
set(VCPKG_TOOLCHAIN ON)
|
||||
set(Z_VCPKG_UNUSED "${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}")
|
||||
|
@ -56,487 +56,519 @@ vcpkg_execute_required_process(
|
||||
* [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake)
|
||||
#]===]
|
||||
|
||||
function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
|
||||
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _am "NO_DEFAULT_PACKAGES;Z_ALL_PACKAGES" "" "PACKAGES;DIRECT_PACKAGES")
|
||||
# Mirror list from https://github.com/msys2/MSYS2-packages/blob/master/pacman-mirrors/mirrorlist.msys
|
||||
# Sourceforge is not used because it does not keep older package versions
|
||||
set(Z_VCPKG_ACQUIRE_MSYS_MIRRORS
|
||||
"https://www2.futureware.at/~nickoe/msys2-mirror/"
|
||||
"https://mirror.yandex.ru/mirrors/msys2/"
|
||||
"https://mirrors.tuna.tsinghua.edu.cn/msys2/"
|
||||
"https://mirrors.ustc.edu.cn/msys2/"
|
||||
"https://mirror.bit.edu.cn/msys2/"
|
||||
"https://mirror.selfnet.de/msys2/"
|
||||
"https://mirrors.sjtug.sjtu.edu.cn/msys2/"
|
||||
)
|
||||
|
||||
set(TOTAL_HASH 0)
|
||||
set(ARCHIVES)
|
||||
|
||||
set(PACKAGES ${_am_PACKAGES})
|
||||
|
||||
if(NOT _am_NO_DEFAULT_PACKAGES)
|
||||
list(APPEND PACKAGES bash coreutils sed grep gawk diffutils make pkg-config)
|
||||
function(z_vcpkg_acquire_msys_download_package out_archive)
|
||||
cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "URL;SHA512;FILENAME" "")
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "internal error: z_vcpkg_acquire_msys_download_package passed extra args: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
macro(msys_package_download URL SHA FILENAME)
|
||||
set(URLS "${URL}")
|
||||
# Mirror list from https://github.com/msys2/MSYS2-packages/blob/master/pacman-mirrors/mirrorlist.msys
|
||||
# Sourceforge is not used because it does not keep older package versions
|
||||
set(MIRRORS
|
||||
"https://www2.futureware.at/~nickoe/msys2-mirror/"
|
||||
"https://mirror.yandex.ru/mirrors/msys2/"
|
||||
"https://mirrors.tuna.tsinghua.edu.cn/msys2/"
|
||||
"https://mirrors.ustc.edu.cn/msys2/"
|
||||
"https://mirror.bit.edu.cn/msys2/"
|
||||
"https://mirror.selfnet.de/msys2/"
|
||||
"https://mirrors.sjtug.sjtu.edu.cn/msys2/"
|
||||
)
|
||||
set(all_urls "${arg_URL}")
|
||||
|
||||
foreach(MIRROR IN LISTS MIRRORS)
|
||||
string(REPLACE "https://repo.msys2.org/" "${MIRROR}" MIRROR_URL "${URL}")
|
||||
list(APPEND URLS "${MIRROR_URL}")
|
||||
endforeach()
|
||||
vcpkg_download_distfile(MSYS_ARCHIVE
|
||||
URLS ${URLS}
|
||||
SHA512 "${SHA}"
|
||||
FILENAME "msys-${FILENAME}"
|
||||
QUIET
|
||||
)
|
||||
string(APPEND TOTAL_HASH "${SHA}")
|
||||
list(APPEND ARCHIVES "${MSYS_ARCHIVE}")
|
||||
endmacro()
|
||||
foreach(mirror IN LISTS Z_VCPKG_ACQUIRE_MSYS_MIRRORS)
|
||||
string(REPLACE "https://repo.msys2.org/" "${mirror}" mirror_url "${arg_URL}")
|
||||
list(APPEND all_urls "${mirror_url}")
|
||||
endforeach()
|
||||
|
||||
macro(msys_package)
|
||||
cmake_parse_arguments(p "ZST;ANY" "URL;NAME;SHA512;VERSION;REPO" "DEPS" ${ARGN})
|
||||
if(p_URL AND NOT p_NAME)
|
||||
if(NOT p_URL MATCHES "^https://repo\\.msys2\\.org/.*/(([^-]+(-[^0-9][^-]*)*)-.+\\.pkg\\.tar\\.(xz|zst))\$")
|
||||
message(FATAL_ERROR "Regex does not match supplied URL to vcpkg_acquire_msys: ${p_URL}")
|
||||
endif()
|
||||
set(FILENAME "${CMAKE_MATCH_1}")
|
||||
set(p_NAME "${CMAKE_MATCH_2}")
|
||||
else()
|
||||
if(p_ZST)
|
||||
set(EXT zst)
|
||||
else()
|
||||
set(EXT xz)
|
||||
endif()
|
||||
if(p_ANY)
|
||||
set(ARCH any)
|
||||
else()
|
||||
set(ARCH x86_64)
|
||||
endif()
|
||||
if(NOT p_REPO)
|
||||
set(p_REPO msys/x86_64)
|
||||
endif()
|
||||
set(FILENAME "${p_NAME}-${p_VERSION}-${ARCH}.pkg.tar.${EXT}")
|
||||
set(p_URL "https://repo.msys2.org/${p_REPO}/${FILENAME}")
|
||||
endif()
|
||||
if("${p_NAME}" IN_LIST PACKAGES OR _am_Z_ALL_PACKAGES)
|
||||
list(REMOVE_ITEM PACKAGES "${p_NAME}")
|
||||
list(APPEND PACKAGES ${p_DEPS})
|
||||
msys_package_download("${p_URL}" "${p_SHA512}" "${FILENAME}")
|
||||
endif()
|
||||
endmacro()
|
||||
vcpkg_download_distfile(msys_archive
|
||||
URLS ${all_urls}
|
||||
SHA512 "${arg_SHA512}"
|
||||
FILENAME "msys-${arg_FILENAME}"
|
||||
QUIET
|
||||
)
|
||||
set("${out_archive}" "${msys_archive}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
unset(N)
|
||||
foreach(P IN LISTS _am_DIRECT_PACKAGES)
|
||||
if(NOT DEFINED N)
|
||||
set(N "${P}")
|
||||
else()
|
||||
get_filename_component(FILENAME "${N}" NAME)
|
||||
msys_package_download("${N}" "${P}" "${FILENAME}")
|
||||
unset(N)
|
||||
# writes to the following variables in parent scope:
|
||||
# - Z_VCPKG_MSYS_ARCHIVES
|
||||
# - Z_VCPKG_MSYS_TOTAL_HASH
|
||||
# - Z_VCPKG_MSYS_PACKAGES
|
||||
function(z_vcpkg_acquire_msys_declare_package)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 arg "" "NAME;URL;SHA512" "DEPS")
|
||||
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "internal error: z_vcpkg_acquire_msys_declare_package passed extra args: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
foreach(required_arg IN ITEMS URL SHA512)
|
||||
if(NOT DEFINED arg_${required_arg})
|
||||
message(FATAL_ERROR "internal error: z_vcpkg_acquire_msys_declare_package requires argument: ${required_arg}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(DEFINED N)
|
||||
message(FATAL_ERROR "vcpkg_acquire_msys(... DIRECT_PACKAGES ...) requires exactly pairs of URL/SHA512")
|
||||
|
||||
if(NOT arg_URL MATCHES [[^https://repo\.msys2\.org/.*/(([^-]+(-[^0-9][^-]*)*)-.+\.pkg\.tar\.(xz|zst))$]])
|
||||
message(FATAL_ERROR "internal error: regex does not match supplied URL to vcpkg_acquire_msys: ${arg_URL}")
|
||||
endif()
|
||||
|
||||
set(filename "${CMAKE_MATCH_1}")
|
||||
if(NOT DEFINED arg_NAME)
|
||||
set(arg_NAME "${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
|
||||
if("${arg_NAME}" IN_LIST Z_VCPKG_MSYS_PACKAGES OR arg_Z_ALL_PACKAGES)
|
||||
list(REMOVE_ITEM Z_VCPKG_MSYS_PACKAGES "${arg_NAME}")
|
||||
list(APPEND Z_VCPKG_MSYS_PACKAGES ${arg_DEPS})
|
||||
set(Z_VCPKG_MSYS_PACKAGES "${Z_VCPKG_MSYS_PACKAGES}" PARENT_SCOPE)
|
||||
|
||||
z_vcpkg_acquire_msys_download_package(archive
|
||||
URL "${arg_URL}"
|
||||
SHA512 "${arg_SHA512}"
|
||||
FILENAME "${filename}"
|
||||
)
|
||||
|
||||
list(APPEND Z_VCPKG_MSYS_ARCHIVES "${archive}")
|
||||
set(Z_VCPKG_MSYS_ARCHIVES "${Z_VCPKG_MSYS_ARCHIVES}" PARENT_SCOPE)
|
||||
string(APPEND Z_VCPKG_MSYS_TOTAL_HASH "${arg_SHA512}")
|
||||
set(Z_VCPKG_MSYS_TOTAL_HASH "${Z_VCPKG_MSYS_TOTAL_HASH}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(vcpkg_acquire_msys out_msys_root)
|
||||
cmake_parse_arguments(PARSE_ARGV 1 "arg"
|
||||
"NO_DEFAULT_PACKAGES;Z_ALL_PACKAGES"
|
||||
""
|
||||
"PACKAGES;DIRECT_PACKAGES"
|
||||
)
|
||||
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(WARNING "vcpkg_acquire_msys was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
set(Z_VCPKG_MSYS_TOTAL_HASH)
|
||||
set(Z_VCPKG_MSYS_ARCHIVES)
|
||||
|
||||
set(Z_VCPKG_MSYS_PACKAGES "${arg_PACKAGES}")
|
||||
|
||||
if(NOT arg_NO_DEFAULT_PACKAGES)
|
||||
list(APPEND Z_VCPKG_MSYS_PACKAGES bash coreutils sed grep gawk diffutils make pkg-config)
|
||||
endif()
|
||||
|
||||
if(DEFINED arg_DIRECT_PACKAGES AND NOT arg_DIRECT_PACKAGES STREQUAL "")
|
||||
list(LENGTH arg_DIRECT_PACKAGES direct_packages_length)
|
||||
math(EXPR direct_packages_parity "${direct_packages_length} % 2")
|
||||
math(EXPR direct_packages_number "${direct_packages_length} / 2")
|
||||
math(EXPR direct_packages_last "${direct_packages_number} - 1")
|
||||
|
||||
if(direct_packages_parity EQUAL 1)
|
||||
message(FATAL_ERROR "vcpkg_acquire_msys(... DIRECT_PACKAGES ...) requires exactly pairs of URL/SHA512")
|
||||
endif()
|
||||
|
||||
# direct_packages_last > direct_packages_number - 1 > 0 - 1 >= 0, so this is fine
|
||||
foreach(index RANGE "${direct_packages_last}")
|
||||
math(EXPR url_index "${index} * 2")
|
||||
math(EXPR sha512_index "${url_index} + 1")
|
||||
list(GET arg_DIRECT_PACKAGES "${url_index}" url)
|
||||
list(GET arg_DIRECT_PACKAGES "${sha512_index}" sha512)
|
||||
|
||||
get_filename_component(filename "${url}" NAME)
|
||||
z_vcpkg_acquire_msys_download_package(archive
|
||||
URL "${url}"
|
||||
SHA512 "${sha512}"
|
||||
FILENAME "${filename}"
|
||||
)
|
||||
list(APPEND Z_VCPKG_MSYS_ARCHIVES "${archive}")
|
||||
string(APPEND Z_VCPKG_MSYS_TOTAL_HASH "${sha512}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# To add new entries, use https://packages.msys2.org/package/$PACKAGE?repo=msys
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/unzip-6.0-2-x86_64.pkg.tar.xz"
|
||||
SHA512 b8a1e0ce6deff26939cb46267f80ada0a623b7d782e80873cea3d388b4dc3a1053b14d7565b31f70bc904bf66f66ab58ccc1cd6bfa677065de1f279dd331afb9
|
||||
DEPS libbz2
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libbz2-1.0.8-2-x86_64.pkg.tar.xz"
|
||||
SHA512 d128bd1792d0f5750e6a63a24db86a791e7ee457db8c0bef68d217099be4a6eef27c85caf6ad09b0bcd5b3cdac6fc0a2b9842cc58d381a4035505906cc4803ec
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/patch-2.7.6-1-x86_64.pkg.tar.xz"
|
||||
SHA512 04d06b9d5479f129f56e8290e0afe25217ffa457ec7bed3e576df08d4a85effd80d6e0ad82bd7541043100799b608a64da3c8f535f8ea173d326da6194902e8c
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/gzip-1.10-1-x86_64.pkg.tar.xz"
|
||||
SHA512 2d0a60f2c384e3b9e2bed2212867c85333545e51ee0f583a33914e488e43c265ed0017cd4430a6e3dafdca99c0414b3756a4b9cc92a6f04d5566eff8b68def75
|
||||
DEPS msys2-runtime
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/texinfo-6.7-3-x86_64.pkg.tar.zst"
|
||||
SHA512 d8bcce1a338d45a8c2350af3edee1d021a76524b767d465d3f7fd9cb03c8799d9cd3454526c10e4a2b4d58f75ae26a1a8177c50079dfdb4299129e0d45b093bc
|
||||
DEPS bash perl
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/bash-4.4.023-2-x86_64.pkg.tar.xz"
|
||||
SHA512 1cf2a07022113010e00e150e7004732013a793d49e7a6ac7c2be27a0b2c0ce3366150584b9974e30df042f8876a84d6a77c1a46f0607e38ebe18f8a25f51c32d
|
||||
DEPS msys2-runtime
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/autoconf-2.69-5-any.pkg.tar.xz"
|
||||
SHA512 66b9c97bd3d1dfe2a2ab576235b6b8c204a9e4c099ba14cf5d0139e564bba1e735e3b1083354b4cac8c6c42233cbdd5e1e277e32cadfe24017b94d2fbdeb5617
|
||||
DEPS m4
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/autoconf-archive-2019.01.06-1-any.pkg.tar.xz"
|
||||
SHA512 77540d3d3644d94a52ade1f5db27b7b4b5910bbcd6995195d511378ca6d394a1dd8d606d57161c744699e6c63c5e55dfe6e8664d032cc8c650af9fdbb2db08b0
|
||||
DEPS m4
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/diffutils-3.7-1-x86_64.pkg.tar.xz"
|
||||
SHA512 0c39837a26b2111bb6310cdfe0bc14656e3d57456ad8023f59c9386634a8f1f236915c79a57348b64c508897c73ed88d8abce2b9ac512a427e9a3956939f2040
|
||||
DEPS msys2-runtime
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/binutils-2.34-4-x86_64.pkg.tar.zst"
|
||||
SHA512 5271288d11489879082bc1f2298bb8bedbcfcf6ee19f8a9b3b552b6a4395543d9385bb833e3c32b1560bff1b411d2be503e2c12a7201bf37b85cfacc5f5baba3
|
||||
DEPS libiconv libintl
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz"
|
||||
SHA512 b309799e5a9d248ef66eaf11a0bd21bf4e8b9bd5c677c627ec83fa760ce9f0b54ddf1b62cbb436e641fbbde71e3b61cb71ff541d866f8ca7717a3a0dbeb00ebf
|
||||
DEPS grep sed coreutils file findutils
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/file-5.39-1-x86_64.pkg.tar.zst"
|
||||
SHA512 be51dd0f6143a2f34f2a3e7d412866eb12511f25daaf3a5478240537733a67d7797a3a55a8893e5638589c06bca5af20aed5ded7db0bf19fbf52b30fae08cadd
|
||||
DEPS gcc-libs zlib libbz2
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz"
|
||||
SHA512 b607da40d3388b440f2a09e154f21966cd55ad77e02d47805f78a9dee5de40226225bf0b8335fdfd4b83f25ead3098e9cb974d4f202f28827f8468e30e3b790d
|
||||
DEPS gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/bzip2-1.0.8-2-x86_64.pkg.tar.xz"
|
||||
SHA512 336f5b59eb9cf4e93b537a212509d84f72cd9b8a97bf8ac0596eff298f3c0979bdea6c605244d5913670b9d20b017e5ee327f1e606f546a88e177a03c589a636
|
||||
DEPS gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libbz2-1.0.8-2-x86_64.pkg.tar.xz"
|
||||
SHA512 d128bd1792d0f5750e6a63a24db86a791e7ee457db8c0bef68d217099be4a6eef27c85caf6ad09b0bcd5b3cdac6fc0a2b9842cc58d381a4035505906cc4803ec
|
||||
DEPS gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/coreutils-8.32-1-x86_64.pkg.tar.xz"
|
||||
SHA512 1a2ae4f296954421ce36f764b9b1c77ca72fc8583c46060b817677d0ad6adc7d7e3c2bbe1ae0179afd116a3d62f28e59eae2f7c84c1c8ffb7d22d2f2b40c0cdc
|
||||
DEPS libiconv libintl gmp
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz"
|
||||
SHA512 c784d5f8a929ae251f2ffaccf7ab0b3936ae9f012041e8f074826dd6077ad0a859abba19feade1e71b3289cc640626dfe827afe91c272b38a1808f228f2fdd00
|
||||
DEPS libiconv libintl libpcre
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/sed-4.8-1-x86_64.pkg.tar.xz"
|
||||
SHA512 b6e7ed0af9e04aba4992ee26d8616f7ac675c8137bb28558c049d50709afb571b33695ce21d01e5b7fe8e188c008dd2e8cbafc72a7e2a919c2d678506095132b
|
||||
DEPS libintl
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libpcre-8.44-1-x86_64.pkg.tar.xz"
|
||||
SHA512 e9e56386fc5cca0f3c36cee21eda91300d9a13a962ec2f52eeea00f131915daea1cfeb0e1b30704bf3cc4357d941d356e0d72192bab3006c2548e18cd96dad77
|
||||
DEPS gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/m4-1.4.18-2-x86_64.pkg.tar.xz"
|
||||
SHA512 061e9243c1e013aa093546e3872984ad47b7fc9d64d4c39dcce62e750ed632645df00be3fe382a2f55f3bf623dd0d649e2092be23e8f22f921f582e41893e36a
|
||||
DEPS msys2-runtime
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/automake-wrapper-11-1-any.pkg.tar.xz"
|
||||
SHA512 0fcfc80c31fd0bda5a46c55e9100a86d2fc788a92c7e2ca4fd281e551375c62eb5b9cc9ad9338bb44a815bf0b1d1b60b882c8e68ca3ea529b442f2d03d1d3e1f
|
||||
DEPS gawk
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/gawk-5.1.0-1-x86_64.pkg.tar.xz"
|
||||
SHA512 4e2be747b184f27945df6fb37d52d56fd8117d2fe4b289370bcdb5b15a4cf90cbeaea98cf9e64bcbfa2c13db50d8bd14cbd719c5f31b420842da903006dbc959
|
||||
DEPS libintl libreadline mpfr
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst"
|
||||
SHA512 d64fa60e188124591d41fc097d7eb51d7ea4940bac05cdcf5eafde951ed1eaa174468f5ede03e61106e1633e3428964b34c96de76321ed8853b398fbe8c4d072
|
||||
DEPS gmp gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz"
|
||||
SHA512 1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8
|
||||
)
|
||||
msys_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/xz-5.2.5-1-x86_64.pkg.tar.xz" # this seems to require immediate updating on version bumps.
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/xz-5.2.5-1-x86_64.pkg.tar.xz" # this seems to require immediate updating on version bumps.
|
||||
SHA512 99d092c3398277e47586cead103b41e023e9432911fb7bdeafb967b826f6a57d32e58afc94c8230dad5b5ec2aef4f10d61362a6d9e410a6645cf23f076736bba
|
||||
DEPS liblzma libiconv gettext
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/liblzma-5.2.5-1-x86_64.pkg.tar.xz"
|
||||
SHA512 8d5c04354fdc7309e73abce679a4369c0be3dc342de51cef9d2a932b7df6a961c8cb1f7e373b1b8b2be40343a95fbd57ac29ebef63d4a2074be1d865e28ca6ad
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libreadline-8.0.004-1-x86_64.pkg.tar.xz"
|
||||
SHA512 42760bddedccc8d93507c1e3a7a81595dc6392b5e4319d24a85275eb04c30eb79078e4247eb2cdd00ff3884d932639130c89bf1b559310a17fa4858062491f97
|
||||
DEPS ncurses
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/ncurses-6.2-1-x86_64.pkg.tar.xz"
|
||||
SHA512 d4dc566d3dbd32e7646e328cb350689ede7eaa7008c8ed971072f8869a2986fe3935e7df1700851b52716af7ef20c49f9e6628d3163a5e9208a8872b5014eaea
|
||||
DEPS msys2-runtime
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/automake1.16-1.16.2-2-any.pkg.tar.zst"
|
||||
SHA512 b837ec70fce700fc6415f1e73287911cbdf665628b63dcffac4cad1b3a3a23efeabacd950d6757567cbcc4c9cedb120e06d2a7dd5cad028434063cab936e03ae
|
||||
DEPS perl
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/automake1.15-1.15.1-2-any.pkg.tar.zst"
|
||||
SHA512 aed269720344948d50965354e35d640a8db1589bb9e98d21427a3cc47a8e8dfd2a6e4828b1ca109a4010eb808bdf9a627383c302a0713efcb6ab3be1f887d930
|
||||
DEPS perl
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/perl-5.32.0-2-x86_64.pkg.tar.zst"
|
||||
SHA512 d8397c64cf9d8deb43904f705e6263b8086773a64c2feb4eb8f36921e4115fc1230267a18c0ef2ca9726fbcce6ed22125f3c7c2472042bf1279b423b2088d3df
|
||||
DEPS libcrypt
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libcrypt-2.1-2-x86_64.pkg.tar.xz"
|
||||
SHA512 59a13f79f560934f880d68209a58a3c39ee4a1d24500035bde90d7a6f6ab0d4f72fe14edea6f19a8eb54d4d53b0b6ad4589b388f1521a07ab24a0f8307619cab
|
||||
DEPS gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/pkg-config-0.29.2-4-x86_64.pkg.tar.zst"
|
||||
SHA512 9f72c81d8095ca1c341998bc80788f7ce125770ec4252f1eb6445b9cba74db5614caf9a6cc7c0fcc2ac18d4a0f972c49b9f245c3c9c8e588126be6c72a8c1818
|
||||
DEPS libiconv
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/make-4.3-1-x86_64.pkg.tar.xz"
|
||||
SHA512 7306dec7859edc27d70a24ab4b396728481484a426c5aa2f7e9fed2635b3b25548b05b7d37a161a86a8edaa5922948bee8c99b1e8a078606e69ca48a433fe321
|
||||
DEPS libintl msys2-runtime
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/gettext-devel-0.19.8.1-1-x86_64.pkg.tar.xz"
|
||||
SHA512 648f74c23e4f92145cdd0d45ff5285c2df34e855a9e75e5463dd6646967f8cf34a18ce357c6f498a4680e6d7b84e2d1697ba9deee84da8ea6bb14bbdb594ee22
|
||||
DEPS gettext
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/gettext-0.19.8.1-1-x86_64.pkg.tar.xz"
|
||||
SHA512 c8c42d084c297746548963f7ec7a7df46241886f3e637e779811ee4a8fee6058f892082bb2658f6777cbffba2de4bcdfd68e846ba63c6a6552c9efb0c8c1de50
|
||||
DEPS libintl libgettextpo libasprintf tar
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/tar-1.32-1-x86_64.pkg.tar.xz"
|
||||
SHA512 379525f4b8a3f21d67d6506647aec8367724e1b4c896039f46845d9e834298280381e7261a87440925ee712794d43074f4ffb5e09e67a5195af810bbc107ad9a
|
||||
DEPS libiconv libintl
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libgettextpo-0.19.8.1-1-x86_64.pkg.tar.xz"
|
||||
SHA512 480b782a79b0ce71ed9939ae3a6821fc2f5a63358733965c62cee027d0e6c88e255df1d62379ee47f5a7f8ffe163e554e318dba22c67dc67469b10aa3248edf7
|
||||
DEPS gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libasprintf-0.19.8.1-1-x86_64.pkg.tar.xz"
|
||||
SHA512 a2e8027b9bbee20f8cf60851130ca2af436641b1fb66054f8deba118da7ebecb1cd188224dcf08e4c5b7cde85b412efab058afef2358e843c9de8eb128ca448c
|
||||
DEPS gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/findutils-4.7.0-1-x86_64.pkg.tar.xz"
|
||||
SHA512 fd09a24562b196ff252f4b5de86ed977280306a8c628792930812f146fcf7355f9d87434bbabe25e6cc17d8bd028f6bc68fc02e5bea83137a49cf5cc6f509e10
|
||||
DEPS libintl libiconv
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libintl-0.19.8.1-1-x86_64.pkg.tar.xz"
|
||||
SHA512 4e54c252b828c862f376d8f5a2410ee623a43d70cbb07d0b8ac20c25096f59fb3ae8dcd011d1792bec76f0b0b9411d0e184ee23707995761dc50eb76f9fc6b92
|
||||
DEPS libiconv
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/libiconv-1.16-2-x86_64.pkg.tar.zst"
|
||||
SHA512 3ab569eca9887ef85e7dd5dbca3143d8a60f7103f370a7ecc979a58a56b0c8dcf1f54ac3df4495bc306bd44bf36ee285aaebbb221c4eebfc912cf47d347d45fc
|
||||
DEPS gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/gcc-libs-9.3.0-1-x86_64.pkg.tar.xz"
|
||||
SHA512 2816afbf45aa0ff47f94a623ad083d9421bca5284dc55683c2f1bc09ea0eadfe720afb75aafef60c2ff6384d051c4fbe2a744bb16a20acf34c04dc59b17c3d8c
|
||||
DEPS msys2-runtime
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/msys/x86_64/msys2-runtime-3.1.6-3-x86_64.pkg.tar.xz"
|
||||
SHA512 f094a7f4926195ef7ba015f0c5c56587b1faa94d85530f07aaaa5557a1494c3bd75257d4687c8401cbf1328d23e5586a92b05f0a872caebb1a7e941a07829776
|
||||
)
|
||||
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-python-numpy-1.19.0-1-any.pkg.tar.zst"
|
||||
SHA512 15791fff23deda17a4452c9ca3f23210ed77ee20dcdd6e0c31d0e626a63aeb93d15ed814078729101f1cce96129b4b5e3c898396b003d794a52d7169dd027465
|
||||
DEPS mingw-w64-x86_64-openblas mingw-w64-x86_64-python
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-openblas-0.3.10-2-any.pkg.tar.zst"
|
||||
SHA512 3cf15ef191ceb303a7e40ad98aca94c56211b245617c17682379b5606a1a76e12d04fa1a83c6109e89620200a74917bcd981380c7749dda12fa8e79f0b923877
|
||||
DEPS mingw-w64-x86_64-gcc-libgfortran mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libwinpthread
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libgfortran-10.2.0-1-any.pkg.tar.zst"
|
||||
SHA512 c2dee2957356fa51aae39d907d0cc07f966028b418f74a1ea7ea551ff001c175d86781f980c0cf994207794322dcd369fa122ab78b6c6d0f0ab01e39a754e780
|
||||
DEPS mingw-w64-x86_64-gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-python-3.8.5-1-any.pkg.tar.zst"
|
||||
SHA512 49bbcaa9479ff95fd21b473a1bc286886b204ec3e2e0d9466322e96a9ee07ccd8116024b54b967a87e4752057004475cac5060605e87bd5057de45efe5122a25
|
||||
DEPS mingw-w64-x86_64-bzip2 mingw-w64-x86_64-expat mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libffi mingw-w64-x86_64-mpdecimal mingw-w64-x86_64-ncurses mingw-w64-x86_64-openssl mingw-w64-x86_64-sqlite3 mingw-w64-x86_64-tcl mingw-w64-x86_64-tk mingw-w64-x86_64-xz mingw-w64-x86_64-zlib
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-bzip2-1.0.8-1-any.pkg.tar.xz"
|
||||
SHA512 6e01b26a2144f99ca00406dbce5b8c3e928ec8a3ff77e0b741b26aaf9c927e9bea8cb1b5f38cd59118307e10dd4523a0ea2a1ea61f798f99e6d605ef1d100503
|
||||
DEPS mingw-w64-x86_64-gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpdecimal-2.5.0-1-any.pkg.tar.zst"
|
||||
SHA512 48130ff676c0235bad4648527021e597ee00aa49a4443740a134005877e2ff2ca27b30a0ac86b923192a65348b36de4e8d3f9c57d76ab42b2e21d1a92dbf7ccf
|
||||
DEPS mingw-w64-x86_64-gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-ncurses-6.2-1-any.pkg.tar.xz"
|
||||
SHA512 1cbffe0e181a3d4ceaa8f39b2a649584b2c7d689e6a057d85cb9f84edece2cf60eddc220127c7fa4f29e4aa6e8fb4f568ef9d73582d08168607135af977407e0
|
||||
DEPS mingw-w64-x86_64-libsystre
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libsystre-1.0.1-4-any.pkg.tar.xz"
|
||||
SHA512 6540e896636d00d1ea4782965b3fe4d4ef1e32e689a98d25e2987191295b319eb1de2e56be3a4b524ff94f522a6c3e55f8159c1a6f58c8739e90f8e24e2d40d8
|
||||
DEPS mingw-w64-x86_64-libtre
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
NAME "mingw-w64-x86_64-libtre"
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libtre-git-r128.6fb7206-2-any.pkg.tar.xz"
|
||||
NAME mingw-w64-x86_64-libtre
|
||||
VERSION git-r128.6fb7206-2
|
||||
ANY
|
||||
REPO mingw/x86_64
|
||||
SHA512 d595dbcf3a3b6ed098e46f370533ab86433efcd6b4d3dcf00bbe944ab8c17db7a20f6535b523da43b061f071a3b8aa651700b443ae14ec752ae87500ccc0332d
|
||||
DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-gettext
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-openssl-1.1.1.g-1-any.pkg.tar.xz"
|
||||
SHA512 81681089a19cae7dbdee1bc9d3148f03458fa7a1d2fd105be39299b3a0c91b34450bcfe2ad86622bc6819da1558d7217deb0807b4a7bed942a9a7a786fcd54a3
|
||||
DEPS mingw-w64-x86_64-ca-certificates mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-zlib
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-ca-certificates-20200601-1-any.pkg.tar.zst"
|
||||
SHA512 21a81e1529a3ad4f6eceb3b7d4e36400712d3a690d3991131573d4aae8364965757f9b02054d93c853eb75fbb7f6173a278b122450c800b2c9a1e8017dd35e28
|
||||
DEPS mingw-w64-x86_64-p11-kit
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-p11-kit-0.23.20-2-any.pkg.tar.xz"
|
||||
SHA512 c441c4928465a98aa53917df737b728275bc0f6e9b41e13de7c665a37d2111b46f057bb652a1d5a6c7cdf8a74ea15e365a727671b698f5bbb5a7cfd0b889935e
|
||||
DEPS mingw-w64-x86_64-gettext mingw-w64-x86_64-libffi mingw-w64-x86_64-libtasn1
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libtasn1-4.16.0-1-any.pkg.tar.xz"
|
||||
SHA512 c450cd49391b46af552a89f2f6e2c21dd5da7d40e7456b380290c514a0f06bcbd63f0f972b3c173c4237bec7b652ff22d2d330e8fdf5c888558380bd2667be64
|
||||
DEPS mingw-w64-x86_64-gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-sqlite3-3.33.0-1-any.pkg.tar.zst"
|
||||
SHA512 eae319f87c9849049347f132efc2ecc46e9ac1ead55542e31a3ea216932a4fa5c5bae8d468d2f050e1e22068ac9fbe9d8e1aa7612cc0110cafe6605032adeb0f
|
||||
DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-readline mingw-w64-x86_64-tcl
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-readline-8.0.004-1-any.pkg.tar.xz"
|
||||
SHA512 e3fb3030a50f677697bec0da39ba2eb979dc28991ad0e29012cbf1bda82723176148510bf924b7fce7a0b79e7b078232d69e07f3fbb7d657b8ee631841730120
|
||||
DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-termcap
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-termcap-1.3.1-6-any.pkg.tar.zst"
|
||||
SHA512 602d182ba0f1e20c4c51ae09b327c345bd736e6e4f22cd7d58374ac68c705dd0af97663b9b94d41870457f46bb9110abb29186d182196133618fc460f71d1300
|
||||
DEPS mingw-w64-x86_64-gcc-libs
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-tk-8.6.10-2-any.pkg.tar.zst"
|
||||
SHA512 a2d05ce3070d3a3bdf823fa5c790b124aa7493e60758e2911d3f9651899cf58328044f9b06edd82060d8a4b5efb5c4cb32085d827aecd796dbb5e42441da305f
|
||||
DEPS mingw-w64-x86_64-tcl
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-tcl-8.6.10-1-any.pkg.tar.xz"
|
||||
SHA512 c3f21588e19725598878ef13145fbe7a995c2a0c678ef0a4782e28fd64d65fe3271178369bf0c54e92123eba82f2d3da6ae2fc34acd3b20150d1e173be1c0f8f
|
||||
DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-zlib
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-xz-5.2.5-2-any.pkg.tar.zst"
|
||||
SHA512 94fcf8b9f9fbc2cfdb2ed53dbe72797806aa3399c4dcfea9c6204702c4504eb4d4204000accd965fcd0680d994bf947eae308bc576e629bbaa3a4cefda3aea52
|
||||
DEPS mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-gettext
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gettext-0.19.8.1-10-any.pkg.tar.zst"
|
||||
SHA512 ebe948028942738918930b1f3b7aa0314ce0fb617dbd36dcfaf3980958555c7c476f2b50c21d272d01fd3b0bb87ac4f800e485a5b7f8fcc7b30aacdf76740348
|
||||
DEPS mingw-w64-x86_64-expat mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libiconv
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-10.2.0-9-any.pkg.tar.zst"
|
||||
SHA512 b2952015e0b27c51219fe15d7550a349e6d73032bbe328f00d6654008c4bda28766d75ce8898d765879ec5f4815695d0f047d01811d8253ed2d433cd5c77d5a9
|
||||
DEPS mingw-w64-x86_64-gmp mingw-w64-x86_64-libwinpthread mingw-w64-x86_64-mpc mingw-w64-x86_64-mpfr
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpc-1.2.0-2-any.pkg.tar.zst"
|
||||
SHA512 f094b3ec407382018b3454afa07ea82b94acf3b92c094c46ab6d27e56cd2647cf5bc4986ecb18f8a5da721fd267dceba25353822e7cac33d9107604ac5d429bc
|
||||
DEPS mingw-w64-x86_64-mpfr
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpfr-4.1.0-3-any.pkg.tar.zst"
|
||||
SHA512 be8ad04e53804f18cfeec5b9cba1877af1516762de60891e115826fcfe95166751a68e24cdf351a021294e3189c31ce3c2db0ebf9c1d4d4ab6fea1468f73ced5
|
||||
DEPS mingw-w64-x86_64-gmp
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gmp-6.2.0-3-any.pkg.tar.zst"
|
||||
SHA512 2736ba40bd7cac4ed12aae3d677aa0b788b161d2488976fbbae0fc6cff9ab154a09c903c1eec38ffe408a41abc62fd6106b55e17d7826b6dc10e720053685b1f
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-expat-2.2.10-1-any.pkg.tar.zst"
|
||||
SHA512 ea3069abd7b9809186d1204479a49d605797535e5d618c5c4fc068511134ef9a277facd67fc47fa9a00da2018db90291190fdb2187cb6a7bd99331a1c0c7e119
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libffi-3.3-3-any.pkg.tar.zst"
|
||||
SHA512 6d7700e218018454e406737108c40328038deb8d159b147b4159192d01fb72f8df90a81cf769c0b452fdab1f2ff110ead2e1894e3804f7e827fa2770349c63f8
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libiconv-1.16-2-any.pkg.tar.zst"
|
||||
SHA512 542ed5d898a57a79d3523458f8f3409669b411f87d0852bb566d66f75c96422433f70628314338993461bcb19d4bfac4dadd9d21390cb4d95ef0445669288658
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-zlib-1.2.11-9-any.pkg.tar.zst"
|
||||
SHA512 f386d3a8d8c169a62a4580af074b7fdc0760ef0fde22ef7020a349382dd374a9e946606c757d12da1c1fe68baf5e2eaf459446e653477035a63e0e20df8f4aa0
|
||||
)
|
||||
msys_package(
|
||||
z_vcpkg_acquire_msys_declare_package(
|
||||
NAME "mingw-w64-x86_64-libwinpthread"
|
||||
URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst"
|
||||
NAME mingw-w64-x86_64-libwinpthread
|
||||
VERSION git-8.0.0.5906.c9a21571-1
|
||||
ANY
|
||||
ZST
|
||||
REPO mingw/x86_64
|
||||
SHA512 a6969a5db1c55ba458c1a047d0a2a9d2db6cc24266ea47f740598b149a601995d2de734a0984ac5e57ee611d5982cbc03fd6fc0f498435e8d6401bf15724caad
|
||||
)
|
||||
|
||||
if(PACKAGES)
|
||||
message(FATAL_ERROR "Unknown packages were required for vcpkg_acquire_msys(${_am_PACKAGES}): ${PACKAGES}\nThis can be resolved by explicitly passing URL/SHA pairs to DIRECT_PACKAGES.")
|
||||
if(NOT Z_VCPKG_MSYS_PACKAGES STREQUAL "")
|
||||
message(FATAL_ERROR "Unknown packages were required for vcpkg_acquire_msys(${arg_PACKAGES}): ${packages}
|
||||
This can be resolved by explicitly passing URL/SHA pairs to DIRECT_PACKAGES.")
|
||||
endif()
|
||||
|
||||
string(SHA512 TOTAL_HASH "${TOTAL_HASH}")
|
||||
string(SUBSTRING "${TOTAL_HASH}" 0 16 TOTAL_HASH)
|
||||
set(PATH_TO_ROOT ${DOWNLOADS}/tools/msys2/${TOTAL_HASH})
|
||||
if(NOT EXISTS "${PATH_TO_ROOT}")
|
||||
file(REMOVE_RECURSE ${PATH_TO_ROOT}.tmp)
|
||||
file(MAKE_DIRECTORY ${PATH_TO_ROOT}.tmp/tmp)
|
||||
set(I 0)
|
||||
foreach(ARCHIVE IN LISTS ARCHIVES)
|
||||
string(SHA512 total_hash "${Z_VCPKG_MSYS_TOTAL_HASH}")
|
||||
string(SUBSTRING "${total_hash}" 0 16 total_hash)
|
||||
set(path_to_root "${DOWNLOADS}/tools/msys2/${total_hash}")
|
||||
if(NOT EXISTS "${path_to_root}")
|
||||
file(REMOVE_RECURSE "${path_to_root}.tmp")
|
||||
file(MAKE_DIRECTORY "${path_to_root}.tmp/tmp")
|
||||
set(index 0)
|
||||
foreach(archive IN LISTS Z_VCPKG_MSYS_ARCHIVES)
|
||||
vcpkg_execute_required_process(
|
||||
ALLOW_IN_DOWNLOAD_MODE
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE}
|
||||
LOGNAME msys-${TARGET_TRIPLET}-${I}
|
||||
WORKING_DIRECTORY ${PATH_TO_ROOT}.tmp
|
||||
COMMAND "${CMAKE_COMMAND}" -E tar xzf "${archive}"
|
||||
LOGNAME "msys-${TARGET_TRIPLET}-${index}"
|
||||
WORKING_DIRECTORY "${path_to_root}.tmp"
|
||||
)
|
||||
math(EXPR I "${I} + 1")
|
||||
math(EXPR index "${index} + 1")
|
||||
endforeach()
|
||||
file(RENAME ${PATH_TO_ROOT}.tmp ${PATH_TO_ROOT})
|
||||
file(RENAME "${path_to_root}.tmp" "${path_to_root}")
|
||||
endif()
|
||||
# Due to skipping the regular MSYS2 installer,
|
||||
# some config files need to be established explicitly.
|
||||
if(NOT EXISTS "${PATH_TO_ROOT}/etc/fstab")
|
||||
if(NOT EXISTS "${path_to_root}/etc/fstab")
|
||||
# This fstab entry removes the cygdrive prefix from paths.
|
||||
file(WRITE "${PATH_TO_ROOT}/etc/fstab" "none / cygdrive binary,posix=0,noacl,user 0 0")
|
||||
file(WRITE "${path_to_root}/etc/fstab" "none / cygdrive binary,posix=0,noacl,user 0 0")
|
||||
endif()
|
||||
message(STATUS "Using msys root at ${PATH_TO_ROOT}")
|
||||
set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE)
|
||||
message(STATUS "Using msys root at ${path_to_root}")
|
||||
set("${out_msys_root}" "${path_to_root}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
@ -40,60 +40,59 @@ Library linkage for which the build should fail early.
|
||||
#]===]
|
||||
|
||||
function(vcpkg_fail_port_install)
|
||||
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _csc "ALWAYS" "MESSAGE" "ON_TARGET;ON_ARCH;ON_CRT_LINKAGE;ON_LIBRARY_LINKAGE")
|
||||
if(DEFINED _csc_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unknown arguments passed to vcpkg_fail_port_install. Please correct the portfile!")
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "arg" "ALWAYS" "MESSAGE" "ON_TARGET;ON_ARCH;ON_CRT_LINKAGE;ON_LIBRARY_LINKAGE")
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "vcpkg_fail_port_install was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
if(DEFINED _csc_MESSAGE)
|
||||
set(_csc_MESSAGE "${_csc_MESSAGE}\n")
|
||||
if(DEFINED arg_MESSAGE)
|
||||
string(APPEND arg_MESSAGE "\n")
|
||||
else()
|
||||
set(_csc_MESSAGE "")
|
||||
set(arg_MESSAGE "")
|
||||
endif()
|
||||
|
||||
unset(_fail_port)
|
||||
#Target fail check
|
||||
if(DEFINED _csc_ON_TARGET)
|
||||
foreach(_target ${_csc_ON_TARGET})
|
||||
string(TOUPPER ${_target} _target_upper)
|
||||
if(VCPKG_TARGET_IS_${_target_upper})
|
||||
set(_fail_port TRUE)
|
||||
set(_csc_MESSAGE "${_csc_MESSAGE}Target '${_target}' not supported by ${PORT}!\n")
|
||||
set(fail_port)
|
||||
# Target fail check
|
||||
if(DEFINED arg_ON_TARGET)
|
||||
foreach(target IN LISTS arg_ON_TARGET)
|
||||
string(TOUPPER "${target}" target_upper)
|
||||
if(VCPKG_TARGET_IS_${target_upper})
|
||||
set(fail_port TRUE)
|
||||
string(APPEND arg_MESSAGE "Target '${target}' not supported by ${PORT}!\n")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
#Architecture fail check
|
||||
if(DEFINED _csc_ON_ARCH)
|
||||
foreach(_arch ${_csc_ON_ARCH})
|
||||
if(${VCPKG_TARGET_ARCHITECTURE} MATCHES ${_arch})
|
||||
set(_fail_port TRUE)
|
||||
set(_csc_MESSAGE "${_csc_MESSAGE}Architecture '${_arch}' not supported by ${PORT}!\n")
|
||||
# Architecture fail check
|
||||
if(DEFINED arg_ON_ARCH)
|
||||
foreach(arch IN LISTS arg_ON_ARCH)
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL arch)
|
||||
set(fail_port TRUE)
|
||||
string(APPEND arg_MESSAGE "Architecture '${arch}' not supported by ${PORT}!\n")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
#CRT linkage fail check
|
||||
if(DEFINED _csc_ON_CRT_LINKAGE)
|
||||
foreach(_crt_link ${_csc_ON_CRT_LINKAGE})
|
||||
if("${VCPKG_CRT_LINKAGE}" MATCHES "${_crt_link}")
|
||||
set(_fail_port TRUE)
|
||||
set(_csc_MESSAGE "${_csc_MESSAGE}CRT linkage '${VCPKG_CRT_LINKAGE}' not supported by ${PORT}!\n")
|
||||
# CRT linkage fail check
|
||||
if(DEFINED arg_ON_CRT_LINKAGE)
|
||||
foreach(crt_linkage IN LISTS arg_ON_CRT_LINKAGE)
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL crt_linkage)
|
||||
set(fail_port TRUE)
|
||||
string(APPEND arg_MESSAGE "CRT linkage '${VCPKG_CRT_LINKAGE}' not supported by ${PORT}!\n")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
#Library linkage fail check
|
||||
if(DEFINED _csc_ON_LIBRARY_LINKAGE)
|
||||
foreach(_lib_link ${_csc_ON_LIBRARY_LINKAGE})
|
||||
if("${VCPKG_LIBRARY_LINKAGE}" MATCHES "${_lib_link}")
|
||||
set(_fail_port TRUE)
|
||||
set(_csc_MESSAGE "${_csc_MESSAGE}Library linkage '${VCPKG_LIBRARY_LINKAGE}' not supported by ${PORT}!\n")
|
||||
# Library linkage fail check
|
||||
if(DEFINED arg_ON_LIBRARY_LINKAGE)
|
||||
foreach(library_linkage IN LISTS arg_ON_LIBRARY_LINKAGE)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL library_linkage)
|
||||
set(fail_port TRUE)
|
||||
string(APPEND arg_MESSAGE "Library linkage '${VCPKG_LIBRARY_LINKAGE}' not supported by ${PORT}!\n")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(_fail_port OR _csc_ALWAYS)
|
||||
message(FATAL_ERROR ${_csc_MESSAGE})
|
||||
if(fail_port OR arg_ALWAYS)
|
||||
message(FATAL_ERROR ${arg_MESSAGE})
|
||||
endif()
|
||||
endfunction()
|
||||
|
@ -1,4 +0,0 @@
|
||||
function(vcpkg_internal_escape_regex_control_characters out_var string_with_regex_characters)
|
||||
string(REGEX REPLACE "[][+.*()^\\$?|]" "\\\\\\0" _escaped_content "${string_with_regex_characters}")
|
||||
set(${out_var} "${_escaped_content}" PARENT_SCOPE)
|
||||
endfunction()
|
@ -31,9 +31,13 @@ This should only be used for edge cases, such as patches that are known to fail
|
||||
function(z_vcpkg_apply_patches)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "arg" "QUIET" "SOURCE_PATH" "PATCHES")
|
||||
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "internal error: z_vcpkg_apply_patches was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
find_program(GIT NAMES git git.cmd REQUIRED)
|
||||
if(DEFINED ENV{GIT_CONFIG_NOSYSTEM})
|
||||
set(git_config_nosystem_backuP "$ENV{GIT_CONFIG_NOSYSTEM}")
|
||||
set(git_config_nosystem_backup "$ENV{GIT_CONFIG_NOSYSTEM}")
|
||||
else()
|
||||
unset(git_config_nosystem_backup)
|
||||
endif()
|
||||
@ -43,7 +47,7 @@ function(z_vcpkg_apply_patches)
|
||||
foreach(patch IN LISTS arg_PATCHES)
|
||||
get_filename_component(absolute_patch "${patch}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}")
|
||||
message(STATUS "Applying patch ${patch}")
|
||||
set(logname patch-${TARGET_TRIPLET}-${patchnum})
|
||||
set(logname "patch-${TARGET_TRIPLET}-${patchnum}")
|
||||
vcpkg_execute_in_download_mode(
|
||||
COMMAND "${GIT}" -c core.longpaths=true -c core.autocrlf=false --work-tree=. --git-dir=.git apply "${absolute_patch}" --ignore-whitespace --whitespace=nowarn --verbose
|
||||
OUTPUT_FILE "${CURRENT_BUILDTREES_DIR}/${logname}-out.log"
|
||||
|
@ -0,0 +1,8 @@
|
||||
function(z_vcpkg_escape_regex_control_characters out_var string)
|
||||
if(ARGC GREATER "2")
|
||||
message(FATAL_ERROR "z_vcpkg_escape_regex_control_characters passed extra arguments: ${ARGN}")
|
||||
endif()
|
||||
# uses | instead of [] to avoid confusion; additionally, CMake doesn't support `]` in a `[]`
|
||||
string(REGEX REPLACE [[\[|\]|\(|\)|\.|\+|\*|\^|\\|\$|\?|\|]] [[\\\0]] escaped_content "${string}")
|
||||
set("${out_var}" "${escaped_content}" PARENT_SCOPE)
|
||||
endfunction()
|
@ -1,3 +1,4 @@
|
||||
# rebuild: 1
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
set(SCRIPTS "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Location to stored scripts")
|
||||
@ -60,9 +61,6 @@ if(CMD MATCHES "^BUILD$")
|
||||
unset(PACKAGES_DIR)
|
||||
unset(BUILDTREES_DIR)
|
||||
|
||||
# NOTE: this was originally done by emptying out ${CURRENT_PACKAGES_DIR}
|
||||
# using file(GLOB). This fails with files containing either `;` or `[`:
|
||||
# as a best effort to support these files, this now just deletes the entire directory.
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}")
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}")
|
||||
|
Loading…
Reference in New Issue
Block a user