From 002cf744fc607a1162a6cf5e6807e1e03f3dce75 Mon Sep 17 00:00:00 2001 From: wangli28 Date: Thu, 9 Apr 2020 08:04:02 +0000 Subject: [PATCH] [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 4f5390ca1..ab6b355c7 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 000000000..a0d4a9b61 --- /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 2406ea819..b560531e2 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 )