From ac6ef2f665ce66a101217a17b16cb8e64469a13f Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 15 Jun 2022 14:40:29 -0600 Subject: [PATCH] [random123] Add new port (#24716) * Provide Deshaw Research's Random123 implementation * Convert CONTROL to vcpkg.json. * Update versions/baseline.json. * Remove call to deprecated function. * Address reviewer comments by using vcpkg_from_github. * Implement recommended changes from MR review. * Update x-add-version. * Random123 uses a proprietary license that is very similar to BSD. * Random123 uses a proprietary license that is very similar to BSD. * Update versions file. * format portfile.cmake * x-add-version * apply suggestion * x-add-version Co-authored-by: Lily Wang --- ports/random123/portfile.cmake | 23 +++++++++++++++++++++++ ports/random123/vcpkg.json | 7 +++++++ versions/baseline.json | 4 ++++ versions/r-/random123.json | 9 +++++++++ 4 files changed, 43 insertions(+) create mode 100644 ports/random123/portfile.cmake create mode 100644 ports/random123/vcpkg.json create mode 100644 versions/r-/random123.json diff --git a/ports/random123/portfile.cmake b/ports/random123/portfile.cmake new file mode 100644 index 00000000000000..31e0049ad47047 --- /dev/null +++ b/ports/random123/portfile.cmake @@ -0,0 +1,23 @@ +# Random123 - Header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "DEShawResearch/random123" + REF "v1.14.0" + SHA512 1c7d139193f5404e5d14d229f55e0a14b11de596a4cfbf0a39c1419f5ae146055dccc61e9430f724a2d7c1efb8bd01edb72866d4f4705508fcc6ebda6e90e91e + HEAD_REF "main" + ) + +# Copy the headers that define this package to the install location. +file(GLOB header_files + "${SOURCE_PATH}/include/Random123/*.h" + "${SOURCE_PATH}/include/Random123/*.hpp") +file(COPY ${header_files} + "${SOURCE_PATH}/include/Random123/features" + "${SOURCE_PATH}/include/Random123/conventional" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/Random123") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/ports/random123/vcpkg.json b/ports/random123/vcpkg.json new file mode 100644 index 00000000000000..dd5bf9db54ae6d --- /dev/null +++ b/ports/random123/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "random123", + "version": "1.14.0", + "description": "Random123 is a library of 'counter-based' random number generators (CBRNGs), in which the Nth random number can be obtained by applying a stateless mixing function to N instead of the conventional approach of using N iterations of a stateful transformation.", + "homepage": "http://www.deshawresearch.com/resources_random123.html", + "license": "BSD-3-Clause" +} diff --git a/versions/baseline.json b/versions/baseline.json index e7de1400fc69ce..2fe623dd5da740 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6108,6 +6108,10 @@ "baseline": "6.10", "port-version": 4 }, + "random123": { + "baseline": "1.14.0", + "port-version": 0 + }, "randomstr": { "baseline": "2022-02-03", "port-version": 0 diff --git a/versions/r-/random123.json b/versions/r-/random123.json new file mode 100644 index 00000000000000..37fb262d5a8fa0 --- /dev/null +++ b/versions/r-/random123.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "c4e7e093d8eabdc89b0634e4a361e4a982c7cbe5", + "version": "1.14.0", + "port-version": 0 + } + ] +}