[coolprop] Add patch for fmt 5.0

This commit is contained in:
Alexander Karatarakis 2018-05-29 13:35:00 -07:00
parent b82bbc4945
commit aca60bfbd7
3 changed files with 46 additions and 5 deletions

View File

@ -1,4 +1,4 @@
Source: coolprop
Version: 6.1.0-3
Version: 6.1.0-4
Description: Thermophysical properties for the masses
Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers

View File

@ -0,0 +1,39 @@
diff --git a/include/CPstrings.h b/include/CPstrings.h
index 2e5a5af..87f6b7c 100644
--- a/include/CPstrings.h
+++ b/include/CPstrings.h
@@ -5,6 +5,8 @@
#include <iterator>
#include <algorithm>
#include <functional>
+ #include <vector>
+ #include <string>
#if !defined(NO_CPPFORMAT)
#ifndef FMT_HEADER_ONLY
@@ -13,9 +15,6 @@
#include "fmt/format.h" // For addition of the string formatting functions and macros from cppformat
#include "fmt/printf.h" // For sprintf
#undef FMT_HEADER_ONLY
-#else
- #include <vector>
- #include <string>
#endif
#include "Exceptions.h"
@@ -57,11 +56,11 @@
// Missing string formatting function, this old guy is needed for ancient gcc compilers on PowerPC for VxWorks
inline std::string format(const char* fmt, ...);
#else
- // Missing std::string formatting function - provided by the cppformat library
- inline std::string format(const char *format, fmt::ArgList args) {
- return fmt::sprintf(format, args);
+ template<class...Args>
+ std::string format(const Args & ... args)
+ {
+ return fmt::sprintf(args...);
}
- FMT_VARIADIC(std::string, format, const char *)
#endif
// Missing string split - like in Python

View File

@ -7,6 +7,8 @@ vcpkg_from_github(
REF 0e934e842e9ce83eea64fda1d4ab8e59adf9d8cd
SHA512 a44eafc84f2b88259d7bcf6cfa81daeb81ea9d55bd356e59b3ef77b6f68ea405961c7cb54ba899e3896bb2a02d3e01119a4a51f72899126c8da6081fa2ece948
HEAD_REF master
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fmt-fix.patch
)
vcpkg_find_acquire_program(PYTHON2)
@ -16,8 +18,8 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON2_DIR}")
file(REMOVE_RECURSE ${SOURCE_PATH}/externals)
# Patch up the file locations
file(COPY
${CURRENT_INSTALLED_DIR}/include/catch.hpp
file(COPY
${CURRENT_INSTALLED_DIR}/include/catch.hpp
DESTINATION ${SOURCE_PATH}/externals/Catch/single_include
)
@ -30,12 +32,12 @@ file(COPY
DESTINATION ${SOURCE_PATH}/externals/Eigen/unsupported
)
file(COPY
file(COPY
${CURRENT_INSTALLED_DIR}/include/rapidjson
DESTINATION ${SOURCE_PATH}/externals/rapidjson/include
)
file(COPY
file(COPY
${CURRENT_INSTALLED_DIR}/include/IF97.h
DESTINATION ${SOURCE_PATH}/externals/IF97
)