commit:     bc01402b312ede7b9609225e18c6cc5ada6601d9
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Dec  8 18:22:25 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Tue Dec 10 08:36:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc01402b

sci-libs/cantera: 3.0.1-r2, fix build against fmt11

Closes: https://bugs.gentoo.org/945800
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/39638
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 sci-libs/cantera/cantera-3.0.1-r2.ebuild           |  3 +-
 .../files/cantera-3.0.1_add_fmt11_support.patch    | 46 ++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/sci-libs/cantera/cantera-3.0.1-r2.ebuild 
b/sci-libs/cantera/cantera-3.0.1-r2.ebuild
index 9a7d0ecd45b5..ffa880c04646 100644
--- a/sci-libs/cantera/cantera-3.0.1-r2.ebuild
+++ b/sci-libs/cantera/cantera-3.0.1-r2.ebuild
@@ -45,7 +45,7 @@ DEPEND="
        ${RDEPEND}
        dev-cpp/eigen:3
        dev-libs/boost:=
-       <dev-libs/libfmt-11
+       dev-libs/libfmt
        python? (
                $(python_gen_cond_dep '
                        dev-python/cython[${PYTHON_USEDEP}]
@@ -68,6 +68,7 @@ DEPEND="
 PATCHES=(
        "${FILESDIR}/${PN}-3.0.0_env.patch"
        "${FILESDIR}/${P}_fix_fmt_with_c++20.patch"
+       "${FILESDIR}/${P}_add_fmt11_support.patch"
 )
 
 pkg_setup() {

diff --git a/sci-libs/cantera/files/cantera-3.0.1_add_fmt11_support.patch 
b/sci-libs/cantera/files/cantera-3.0.1_add_fmt11_support.patch
new file mode 100644
index 000000000000..7e0d5333a105
--- /dev/null
+++ b/sci-libs/cantera/files/cantera-3.0.1_add_fmt11_support.patch
@@ -0,0 +1,46 @@
+This is upstream patch with removed changes for 
"doc/sphinx/develop/compiling/dependencies.md" file
+Upstream issue: https://github.com/Cantera/cantera/issues/1735
+Gentoo issue: https://bugs.gentoo.org/945800
+
+From c8f190928fd7a074944f0f4c58661f84a282a35e Mon Sep 17 00:00:00 2001
+From: Ray Speth <[email protected]>
+Date: Wed, 24 Jul 2024 20:12:18 -0400
+Subject: [PATCH] Add support for fmt 11.0
+
+Resolves #1735
+---
+ SConstruct                                   | 2 +-
+ doc/sphinx/develop/compiling/dependencies.md | 2 +-
+ include/cantera/base/fmt.h                   | 8 ++++++++
+ 3 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 3863fe3a32..0b607ac891 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -216,7 +216,7 @@ config_options = [
+            options with spaces, for example, "cxx_flags='-g -Wextra -O3 
--std=c++14'"
+            """,
+         {
+-            "cl": "/EHsc /std:c++17",
++            "cl": "/EHsc /std:c++17 /utf-8",
+             "default": "-std=c++17"
+         }),
+     Option(
+diff --git a/include/cantera/base/fmt.h b/include/cantera/base/fmt.h
+index 1e0b3a0423..6b4d734fe3 100644
+--- a/include/cantera/base/fmt.h
++++ b/include/cantera/base/fmt.h
+@@ -42,4 +42,12 @@ void fmt_append(fmt::memory_buffer& b, const std::string& 
tmpl, Args... args) {
+ }
+ #endif
+ 
++#if FMT_VERSION > 100000
++  #if CT_USE_SYSTEM_FMT
++    #include <fmt/ranges.h>
++  #else
++    #include <fmt/join.h>
++  #endif
++#endif
++
+ #endif

Reply via email to