summaryrefslogtreecommitdiff
path: root/dev-util/ccache
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-11 11:06:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-11 11:06:02 +0100
commite93a38d535f2c29b55a5756d2de99425986b0bf3 (patch)
treec0fa85c173d211181d0093e7dc031623e7b8a9a3 /dev-util/ccache
parentfbbf0ee3d56a6fd27adf182c6907dc745623aeaa (diff)
gentoo auto-resync : 11:08:2024 - 11:06:01
Diffstat (limited to 'dev-util/ccache')
-rw-r--r--dev-util/ccache/Manifest6
-rw-r--r--dev-util/ccache/ccache-4.10.1.ebuild1
-rw-r--r--dev-util/ccache/ccache-4.10.2.ebuild139
-rw-r--r--dev-util/ccache/files/ccache-4.10-libfmt11.patch85
4 files changed, 230 insertions, 1 deletions
diff --git a/dev-util/ccache/Manifest b/dev-util/ccache/Manifest
index b520ec9bcbcf..9d25198e9cd6 100644
--- a/dev-util/ccache/Manifest
+++ b/dev-util/ccache/Manifest
@@ -2,6 +2,7 @@ AUX ccache-3.5-nvcc-test.patch 262 BLAKE2B b33b6372e8e6c597d7ed6c781f0a3ac22c435
AUX ccache-4.0-objdump.patch 271 BLAKE2B e641f1acef1e439660753c781d5760ab2a2530ce8dbcfacb1c3835523ec41ff35701536698827f11c39c1e06641fcf6b57d374944ecb44888a66c7860f97b813 SHA512 cc53f44b173c1ae66258aa573182ae936304dac9daf8489a20c45dbe3d554df207bd93b370da2c86b22fbc4edf5fd954f84fd18812d97d41a88ea4c7926f117c
AUX ccache-4.10-avoid-run-user.patch 1288 BLAKE2B 265e331172f97edfed18c5dc06e2726e083aede833eea9fdf13c940e1534f9e1d7705353679c22d3d6518870667c10f3df2410f56b59f0540535720a37a590c9 SHA512 2f4efb047ce1f735935b575e006e78be2c640330aef3acc4cc2610f36943dbd5c5c6582e1310ae1a5d53c24f3437fe764a7397a7a786dd2f53feaea867d4422e
AUX ccache-4.10-blake3.patch 3043 BLAKE2B ef372a28e43ac0bc0545c1a9421a96a92d370f2da6195cd0d3f951eb6def1ba802494b6d0e62796aa24b8e1afc35f87b1f1a66626cbe074639ff34bcf1ad3d09 SHA512 20cfa0e9c2e05955e28256d6561a4773db269d21dcb0bee5d545c13439352d0990eef88a5bbbe282adffcfc88ac9bf5e3a95d2c4a6f4d232ebaf53d0e0587355
+AUX ccache-4.10-libfmt11.patch 3412 BLAKE2B 7cff9b41cb1c31f4a133396e3209a8ed31dddaf20978361ad6b6f511abde34baa2c500c2b16c20230032165489752f139812410fda608a80db204d074defa233 SHA512 f265ea1c35a394815df28263041737e07fbaaadd2cddaa7554c3600ba01c8d445623715d6a3b1436787580880fc75aef9ed939b3f80148bc9d2e10021adc5e29
AUX ccache-4.10-unittest-httplib.patch 1230 BLAKE2B 0346b9629618c37ab967630d7d76943037b55737e23fc5cb6aa9d2f1add16291e8620aa4a6aabfaf9338fa708454cbe6fb77bafb8fe896f7e9d938045a323a19 SHA512 fc54c2ab507659b6a60155d739fb218b1b86399803d73f8e3f897aea2041da406213821904148e1f534bac1c81140c0e6aac1956b01a53c2b42654887f03c764
AUX ccache-4.8-avoid-run-user.patch 1270 BLAKE2B 2ecdef4b319a2d3c2fd4740667ae22b6134d977b252d9d022acfab723cc9c2cd7f11ea4f2674d5461fba5e3cf5574de39a3df840451670b68689569b819f2cb3 SHA512 898b0d7041af9765ac2a5f26099256e96c881d39452eb0cc90d859f9f64dab2d31d673d6b538958337a6f7848eb2ebf309064e96c37567e271a42e46c948b0ea
AUX ccache-4.9-avoid-run-user.patch 1274 BLAKE2B 04df088e408ac82390f8f2c83d1a148b067a9c0215f70b0e51c347b4bc0c7221b56ea2608b9035a70ec1e9c4668d50f11db2fa223a2dc21ea0cdde71e2beb548 SHA512 b0faf07c1d3bfeafe8c7b25106e9abaaee47c3439254c8cf92e1140957760d6cfaf25ca1076c935973e5b58730bb2188957902e25f2293b0e8754fb2f13fa625
@@ -10,6 +11,8 @@ AUX ccache-config-3 2171 BLAKE2B 2b2e3c61b6f6897847503a4c8fa3b906cea1f39e1ebd21f
DIST ccache-4.10-docs.tar.xz 82900 BLAKE2B 0d0ef988bb21bc05642c2d5ea42bdf9c87c190464d3bddc08a8bf281b003670a50a07a88bf31731a781d5454be09b87168bc8df3b239b93f4e3d3e3f667e9094 SHA512 c1030e76dea6eaeed5548dda80a766bb9c944f8e1223157eb7a227f08f80f48a8fece4e1a99beced4c6075b40ec7de3df662111c95f9390624f6e9a3b04c1083
DIST ccache-4.10.1.tar.xz 485228 BLAKE2B 875914cf89bd696e240e93bb8146339b60a96ec5584b9908578abffe1d8f1b5604907e34a578916d291186fb742907b3d5d75f7a0e9775822ffd206358d44535 SHA512 98ad98ddc2d05d5779e507190df838317b41bc9b196aa20a43bba21700712b671c581ce7379094625dc6411e720cc7f5cb03d4d3b1df925cb5ce614363dea373
DIST ccache-4.10.1.tar.xz.asc 833 BLAKE2B 0d072b247a09e3823636f69bec81031f2ab02ee6aaf545b7dfd71d39b66c60d47e80bf01e0b53ef674234044c724f2b8fd05698f4166fe4ac76bbf915b9a7089 SHA512 aaf008593cfb26050a6548421249f60a74ecc98b65140a18304a162d9d2d754742e4a35a0aa216a5d12fdac435dc530808b70c6916c1a20c0d7dd25eaf7d4988
+DIST ccache-4.10.2.tar.xz 485460 BLAKE2B 7352b8b48ed889e1f251ae59cb7cd9d01d7d3226b58a7823be176907dc074ff22ca5d6a271e2caede7d97a65457b9067b48e9d39ab833bf45fb055eb3bfe7607 SHA512 3815c71d7266c32839acb306763268018acc58b3bbbd9ec79fc101e4217c1720d2ad2f01645bf69168c1c61d27700b6f3bb755cfa82689cca69824f015653f3c
+DIST ccache-4.10.2.tar.xz.asc 833 BLAKE2B 4a975aa1e8c9c12cf4df60b31cea10023e8e8efb561608dd652ecef2a0e575b41c5f6cfc551b0f3bd860e3b4a59061fcf870a67f5625f6a82cab104045ac2e57 SHA512 4afcc08563f0dfc8ccfd0797ea2cc26227b253415b9b9fe8ed90ef47e5b8d1dbcb8cbdd17ebf95acd6a367260f6a405764d0d0c5432cfbe2dce4d098b2a7a1b9
DIST ccache-4.10.tar.xz 411272 BLAKE2B 55e4efa41a53a664e8dfa25cd2b21dda80bf7847c467cf361058aaf06425a5c494d9e5b71e70f7d9327a6d57672af271946ad4e24fbd99f49c0bb8c256a9a2a5 SHA512 8bc8451a5e66300cb26ef7c1348d1b47e164ede17eab7f5f857a584a9def599c5c752d5591017a5e5b9673f108bb7a4a5bd59368e379fed9531e833fca8808a4
DIST ccache-4.10.tar.xz.asc 833 BLAKE2B 4cdd6ce059ab54dca39365120b74e675a5a8c16e280f2e812d7a81feecda4283b63f84bf921d8b18493e348de38850facc95d48f0631e9ae46f33d7154a01f21 SHA512 faa3177d07a63746fe1dac1e748124d85207aa51d55894523e88074bf3b02deba7e961d2f7de48265acc6898bdd083bb48cb65631b02d9f7bdb7a27364d0fc4c
DIST ccache-4.8-docs.tar.xz 80280 BLAKE2B e8e00dd10a00670ff3a0c3f5ab0966469fa5246de64724e24d0287020d4636fb5a1f59421aaa094d05b88bd20efd2a4a06e46dfb957bcf77ad2ea61fd02551c9 SHA512 e0036a7f86b458028c6e24158f95b62e40d9f659031e16adc59c067096bb728f1cb583a2edecaf2118f15b8e00f028fa6f1cfa2466fba76b7c870cca93a883eb
@@ -19,7 +22,8 @@ DIST ccache-4.9-docs.tar.xz 82684 BLAKE2B bc3517803cac75a0124358f740e3f4f4b92334
DIST ccache-4.9.1.tar.xz 583764 BLAKE2B 9ebaf335fda54666e4bfc8f2c402f2b908b3922f3898b6a739b0256481256c6121546021b80fd2dbc93f3aea254db63a8624b97b2820b88e73e502a243bf2562 SHA512 5ae4537a7e546b779c80f5adadce1349a84da3a47b255bda06cb2678ee5403307f013c08c8541a21f6f1fb36a0b64bdbcf785fbd2fcfe3009150117250e75b0b
DIST ccache-4.9.1.tar.xz.asc 833 BLAKE2B a157b0c2c0777732d9a51fb7519f561fac098bbac9ba33fe453b210a6e9a34372b5d00b0fa940d2b783ab0eb48e7bc98707de884b191d83120d9ad8239c9fb76 SHA512 43605eca0f9a62565486c6c7ff622fc4d18a400518aa9c9e3c9d865a99c40c63a6a09d42ccd3428d28575c4de8a69be89c93830d26261d3479792e67179d0839
EBUILD ccache-4.10-r1.ebuild 4042 BLAKE2B 8d7a172e6ed69a5203757e47f4c03388fb9bd282f1f431dd2516f6616f0b4deb2819efec77db84ee88ac242515a6cab1738a3e72fb4e9c873bbcb4886f6e8174 SHA512 47c5f5872a6ee236f321229b039ab82aab7c5405a55dd77d50d984e222d1fb0b3b4ca0f3590085eb16f4b995fd7699c4921efd5f5dd0048e0375c072c1e26ca7
-EBUILD ccache-4.10.1.ebuild 3929 BLAKE2B c7e5459cc873feefb3392122ac83e82d1ef314296b7e91d86a18a2bc2f67b4538ac0e19c67011c2b50d990d99e9aa4aa43e7c15cbec6fbf217e04be79bfd9d6d SHA512 bcddd274a408c04a5dc8d411da37a0e42210f11b31cb5e72431487cf764a7edb04341b32309a3cd5e80933a84d9bd55d7678e98d8060da6a1b8b591b35cec2fb
+EBUILD ccache-4.10.1.ebuild 3970 BLAKE2B 31b3a353219816c49785697398ca8176c67a000a7e7e4db79569712265b5998a9b3c12125378280db5bb3d11698e08cd3bc43d713fce2de5407eedde88b4a84b SHA512 8f093c428225dadfc9a686dbbba25e3d96c7b25b8efc7dea0a02f499c709a7ff3ce4fbdd7035d26f86dc45de054a45130b64c3dfc66267cbd6edf468bb4b2197
+EBUILD ccache-4.10.2.ebuild 3929 BLAKE2B c7e5459cc873feefb3392122ac83e82d1ef314296b7e91d86a18a2bc2f67b4538ac0e19c67011c2b50d990d99e9aa4aa43e7c15cbec6fbf217e04be79bfd9d6d SHA512 bcddd274a408c04a5dc8d411da37a0e42210f11b31cb5e72431487cf764a7edb04341b32309a3cd5e80933a84d9bd55d7678e98d8060da6a1b8b591b35cec2fb
EBUILD ccache-4.8.3.ebuild 3752 BLAKE2B 0f308f104c92a68219f1a54b2122f6913030eaa59d72fe8730d0cdeff62d4db234146d4d2e6abed64f5c86b770ea335c8a06788590b6d23d040d869ab8e3347c SHA512 bec7baf39f9f603fa242be8bfba506431e1de7e8c8f182a6f1b15fe14823748478dc24db2672282831baadb65153a1a20d19441ced32c56f0da6ec2ccd68d190
EBUILD ccache-4.9.1-r1.ebuild 3786 BLAKE2B 3e41e799c604cfc5ac812fe89e9db4e48684a72aeee08c6a0a281d01df9a9a892bd5f74713ffdceac450419510df8c5fac06a5a1aced7ec6e552d777968f3bc0 SHA512 af2a9f19eaad9512be78ccf8657ae0270f5d872f084cd9edc7978630b3c2219010cf58eeb108c734a0cdf04e513c3856c3f60af84b97ff3d0015a2eed724bc59
MISC metadata.xml 710 BLAKE2B 0a93cf3dd4222eb2fd500c3cafdff3c01eacecc489a471270922fc5dd1daf58cd1398ddfb7ab4d271a6e84d5a3da5c3e7a341b1e7994af7b10fd432318de7c5e SHA512 dbfa6b8d8f435e25887b25ce25df65184a7f315986ee60a1c723d0e6592ca73bc7414b6650014812eb882e7e39bed953eaa21139a414043c50c018a7b780e6f1
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/ccache-4.10.2.ebuild b/dev-util/ccache/ccache-4.10.2.ebuild
new file mode 100644
index 000000000000..f50d51039e24
--- /dev/null
+++ b/dev-util/ccache/ccache-4.10.2.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# XXX: We don't use CCACHE_* for these vars like we do in e.g. cmake/libabigail/qemu
+# because Portage unsets them. Aaaah!
+#
+# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-ccache-docs
+# Set to 1 if prebuilt, 0 if not
+# (the construct below is to allow overriding from env for script)
+: ${MY_DOCS_PREBUILT:=1}
+
+MY_DOCS_PREBUILT_DEV=sam
+MY_DOCS_VERSION=$(ver_cut 1-2)
+# Default to generating docs (inc. man pages) if no prebuilt; overridden later
+# See bug #784815
+MY_DOCS_USEFLAG="+doc"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/joelrosdahl.asc
+inherit cmake toolchain-funcs flag-o-matic prefix verify-sig
+
+DESCRIPTION="Fast compiler cache"
+HOMEPAGE="https://ccache.dev/"
+SRC_URI="https://github.com/ccache/ccache/releases/download/v${PV}/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( https://github.com/ccache/ccache/releases/download/v${PV}/${P}.tar.xz.asc )"
+if [[ ${MY_DOCS_PREBUILT} == 1 ]] ; then
+ SRC_URI+=" !doc? ( https://dev.gentoo.org/~${MY_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${MY_DOCS_VERSION}-docs.tar.xz )"
+ MY_DOCS_USEFLAG="doc"
+fi
+
+# https://ccache.dev/license.html
+# ccache, blake3, NonstdSpan, tl-expected
+LICENSE="GPL-3+ || ( CC0-1.0 Apache-2.0 ) Boost-1.0 CC0-1.0"
+LICENSE+=" elibc_mingw? ( LGPL-3 ISC PSF-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+# Enable 'static-c++' by default to make 'gcc' ebuild Just Work: bug #761220
+IUSE="${MY_DOCS_USEFLAG} redis +static-c++ test"
+RESTRICT="!test? ( test )"
+
+# TODO: package NonstdSpan, TlExpected
+DEPEND="
+ >=app-arch/zstd-1.3.4:=
+ >=dev-cpp/cpp-httplib-0.10.6:=
+ >=dev-libs/blake3-1.4.0:=
+ >=dev-libs/libfmt-8.0.0:=
+ >=dev-libs/xxhash-0.8.0
+ redis? ( >=dev-libs/hiredis-0.13.3:= )
+"
+RDEPEND="
+ ${DEPEND}
+ dev-util/shadowman
+ sys-apps/gentoo-functions
+"
+# Needed for eselect calls in pkg_*
+IDEPEND="dev-util/shadowman"
+
+# clang-specific tests use dev-libs/elfutils to compare objects for equality.
+# Let's pull in the dependency unconditionally.
+BDEPEND="
+ doc? ( dev-ruby/asciidoctor )
+ test? (
+ >=dev-cpp/doctest-2.4.6
+ dev-libs/elfutils
+ )
+ verify-sig? ( sec-keys/openpgp-keys-joelrosdahl )
+"
+
+DOCS=( doc/{AUTHORS,MANUAL,NEWS}.adoc CONTRIBUTING.md README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5-nvcc-test.patch
+ "${FILESDIR}"/${PN}-4.0-objdump.patch
+ "${FILESDIR}"/${PN}-4.10-avoid-run-user.patch
+)
+
+src_unpack() {
+ # Avoid aborting on the doc tarball
+ if use verify-sig ; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc}
+ fi
+
+ default
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ cp "${FILESDIR}"/ccache-config-3 ccache-config || die
+ eprefixify ccache-config
+}
+
+src_configure() {
+ # Mainly used in tests
+ tc-export CC OBJDUMP
+
+ # Avoid dependency on libstdc++.so. Useful for cases when
+ # we would like to use ccache to build older gcc which injects
+ # into ccache locally built (possibly outdated) libstdc++
+ # See bug #761220 for examples.
+ #
+ # Ideally gcc should not use LD_PRELOAD to avoid this type of failure.
+ use static-c++ && append-ldflags -static-libstdc++
+
+ local mycmakeargs=(
+ -DENABLE_DOCUMENTATION=$(usex doc)
+ -DENABLE_TESTING=$(usex test)
+ -DDEPS=LOCAL
+ -DREDIS_STORAGE_BACKEND=$(usex redis)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ dobin ccache-config
+ insinto /usr/share/shadowman/tools
+ newins - ccache <<<"${EPREFIX}/usr/lib/ccache/bin"
+
+ # If USE=doc, there'll be newly generated docs which we install instead.
+ if ! use doc && [[ ${MY_DOCS_PREBUILT} == 1 ]] ; then
+ doman "${WORKDIR}"/${PN}-${MY_DOCS_VERSION}-docs/doc/*.[0-8]
+ fi
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]] ; then
+ eselect compiler-shadow remove ccache
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} ]] ; then
+ eselect compiler-shadow update ccache
+ fi
+}
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()