From 90ad82908e85ff4b6cd385b82da3e8b66692a8b1 Mon Sep 17 00:00:00 2001 From: wangli28 <47812810+wangli28@users.noreply.github.com> Date: Wed, 26 Jun 2019 02:00:48 +0800 Subject: [nana, fmi4cpp] Fix Visual Studio 2019 deprecates . (#7021) --- ports/fmi4cpp/CONTROL | 2 +- ports/fmi4cpp/fix-build_error.patch | 25 +++++++++++++++++++++++++ ports/fmi4cpp/portfile.cmake | 2 ++ ports/nana/CONTROL | 2 +- ports/nana/fix-build-error.patch | 12 ++++++++++++ ports/nana/portfile.cmake | 2 ++ 6 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 ports/fmi4cpp/fix-build_error.patch create mode 100644 ports/nana/fix-build-error.patch diff --git a/ports/fmi4cpp/CONTROL b/ports/fmi4cpp/CONTROL index 2a05be3b5..4659e9d1a 100644 --- a/ports/fmi4cpp/CONTROL +++ b/ports/fmi4cpp/CONTROL @@ -1,5 +1,5 @@ Source: fmi4cpp -Version: 0.7.0 +Version: 0.7.0-1 Description: FMI 2.0 implementation written in modern C++ Build-Depends: boost-property-tree, libzip[openssl] diff --git a/ports/fmi4cpp/fix-build_error.patch b/ports/fmi4cpp/fix-build_error.patch new file mode 100644 index 000000000..ef0950e87 --- /dev/null +++ b/ports/fmi4cpp/fix-build_error.patch @@ -0,0 +1,25 @@ +diff --git a/include/fmi4cpp/fmu_resource.hpp b/include/fmi4cpp/fmu_resource.hpp +index 98f2067..8e88dcf 100644 +--- a/include/fmi4cpp/fmu_resource.hpp ++++ b/include/fmi4cpp/fmu_resource.hpp +@@ -24,6 +24,7 @@ + + #ifndef FMI4CPP_FMURESOURCE_HPP + #define FMI4CPP_FMURESOURCE_HPP ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING + + #include + #include +diff --git a/src/fmi2/fmu.cpp b/src/fmi2/fmu.cpp +index a0d5f75..bd01487 100644 +--- a/src/fmi2/fmu.cpp ++++ b/src/fmi2/fmu.cpp +@@ -26,6 +26,8 @@ + #include + #endif + ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING ++ + #include + #include + diff --git a/ports/fmi4cpp/portfile.cmake b/ports/fmi4cpp/portfile.cmake index 0952f5c5a..ad45b5abe 100644 --- a/ports/fmi4cpp/portfile.cmake +++ b/ports/fmi4cpp/portfile.cmake @@ -18,6 +18,8 @@ vcpkg_from_github( REF v0.7.0 SHA512 5846f5b28badb5b4836ffd9d284f602dd243df20d3c82cab5e2b62b8be37e0ab05b7422bca066f37ca67ee0d5b35abd2febe87f623fc3b9854d245e86e1e21fe HEAD_REF master + PATCHES + fix-build_error.patch ) set(WITH_CURL OFF) diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index 0e832f7e8..4038c6f9e 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,5 +1,5 @@ Source: nana -Version: 1.7.1 +Version: 1.7.1-1 Homepage: https://github.com/cnjinhao/nana Description: Cross-platform library for GUI programming in modern C++ style. Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows) diff --git a/ports/nana/fix-build-error.patch b/ports/nana/fix-build-error.patch new file mode 100644 index 000000000..3894f9600 --- /dev/null +++ b/ports/nana/fix-build-error.patch @@ -0,0 +1,12 @@ +diff --git a/include/nana/filesystem/filesystem.hpp b/include/nana/filesystem/filesystem.hpp +index 86b907a..ea8db75 100644 +--- a/include/nana/filesystem/filesystem.hpp ++++ b/include/nana/filesystem/filesystem.hpp +@@ -30,6 +30,7 @@ + #ifndef NANA_FILESYSTEM_HPP + #define NANA_FILESYSTEM_HPP + #include ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING + + //Filesystem Selection + #include diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index 981bc4244..fa0815813 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -12,6 +12,8 @@ vcpkg_from_github( REF v1.7.1 SHA512 43bd6f6321557184431935b4fdd636427458e79333879f6310685a70ee25f4344851910e67c52145382c38a3cea9d1761b40c8edbc072a7cc9c62406ed402549 HEAD_REF develop + PATCHES + fix-build-error.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3