From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/, dev-util/ccache/files/
Date: Sat, 10 Aug 2024 20:02:46 +0000 (UTC) [thread overview]
Message-ID: <1723320129.afe458f45b86a439985e0c6cae53912d487bc88e.sam@gentoo> (raw)
commit: afe458f45b86a439985e0c6cae53912d487bc88e
Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Thu Jul 25 21:00:37 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 10 20:02:09 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afe458f4
dev-util/ccache: fix compilation with libfmt >=10
Closes: https://bugs.gentoo.org/935291
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/37725
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/ccache/ccache-4.10.1.ebuild | 1 +
dev-util/ccache/files/ccache-4.10-libfmt11.patch | 85 ++++++++++++++++++++++++
2 files changed, 86 insertions(+)
diff --git a/dev-util/ccache/ccache-4.10.1.ebuild b/dev-util/ccache/ccache-4.10.1.ebuild
index f50d51039e24..9b08f52780fa 100644
--- a/dev-util/ccache/ccache-4.10.1.ebuild
+++ b/dev-util/ccache/ccache-4.10.1.ebuild
@@ -73,6 +73,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.5-nvcc-test.patch
"${FILESDIR}"/${PN}-4.0-objdump.patch
"${FILESDIR}"/${PN}-4.10-avoid-run-user.patch
+ "${FILESDIR}"/${PN}-4.10-libfmt11.patch
)
src_unpack() {
diff --git a/dev-util/ccache/files/ccache-4.10-libfmt11.patch b/dev-util/ccache/files/ccache-4.10-libfmt11.patch
new file mode 100644
index 000000000000..37ed2167611a
--- /dev/null
+++ b/dev-util/ccache/files/ccache-4.10-libfmt11.patch
@@ -0,0 +1,85 @@
+
+Patch from:
+https://github.com/ccache/ccache/commit/71f772e9d3d4f8045cfa7bccd03bd21c1e8fbef1
+
+From db136b6819d95bb53582e4fea8c328029c8f5681 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
+Date: Tue, 2 Jul 2024 12:53:04 +0200
+Subject: [PATCH] build: Try harder to determine FMT_VERSION
+
+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")
+
+Patch from:
+https://github.com/ccache/ccache/commit/3b09afc5f792f0bd0a15cf6b8408ea40eb069787
+
+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()
next reply other threads:[~2024-08-10 20:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 20:02 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-10 5:06 [gentoo-commits] repo/gentoo:master commit in: dev-util/ccache/, dev-util/ccache/files/ Sam James
2024-12-20 6:29 Sam James
2024-05-31 18:46 Sam James
2024-03-24 18:02 Sam James
2024-02-07 19:20 Sam James
2023-05-20 4:39 Sam James
2023-05-17 4:01 Sam James
2022-09-23 1:56 Sam James
2022-08-22 21:08 Sam James
2022-05-20 19:26 Matt Turner
2022-04-09 11:26 Sam James
2022-04-09 4:30 Sam James
2021-06-18 10:15 Sergei Trofimovich
2020-11-18 19:07 Sergei Trofimovich
2020-10-19 18:49 Sergei Trofimovich
2019-02-02 23:40 Sergei Trofimovich
2019-01-04 21:13 Sergei Trofimovich
2018-10-15 21:13 Sergei Trofimovich
2018-08-15 8:39 Sergei Trofimovich
2016-05-27 20:40 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1723320129.afe458f45b86a439985e0c6cae53912d487bc88e.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox