[vcpkg_from_sourceforge] Add retry mirror function (2/2) (#12018)

This commit is contained in:
Jack·Boos·Yu 2020-07-03 09:36:40 -07:00 committed by GitHub
parent 3d2a7ca33e
commit 21b56d9929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 134 additions and 59 deletions

View File

@ -4,10 +4,10 @@ Download and extract a project from sourceforge.
## Usage:
```cmake
vcpkg_from_sourceforge(
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO <cunit/CUnit>
[REF <2.1-3>]
[REF <2.1-3>]
SHA512 <547b417109332...>
FILENAME <CUnit-2.1-3.tar.bz2>
[DISABLE_SSL]

View File

@ -1,4 +1,4 @@
Source: argtable2
Version: 2.13-5
Version: 2.13-7
Homepage: http://argtable.sourceforge.net
Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss.

View File

@ -1,5 +1,5 @@
Source: cairo
Version: 1.16.0-5
Version: 1.16.0-6
Homepage: https://cairographics.org
Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
Build-Depends: zlib, libpng, pixman, freetype, fontconfig

View File

@ -1,4 +1,4 @@
Source: cunit
Version: 2.1.3-4
Version: 2.1.3-6
Homepage: https://sourceforge.net/projects/cunit/
Description: CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces

View File

@ -1,5 +1,5 @@
Source: epsilon
Version: 0.9.2-2
Version: 0.9.2-4
Homepage: https://sourceforge.net/projects/epsilon-project/
Description: EPSILON is an Open Source wavelet image compressor, that is aimed on parallel and robust image processing.
Build-Depends: libpopt

View File

@ -1,4 +1,4 @@
Source: freeglut
Version: 3.2.1-2
Version: 3.2.1-4
Homepage: https://sourceforge.net/projects/freeglut/
Description: Open source implementation of GLUT with source and binary backwards compatibility.

View File

@ -1,5 +1,5 @@
Source: freeimage
Version: 3.18.0-10
Version: 3.18.0-12
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp (!uwp), libraw, jxrlib, openexr
Homepage: https://sourceforge.net/projects/freeimage/
Description: Support library for graphics image formats

View File

@ -1,4 +1,4 @@
Source: geographiclib
Version: 1.47-patch1-14
Version: 1.47-patch1-16
Homepage: https://sourceforge.net/projects/geographiclib/
Description: a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems.

View File

@ -1,4 +1,4 @@
Source: giflib
Version: 5.1.4-4
Version: 5.1.4-6
Homepage: https://sourceforge.net/projects/giflib/
Description: A library for reading and writing gif images.

View File

@ -1,5 +1,5 @@
Source: gsoap
Version: 2.8.102-1
Version: 2.8.102-4
Build-Depends: curl
Homepage: https://sourceforge.net/projects/gsoap2/
Description: The gSOAP toolkit is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings.

View File

@ -1,5 +1,5 @@
Source: healpix
Version: 1.12.10-2
Version: 1.12.10-5
Homepage: http://healpix.sourceforge.net/
Description: HEALPix is an acronym for Hierarchical Equal Area isoLatitude Pixelation of a sphere.
Build-Depends: cfitsio

View File

@ -1,5 +1,5 @@
Source: irrlicht
Version: 1.8.4-8
Version: 1.8.4-10
Homepage: http://irrlicht.sourceforge.net
Description: Irrlicht lightning fast 3d engine
Build-Depends: zlib, libpng, bzip2, libjpeg-turbo

View File

@ -1,4 +1,4 @@
Source: itpp
Version: 4.3.1-3
Version: 4.3.1-5
Homepage: http://itpp.sourceforge.net
Description: IT++ is a C++ library of mathematical, signal processing and communication classes and functions. Its main use is in simulation of communication systems and for performing research in the area of communications.

View File

@ -1,4 +1,4 @@
Source: libaiff
Version: 5.0-4
Version: 5.0-6
Homepage: https://sourceforge.net/projects/aifftools
Description: LibAiff is an open-source library, providing C applications transparent read & write operations for Audio Interchange File Format (AIFF) files, with the goal of supporting all of its features

View File

@ -1,4 +1,4 @@
Source: libdisasm
Version: 0.23-5
Version: 0.23-7
Homepage: https://sourceforge.net/projects/bastard
Description: x86 Disassembler Library.

View File

@ -1,4 +1,4 @@
Source: libmad
Version: 0.15.1-6
Version: 0.15.1-8
Homepage: http://www.mars.org/home/rob/proj/mpeg/
Description: high-quality MPEG audio decoder

View File

@ -1,5 +1,5 @@
Source: libmikmod
Version: 3.3.11.1-6
Version: 3.3.11.1-8
Homepage: https://sourceforge.net/projects/mikmod/
Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm.
Build-Depends: openal-soft

View File

@ -1,5 +1,5 @@
Source: libnice
Version: 0.1.15-3
Version: 0.1.15-4
Homepage: https://nice.freedesktop.org
Description: Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389).
Build-Depends: glib, openssl

View File

@ -22,7 +22,6 @@ vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(COPY ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,4 +1,4 @@
Source: libsquish
Version: 1.15-5
Version: 1.15-7
Homepage: https://sourceforge.net/projects/libsquish
Description: Open source DXT compression library.

View File

@ -1,5 +1,5 @@
Source: libusb-win32
Version: 1.2.6.0-4
Version: 1.2.6.0-6
Homepage: https://sourceforge.net/projects/libusb-win32
Description: Allows user space applications to access many USB device on Windows.
Supports: windows

View File

@ -1,5 +1,5 @@
Source: libuuid
Version: 1.0.3-5
Version: 1.0.3-7
Homepage: https://sourceforge.net/projects/libuuid
Description: Universally unique id library
Supports: linux|osx

View File

@ -1,4 +1,4 @@
Source: libxmp-lite
Version: 4.4.1-4
Version: 4.4.1-6
Homepage: https://sourceforge.net/projects/xmp/
Description: Lightweight version of libxmp that supports MOD, S3M, XM and IT modules.

View File

@ -1,5 +1,5 @@
Source: mathgl
Version: 2.4.3-4
Version: 2.4.3-6
Description: MathGL is a free library of fast C++ routines for the plotting of the data varied in one or more dimensions
Default-Features: opengl, jpeg, png, zlib

View File

@ -1,4 +1,4 @@
Source: mp3lame
Version: 3.100-1
Version: 3.100-3
Homepage: http://lame.sourceforge.net/
Description: LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL.

View File

@ -1,5 +1,5 @@
Source: opencc
Version: 2020-04-26-4
Version: 2020-04-26-6
Description: A project for conversion between Traditional and Simplified Chinese
Homepage: https://github.com/BYVoid/OpenCC
Supports: !(arm|arm64|uwp)

View File

@ -1,4 +1,4 @@
Source: pcre
Version: 8.44-2
Version: 8.44-4
Homepage: https://www.pcre.org/
Description: Perl Compatible Regular Expressions

View File

@ -1,11 +1,15 @@
set(PCRE_VERSION 8.44)
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO pcre/pcre
REF ${PCRE_VERSION}
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.pcre.org/pub/pcre/pcre-${PCRE_VERSION}.zip"
"https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.zip"
FILENAME "pcre-${PCRE_VERSION}.zip"
SHA512 adddec1236b25ff1c90e73835c2ba25d60a5839cbde2d6be7838a8ec099f7443dede931dc39002943243e21afea572eda71ee8739058e72235a192e4324398f0
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
# Fix CMake Deprecation Warning concerning OLD behavior for policy CMP0026
# Suppress MSVC compiler warnings C4703, C4146, C4308, which fixes errors

View File

@ -1,5 +1,5 @@
Source: plplot
Version: 5.13.0-6
Version: 5.13.0-8
Build-Depends: freetype, zlib, libpng, bzip2
Description: PLplot is a cross-platform software package for creating scientific plots whose (UTF-8) plot symbols and text are limited in practice only by what Unicode-aware system fonts are installed on a user's computer.

View File

@ -1,5 +1,5 @@
Source: podofo
Version: 0.9.6-9
Version: 0.9.6-11
Homepage: https://sourceforge.net/projects/podofo/
Description: PoDoFo is a library to work with the PDF file format
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype

View File

@ -1,4 +1,4 @@
Source: polyclipping
Version: 6.4.2-2
Version: 6.4.2-4
Homepage: https://sourceforge.net/projects/polyclipping/
Description: The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.

View File

@ -1,5 +1,5 @@
Source: portmidi
Version: 0.217.1-2
Version: 0.217.1-4
Homepage: https://sourceforge.net/projects/portmedia/
Description: Free, cross-platform, open-source I/O library for MIDI
Supports: !uwp

View File

@ -1,4 +1,4 @@
Source: rapidxml
Version: 1.13-2
Version: 1.13-4
Homepage: https://sourceforge.net/projects/rapidxml
Description: RapidXml is an attempt to create the fastest XML parser possible, while retaining useability, portability and reasonable W3C compatibility.

View File

@ -1,3 +1,3 @@
Source: sigslot
Version: 1.0.0-1
Version: 1.0.0-3
Description: Portable C++ type-safe, thread-safe signal/slot library for ISO C++, Unix/BSD/Linux and Win32. Sigslot allows C++ code to use the signal/slot paradigm made popular by, for example, Qt.

View File

@ -1,4 +1,4 @@
Source: tinyxml
Version: 2.6.2-5
Version: 2.6.2-7
Homepage: https://sourceforge.net/projects/tinyxml
Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs.

View File

@ -1,4 +1,4 @@
Source: wtl
Version: 10.0-8
Version: 10.0-10
Homepage: https://sourceforge.net/projects/wtl/
Description: Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components.

View File

@ -47,7 +47,7 @@
## * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake)
## * [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake)
function(vcpkg_download_distfile VAR)
set(options SKIP_SHA512)
set(options SKIP_SHA512 SILENT_EXIT)
set(oneValueArgs FILENAME SHA512)
set(multipleValuesArgs URLS HEADERS)
cmake_parse_arguments(vcpkg_download_distfile "${options}" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
@ -171,18 +171,31 @@ function(vcpkg_download_distfile VAR)
endforeach(url)
endif()
if (NOT download_success)
message(FATAL_ERROR
" \n"
" Failed to download file.\n"
" If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment\n"
" variables to \"https://user:password@your-proxy-ip-address:port/\".\n"
" Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues\n")
if (NOT vcpkg_download_distfile_SILENT_EXIT)
if (NOT download_success)
message(FATAL_ERROR
" \n"
" Failed to download file.\n"
" If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment\n"
" variables to \"https://user:password@your-proxy-ip-address:port/\".\n"
" Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues\n")
else()
test_hash("${download_file_path_part}" "downloaded file" "The file may have been corrupted in transit. This can be caused by proxies. If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment variables to \"https://user:password@your-proxy-ip-address:port/\".\n")
get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY)
file(MAKE_DIRECTORY "${downloaded_file_dir}")
file(RENAME ${download_file_path_part} ${downloaded_file_path})
endif()
else()
test_hash("${download_file_path_part}" "downloaded file" "The file may have been corrupted in transit. This can be caused by proxies. If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment variables to \"https://user:password@your-proxy-ip-address:port/\".\n")
get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY)
file(MAKE_DIRECTORY "${downloaded_file_dir}")
file(RENAME ${download_file_path_part} ${downloaded_file_path})
if (NOT download_success)
message(WARNING
" \n"
" Failed to download file.\n")
else()
test_hash("${download_file_path_part}" "downloaded file" "The file may have been corrupted in transit. This can be caused by proxies. If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment variables to \"https://user:password@your-proxy-ip-address:port/\".\n")
get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY)
file(MAKE_DIRECTORY "${downloaded_file_dir}")
file(RENAME ${download_file_path_part} ${downloaded_file_path})
endif()
endif()
endif()
set(${VAR} ${downloaded_file_path} PARENT_SCOPE)

View File

@ -82,7 +82,8 @@ function(vcpkg_from_sourceforge)
else()
set(URL_PROTOCOL https:)
endif()
set(SOURCEFORGE_HOST ${URL_PROTOCOL}//downloads.sourceforge.net/project)
set(SOURCEFORGE_HOST ${URL_PROTOCOL}//sourceforge.net/projects)
string(FIND ${_vdus_REPO} "/" FOUND_ORG)
if (NOT FOUND_ORG EQUAL -1)
@ -94,14 +95,14 @@ function(vcpkg_from_sourceforge)
endif()
set(ORG_NAME ${ORG_NAME}/)
else()
set(REPO_NAME ${_vdus_REPO})
set(ORG_NAME )
set(ORG_NAME ${_vdus_REPO}/)
set(REPO_NAME )
endif()
if (DEFINED _vdus_REF)
set(URL "${SOURCEFORGE_HOST}/${ORG_NAME}${REPO_NAME}/${_vdus_REF}/${_vdus_FILENAME}")
set(URL "${SOURCEFORGE_HOST}/${ORG_NAME}files/${REPO_NAME}/${_vdus_REF}/${_vdus_FILENAME}")
else()
set(URL "${SOURCEFORGE_HOST}/${ORG_NAME}${REPO_NAME}/${_vdus_FILENAME}")
set(URL "${SOURCEFORGE_HOST}/${ORG_NAME}${REPO_NAME}/files/${_vdus_FILENAME}")
endif()
set(NO_REMOVE_ONE_LEVEL )
@ -111,12 +112,70 @@ function(vcpkg_from_sourceforge)
string(SUBSTRING "${_vdus_SHA512}" 0 10 SANITIZED_REF)
list(APPEND SOURCEFORGE_MIRRORS
cfhcable # United States
pilotfiber # New York, NY
gigenet # Chicago, IL
versaweb # Las Vegas, NV
ayera # Modesto, CA
netactuate # Durham, NC
phoenixnap # Tempe, AZ
astuteinternet # Vancouver, BC
freefr # Paris, France
netcologne # Cologne, Germany
deac-riga # Latvia
excellmedia # Hyderabad, India
iweb # Montreal, QC
jaist # Nomi, Japan
jztkft # Mezotur, Hungary
managedway # Detroit, MI
nchc # Taipei, Taiwan
netix # Bulgaria
ufpr # Curitiba, Brazil
tenet # Wynberg, South Africa
)
# Try to use auto-select first
set(DOWNLOAD_URL ${URL}/download)
message(STATUS "Trying auto-select mirror...")
vcpkg_download_distfile(ARCHIVE
URLS "${URL}"
URLS "${DOWNLOAD_URL}"
SHA512 "${_vdus_SHA512}"
FILENAME "${_vdus_FILENAME}"
SILENT_EXIT
)
if (EXISTS ${ARCHIVE})
set(download_success 1)
endif()
if (NOT download_success EQUAL 1)
foreach(SOURCEFORGE_MIRROR ${SOURCEFORGE_MIRRORS})
set(DOWNLOAD_URL ${URL}/download?use_mirror=${SOURCEFORGE_MIRROR})
message(STATUS "Trying mirror ${SOURCEFORGE_MIRROR}...")
vcpkg_download_distfile(ARCHIVE
URLS "${DOWNLOAD_URL}"
SHA512 "${_vdus_SHA512}"
FILENAME "${_vdus_FILENAME}"
SILENT_EXIT
)
if (EXISTS ${ARCHIVE})
set(download_success 1)
break()
endif()
endforeach()
endif()
if (NOT download_success)
message(FATAL_ERROR [[
Couldn't download source from any of the sourceforge mirrors, please check your network.
If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
variables to "http[s]://user:password@your-proxy-ip-address:port/".
Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues
]])
endif()
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE "${ARCHIVE}"