diff options
| author | wangli28 <47812810+wangli28@users.noreply.github.com> | 2019-07-07 15:29:23 +0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-07-07 00:29:23 -0700 |
| commit | 46e5414ce0e977c37f4f44643d7ef273fbee8d88 (patch) | |
| tree | 5854c7f5dbd01019ea9cd416e56d092d0d1e8404 | |
| parent | 6f15f897b9635112b624c384e62254963851d04e (diff) | |
| download | vcpkg-46e5414ce0e977c37f4f44643d7ef273fbee8d88.tar.gz vcpkg-46e5414ce0e977c37f4f44643d7ef273fbee8d88.zip | |
[botan] Fix build error C2039 with Visual Studio 2019 and C++17 (#7140)
| -rw-r--r-- | ports/botan/CONTROL | 2 | ||||
| -rw-r--r-- | ports/botan/fix-build_error.patch | 25 | ||||
| -rw-r--r-- | ports/botan/portfile.cmake | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL index 9221e7f66..48ee01549 100644 --- a/ports/botan/CONTROL +++ b/ports/botan/CONTROL @@ -1,4 +1,4 @@ Source: botan -Version: 2.9.0-1 +Version: 2.9.0-2 Homepage: https://botan.randombit.net Description: A cryptography library written in C++11 diff --git a/ports/botan/fix-build_error.patch b/ports/botan/fix-build_error.patch new file mode 100644 index 000000000..85cae86b0 --- /dev/null +++ b/ports/botan/fix-build_error.patch @@ -0,0 +1,25 @@ +diff --git a/src/lib/utils/filesystem.cpp b/src/lib/utils/filesystem.cpp +index 053c91e..8e0a271 100644 +--- a/src/lib/utils/filesystem.cpp ++++ b/src/lib/utils/filesystem.cpp +@@ -9,8 +9,10 @@ + #include <botan/internal/filesystem.h> + #include <algorithm> + ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING ++ + #if defined(BOTAN_TARGET_OS_HAS_STL_FILESYSTEM_MSVC) && defined(BOTAN_BUILD_COMPILER_IS_MSVC) +- #include <filesystem> ++ #include <experimental/filesystem> + #elif defined(BOTAN_HAS_BOOST_FILESYSTEM) + #include <boost/filesystem.hpp> + #elif defined(BOTAN_TARGET_OS_HAS_POSIX1) +@@ -38,7 +40,7 @@ std::vector<std::string> impl_stl_filesystem(const std::string& dir) + #if (_MSVC_LANG >= 201703L) + using namespace std::filesystem; + #else +- using namespace std::tr2::sys; ++ using namespace std::experimental::filesystem; + #endif + + std::vector<std::string> out; diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index 4dc02d588..81eb3706c 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -8,6 +8,8 @@ vcpkg_from_github( REF 0129d3172ec419beb90a2b3487f6385a35da0742 SHA512 a8328df5ad2693a96935d1d2202ddd6678a5ba9c63a8159acbe56f1c884fa5faaa71339e8f56284cfd00574a9b4f91bdb1fb22c36c8e899d9b4cbe881f4867d3 HEAD_REF master + PATCHES + fix-build_error.patch ) if(CMAKE_HOST_WIN32) |
