commit:     6c34a781ed2d42b1923889fc4f6d015813d2fcdf
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 12 17:56:54 2023 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Apr 12 17:57:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c34a781

sci-libs/caffe2: to build with gcc-13

Closes: https://bugs.gentoo.org/904086
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 sci-libs/caffe2/caffe2-2.0.0-r1.ebuild         |  1 +
 sci-libs/caffe2/files/caffe2-2.0.0-gcc13.patch | 41 ++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/sci-libs/caffe2/caffe2-2.0.0-r1.ebuild 
b/sci-libs/caffe2/caffe2-2.0.0-r1.ebuild
index ae14175b2471..48a01218a4e0 100644
--- a/sci-libs/caffe2/caffe2-2.0.0-r1.ebuild
+++ b/sci-libs/caffe2/caffe2-2.0.0-r1.ebuild
@@ -80,6 +80,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-1.13.0-install-dirs.patch
        "${FILESDIR}"/${PN}-1.12.0-glog-0.6.0.patch
        "${FILESDIR}"/${PN}-1.13.1-tensorpipe.patch
+       "${FILESDIR}"/${P}-gcc13.patch
 )
 
 src_prepare() {

diff --git a/sci-libs/caffe2/files/caffe2-2.0.0-gcc13.patch 
b/sci-libs/caffe2/files/caffe2-2.0.0-gcc13.patch
new file mode 100644
index 000000000000..acbcebad0a5d
--- /dev/null
+++ b/sci-libs/caffe2/files/caffe2-2.0.0-gcc13.patch
@@ -0,0 +1,41 @@
+--- a/c10/util/Registry.h   2023-03-09 17:42:00.000000000 -0500
++++ b/c10/util/Registry.h       2023-04-09 20:38:33.108135511 -0400
+@@ -16,6 +16,7 @@
+ #include <memory>
+ #include <mutex>
+ #include <string>
++#include <stdexcept>
+ #include <unordered_map>
+ #include <vector>
+ 
+--- a/torch/csrc/jit/passes/quantization/quantization_type.h    2023-03-09 
17:42:00.000000000 -0500
++++ b/torch/csrc/jit/passes/quantization/quantization_type.h    2023-04-09 
20:43:43.124806308 -0400
+@@ -1,5 +1,6 @@
+ #pragma once
+ #include <ostream>
++#include <cstdint>
+ 
+ namespace torch {
+ namespace jit {
+
+--- a/torch/csrc/jit/runtime/logging.cpp    2023-03-09 17:42:00.000000000 -0500
++++ b/torch/csrc/jit/runtime/logging.cpp    2023-04-09 20:47:49.758142941 -0400
+@@ -1,6 +1,7 @@
+ #include <torch/csrc/jit/runtime/logging.h>
+ 
+ #include <atomic>
++#include <stdexcept>
+ #include <mutex>
+ #include <unordered_map>
+ 
+
+--- a/torch/csrc/lazy/core/multi_wait.cpp   2023-03-09 17:42:00.000000000 -0500
++++ b/torch/csrc/lazy/core/multi_wait.cpp   2023-04-09 20:50:36.608145172 -0400
+@@ -1,6 +1,7 @@
+ #include <torch/csrc/lazy/core/multi_wait.h>
+ 
+ #include <chrono>
++#include <stdexcept>
+ #include <exception>
+ 
+ namespace torch {

Reply via email to