SHA256
1
0
forked from pool/trng

* Update to version 4.26.

* Disable builds for aarch64, ppc64*, test fails (gh#rabauke/trng4#32).

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/trng?expand=0&rev=11
This commit is contained in:
Atri Bhattacharya 2024-08-11 05:13:22 +00:00 committed by Git OBS Bridge
commit 63304b0205
7 changed files with 215 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
trng-4.25.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2727ce04e726a0b214e7bc8066793489b1ddce2fdf932d63313f4fd2823c9beb
size 1462898

3
trng-4.26.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b6646d911862edb5a35e1a633b2ebbe8b5e66a4147d1c075f35d18f49467a864
size 1508928

25
trng-external-catch.patch Normal file
View File

@ -0,0 +1,25 @@
Index: trng4-4.25/CMakeLists.txt
===================================================================
--- trng4-4.25.orig/CMakeLists.txt
+++ trng4-4.25/CMakeLists.txt
@@ -14,6 +14,7 @@ endif()
option(TRNG_ENABLE_TESTS "Enable/Disable the compilation of the TRNG tests" ON)
option(TRNG_ENABLE_EXAMPLES "Enable/Disable the compilation of the TRNG examples" ON)
+option(USE_EXTERNAL_CATCH "Use system installed Catch2" ON)
if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wmaybe-uninitialized")
@@ -42,7 +43,11 @@ configure_package_config_file("cmake/Con
add_subdirectory(trng)
if(TRNG_ENABLE_TESTS)
- add_subdirectory(external/Catch2)
+ if(USE_EXTERNAL_CATCH)
+ find_package(Catch2 2 REQUIRED)
+ else(USE_EXTERNAL_CATCH)
+ add_subdirectory(external/Catch2)
+ endif()
add_subdirectory(tests)
endif()
if(TRNG_ENABLE_EXAMPLES)

68
trng.changes Normal file
View File

@ -0,0 +1,68 @@
-------------------------------------------------------------------
Mon Jul 22 11:56:18 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 4.26:
* Many changes, but no release notes.
- Disable builds for aarch64, ppc64*, test fails
(gh#rabauke/trng4#32).
-------------------------------------------------------------------
Fri Oct 20 13:43:52 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 4.25:
* All unit tests have been converted to Catch2 unit test
framework.
* TRNG can be consumed as a third-party component in CMake-based
projects supporting CMakes find_package.
* Support building static or shared libraries depending on the
BUILD_SHARED_LIBS CMake variable.
* Cuda support has been revised to work with Cuda 12.2.
* Experimental support for AMDs Heterogeneous-compute Interface
for Portabilit (HIP).
* Several minor fixes and improvements.
- Add trng-external-catch.patch -- Allow using external Catch2 for
building and running tests (gh#rabauke/trng4#30).
- Drop trng-drop-findtbb-cmake-module.patch: fixed upstream.
-------------------------------------------------------------------
Sat Jan 15 14:11:18 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Add trng-drop-findtbb-cmake-module.patch: Drop outdated
FindTBB.cmake module and depend on TBB's bundled cmake module
[gh#rabauke/trng4#26].
- Enable builds for aarch64: Tests fixed.
-------------------------------------------------------------------
Thu Apr 1 00:13:59 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 4.24:
* The two new random number engines, called xoshiro256plus
and lcg64_count_shift, have been implemented.
* New unit tests have been intoduced to extend test coverage.
* Special-functions unit tests use reference values with
improved numerical accuracy now.
* The numerical accuracy of various special functions has been
improved to reach machine precision also in 128-bit floating
point number arithmetic, e. g., the inverse cumulative
probability distribution of the normal distribution,
incomplete gamma functions and the Beta function.
* An uninitialized memory read access has been fixed.
* Documentation updates.
-------------------------------------------------------------------
Sat Feb 13 14:21:34 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 4.23.1:
* Fix uninitialized-memory read access.
-------------------------------------------------------------------
Fri Oct 30 13:36:53 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Wrap descriptions, trim marketing wording.
-------------------------------------------------------------------
Fri Oct 23 11:57:26 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Initial package.
- Disable building on aarch64 because tests fail
[gh#rabauke/trng4#21].

92
trng.spec Normal file
View File

@ -0,0 +1,92 @@
#
# spec file for package trng
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global shlib libtrng4-25
Name: trng
Version: 4.26
Release: 0
Summary: A Random Number Generator Library
License: BSD-3-Clause
URL: https://www.numbercrunch.de/trng/
Source: https://github.com/rabauke/trng4/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM trng-external-catch.patch gh#rabauke/trng4#30 badshah400@gmail.com -- Allow using external Catch2 for building and running tests
Patch0: trng-external-catch.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libboost_headers-devel
BuildRequires: libboost_test-devel
BuildRequires: tbb-devel
BuildRequires: cmake(Catch2) < 3.0
# Fails at %%check: see https://github.com/rabauke/trng4/issues/32
ExcludeArch: aarch64 %{power64}
%description
TRNG is a pseudo random number generator C++ library.
%package -n %{shlib}
Summary: A Random Number Generator Library
%description -n %{shlib}
TRNG is a C++ pseudo random number generator library.
Key features:
* compatible with the C++11 random number facility as defined in
<random>
* implements various pseudo random number algorithms
* supports multiple streams of random numbers for parallel
(multi-threaded) applications
* may be used with any threading library or MPI
* pseudo random numbers can be sampled from many different distributions
%package devel
Summary: Headers and devel files for TRNG
Requires: %{shlib} = %{version}
%description devel
TRNG is a C++ pseudo random number generator library.
This package provides the headers and devel files for developing
applications against TRNG.
%prep
%autosetup -p1 -n %{name}4-%{version}
%build
%cmake
%cmake_build
%install
%cmake_install
%check
%ctest
%ldconfig_scriptlets -n %{shlib}
%files -n %{shlib}
%license COPYING
%{_libdir}/libtrng4.so.*
%files devel
%license COPYING
%doc AUTHORS NEWS README.md doc/trng.pdf examples/
%{_libdir}/libtrng4.so
%{_libdir}/cmake/trng4/
%{_includedir}/trng/
%changelog