commit:     3eb644344c81572ed7a50f6e7a9c10db689dcd2c
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Mon Aug 19 18:28:49 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 16:08:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3eb64434

sci-libs/caffe2: fix build against libfmt-11

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38210
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/caffe2/caffe2-2.4.0.ebuild                |  1 +
 sci-libs/caffe2/files/caffe2-2.4.0-libfmt-11.patch | 44 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/sci-libs/caffe2/caffe2-2.4.0.ebuild 
b/sci-libs/caffe2/caffe2-2.4.0.ebuild
index 524dafcaacef..81a8906ea669 100644
--- a/sci-libs/caffe2/caffe2-2.4.0.ebuild
+++ b/sci-libs/caffe2/caffe2-2.4.0.ebuild
@@ -121,6 +121,7 @@ PATCHES=(
        ../patches/${PN}-2.4.0-exclude-aotriton.patch
        ../patches/${PN}-2.3.0-fix-rocm-gcc14-clamp.patch
        ../patches/${PN}-2.3.0-fix-libcpp.patch
+       "${FILESDIR}"/${PN}-2.4.0-libfmt-11.patch
 )
 
 src_prepare() {

diff --git a/sci-libs/caffe2/files/caffe2-2.4.0-libfmt-11.patch 
b/sci-libs/caffe2/files/caffe2-2.4.0-libfmt-11.patch
new file mode 100644
index 000000000000..9f6740a07f1f
--- /dev/null
+++ b/sci-libs/caffe2/files/caffe2-2.4.0-libfmt-11.patch
@@ -0,0 +1,44 @@
+Fix build against libfmt-11
+
+https://github.com/pytorch/pytorch/commit/83eedf66b9e7f52323d9f45c5dfaa64472452595
+https://github.com/pytorch/pytorch/pull/130628
+
+From 83eedf66b9e7f52323d9f45c5dfaa64472452595 Mon Sep 17 00:00:00 2001
+From: Aaron Gokaslan <[email protected]>
+Date: Tue, 16 Jul 2024 06:12:08 +0000
+Subject: [PATCH] Update libfmt submodule to 11.0.1 (#130628)
+
+Update libfmt to 11.0.1 reopen of 
https://github.com/pytorch/pytorch/pull/129962. Requires a kineto update and 
moves fmt::join into a separate include so added it where necessary.
+
+Pull Request resolved: https://github.com/pytorch/pytorch/pull/130628
+Approved by: https://github.com/aaronenyeshi
+--- a/torch/csrc/distributed/c10d/socket.cpp
++++ b/torch/csrc/distributed/c10d/socket.cpp
+@@ -32,6 +32,7 @@ C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated")
+ #include <fmt/chrono.h>
+ C10_DIAGNOSTIC_POP()
+ #include <fmt/format.h>
++#include <fmt/ranges.h>
+ 
+ #include <torch/csrc/distributed/c10d/error.h>
+ #include <torch/csrc/distributed/c10d/exception.h>
+--- a/torch/csrc/profiler/standalone/execution_trace_observer.cpp
++++ b/torch/csrc/profiler/standalone/execution_trace_observer.cpp
+@@ -10,6 +10,7 @@
+ #endif // _WIN32
+ 
+ #include <fmt/format.h>
++#include <fmt/ranges.h>
+ #include <chrono>
+ #include <cmath>
+ #include <fstream>
+--- a/torch/csrc/profiler/util.cpp
++++ b/torch/csrc/profiler/util.cpp
+@@ -5,6 +5,7 @@
+ #include <c10/util/ArrayRef.h>
+ #include <c10/util/irange.h>
+ #include <fmt/format.h>
++#include <fmt/ranges.h>
+ 
+ #ifdef USE_KINETO
+ #include <libkineto.h>

Reply via email to