# # spec file for package xxhash # # 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/ # Name: xxhash Version: 0.8.3 Release: 1.2 Summary: Non-cryptographic hash algorithm License: BSD-2-Clause AND GPL-2.0-only Group: Productivity/Security URL: https://github.com/Cyan4973/xxHash Source: https://github.com/Cyan4973/xxHash/archive/v%version.tar.gz Patch1: test-tools-do-not-override-cflags.patch Patch2: inline.patch BuildRequires: gcc-c++ BuildRequires: pkg-config BuildRequires: time %{?suse_build_hwcaps_libs} %description xxHash is a hash algorithm. It completes the SMHasher test suite which evaluates collision, dispersion and randomness qualities of hash functions. Hashes are identical on all platforms. %package -n libxxhash0 Summary: Non-cryptographic hash algorithm License: BSD-2-Clause Group: System/Libraries %description -n libxxhash0 xxHash is a hash algorithm. It completes the SMHasher test suite which evaluates collision, dispersion and randomness qualities of hash functions. Hashes are identical on all platforms. %package devel Summary: Headers for xxHash, a non-cryptographic hash algorithm License: BSD-2-Clause Group: Development/Libraries/C and C++ Requires: %name = %version Requires: libxxhash0 = %version %description devel Headers and other development files for xxHash. %prep %autosetup -p1 -n xxHash-%version %build # ALLOW_AVX just means "we guarantee we policed our %%optflags". export CFLAGS="%optflags -DXXH_X86DISPATCH_ALLOW_AVX=1" export CXXFLAGS="$CFLAGS" export LDFLAGS="%{?build_ldflags}" # DISPATCH=1 if you want AVX2/AVX512. But it does not seem to perform any # better than the lowest-denomimation code on at least the 1135G7 and 5950X # CPUs, and for both LP64 as well as ILP32 — it seems to be all within margin # of error. %make_build prefix=%_prefix libdir=%_libdir %install export CFLAGS="%optflags -DXXH_X86DISPATCH_ALLOW_AVX=1" export CXXFLAGS="%optflags" export LDFLAGS="%{?build_ldflags}" %make_install prefix=%_prefix libdir=%_libdir rm -rf %buildroot%_libdir/libxxhash.a %check export CFLAGS="%optflags" export CXXFLAGS="%optflags" export LDFLAGS="%{?build_ldflags}" # not safe for parallel execution as it removes xxhash.o and recreates it with different flags # the list is taken from test-all with non-working/irrelevant ones (such as ones that change the toolchain) removed %make_build -j1 test test-unicode listL120 trailingWhitespace test-xxh-nnn-sums %ldconfig_scriptlets -n libxxhash0 %files %license LICENSE %doc README.md %_bindir/xxh* %_mandir/man1/xxh* %files -n libxxhash0 %_libdir/libxxhash.so.* %files devel %_includedir/*.h %_libdir/pkgconfig/*.pc %_libdir/libxxhash.so %changelog * Mon Dec 30 2024 Jan Engelhardt - Update to release 0.8.3 * Corrects an edge case in ``XXH3_128bits_withSecretandSeed`` that could generate invalid results. * xxhash now knows command-line arguments ``--filelist``, ``--files-from``. * Tue Sep 3 2024 Jan Engelhardt - Add inline.patch to resolve FTBFS on gcc-14 + -Og. * Sun May 5 2024 Bruno Pitrus - Fix ftbfs with gcc14: * use correct optflags also in %%check * add test-tools-do-not-override-cflags.patch - Execute more tests * Thu Nov 30 2023 Guillaume GARDET - Make use of openSUSE build flags * Fri Nov 3 2023 Jan Engelhardt - Update to release 0.8.2 * ARM NEON speed improvements; on M1 Pro it is +20%% speed for XXH3 and XXH128 (from 30.0 GB/s to 36 GB/s). * Added support for ARM's SVE vector extension. * Resolved some issues with XXH3's s390x vector implementation. - Delete xxhash-avoid-armv6-unaligned-access.patch (should be fixed by c0dd448b), delete 836f4e735cf368542f14005e41d2f84ec29dfd60.patch (merged), delete 15ce80f9f2760609d8cc68cea76d3f3217ab70e1.patch (merged) * Wed Mar 8 2023 Michael Gorse - Add 15ce80f9f2760609d8cc68cea76d3f3217ab70e1.patch: fix build failure on ppc64le when using gcc 7 (boo#1208794). * Mon Dec 20 2021 Dirk Müller - fix racy check execution * Thu Dec 2 2021 Dirk Müller - update to 0.8.1: * perf : much improved performance for XXH3 streaming variants, notably on gcc and msvc * perf : improved XXH64 speed and latency on small inputs * perf : small XXH32 speed and latency improvement on small inputs of random size * perf : minor stack usage improvement for XXH32 and XXH64 * api : new experimental variants XXH3_*_withSecretandSeed() * api : update XXH3_generateSecret(), can no generate secret of any size (>= XXH3_SECRET_SIZE_MIN) * cli : xxhsum can now generate and check XXH3 checksums, using command `-H3` * build: can build xxhash without XXH3, with new build macro XXH_NO_XXH3 * build: fix xxh_x86dispatch build with MSVC, by @apankrat * build: XXH_INLINE_ALL can always be used safely, even after XXH_NAMESPACE or a previous XXH_INLINE_ALL * build: improved PPC64LE vector support * install: fix pkgconfig * install: compatibility with Haiku * doc : code comments made compatible with doxygen * misc : XXH_ACCEPT_NULL_INPUT_POINTER is no longer necessary, all functions can accept NULL input pointers, as long as size == 0 * misc : complete refactor of CI tests on Github Actions, offering much larger coverage * misc : xxhsum code base split into multiple specialized units, within directory cli/ - add 836f4e735cf368542f14005e41d2f84ec29dfd60.patch (fix manpage installation) * Tue Jul 6 2021 ro@suse.de - add patch xxhash-avoid-armv6-unaligned-access.patch do not expect unaligned accesses to work on armv6, it breaks in our build setup using aarch64 kernels * Mon Aug 3 2020 Ismail Dönmez - Update to version 0.8.0 * api : stabilize XXH3 * cli : xxhsum can produce BSD-style lines, with command --tag * cli : xxhsum can parse and check BSD-style lines, using command --check * cli : xxhsum - accepts console input * cli : xxhsum accepts -- separator * cli : fix : print correct default algo for symlinked helpers - Add BR on c++_compiler, needed for test programs * Wed Dec 18 2019 Stefan Brüns - Enable test suite run in %%check * Tue Dec 17 2019 Michał Rostecki - Update to version 0.7.2 * Fixed collision ratio of XXH128 for some specific input lengths * Improved VSX and NEON variants * Improved performance of scalar code path (XXH_VECTOR=0), * xxhsum: can generate 128-bit hash with command -H2 (note: for experimental purposes only! XXH128 is not yet frozen) * xxhsum: option -q removes status notifications * Thu Sep 26 2019 simmphonie@opensuse.org - update to version 0.7.1 - XXH3 updates: * Secret first : the algorithm computation can be altered by providing a "secret", which is any blob of bytes, of size >= XXH3_SECRET_SIZE_MIN. * seed is still available, and acts as a secret generator * As a consequence of these changes, note that new return values of XXH3 are not compatible with v0.7.0 * updated ARM NEON variant * Streaming implementation is available * Improve compatibility and performance with Visual Studio * Better integration when using XXH_INLINE_ALL : do not pollute host namespace, use its own macros, such as XXH_ASSERT(), XXH_ALIGN, etc. * 128-bits variant provide helper function, for comparison of hashes. - general improvements: * Better clang generation of rotl instruction * XXH_REROLL build macro, to reduce binary size * Improved cmake script * Full benchmark program provided in /tests/bench - update to version 0.7.0 - Add XXH3 hash algorithm * Thu Dec 6 2018 Michał Rostecki - Remove false information from description - xxHash does not derive from Argon2 algorithm. * Mon Dec 3 2018 Jan Engelhardt - Trim bias from description * Tue Oct 16 2018 t.gruner@katodev.de - update to version 0.6.5 - Improved performance on small keys, thanks to suggestions from Jens Bauer - New build macro, XXH_INLINE_ALL, extremely effective for small keys of fixed length (see this article for details) - XXH32() : better performance on OS-X clang by disabling auto-vectorization - Improved benchmark measurements accuracy on small keys - Included xxHash specification document * Sun Jan 21 2018 bugs@vdm-design.de - Initial package of version 0.6.4