commit:     8391289fa180bac84fc7217ddbe20ef10cb9a8e2
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Thu Jul  4 11:13:00 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Thu Jul  4 11:13:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8391289f

media-gfx/mayo: fix gcc14 build

Closes: https://bugs.gentoo.org/935121
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>

 media-gfx/mayo/files/mayo-0.8.0-gcc14.patch | 43 +++++++++++++++++++++++++++++
 media-gfx/mayo/mayo-0.8.0.ebuild            | 14 +---------
 2 files changed, 44 insertions(+), 13 deletions(-)

diff --git a/media-gfx/mayo/files/mayo-0.8.0-gcc14.patch 
b/media-gfx/mayo/files/mayo-0.8.0-gcc14.patch
new file mode 100644
index 000000000..c8763811f
--- /dev/null
+++ b/media-gfx/mayo/files/mayo-0.8.0-gcc14.patch
@@ -0,0 +1,43 @@
+From c4fdeb206235e9c37f34b18f5463d1e0702b2c14 Mon Sep 17 00:00:00 2001
+From: Hugues Delorme <[email protected]>
+Date: Thu, 25 Apr 2024 12:37:09 +0200
+Subject: [PATCH] Base: fix missing <algorithm> header
+
+---
+ src/base/property.cpp             | 2 ++
+ src/base/property_enumeration.cpp | 4 +++-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/base/property.cpp b/src/base/property.cpp
+index d98acb31..61b9c623 100644
+--- a/src/base/property.cpp
++++ b/src/base/property.cpp
+@@ -7,6 +7,8 @@
+ #include "property.h"
+ 
+ #include "property_enumeration.h"
++
++#include <algorithm>
+ #include <cassert>
+ 
+ namespace Mayo {
+diff --git a/src/base/property_enumeration.cpp 
b/src/base/property_enumeration.cpp
+index 556c3e8e..1ef57091 100644
+--- a/src/base/property_enumeration.cpp
++++ b/src/base/property_enumeration.cpp
+@@ -6,12 +6,14 @@
+ 
+ #include "property_enumeration.h"
+ 
++#include <algorithm>
+ #include <stdexcept>
+ 
+ namespace Mayo {
+ 
+ PropertyEnumeration::PropertyEnumeration(
+-        PropertyGroup* grp, const TextId& name, const Enumeration* 
enumeration)
++        PropertyGroup* grp, const TextId& name, const Enumeration* enumeration
++    )
+     : Property(grp, name),
+       m_enumeration(enumeration),
+       m_value(enumeration && enumeration->empty() ? 
enumeration->itemAt(0).value : -1)

diff --git a/media-gfx/mayo/mayo-0.8.0.ebuild b/media-gfx/mayo/mayo-0.8.0.ebuild
index 8fe1a4d74..87aefeee2 100644
--- a/media-gfx/mayo/mayo-0.8.0.ebuild
+++ b/media-gfx/mayo/mayo-0.8.0.ebuild
@@ -27,21 +27,9 @@ DEPEND="${RDEPEND}"
 
 PATCHES=(
        "${FILESDIR}"/${P}-nogit.patch
+       "${FILESDIR}"/${P}-gcc14.patch
 )
 
-pkg_pretend() {
-       # https://bugs.gentoo.org/935121
-       if tc-is-gcc && ver_test $(gcc-version) -ne 13 ; then
-               ewarn "GCC 13 is not in use! Versions different to gcc-13 are 
known to fail to compile."
-               ewarn "That is so even when any gcc >= 9 should work according 
to upstream."
-               ewarn "See https://bugs.gentoo.org/935121";
-       elif tc-is-clang; then
-               ewarn "LLVM/Clang >= 6 should work according to upstream but it 
is untested."
-               ewarn "If compilation fails, gcc-13 is known to work."
-               ewarn "See https://bugs.gentoo.org/935121";
-       fi
-}
-
 src_configure() {
        eqmake5 "CASCADE_INC_DIR=/usr/include/opencascade" 
"CASCADE_LIB_DIR=/usr/$(get_libdir)/opencascade" 
"ASSIMP_INC_DIR=/usr/include/assimp" "ASSIMP_LIB_DIR=/usr/$(get_libdir)" 
mayo.pro
 }

Reply via email to