From 63304b0205a43f3fa553d8d9907effc9cffb46489b2f4fee8c87c152dff5e1f6 Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Sun, 11 Aug 2024 05:13:22 +0000 Subject: [PATCH] * 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 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + trng-4.25.tar.gz | 3 ++ trng-4.26.tar.gz | 3 ++ trng-external-catch.patch | 25 +++++++++++ trng.changes | 68 +++++++++++++++++++++++++++++ trng.spec | 92 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 215 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 trng-4.25.tar.gz create mode 100644 trng-4.26.tar.gz create mode 100644 trng-external-catch.patch create mode 100644 trng.changes create mode 100644 trng.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/trng-4.25.tar.gz b/trng-4.25.tar.gz new file mode 100644 index 0000000..840cd47 --- /dev/null +++ b/trng-4.25.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2727ce04e726a0b214e7bc8066793489b1ddce2fdf932d63313f4fd2823c9beb +size 1462898 diff --git a/trng-4.26.tar.gz b/trng-4.26.tar.gz new file mode 100644 index 0000000..4e1d19b --- /dev/null +++ b/trng-4.26.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6646d911862edb5a35e1a633b2ebbe8b5e66a4147d1c075f35d18f49467a864 +size 1508928 diff --git a/trng-external-catch.patch b/trng-external-catch.patch new file mode 100644 index 0000000..7784263 --- /dev/null +++ b/trng-external-catch.patch @@ -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) diff --git a/trng.changes b/trng.changes new file mode 100644 index 0000000..9f4ba21 --- /dev/null +++ b/trng.changes @@ -0,0 +1,68 @@ +------------------------------------------------------------------- +Mon Jul 22 11:56:18 UTC 2024 - Atri Bhattacharya + +- 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 + +- 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 CMake’s 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 AMD’s 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 + +- 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 + +- 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 + +- Update to version 4.23.1: + * Fix uninitialized-memory read access. + +------------------------------------------------------------------- +Fri Oct 30 13:36:53 UTC 2020 - Jan Engelhardt + +- Wrap descriptions, trim marketing wording. + +------------------------------------------------------------------- +Fri Oct 23 11:57:26 UTC 2020 - Atri Bhattacharya + +- Initial package. +- Disable building on aarch64 because tests fail + [gh#rabauke/trng4#21]. diff --git a/trng.spec b/trng.spec new file mode 100644 index 0000000..2ef8dfe --- /dev/null +++ b/trng.spec @@ -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 + +* 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