From 46e5414ce0e977c37f4f44643d7ef273fbee8d88 Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Sun, 7 Jul 2019 15:29:23 +0800 Subject: [botan] Fix build error C2039 with Visual Studio 2019 and C++17 (#7140) --- ports/botan/CONTROL | 2 +- ports/botan/fix-build_error.patch | 25 +++++++++++++++++++++++++ ports/botan/portfile.cmake | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ports/botan/fix-build_error.patch 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 + #include + ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING ++ + #if defined(BOTAN_TARGET_OS_HAS_STL_FILESYSTEM_MSVC) && defined(BOTAN_BUILD_COMPILER_IS_MSVC) +- #include ++ #include + #elif defined(BOTAN_HAS_BOOST_FILESYSTEM) + #include + #elif defined(BOTAN_TARGET_OS_HAS_POSIX1) +@@ -38,7 +40,7 @@ std::vector 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 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) -- cgit v1.2.3