commit: 4cd1d262361ad70ed510e934944786974b6b1e2e Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Mon Nov 17 06:59:22 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Nov 17 07:08:05 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cd1d262
sci-libs/vtk: support libfmt-12 Closes: https://bugs.gentoo.org/963035 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/44649 Closes: https://github.com/gentoo/gentoo/pull/44649 Signed-off-by: Sam James <sam <AT> gentoo.org> .../vtk/files/vtk-9.4.2-ThirdParty-libfmt-12.patch | 55 ++++++++++++++++++++++ sci-libs/vtk/vtk-9.4.2-r2.ebuild | 1 + 2 files changed, 56 insertions(+) diff --git a/sci-libs/vtk/files/vtk-9.4.2-ThirdParty-libfmt-12.patch b/sci-libs/vtk/files/vtk-9.4.2-ThirdParty-libfmt-12.patch new file mode 100644 index 000000000000..75bfdbd43a4e --- /dev/null +++ b/sci-libs/vtk/files/vtk-9.4.2-ThirdParty-libfmt-12.patch @@ -0,0 +1,55 @@ +https://bugs.gentoo.org/963035 +https://gitlab.kitware.com/third-party/seacas/-/commit/324c9e0ad360da1dc819b0134e1bda3956048b43 + +Changed paths and removed irrevelant changes for upstream vtk. + +These changed were merged into vtk itself in: +https://gitlab.kitware.com/vtk/vtk/-/commit/505fe4b14477e00d7285ea771200a2cba099f26a + +From 324c9e0ad360da1dc819b0134e1bda3956048b43 Mon Sep 17 00:00:00 2001 +From: Greg Sjaardema <[email protected]> +Date: Fri, 11 Jul 2025 09:34:37 -0600 +Subject: [PATCH] IOSS: Update fmt library; use std::localtime instead of + fmt::localtime + +--- a/ThirdParty/ioss/vtkioss/Ioss_Utils.C ++++ b/ThirdParty/ioss/vtkioss/Ioss_Utils.C +@@ -1,4 +1,4 @@ +-// Copyright(C) 1999-2024 National Technology & Engineering Solutions ++// Copyright(C) 1999-2025 National Technology & Engineering Solutions + // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + // NTESS, the U.S. Government retains certain rights in this software. + // +@@ -161,13 +161,13 @@ std::ostream &Ioss::Utils::get_debug_stream() { return *m_debugStream; } + void Ioss::Utils::time_and_date(char *time_string, char *date_string, size_t length) + { + std::time_t t = std::time(nullptr); +- std::string time = fmt::format("{:%H:%M:%S}", fmt::localtime(t)); ++ std::string time = fmt::format("{:%H:%M:%S}", *std::localtime(&t)); + std::string date; + if (length >= 10) { +- date = fmt::format("{:%Y/%m/%d}", fmt::localtime(t)); ++ date = fmt::format("{:%Y/%m/%d}", *std::localtime(&t)); + } + else { +- date = fmt::format("{:%y/%m/%d}", fmt::localtime(t)); ++ date = fmt::format("{:%y/%m/%d}", *std::localtime(&t)); + } + copy_string(time_string, time, 9); + copy_string(date_string, date, length + 1); +--- a/ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.C ++++ b/ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.C +@@ -1051,8 +1051,8 @@ size_t Iocgns::Utils::common_write_metadata(int file_ptr, const Ioss::Region &re + + CGERR(cg_goto(file_ptr, base, "end")); + std::time_t t = std::time(nullptr); +- std::string date = fmt::format("{:%Y/%m/%d}", fmt::localtime(t)); +- std::string time = fmt::format("{:%H:%M:%S}", fmt::localtime(t)); ++ std::string date = fmt::format("{:%Y/%m/%d}", *std::localtime(&t)); ++ std::string time = fmt::format("{:%H:%M:%S}", *std::localtime(&t)); + + std::string code_version = region.get_optional_property("code_version", "unknown"); + std::string code_name = region.get_optional_property("code_name", "unknown"); +-- +GitLab + diff --git a/sci-libs/vtk/vtk-9.4.2-r2.ebuild b/sci-libs/vtk/vtk-9.4.2-r2.ebuild index f606b65e1ab1..8b41399cd7ae 100644 --- a/sci-libs/vtk/vtk-9.4.2-r2.ebuild +++ b/sci-libs/vtk/vtk-9.4.2-r2.ebuild @@ -168,6 +168,7 @@ PATCHES=( "${FILESDIR}/${PN}-9.4.2-vtk-m-jobpool-size.patch" "${FILESDIR}/${PN}-9.4.2-ThirdParty-gcc15.patch" "${FILESDIR}/${PN}-9.4.2-find-hdf5-in-global-scope.patch" + "${FILESDIR}/${PN}-9.4.2-ThirdParty-libfmt-12.patch" ) DOCS=( CONTRIBUTING.md README.md )
