Skip to content

Commit

Permalink
Merge pull request #245 from microsoft/master
Browse files Browse the repository at this point in the history
[vcpkg_from_sourceforge] Add retry mirror function (2/2) (microsoft#12018)
  • Loading branch information
Jimmy-Hu committed Jul 5, 2020
2 parents 450d8e5 + 21b56d9 commit 6db93a8
Show file tree
Hide file tree
Showing 38 changed files with 134 additions and 59 deletions.
4 changes: 2 additions & 2 deletions docs/maintainers/vcpkg_from_sourceforge.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion ports/argtable2/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/cairo/CONTROL
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ports/cunit/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/epsilon/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/freeglut/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/freeimage/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/geographiclib/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/giflib/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/gsoap/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ports/healpix/CONTROL
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ports/irrlicht/CONTROL
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ports/itpp/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/libaiff/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/libdisasm/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: libdisasm
Version: 0.23-5
Version: 0.23-7
Homepage: https://sourceforge.net/projects/bastard
Description: x86 Disassembler Library.
2 changes: 1 addition & 1 deletion ports/libmad/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/libmikmod/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/libnice/CONTROL
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions ports/libnice/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion ports/libsquish/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/libusb-win32/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/libuuid/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/libxmp-lite/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/mathgl/CONTROL
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion ports/mp3lame/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/opencc/CONTROL
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ports/pcre/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: pcre
Version: 8.44-2
Version: 8.44-4
Homepage: https://www.pcre.org/
Description: Perl Compatible Regular Expressions
12 changes: 8 additions & 4 deletions ports/pcre/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ports/plplot/CONTROL
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion ports/podofo/CONTROL
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ports/polyclipping/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/portmidi/CONTROL
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ports/rapidxml/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/sigslot/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/tinyxml/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion ports/wtl/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
37 changes: 25 additions & 12 deletions scripts/cmake/vcpkg_download_distfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 6db93a8

Please sign in to comment.