-
-
Notifications
You must be signed in to change notification settings - Fork 542
Add package randx 1.4.2 #10481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add package randx 1.4.2 #10481
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1229bd0
Add package randx 1.3.1
lidaixingchen 9941bf8
Update randx to 1.4.0
lidaixingchen d3e9656
refactor(randx): simplify package recipe per review feedback
lidaixingchen 5a9ac24
fix(randx): correct SHA hashes, use Security framework, test with C++17
lidaixingchen 25d4a18
Update randx to 1.4.2
lidaixingchen 2e789ef
Fix SHA256 for randx 1.4.2 tarball
lidaixingchen 036e223
Fix header-only link check: create empty archive, remove macOS-incomp…
lidaixingchen 2c2146d
fix(randx): remove redundant archive file creation and clean version …
lidaixingchen b979453
Update xmake.lua
luadebug adeeada
Fix checksum for version 1.3.1 in xmake.lua
luadebug 36f4a40
Remove version 1.3.1 from xmake.lua
luadebug 0e8b00e
Update C++ standard and header in test function
luadebug 00e791d
Enhance RandX_Cpp17.hpp for Android support
luadebug 87d1833
Update include directives for Android in RandX_Cpp17.hpp
luadebug 1e837ad
Update RandX_Cpp17.hpp for Linux and Android compatibility
luadebug 76a3513
Correct pragma once handling in xmake.lua
luadebug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package("randx") | ||
| set_kind("library", {headeronly = true}) | ||
| set_homepage("https://github.com/lidaixingchen/RandX") | ||
| set_description("Modern, fast, and header-only C++ pseudo-random number generator and distribution library (C++17/C++23).") | ||
| set_license("MIT") | ||
|
|
||
| add_urls("https://github.com/lidaixingchen/RandX/archive/refs/tags/v$(version).tar.gz") | ||
|
|
||
| add_versions("1.4.2", "25badb73e98b2e83456bea63bb60b1f335091576ec1d1c06ec2649ed92fc84bf") | ||
| add_versions("1.4.0", "ecf611c6f340986df2abf3191def2222a3287f5e20ec4280c88996770a95eec7") | ||
|
|
||
| if is_plat("windows", "mingw") then | ||
| add_syslinks("bcrypt") | ||
| elseif is_plat("macosx") then | ||
| add_frameworks("Security") | ||
| end | ||
|
|
||
| on_install(function (package) | ||
| os.cp("RandX.hpp", package:installdir("include")) | ||
| os.cp("RandX_Cpp17.hpp", package:installdir("include")) | ||
| -- Header-only: create empty archive so -lrandx resolves in find_package checks | ||
| if not package:is_plat("windows") then | ||
| local libfile = package:installdir("lib", "librandx.a") | ||
| os.mkdir(path.directory(libfile)) | ||
| io.writefile(libfile, "!<arch>\n") | ||
|
luadebug marked this conversation as resolved.
Outdated
|
||
| end | ||
| end) | ||
|
|
||
| on_test(function (package) | ||
| assert(package:check_cxxsnippets({test = [[ | ||
| #include <RandX_Cpp17.hpp> | ||
| #include <cstdint> | ||
| static void test() { | ||
| std::uint64_t v = RandX::RandInt<std::uint64_t>(0, 1000); | ||
| (void)v; | ||
| } | ||
| ]]}, {configs = {languages = "c++17"}})) | ||
| end) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.