Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pcre] Use vcpkg_from_sourceforge as a fallback #12252

Merged
merged 2 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-4
Version: 8.44-5
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
Homepage: https://www.pcre.org/
Description: Perl Compatible Regular Expressions
35 changes: 24 additions & 11 deletions ports/pcre/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
set(PCRE_VERSION 8.44)
set(EXPECTED_SHA adddec1236b25ff1c90e73835c2ba25d60a5839cbde2d6be7838a8ec099f7443dede931dc39002943243e21afea572eda71ee8739058e72235a192e4324398f0)
set(PATCHES
# Fix CMake Deprecation Warning concerning OLD behavior for policy CMP0026
# Suppress MSVC compiler warnings C4703, C4146, C4308, which fixes errors
# under x64-uwp and arm-uwp
pcre-8.44_suppress_cmake_and_compiler_warnings-errors.patch)

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
SHA512 ${EXPECTED_SHA}
SILENT_EXIT
)

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
# under x64-uwp and arm-uwp
pcre-8.44_suppress_cmake_and_compiler_warnings-errors.patch
)
if (EXISTS "${ARCHIVE}")
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES ${PATCHES}
)
else()
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO pcre/pcre
REF ${PCRE_VERSION}
FILENAME "pcre-${PCRE_VERSION}.zip"
SHA512 ${EXPECTED_SHA}
PATCHES ${PATCHES}
)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
Expand Down