Update to 4.10.2

This commit is contained in:
Orion Poplawski 2024-07-30 21:25:16 -06:00
parent fe012d61e0
commit be8ac5da39
5 changed files with 7 additions and 84 deletions

1
.gitignore vendored
View File

@ -25,3 +25,4 @@
/ccache-4.9.1.tar.gz
/ccache-4.10.tar.gz
/ccache-4.10.1.tar.gz
/ccache-4.10.2.tar.gz

View File

@ -1,40 +0,0 @@
From 71f772e9d3d4f8045cfa7bccd03bd21c1e8fbef1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
Date: Tue, 2 Jul 2024 15:46:44 +0200
Subject: [PATCH] build: Try harder to determine FMT_VERSION (#1478)
fmt-11.0 moved the FMT_VERSION from core.h to base.h, so try the
new header first and then fall back to the old one.
Closes: #1477
---
cmake/FindFmt.cmake | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/cmake/FindFmt.cmake b/cmake/FindFmt.cmake
index 55126a3172..0619f4615e 100644
--- a/cmake/FindFmt.cmake
+++ b/cmake/FindFmt.cmake
@@ -3,11 +3,19 @@ mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY)
if(DEP_FMT STREQUAL "BUNDLED")
message(STATUS "Using bundled Fmt as requested")
else()
- find_path(FMT_INCLUDE_DIR fmt/core.h)
+ find_path(FMT_INCLUDE_DIR fmt/base.h fmt/core.h)
find_library(FMT_LIBRARY fmt)
if(FMT_INCLUDE_DIR AND FMT_LIBRARY)
- file(READ "${FMT_INCLUDE_DIR}/fmt/core.h" _fmt_core_h)
- string(REGEX MATCH "#define FMT_VERSION ([0-9]+)" _ "${_fmt_core_h}")
+ file(READ "${FMT_INCLUDE_DIR}/fmt/base.h" _fmt_base_h)
+ string(REGEX MATCH "#define FMT_VERSION ([0-9]+)" _ "${_fmt_base_h}")
+ if("${CMAKE_MATCH_0}" STREQUAL "")
+ file(READ "${FMT_INCLUDE_DIR}/fmt/core.h" _fmt_core_h)
+ string(REGEX MATCH "#define FMT_VERSION ([0-9]+)" _ "${_fmt_core_h}")
+ endif()
+ if("${CMAKE_MATCH_0}" STREQUAL "")
+ message(FATAL_ERROR "FMT_VERSION not found")
+ return()
+ endif()
math(EXPR _fmt_major "${CMAKE_MATCH_1} / 10000")
math(EXPR _fmt_minor "${CMAKE_MATCH_1} / 100 % 100")
math(EXPR _fmt_patch "${CMAKE_MATCH_1} % 100")

View File

@ -1,37 +0,0 @@
From 3b09afc5f792f0bd0a15cf6b8408ea40eb069787 Mon Sep 17 00:00:00 2001
From: Joel Rosdahl <joel@rosdahl.net>
Date: Tue, 2 Jul 2024 17:05:43 +0200
Subject: [PATCH] build: Fix detection of Fmt version for Fmt<11
Fixes regression in 71f772e9d3d4f8045cfa7bccd03bd21c1e8fbef1.
---
cmake/FindFmt.cmake | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/cmake/FindFmt.cmake b/cmake/FindFmt.cmake
index 0619f4615e..7c39291eca 100644
--- a/cmake/FindFmt.cmake
+++ b/cmake/FindFmt.cmake
@@ -3,15 +3,16 @@ mark_as_advanced(FMT_INCLUDE_DIR FMT_LIBRARY)
if(DEP_FMT STREQUAL "BUNDLED")
message(STATUS "Using bundled Fmt as requested")
else()
- find_path(FMT_INCLUDE_DIR fmt/base.h fmt/core.h)
+ find_path(FMT_INCLUDE_DIR NAMES fmt/base.h fmt/core.h)
find_library(FMT_LIBRARY fmt)
if(FMT_INCLUDE_DIR AND FMT_LIBRARY)
- file(READ "${FMT_INCLUDE_DIR}/fmt/base.h" _fmt_base_h)
- string(REGEX MATCH "#define FMT_VERSION ([0-9]+)" _ "${_fmt_base_h}")
- if("${CMAKE_MATCH_0}" STREQUAL "")
- file(READ "${FMT_INCLUDE_DIR}/fmt/core.h" _fmt_core_h)
- string(REGEX MATCH "#define FMT_VERSION ([0-9]+)" _ "${_fmt_core_h}")
+ if(EXISTS "${FMT_INCLUDE_DIR}/fmt/base.h")
+ set(_fmt_h base.h)
+ else()
+ set(_fmt_h core.h)
endif()
+ file(READ "${FMT_INCLUDE_DIR}/fmt/${_fmt_h}" _fmt_h_content)
+ string(REGEX MATCH "#define FMT_VERSION ([0-9]+)" _ "${_fmt_h_content}")
if("${CMAKE_MATCH_0}" STREQUAL "")
message(FATAL_ERROR "FMT_VERSION not found")
return()

View File

@ -12,8 +12,8 @@
%global relccache %(%abs2rel %{_bindir}/ccache %{_libdir}/ccache)
Name: ccache
Version: 4.10.1
Release: 3%{?dist}
Version: 4.10.2
Release: 1%{?dist}
Summary: C/C++ compiler cache
# See LICENSE.adoc for licenses of bundled codes
@ -25,10 +25,6 @@ URL: http://ccache.dev/
Source0: https://github.com/ccache/ccache/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: %{name}.sh.in
Source2: %{name}.csh.in
# https://github.com/ccache/ccache/commit/83190fff9ab7298b1c5332f7d1332440763998f7
Patch0: 0001-build-try-harder-to-determine-fmt.patch
# https://github.com/ccache/ccache/commit/3b09afc5f792f0bd0a15cf6b8408ea40eb069787
Patch1: 0002-build-fix-detection-of-fmt-version.patch
BuildRequires: /usr/bin/asciidoctor
BuildRequires: cmake
@ -236,6 +232,9 @@ getent group ccache >/dev/null || groupadd -r ccache || :
%changelog
* Wed Jul 31 2024 Orion Poplawski <orion@nwra.com> - 4.10.2-1
- Update to 4.10.2
* Fri Jul 26 2024 Kefu Chai <tchaikov@gmail.com> - 4.10.1-3
- Rebuilt for fmt 11

View File

@ -1 +1 @@
SHA512 (ccache-4.10.1.tar.gz) = 28c91693e9a37eed494ff4fc8a98e12d566fa8510bab3587a7a67e94b80b8d9c146952ffe13c5b852adf5c2b91e70f073b70809f36fbbd8730fbbf900a7ddc55
SHA512 (ccache-4.10.2.tar.gz) = c6b66821372492b3e52cfaaad9a3167039aa943557ab2e1119fa68e3e983dcd022b839c54ef016802c0092209cae8122fcb8aa4dbe3bc03902183376bde2c4ef