From 279867cb0c22b1251c5dd50f2dc17030ed9861c9 Mon Sep 17 00:00:00 2001 From: wangli28 Date: Thu, 9 Apr 2020 02:25:59 +0000 Subject: [PATCH 1/2] [fmt] update to 6.2.0 --- ports/fmt/CONTROL | 2 +- ports/fmt/fix-warning4189.patch | 10 +++++----- ports/fmt/portfile.cmake | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index 48f758b108..021d5cc464 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,4 +1,4 @@ Source: fmt -Version: 6.1.2 +Version: 6.2.0 Homepage: https://github.com/fmtlib/fmt Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/fix-warning4189.patch b/ports/fmt/fix-warning4189.patch index 5c25379540..0efab0f1c9 100644 --- a/ports/fmt/fix-warning4189.patch +++ b/ports/fmt/fix-warning4189.patch @@ -1,11 +1,11 @@ diff --git a/include/fmt/format.h b/include/fmt/format.h -index 01f41f5c..208a58d0 100644 +index 4e96539..0f1d179 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h -@@ -35,6 +35,7 @@ - - #include "core.h" - +@@ -33,6 +33,7 @@ + #ifndef FMT_FORMAT_H_ + #define FMT_FORMAT_H_ + +#pragma warning(disable:4189) #include #include diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index bc21d97a3b..82d821ef96 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fmtlib/fmt - REF 6.1.2 - SHA512 8770bf4bd2bb6d938e75e0cf1e665c41930dbd9d2a6825274a5a43cd1d85b9c9ca621bb040ed099429f0e16bddbc3399361c453eb1bf3fc01376e6ad9dd875b7 + REF 9bdd1596cef1b57b9556f8bef32dc4a32322ef3e#version 6.2.0 + SHA512 3639b4984a88fc5495c6cb1a0a09bb0a13f5dc05286f5a2b15e60dfda780bcc1fe213497006cc27247c3c358be27d8af4dd995db2b3de0f6a5a1288dc1058585 HEAD_REF master PATCHES fix-warning4189.patch ) @@ -16,9 +16,9 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmt RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + if(VCPKG_TARGET_IS_WINDOWS) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) @@ -42,7 +42,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) +if(VCPKG_TARGET_IS_WINDOWS) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE) string(REPLACE "lib/fmtd.dll" "bin/fmtd.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) From 002cf744fc607a1162a6cf5e6807e1e03f3dce75 Mon Sep 17 00:00:00 2001 From: wangli28 Date: Thu, 9 Apr 2020 08:04:02 +0000 Subject: [PATCH 2/2] [fmt] Fix coolprop build error --- ports/coolprop/CONTROL | 2 +- ports/coolprop/fix-builderror.patch | 13 +++++++++++++ ports/coolprop/portfile.cmake | 8 ++++---- 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 ports/coolprop/fix-builderror.patch diff --git a/ports/coolprop/CONTROL b/ports/coolprop/CONTROL index 4f5390ca1e..ab6b355c70 100644 --- a/ports/coolprop/CONTROL +++ b/ports/coolprop/CONTROL @@ -1,5 +1,5 @@ Source: coolprop -Version: 6.1.0-4 +Version: 6.1.0-5 Homepage: https://github.com/CoolProp/CoolProp Description: Thermophysical properties for the masses Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers diff --git a/ports/coolprop/fix-builderror.patch b/ports/coolprop/fix-builderror.patch new file mode 100644 index 0000000000..a0d4a9b61c --- /dev/null +++ b/ports/coolprop/fix-builderror.patch @@ -0,0 +1,13 @@ +diff --git a/src/ODEIntegrators.cpp b/src/ODEIntegrators.cpp +index ce86cf6..681db13 100644 +--- a/src/ODEIntegrators.cpp ++++ b/src/ODEIntegrators.cpp +@@ -4,6 +4,8 @@ + #include "CPstrings.h" + #include "Exceptions.h" + #include ++#undef max ++#undef min + + bool ODEIntegrators::AdaptiveRK54(AbstractODEIntegrator &ode, double tstart, double tend, double hmin, double hmax, double eps_allowed, double step_relax) + { diff --git a/ports/coolprop/portfile.cmake b/ports/coolprop/portfile.cmake index 2406ea819f..b560531e22 100644 --- a/ports/coolprop/portfile.cmake +++ b/ports/coolprop/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) set(PORT_VERSION 6.1.0) vcpkg_from_github( @@ -8,12 +7,13 @@ vcpkg_from_github( SHA512 a44eafc84f2b88259d7bcf6cfa81daeb81ea9d55bd356e59b3ef77b6f68ea405961c7cb54ba899e3896bb2a02d3e01119a4a51f72899126c8da6081fa2ece948 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fmt-fix.patch + fmt-fix.patch + fix-builderror.patch ) vcpkg_find_acquire_program(PYTHON2) get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON2_DIR}") +vcpkg_add_to_path(${PYTHON2_DIR}) file(REMOVE_RECURSE ${SOURCE_PATH}/externals) @@ -118,6 +118,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER} ${CURRENT_PAC # Handle copyright file( INSTALL ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/coolprop + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright )