diff --git a/ports/coolprop/CONTROL b/ports/coolprop/CONTROL deleted file mode 100644 index ed0612bde9..0000000000 --- a/ports/coolprop/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: coolprop -Version: 6.4.1 -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-install.patch b/ports/coolprop/fix-install.patch new file mode 100644 index 0000000000..73732f4dbd --- /dev/null +++ b/ports/coolprop/fix-install.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80ac50a..36819dd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -493,13 +493,13 @@ IF ( COOLPROP_OBJECT_LIBRARY OR COOLPROP_STATIC_LIBRARY OR COOLPROP_SHARED_LIBRA + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY RELEASE_POSTFIX ) + modify_msvc_flags("/MD") # Note that the default is not used if ${COOLPROP_MSVC_REL} or ${COOLPROP_MSVC_DBG} is set + ENDIF (MSVC) +- INSTALL(TARGETS ${LIB_NAME} DESTINATION static_library/${CMAKE_SYSTEM_NAME}/${BITNESS}bit_${CMAKE_CXX_COMPILER_ID}_${CMAKE_CXX_COMPILER_VERSION} ) +- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_HEADER} DESTINATION static_library) ++ INSTALL(TARGETS ${LIB_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_HEADER} DESTINATION include) + ELSEIF (COOLPROP_SHARED_LIBRARY) + LIST(APPEND APP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_SOURCE}") + ADD_LIBRARY(${LIB_NAME} SHARED ${APP_SOURCES} ${COOLPROP_LIBRARY_EXPORTS}) +- INSTALL(TARGETS ${LIB_NAME} DESTINATION shared_library/${CMAKE_SYSTEM_NAME}/${BITNESS}bit${CONVENTION} ) +- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_HEADER} DESTINATION shared_library) ++ INSTALL(TARGETS ${LIB_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${COOLPROP_LIBRARY_HEADER} DESTINATION include) + SET_PROPERTY (TARGET ${LIB_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS " -DCOOLPROP_LIB") + # Now all the compiler specific settings for Visual Studio + IF (MSVC) +@@ -732,7 +732,7 @@ if (COOLPROP_EES_MODULE) + VERBATIM + ) + # install the generated library and the other files +- install(TARGETS COOLPROP_EES DESTINATION "${CMAKE_INSTALL_PREFIX}/EES/${CMAKE_SYSTEM_NAME}") ++ install(TARGETS COOLPROP_EES RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/wrappers/EES/CoolProp.htm" DESTINATION "${CMAKE_INSTALL_PREFIX}/EES/${CMAKE_SYSTEM_NAME}") + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/wrappers/EES/CoolProp.LIB" DESTINATION "${CMAKE_INSTALL_PREFIX}/EES/${CMAKE_SYSTEM_NAME}") + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/wrappers/EES/CoolProp_EES_Sample.EES" DESTINATION "${CMAKE_INSTALL_PREFIX}/EES/${CMAKE_SYSTEM_NAME}") diff --git a/ports/coolprop/portfile.cmake b/ports/coolprop/portfile.cmake index 2ba5a7ec5f..a1e7b978de 100644 --- a/ports/coolprop/portfile.cmake +++ b/ports/coolprop/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( fmt-fix.patch fix-builderror.patch fix-dependency.patch + fix-install.patch ) vcpkg_find_acquire_program(PYTHON2) @@ -89,32 +90,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(TARGET_FOLDER "shared_library") -else() - set(TARGET_FOLDER "static_library") +if (VCPKG_TARGET_IS_WINDOWS AND COOLPROP_SHARED_LIBRARY) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/CoolPropLib.h + "#if defined(COOLPROP_LIB)" "#if 1" + ) endif() -file(GLOB_RECURSE COOLPROP_HEADERS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.h") -file(INSTALL ${COOLPROP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -file(GLOB_RECURSE COOLPROP_LIBS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.lib") -file(GLOB_RECURSE COOLPROP_DLLS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.dll") - -file(INSTALL ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(COOLPROP_DLLS) - file(INSTALL ${COOLPROP_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() - -file(GLOB_RECURSE COOLPROP_DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.lib") -file(GLOB_RECURSE COOLPROP_DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.dll") - -file(INSTALL ${COOLPROP_DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -if(COOLPROP_DEBUG_DLLS) - file(INSTALL ${COOLPROP_DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER} ${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/coolprop/vcpkg.json b/ports/coolprop/vcpkg.json new file mode 100644 index 0000000000..acd6b2f17f --- /dev/null +++ b/ports/coolprop/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "coolprop", + "version-semver": "6.4.1", + "port-version": 1, + "description": "Thermophysical properties for the masses", + "homepage": "https://github.com/CoolProp/CoolProp", + "dependencies": [ + "catch", + "eigen3", + "fmt", + "if97", + "msgpack", + "pybind11", + "rapidjson", + "refprop-headers" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 0d43da343f..559a12262d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1374,7 +1374,7 @@ }, "coolprop": { "baseline": "6.4.1", - "port-version": 0 + "port-version": 1 }, "coroutine": { "baseline": "1.5.0", diff --git a/versions/c-/coolprop.json b/versions/c-/coolprop.json index 4b2f297182..7c9baee71e 100644 --- a/versions/c-/coolprop.json +++ b/versions/c-/coolprop.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "61676b5a1e9b82c4b88fd3bf37b684f592f9103e", + "version-semver": "6.4.1", + "port-version": 1 + }, { "git-tree": "5b29615cb7e9dffd253398cd0d7d06a9b9b9fcb2", "version-string": "6.4.1",