From 4d52db6bb8721b50b548bf67a05d10b2580c6040 Mon Sep 17 00:00:00 2001 From: chausner <15180557+chausner@users.noreply.github.com> Date: Mon, 15 Nov 2021 23:18:12 +0100 Subject: [PATCH] [mp-units] Update to 0.7.0 (#21405) * Update mp-units to 0.7.0 * Update CI baseline Co-authored-by: chausner --- ports/mp-units/cmake.patch | 33 ++++++++++++++------------------- ports/mp-units/config.patch | 21 +++++++++++++-------- ports/mp-units/portfile.cmake | 18 +++++++++--------- ports/mp-units/vcpkg.json | 13 ++++++++++--- versions/baseline.json | 4 ++-- versions/m-/mp-units.json | 5 +++++ 6 files changed, 53 insertions(+), 41 deletions(-) diff --git a/ports/mp-units/cmake.patch b/ports/mp-units/cmake.patch index d5a57ce8b8..d2d4a1a54c 100644 --- a/ports/mp-units/cmake.patch +++ b/ports/mp-units/cmake.patch @@ -2,12 +2,22 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index b18a30a96..d89248aa1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -40,14 +40,24 @@ conan_init(cmake) +@@ -66,11 +66,21 @@ conan_init(cmake) add_subdirectory(src) + + # add usage example +-add_subdirectory(example) ++option(BUILD_EXAMPLES "Build usage examples" OFF) ++if(BUILD_EXAMPLES) ++ add_subdirectory(example) ++endif() - # set restrictive compilation warnings --set_warnings(mp-units) -+# set_warnings(mp-units) + # generate project documentation +-add_subdirectory(docs) ++option(BUILD_DOCS "Generate docs" OFF) ++if(BUILD_DOCS) ++ add_subdirectory(docs) ++endif() # add unit tests -enable_testing() @@ -18,18 +28,3 @@ index b18a30a96..d89248aa1 100644 + enable_testing() + add_subdirectory(test) +endif() - - # add usage example --add_subdirectory(example) -- -+option(BUILD_EXAMPLES "Build usage examples" OFF) -+if(BUILD_EXAMPLES) -+ add_subdirectory(example) -+endif() - # generate project documentation --add_subdirectory(docs) -+ -+option(BUILD_DOCS "Generate docs" OFF) -+if(BUILD_DOCS) -+ add_subdirectory(docs) -+endif() diff --git a/ports/mp-units/config.patch b/ports/mp-units/config.patch index 5bd81c927a..b5f6bd6d20 100644 --- a/ports/mp-units/config.patch +++ b/ports/mp-units/config.patch @@ -1,9 +1,14 @@ -diff --git a/cmake/common/simple-config.cmake.in b/cmake/common/simple-config.cmake.in -index f40ebfa88..d521e0ba8 100644 ---- a/cmake/common/simple-config.cmake.in -+++ b/cmake/common/simple-config.cmake.in -@@ -1 +1,4 @@ -+include(CMakeFindDependencyMacro) +diff --git a/src/mp-unitsConfig.cmake b/src/mp-unitsConfig.cmake +--- a/src/mp-unitsConfig.cmake ++++ b/src/mp-unitsConfig.cmake +@@ -39,8 +39,8 @@ function(__check_libcxx_in_use variable) + endfunction() + + include(CMakeFindDependencyMacro) +-find_dependency(fmt) +-find_dependency(gsl-lite) +find_dependency(fmt CONFIG) -+find_dependency(Microsoft.GSL CONFIG) - include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") ++find_dependency(gsl-lite CONFIG) + + # add range-v3 dependency only for clang + libc++ + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") diff --git a/ports/mp-units/portfile.cmake b/ports/mp-units/portfile.cmake index 1200c17197..f608f1af1e 100644 --- a/ports/mp-units/portfile.cmake +++ b/ports/mp-units/portfile.cmake @@ -1,24 +1,24 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mpusz/units - REF 33ad51311b835efb7f7767473f971c02a3140073 - SHA512 18c9a4bb1812d7ab59e86d3eef5f62aa760c8f78eac81086bd3b25f7e2d359f2fba71b0298cf91ecb31dbe13846f2e5ce75133b0db534020102b788dd1c1a1da + REF v0.7.0 + SHA512 72175f34f358d0741650ce9c8a7b28fced90cc45ddd3f1662ae1cb9ff7d31403ff742ee07ab4c96bd2d95af714d9111a888cf6acccb91e568e12d1ef663b2f64 PATCHES cmake.patch config.patch ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" ) -vcpkg_install_cmake() +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) # Handle copyright/readme/package files -file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") # Header only \ No newline at end of file diff --git a/ports/mp-units/vcpkg.json b/ports/mp-units/vcpkg.json index 34ca3b8f05..e4cc95da2e 100644 --- a/ports/mp-units/vcpkg.json +++ b/ports/mp-units/vcpkg.json @@ -1,11 +1,18 @@ { "name": "mp-units", - "version-string": "0.6.0", - "port-version": 1, + "version-semver": "0.7.0", "description": "mp-units - A Units Library for C++", "homepage": "https://github.com/mpusz/units", "dependencies": [ "fmt", - "ms-gsl" + "gsl-lite", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } ] } diff --git a/versions/baseline.json b/versions/baseline.json index 5ef67a6ee2..6ab33ce926 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4465,8 +4465,8 @@ "port-version": 0 }, "mp-units": { - "baseline": "0.6.0", - "port-version": 1 + "baseline": "0.7.0", + "port-version": 0 }, "mp3lame": { "baseline": "3.100", diff --git a/versions/m-/mp-units.json b/versions/m-/mp-units.json index 9319735f0b..a8e54c22c1 100644 --- a/versions/m-/mp-units.json +++ b/versions/m-/mp-units.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ed05b65c897d6508b0b5f88f8a97373cf8fd8715", + "version-semver": "0.7.0", + "port-version": 0 + }, { "git-tree": "f39d5365e27cf32f149da1ef78f0ae6cd09e9039", "version-string": "0.6.0",