Skip to content

Commit

Permalink
media-gfx/mayo: fix gcc14 build
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/935121
Signed-off-by: David Roman <[email protected]>
  • Loading branch information
stkw0 committed Jul 4, 2024
1 parent 6390610 commit 8391289
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 13 deletions.
43 changes: 43 additions & 0 deletions media-gfx/mayo/files/mayo-0.8.0-gcc14.patch
Original file line number Diff line number Diff line change
@@ -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)
14 changes: 1 addition & 13 deletions media-gfx/mayo/mayo-0.8.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

2 comments on commit 8391289

@antecrescent
Copy link
Contributor

@antecrescent antecrescent commented on 8391289 Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you forgot to remove the BDEPEND restriction.

@stkw0
Copy link
Contributor Author

@stkw0 stkw0 commented on 8391289 Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, fixed in the next commit. Thank you!

Please sign in to comment.