aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Hartman <kevin@hart.mn>2020-03-27 22:41:44 -0400
committerGitHub <noreply@github.com>2020-03-27 19:41:44 -0700
commitd615162aff5e07b9ee7c24f44627b7d5caf1c5e2 (patch)
treecf3e9855e185d243b541614354c2fd0270cb643b
parent774f4fe6dddeaf4d4aae163d3272032a1337d953 (diff)
downloadvcpkg-d615162aff5e07b9ee7c24f44627b7d5caf1c5e2.tar.gz
vcpkg-d615162aff5e07b9ee7c24f44627b7d5caf1c5e2.zip
[Morton-nd] Update version to v3.0.0 (#10474)
* Update morton-nd to v3.0.0. Morton ND now also provides its own CMake integration, which this portfile uses directly. * Address review comments.
-rw-r--r--ports/morton-nd/CONTROL5
-rw-r--r--ports/morton-nd/portfile.cmake30
2 files changed, 25 insertions, 10 deletions
diff --git a/ports/morton-nd/CONTROL b/ports/morton-nd/CONTROL
index 40065dbee..e6866779e 100644
--- a/ports/morton-nd/CONTROL
+++ b/ports/morton-nd/CONTROL
@@ -1,3 +1,4 @@
Source: morton-nd
-Version: 2.0.0
-Description: (C++14) header-only library for fast Morton encoding/decoding in N dimensions.
+Version: 3.0.0
+Homepage: https://github.com/kevinhartman/morton-nd
+Description: header-only constexpr library for fast Morton encoding/decoding in N dimensions.
diff --git a/ports/morton-nd/portfile.cmake b/ports/morton-nd/portfile.cmake
index 63c8ee95f..46aa5bef5 100644
--- a/ports/morton-nd/portfile.cmake
+++ b/ports/morton-nd/portfile.cmake
@@ -1,16 +1,30 @@
#header-only library
-include(vcpkg_common_functions)
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO kevinhartman/morton-nd
- REF v2.0.0
- SHA512 f349187a9c6094ebdc8dc10a0b028e119a82721946e2f629b3f64edade9665a97824d6a52496e470da61e5b65ae46c953346b271c2db11f5f2e3c7748de03daf
+ REF v3.0.0
+ SHA512 659c903c0c4a4ee4179d01950a952fe0c40d2c426063c10515ae5d2ad13ec8ca6b83d8de50c9eb86dd3c2c3747e1594d832f0c28cd6d414703baf9a7ab2f1f36
HEAD_REF master
)
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/morton-nd)
-file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/morton-nd)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/morton-nd/LICENSE ${CURRENT_PACKAGES_DIR}/share/morton-nd/copyright)
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ DISABLE_PARALLEL_CONFIGURE
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_TESTING=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/morton-nd/cmake TARGET_PATH)
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug
+ ${CURRENT_PACKAGES_DIR}/share/doc
+)
-file(GLOB HEADER_FILES ${SOURCE_PATH}/morton-nd/include/*.h)
-file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/morton-nd)
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})