diff --git a/ccache.changes b/ccache.changes index 167d81c..b5788ae 100644 --- a/ccache.changes +++ b/ccache.changes @@ -49,6 +49,7 @@ Thu Jan 18 10:54:53 UTC 2024 - Danilo Spinella * The manual now mentions that system_headers sloppiness is not supported for MSVC. * Fixed regex in direct.bash. +- Fix SLE build by using gcc11 and disable hiredis dependency ------------------------------------------------------------------- Sat Oct 28 19:46:57 UTC 2023 - Andreas Stieger diff --git a/ccache.spec b/ccache.spec index 8b24fd2..9ad3b07 100644 --- a/ccache.spec +++ b/ccache.spec @@ -16,7 +16,12 @@ # +# Build with hiredis by default only on TW +%if %{?suse_version} > 1600 %bcond_without hiredis +%else +%bcond_with hiredis +%endif Name: ccache Version: 4.9 Release: 0 @@ -27,7 +32,14 @@ Source0: https://github.com/ccache/ccache/releases/download/v%{version}/c Source1: https://github.com/ccache/ccache/releases/download/v%{version}/ccache-%{version}.tar.xz.asc Source2: %{name}.keyring BuildRequires: cmake +%if %{?suse_version} > 1600 +BuildRequires: gcc BuildRequires: gcc-c++ +# SLE requires gcc11 for std::filesystem +%else +BuildRequires: gcc11 +BuildRequires: gcc11-c++ +%endif BuildRequires: pkgconfig BuildRequires: pkgconfig(libzstd) >= 1.1.2 BuildRequires: rubygem(asciidoctor) @@ -49,6 +61,9 @@ Objective-C++. %autosetup -p1 %build +%if %{?suse_version} < 1600 +export CC=gcc-11 CXX=g++-11 +%endif %cmake \ %if !%{with hiredis} -DREDIS_STORAGE_BACKEND=OFF \