SHA256
3
0
forked from pool/xxhash

Accepting request 1172038 from science

- Fix ftbfs with gcc14:

OBS-URL: https://build.opensuse.org/request/show/1172038
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xxhash?expand=0&rev=11
This commit is contained in:
Dominique Leuenberger 2024-05-07 16:02:01 +00:00 committed by Git OBS Bridge
commit cfb152b9cd
3 changed files with 36 additions and 5 deletions

View File

@ -0,0 +1,16 @@
From: Bruno Pitrus <brunopitrus@hotmail.com>
Date: 2024-05-05 19:35:03+0000
--- xxHash-0.8.2/Makefile.old 2023-07-21 12:01:35.000000000 +0200
+++ xxHash-0.8.2/Makefile 2024-05-05 21:19:32.265851133 +0200
@@ -450,8 +450,8 @@ test-all: test test32 test-unicode clang
.PHONY: test-tools
test-tools:
- CFLAGS=-Werror $(MAKE) -C tests/bench
- CFLAGS=-Werror $(MAKE) -C tests/collisions
+ $(MAKE) -C tests/bench
+ $(MAKE) -C tests/collisions
.PHONY: test-xxh-nnn-sums
test-xxh-nnn-sums: xxhsum_and_links

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sun May 5 19:35:03 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
- Fix ftbfs with gcc14:
* use correct optflags also in %check
* add test-tools-do-not-override-cflags.patch
- Execute more tests
-------------------------------------------------------------------
Thu Nov 30 14:43:11 UTC 2023 - Guillaume GARDET <guillaume.gardet@opensuse.org>

View File

@ -1,7 +1,7 @@
#
# spec file for package xxhash
#
# Copyright (c) 2023 SUSE LLC
# 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
@ -24,6 +24,7 @@ License: BSD-2-Clause AND GPL-2.0-only
Group: Productivity/Security
URL: https://github.com/Cyan4973/xxHash
Source0: https://github.com/Cyan4973/xxHash/archive/v%{version}.tar.gz#/xxHash-%{version}.tar.gz
Patch0: test-tools-do-not-override-cflags.patch
BuildRequires: gcc-c++
BuildRequires: pkgconfig
@ -60,19 +61,25 @@ functions. Hashes are identical on all platforms.
%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
export LDFLAGS="%{?_lto_cflags}"
export LDFLAGS="%{?build_ldflags}"
%make_build prefix=%{_prefix} libdir=%{_libdir}
%install
export CFLAGS="%{optflags}"
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
%make_build -j1 test
# 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
%post -n libxxhash0 -p /sbin/ldconfig
%postun -n libxxhash0 -p /sbin/ldconfig
%ldconfig_scriptlets -n libxxhash0
%files
%license LICENSE