aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-26 13:47:52 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-26 13:47:52 -0700
commit7147ef13eb23274ff387aee16600e7dab7298a64 (patch)
tree60f15c3ba0ed0c4b6eb6efe4ea29d0e29d1820dc
parentcdfa4ea1dfa682fe27d2484ba7a36c45c58f5501 (diff)
parent2491a16b0dd4bb88d48cd582e12e953c50a24b10 (diff)
downloadvcpkg-7147ef13eb23274ff387aee16600e7dab7298a64.tar.gz
vcpkg-7147ef13eb23274ff387aee16600e7dab7298a64.zip
Merge branch 'Add-mirror-support' of https://github.com/Ninetainedo/vcpkg into Ninetainedo-Add-mirror-support
-rw-r--r--ports/boost/portfile.cmake2
-rw-r--r--ports/cocos2d/portfile.cmake4
-rw-r--r--ports/curl/portfile.cmake2
-rw-r--r--ports/doctest/portfile.cmake2
-rw-r--r--ports/eigen3/portfile.cmake2
-rw-r--r--ports/expat/portfile.cmake2
-rw-r--r--ports/fmt/portfile.cmake2
-rw-r--r--ports/freetype/portfile.cmake2
-rw-r--r--ports/glew/portfile.cmake2
-rw-r--r--ports/glfw3/portfile.cmake2
-rw-r--r--ports/glm/portfile.cmake2
-rw-r--r--ports/gsl/portfile.cmake2
-rw-r--r--ports/libjpeg-turbo/portfile.cmake2
-rw-r--r--ports/libpng/portfile.cmake2
-rw-r--r--ports/libuv/portfile.cmake2
-rw-r--r--ports/libwebsockets/portfile.cmake2
-rw-r--r--ports/mpg123/portfile.cmake2
-rw-r--r--ports/mpir/portfile.cmake2
-rw-r--r--ports/openal-soft/portfile.cmake2
-rw-r--r--ports/openssl/portfile.cmake2
-rw-r--r--ports/range-v3/portfile.cmake2
-rw-r--r--ports/rapidjson/portfile.cmake2
-rw-r--r--ports/rapidxml/portfile.cmake2
-rw-r--r--ports/sdl2/portfile.cmake2
-rw-r--r--ports/sery/portfile.cmake2
-rw-r--r--ports/sqlite3/portfile.cmake2
-rw-r--r--ports/stb/portfile.cmake2
-rw-r--r--ports/tcl/portfile.cmake2
-rw-r--r--ports/tiff/portfile.cmake2
-rw-r--r--ports/tinyxml2/portfile.cmake2
-rw-r--r--ports/tk/portfile.cmake2
-rw-r--r--ports/zlib/portfile.cmake2
-rw-r--r--scripts/cmake/vcpkg_download_distfile.cmake58
-rw-r--r--scripts/templates/portfile.in.cmake2
34 files changed, 79 insertions, 47 deletions
diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake
index 89839d549..e5ee25073 100644
--- a/ports/boost/portfile.cmake
+++ b/ports/boost/portfile.cmake
@@ -1,6 +1,6 @@
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"
+ URLS "http://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.bz2"
FILENAME "boost_1_61_0.tar.bz2"
SHA512 a1c7338e2d2dbac8552ede7c554640d22cbb2fda7fbc325dc3cdcb51e769713626695426ffc158cbe0e1729dd9a7b5ad18af4800d74e24539e8d8564268c2b9d
)
diff --git a/ports/cocos2d/portfile.cmake b/ports/cocos2d/portfile.cmake
index b39180b40..6359055f1 100644
--- a/ports/cocos2d/portfile.cmake
+++ b/ports/cocos2d/portfile.cmake
@@ -1,11 +1,11 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE_FILE
- URL "https://github.com/cocos2d/cocos2d-x/archive/cocos2d-x-3.10.tar.gz"
+ URLS "https://github.com/cocos2d/cocos2d-x/archive/cocos2d-x-3.10.tar.gz"
FILENAME "cocos2d-x-3.10.tar.gz"
MD5 7c67068675ad28374448e844b0e463ff
)
vcpkg_download_distfile(DEPS_ARCHIVE_FILE
- URL "https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-79.zip"
+ URLS "https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-79.zip"
FILENAME "cocos2d-x-v3-deps-79.zip"
MD5 5d88ff867205080b9ee8da532437e891
)
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
index a4ea250c0..168d5f0ff 100644
--- a/ports/curl/portfile.cmake
+++ b/ports/curl/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE_FILE
- URL "https://curl.haxx.se/download/curl-7.48.0.tar.bz2"
+ URLS "https://curl.haxx.se/download/curl-7.48.0.tar.bz2"
FILENAME "curl-7.48.0.tar.bz2"
SHA512 9bb554eaf4ccaced0fa9b38de4f381eab84b96c1aa07a45d83ddfd38a925044d0fe9fac517263f67f009d2294a31c33dedb2267defbab0cb14f96091bbed5f92
)
diff --git a/ports/doctest/portfile.cmake b/ports/doctest/portfile.cmake
index 46a3abe71..54228c716 100644
--- a/ports/doctest/portfile.cmake
+++ b/ports/doctest/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/onqtam/doctest/archive/1.1.0.zip"
+ URLS "https://github.com/onqtam/doctest/archive/1.1.0.zip"
FILENAME "doctest-1.1.0.zip"
SHA512 3cbdbb82d2dceff5a34aaed45222832c5767f21b64b271c41c2da7bae1f9e364a60758a8b6ce64285999afc30dd76de980e287663fa3119d0bcc1d2b45514e0b
)
diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake
index 921058803..763143a05 100644
--- a/ports/eigen3/portfile.cmake
+++ b/ports/eigen3/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "http://bitbucket.org/eigen/eigen/get/3.2.9.tar.bz2"
+ URLS "http://bitbucket.org/eigen/eigen/get/3.2.9.tar.bz2"
FILENAME "eigen-3.2.9.tar.bz2"
SHA512 2734ce70e0b04dc5839715a3cc9b8f90e05b341cfca42a7d586df213a9a14fe5642c76ccf36c16d020ae167c0d6e4d5cc306f0b3bf1f519c58372b0736ca7e63
)
diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake
index e0f0d06e0..ea0f0f723 100644
--- a/ports/expat/portfile.cmake
+++ b/ports/expat/portfile.cmake
@@ -1,6 +1,6 @@
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"
+ URLS "http://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2"
FILENAME "expat-2.1.1.tar.bz2"
SHA512 088e2ef3434f2affd4fc79fe46f0e9826b9b4c3931ddc780cd18892f1cd1e11365169c6807f45916a56bb6abcc627dcd17a23f970be0bf464f048f5be2713628
)
diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake
index 74cdd60be..49a0f3ef5 100644
--- a/ports/fmt/portfile.cmake
+++ b/ports/fmt/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE_FILE
- URL "https://github.com/fmtlib/fmt/archive/3.0.0.tar.gz"
+ URLS "https://github.com/fmtlib/fmt/archive/3.0.0.tar.gz"
FILENAME "fmt-3.0.0.tar.gz"
SHA512 20c9b1ffe8b46cb5d22015122fc698a75ad854709d3de1a1316b6040d86f54bada4e6d7263f2f1fd94cb13ac37ee9447c162c6aec3f3af650455e8a8a9804871
)
diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake
index 750f1a9e4..c618cb23a 100644
--- a/ports/freetype/portfile.cmake
+++ b/ports/freetype/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "http://download.savannah.gnu.org/releases/freetype/freetype-2.6.3.tar.bz2"
+ URLS "http://download.savannah.gnu.org/releases/freetype/freetype-2.6.3.tar.bz2"
FILENAME "freetype-2.6.3.tar.bz2"
SHA512 e1f9018835fc88beeb4479537b59f866c52393ae18d24a1e0710a464cf948ab02b35c2c6043bc20c1db3a04871ee4eb0bb1d210550c0ea2780c8b1aea98fbf0d
)
diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake
index 273d7041b..cd7bbdf9d 100644
--- a/ports/glew/portfile.cmake
+++ b/ports/glew/portfile.cmake
@@ -1,6 +1,6 @@
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"
+ URLS "http://downloads.sourceforge.net/project/glew/glew/1.13.0/glew-1.13.0.tgz"
FILENAME "glew-1.13.0.tgz"
SHA512 8fc8d7c0d2cd9235ea51db9972f492701827bff40642fdb3cc54c10b0737dba8e6d8d0dcd8c5aa5bfaaae39c6198ba3d4292cd1662fbe1977eb9a5d187ba635f
)
diff --git a/ports/glfw3/portfile.cmake b/ports/glfw3/portfile.cmake
index 25438b420..6d14c34fe 100644
--- a/ports/glfw3/portfile.cmake
+++ b/ports/glfw3/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip"
+ URLS "https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip"
FILENAME "glfw-3.1.2.zip"
SHA512 c199137b32182182123869fe69ab991a296feb80dcf3db3cf5e070cdaef31ed958148d9b87e724c1937fa535960122bdceb92ea9dd38f7ef41e4e08e36210fe5
)
diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake
index 63540f95d..715310149 100644
--- a/ports/glm/portfile.cmake
+++ b/ports/glm/portfile.cmake
@@ -1,6 +1,6 @@
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"
+ URLS "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"
SHA512 5fe9d1f582e7bbef37fd23c9d10fd9cf7696bb7c6f8086a250248e97f84b0205a89a195c8838a1ddc4c0a4cb4c69d1764f90db6513a9691a94877b7ec6b2befb
)
diff --git a/ports/gsl/portfile.cmake b/ports/gsl/portfile.cmake
index 53d5556d6..4c7e9f051 100644
--- a/ports/gsl/portfile.cmake
+++ b/ports/gsl/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/Microsoft/GSL/archive/fd5ad87bf25cb5e87104ee58106dee9bc809cd93.zip"
+ URLS "https://github.com/Microsoft/GSL/archive/fd5ad87bf25cb5e87104ee58106dee9bc809cd93.zip"
FILENAME "gsl-fd5ad87bf.zip"
SHA512 81887be57e12bfc4e67353713478e1638bf1bffb8f523cf7241acf5415c2e3fe82ea0c0128380dcb2008afb5f53ac0d4893660626a8cd1eb501da536e6af5692
)
diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake
index 46670d277..a6227ddd6 100644
--- a/ports/libjpeg-turbo/portfile.cmake
+++ b/ports/libjpeg-turbo/portfile.cmake
@@ -2,7 +2,7 @@ include(vcpkg_common_functions)
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"
+ URLS "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/1.4.90.zip"
FILENAME "libjpeg-turbo-1.4.90.zip"
SHA512 43c3d26c70a7356bb0832276fe82eead040c3f4aa17df118f91a38615bfacfdfb25fab41965f9ca2b69d18e0b937a1bb753e93fa2c114e01d5174fc1100010b4
)
diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake
index f376201f2..482b72bad 100644
--- a/ports/libpng/portfile.cmake
+++ b/ports/libpng/portfile.cmake
@@ -2,7 +2,7 @@ include(vcpkg_common_functions)
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"
+ URLS "http://download.sourceforge.net/libpng/libpng-1.6.24.tar.xz"
FILENAME "libpng-1.6.24.tar.xz"
SHA512 7eccb90f530a9c728e280b2b1776304a808b5deea559632e7bcf4ea219c7cb5e453aa810215465304501127595000717d4b7c5b26a9f8e22e236ec04af53a90f
)
diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake
index 480856cfb..2e0002b4e 100644
--- a/ports/libuv/portfile.cmake
+++ b/ports/libuv/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/libuv/libuv/archive/v1.9.1.zip"
+ URLS "https://github.com/libuv/libuv/archive/v1.9.1.zip"
FILENAME "libuv-v1.9.1.zip"
SHA512 3eb8711e3612fb3f5a1ddeb4614b2bec29c022ac5c6c2590bc5239825d758a73be0819c52747956a029859ef4e416bf3fce16665bac2c6c4890f736b47c38226
)
diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake
index ba95019e3..7b8a2c918 100644
--- a/ports/libwebsockets/portfile.cmake
+++ b/ports/libwebsockets/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/warmcat/libwebsockets/archive/v2.0.0.zip"
+ URLS "https://github.com/warmcat/libwebsockets/archive/v2.0.0.zip"
FILENAME "libwebsockets-v2.0.0.zip"
SHA512 bf57a46f2c60095e7e6ec6656b185ffd2cf8f553bc22255ae8f6825d3613316d794f139cdefacbdf60ef997b0cd675fe356813d406c9b7c5a5ae838ce5326042
)
diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake
index f92b26825..ac2e7e7ca 100644
--- a/ports/mpg123/portfile.cmake
+++ b/ports/mpg123/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "http://downloads.sourceforge.net/project/mpg123/mpg123/1.23.3/mpg123-1.23.3.tar.bz2"
+ URLS "http://downloads.sourceforge.net/project/mpg123/mpg123/1.23.3/mpg123-1.23.3.tar.bz2"
FILENAME "mpg123-1.23.3.tar.bz2"
SHA512 a5ebfb36223a3966386bc8e5769b8543861872d20f9de037d07857e857000f20e198e0b1db04bdc56b18b19d5b4027d8261a104af0216d6ea45274b21a18dda4
)
diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake
index 7e9103ec7..ff1489291 100644
--- a/ports/mpir/portfile.cmake
+++ b/ports/mpir/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE_FILE
- URL "http://mpir.org/mpir-2.7.2.tar.lz"
+ URLS "http://mpir.org/mpir-2.7.2.tar.lz"
FILENAME "mpir-2.7.2.tar.lz"
SHA512 2635c167ddbba99364ec741373768e0675d34f94fad8912d5433b95e6fbfdb0510f5e94a707acc42048254bc658c52c6671bb0c0dac31267c4b82b00c3e74efa
)
diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake
index 22129cc87..d80bc373c 100644
--- a/ports/openal-soft/portfile.cmake
+++ b/ports/openal-soft/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "http://openal-soft.org/openal-releases/openal-soft-1.17.2.tar.bz2"
+ URLS "http://openal-soft.org/openal-releases/openal-soft-1.17.2.tar.bz2"
FILENAME "openal-soft-1.17.2.tar.bz2"
MD5 1764e0d8fec499589b47ebc724e0913d
SHA512 50c20cd3ddada55d91643a79c2894d5a14315d5fc1ed8e870e3d8d3f410e8b7d8da29b838226e7fce37fbeca719ff919b51806f72e4cd529a18fbe8bd68860e3
diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake
index 0d017bdfc..345ec8e3b 100644
--- a/ports/openssl/portfile.cmake
+++ b/ports/openssl/portfile.cmake
@@ -6,7 +6,7 @@ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}")
vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE
- URL "https://www.openssl.org/source/openssl-1.0.2h.tar.gz"
+ URLS "https://www.openssl.org/source/openssl-1.0.2h.tar.gz"
FILENAME "openssl-1.0.2h.tar.gz"
SHA512 780601f6f3f32f42b6d7bbc4c593db39a3575f9db80294a10a68b2b0bb79448d9bd529ca700b9977354cbdfc65887c76af0aa7b90d3ee421f74ab53e6f15c303
)
diff --git a/ports/range-v3/portfile.cmake b/ports/range-v3/portfile.cmake
index 66a908362..4f547c2c8 100644
--- a/ports/range-v3/portfile.cmake
+++ b/ports/range-v3/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/Microsoft/Range-V3-VS2015/archive/ede9ad367fd5ec764fecb039c874614bd908e6b6.zip"
+ URLS "https://github.com/Microsoft/Range-V3-VS2015/archive/ede9ad367fd5ec764fecb039c874614bd908e6b6.zip"
FILENAME "range-v3-ede9ad367fd5ec764fecb039c874614bd908e6b6.zip"
SHA512 e978c7694471d8616c248647b77689f377b3e2517347abde8629b140e5994de8bf686565a24cdd7dd222f325d43b775f5e478c91220dce75313985499b134637
)
diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake
index 3440428f0..53008daea 100644
--- a/ports/rapidjson/portfile.cmake
+++ b/ports/rapidjson/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/miloyip/rapidjson/archive/879def80f2e466cdf4c86dc7e53ea2dd4cafaea0.zip"
+ URLS "https://github.com/miloyip/rapidjson/archive/879def80f2e466cdf4c86dc7e53ea2dd4cafaea0.zip"
FILENAME "rapidjson-879def80f2e466cdf4c86dc7e53ea2dd4cafaea0.zip"
SHA512 4d9ef7cce7d179344c33245c081a142ca5fcb2a0cc170ed39e3d0add008efab8e7389feec03e1ea83b30c5778cd0600865b08bc1c23592e5154dbe1f21f9547d
)
diff --git a/ports/rapidxml/portfile.cmake b/ports/rapidxml/portfile.cmake
index 7cd885b7d..9551e17a5 100644
--- a/ports/rapidxml/portfile.cmake
+++ b/ports/rapidxml/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://sourceforge.net/projects/rapidxml/files/rapidxml/rapidxml%201.13/rapidxml-1.13.zip/download"
+ URLS "https://sourceforge.net/projects/rapidxml/files/rapidxml/rapidxml%201.13/rapidxml-1.13.zip/download"
FILENAME "rapidxml-1.13.zip"
SHA512 6c10583e6631ccdb0217d0a5381172cb4c1046226de6ef1acf398d85e81d145228e14c3016aefcd7b70a1db8631505b048d8b4f5d4b0dbf1811d2482eefdd265
)
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index 69c6d3672..0f0409160 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE_FILE
- URL "http://libsdl.org/release/SDL2-2.0.4.tar.gz"
+ URLS "http://libsdl.org/release/SDL2-2.0.4.tar.gz"
FILENAME "SDL2-2.0.4.tar.gz"
SHA512 dd0a95878639856c0f4b8a579ace8071379ab64519fa139b22d3ed857a0f0db87a75bc8480c7207e02fbffd1fdbd448e3c0b882c451675b0e2f1a945af02e1d6
)
diff --git a/ports/sery/portfile.cmake b/ports/sery/portfile.cmake
index 34ddb0248..94a236b85 100644
--- a/ports/sery/portfile.cmake
+++ b/ports/sery/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/Ninetainedo/Sery/archive/v1.0.zip"
+ URLS "https://github.com/Ninetainedo/Sery/archive/v1.0.zip"
FILENAME "sery-1.0.0.zip"
SHA512 15ef97bf094e8931049d8dd667a778e23847555f0f8d5b949b250e26edcc2541744fac5c34d935880d070546777fa787b1baf018d8ca2240fcd18a820aded04f
)
diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake
index 9cdb67bb6..75dfc73b5 100644
--- a/ports/sqlite3/portfile.cmake
+++ b/ports/sqlite3/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "http://www.sqlite.org/2016/sqlite-amalgamation-3120200.zip"
+ URLS "http://www.sqlite.org/2016/sqlite-amalgamation-3120200.zip"
FILENAME "sqlite-amalgamation-3120200.zip"
SHA512 92e1cc09dc4d4e9dd4c189e4a5061664f11971eb3e14c4c59e1f489f201411b08a31dae9e6fc50fffd49bb72f88ac3d99b7c7cd5e334b3079c165ee1c4f5a16e
)
diff --git a/ports/stb/portfile.cmake b/ports/stb/portfile.cmake
index dace9acd9..15414d0da 100644
--- a/ports/stb/portfile.cmake
+++ b/ports/stb/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/nothings/stb/archive/e713a69f1ea6ee1e0d55725ed0731520045a5993.zip"
+ URLS "https://github.com/nothings/stb/archive/e713a69f1ea6ee1e0d55725ed0731520045a5993.zip"
FILENAME "stb-e713a69f1ea6ee1e0d55725ed0731520045a5993.zip"
SHA512 28d73905e626bf286bc42e30bc50e8449912a9db5e421e09bfbd17790de1909fe9df19c96d6ad3125a6ae0947d45b11b83ee5965dab68d1eadd0c332e391400e
)
diff --git a/ports/tcl/portfile.cmake b/ports/tcl/portfile.cmake
index 16f9abdbd..d8b19097a 100644
--- a/ports/tcl/portfile.cmake
+++ b/ports/tcl/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "http://prdownloads.sourceforge.net/tcl/tcl8.6.5-src.tar.gz"
+ URLS "http://prdownloads.sourceforge.net/tcl/tcl8.6.5-src.tar.gz"
FILENAME "tcl8.6.5-src.tar.gz"
MD5 0e6426a4ca9401825fbc6ecf3d89a326
)
diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake
index e6d8d9cc6..ef770a2c5 100644
--- a/ports/tiff/portfile.cmake
+++ b/ports/tiff/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "http://download.osgeo.org/libtiff/tiff-4.0.6.tar.gz"
+ URLS "http://download.osgeo.org/libtiff/tiff-4.0.6.tar.gz"
FILENAME "tiff-4.0.6.tar.gz"
SHA512 2c8dbaaaab9f82a7722bfe8cb6fcfcf67472beb692f1b7dafaf322759e7016dad1bc58457c0f03db50aa5bd088fef2b37358fcbc1524e20e9e14a9620373fdf8
)
diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake
index 4611ee94c..3e29b857c 100644
--- a/ports/tinyxml2/portfile.cmake
+++ b/ports/tinyxml2/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "https://github.com/leethomason/tinyxml2/archive/3.0.0.zip"
+ URLS "https://github.com/leethomason/tinyxml2/archive/3.0.0.zip"
FILENAME "tinyxml2-3.0.0.zip"
SHA512 3581e086e41ea01418fdf74e53b932c41cada9a45b73fb71c15424672182dc2a1e55110f030962ae44df6f5d9f060478c5b04373f886da843a78fcabae8b063c
)
diff --git a/ports/tk/portfile.cmake b/ports/tk/portfile.cmake
index 8b5f1f36e..0391b0b30 100644
--- a/ports/tk/portfile.cmake
+++ b/ports/tk/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "http://prdownloads.sourceforge.net/tcl/tk8.6.5-src.tar.gz"
+ URLS "http://prdownloads.sourceforge.net/tcl/tk8.6.5-src.tar.gz"
FILENAME "tk8.6.5-src.tar.gz"
MD5 11dbbd425c3e0201f20d6a51482ce6c4
)
diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake
index 461304ffe..82c5caded 100644
--- a/ports/zlib/portfile.cmake
+++ b/ports/zlib/portfile.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE_FILE
- URL "http://zlib.net/zlib128.zip"
+ URLS "http://zlib.net/zlib128.zip"
FILENAME "zlib128.zip"
SHA512 b0d7e71eca9032910c56fc1de6adbdc4f915bdeafd9a114591fc05701893004ef3363add8ad0e576c956b6be158f2fc339ab393f2dd40e8cc8c2885d641d807b
)
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake
index 3145c8851..44b562573 100644
--- a/scripts/cmake/vcpkg_download_distfile.cmake
+++ b/scripts/cmake/vcpkg_download_distfile.cmake
@@ -1,20 +1,52 @@
-# Usage: vcpkg_download_distfile(<VAR> URL <http://...> FILENAME <output.zip> SHA512 <5981de...>)
+# Usage: vcpkg_download_distfile(<VAR> URLS <http://mainUrl> <http://mirror1> <http://mirror2> FILENAME <output.zip> SHA512 <5981de...>)
function(vcpkg_download_distfile VAR)
- set(oneValueArgs URL FILENAME SHA512)
- cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "" ${ARGN})
+ set(oneValueArgs FILENAME SHA512)
+ set(multipleValuesArgs URLS)
+ cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
+ set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME})
- if(EXISTS ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME})
- message(STATUS "Using cached ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}")
- file(SHA512 ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} FILE_HASH)
- if(NOT FILE_HASH STREQUAL "${vcpkg_download_distfile_SHA512}")
+ function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE)
+ message(STATUS "Testing integrity of ${FILE_KIND}...")
+ file(SHA512 ${downloaded_file_path} 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_SHA512}'\n"
- "Please delete the file and try again if this file should be downloaded again.")
+ "\nFile does not have expected hash:\n"
+ " File path: [ ${downloaded_file_path} ]\n"
+ " Expected hash: [ ${vcpkg_download_distfile_SHA512} ]\n"
+ " Actual hash: [ ${FILE_HASH} ]\n"
+ "${CUSTOM_ERROR_ADVICE}\n")
endif()
+ message(STATUS "Testing integrity of ${FILE_KIND}... OK")
+ endfunction()
+
+ if(EXISTS ${downloaded_file_path})
+ message(STATUS "Using cached ${downloaded_file_path}")
+ test_hash("cached file" "Please delete the file and retry if this file should be downloaded again.")
else()
- message(STATUS "Downloading ${vcpkg_download_distfile_URL}")
- file(DOWNLOAD ${vcpkg_download_distfile_URL} ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} EXPECTED_HASH SHA512=${vcpkg_download_distfile_SHA512})
+ # Tries to download the file.
+ foreach(url IN LISTS vcpkg_download_distfile_URLS)
+ message(STATUS "Downloading ${url}...")
+ file(DOWNLOAD ${url} ${downloaded_file_path} STATUS download_status)
+ list(GET download_status 0 status_code)
+ if (NOT "${status_code}" STREQUAL "0")
+ message(STATUS "Downloading ${url}... Failed. Status: ${download_status}")
+ file(REMOVE ${downloaded_file_path})
+ set(download_success 0)
+ else()
+ message(STATUS "Downloading ${url}... OK")
+ set(download_success 1)
+ break()
+ endif()
+ endforeach(url)
+
+ if (NOT ${download_success})
+ message(FATAL_ERROR
+ "\n"
+ " Failed to download file.\n"
+ " Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues\n")
+ else()
+ test_hash("downloaded file" "The file may be corrupted.")
+ endif()
endif()
- set(${VAR} ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME} PARENT_SCOPE)
+ set(${VAR} ${downloaded_file_path} PARENT_SCOPE)
endfunction()
diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake
index 99a3ac3e8..f74c89aca 100644
--- a/scripts/templates/portfile.in.cmake
+++ b/scripts/templates/portfile.in.cmake
@@ -1,6 +1,6 @@
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
- URL "@URL@"
+ URLS "@URL@"
FILENAME "@FILENAME@"
SHA512 @SHA512@
)