summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-04-30 11:03:44 -0400
committerIonen Wolkens <ionen@gentoo.org>2024-04-30 11:43:06 -0400
commit1fd831828b26a92051ae4a7a74e9ffe3ec058987 (patch)
treeea5f10d0d7a0adcb71794424f521e7615e9201e2 /media-gfx/ueberzugpp
parentprofiles: remove premature wd40 inherit on i486 (diff)
downloadgentoo-1fd831828b26a92051ae4a7a74e9ffe3ec058987.tar.gz
gentoo-1fd831828b26a92051ae4a7a74e9ffe3ec058987.tar.bz2
gentoo-1fd831828b26a92051ae4a7a74e9ffe3ec058987.zip
media-gfx/ueberzugpp: fix build w/ libc++ if USE=X or USE=wayland
Two different issues with libc++ (clang18+libstdc++ is fine), USE=wayland is missing an header, and USE=X fails due to incomplete C++20 support (std::jthread) in libc++. Fortunately for the latter, the support does exist and is merely locked behind -fexperimental-library (unsure if the implementation works right but it seems ok at a glance). Closes: https://bugs.gentoo.org/930977 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'media-gfx/ueberzugpp')
-rw-r--r--media-gfx/ueberzugpp/files/ueberzugpp-2.9.4-libcxx18.patch11
-rw-r--r--media-gfx/ueberzugpp/ueberzugpp-2.9.4.ebuild13
2 files changed, 23 insertions, 1 deletions
diff --git a/media-gfx/ueberzugpp/files/ueberzugpp-2.9.4-libcxx18.patch b/media-gfx/ueberzugpp/files/ueberzugpp-2.9.4-libcxx18.patch
new file mode 100644
index 000000000000..ccd808e5b5f1
--- /dev/null
+++ b/media-gfx/ueberzugpp/files/ueberzugpp-2.9.4-libcxx18.patch
@@ -0,0 +1,11 @@
+https://bugs.gentoo.org/930977
+https://github.com/jstkdng/ueberzugpp/issues/179
+--- a/src/canvas/wayland/config/dummy.hpp
++++ b/src/canvas/wayland/config/dummy.hpp
+@@ -20,4 +20,6 @@
+ #include "../config.hpp"
+
++#include <string>
++
+ class DummyWaylandConfig : public WaylandConfig
+ {
diff --git a/media-gfx/ueberzugpp/ueberzugpp-2.9.4.ebuild b/media-gfx/ueberzugpp/ueberzugpp-2.9.4.ebuild
index d37875aaaff8..44c32b0c573f 100644
--- a/media-gfx/ueberzugpp/ueberzugpp-2.9.4.ebuild
+++ b/media-gfx/ueberzugpp/ueberzugpp-2.9.4.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit cmake
+inherit cmake flag-o-matic toolchain-funcs
DESCRIPTION="Drop in replacement for ueberzug written in C++"
HOMEPAGE="https://github.com/jstkdng/ueberzugpp/"
@@ -53,7 +53,18 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}"/${P}-libcxx18.patch
+)
+
src_configure() {
+ if use X && tc-is-clang && has_version sys-libs/libcxx; then
+ # X support makes use of C++20's std::jthread which is currently
+ # marked experimental (at least) in <=libcxx-18 (should limit
+ # version in above libcxx check whenever this becomes unnecessary)
+ append-cxxflags $(test-flags-CXX -fexperimental-library)
+ fi
+
# TODO?: wayfire plugin is skipped for now (needs wlroots which is
# likely to be messier), but could be handled if there is a demand