summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrahmajit das <brahmajit.xyz@gmail.com>2022-06-27 10:35:21 +0530
committerSam James <sam@gentoo.org>2022-06-27 06:23:42 +0100
commitf2b020c57035cd3217078df35446e2a96012b53c (patch)
tree62f28f00814a22a51cb3130978faf2fcdd469ec0 /x11-terms
parentdev-libs/libxls: drop obsolete RESTRICT=test (diff)
downloadgentoo-f2b020c57035cd3217078df35446e2a96012b53c.tar.gz
gentoo-f2b020c57035cd3217078df35446e2a96012b53c.tar.bz2
gentoo-f2b020c57035cd3217078df35446e2a96012b53c.zip
x11-terms/gnome-terminal: fix missing define
https://gitlab.gnome.org/GNOME/vte/-/issues/72 Someone already tried to upstream a similar patch to gnome vte that would fix this but was rejected by maintainer. More info can be found on the link above. W_EXITCODE is missing in musl thus causing gnome-terminal build to fail. This patch checks if W_EXITCODE is not defined and then defines it. Signed-off-by: brahmajit das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/25872 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-terms')
-rw-r--r--x11-terms/gnome-terminal/files/gnome-terminal-3.44.1-fix-missing-wexitcode.patch21
-rw-r--r--x11-terms/gnome-terminal/gnome-terminal-3.44.1.ebuild1
2 files changed, 22 insertions, 0 deletions
diff --git a/x11-terms/gnome-terminal/files/gnome-terminal-3.44.1-fix-missing-wexitcode.patch b/x11-terms/gnome-terminal/files/gnome-terminal-3.44.1-fix-missing-wexitcode.patch
new file mode 100644
index 000000000000..aff2237db902
--- /dev/null
+++ b/x11-terms/gnome-terminal/files/gnome-terminal-3.44.1-fix-missing-wexitcode.patch
@@ -0,0 +1,21 @@
+https://gitlab.gnome.org/GNOME/vte/-/issues/72
+Someone already tried to upstream a similar patch to gnome vte that
+would fix this but was rejected by maintainer. More info can be found
+on the link above.
+
+W_EXITCODE is missing in musl thus causing gnome-terminal build to fail.
+This patch checks if W_EXITCODE is not defined and then defines it.
+--- a/src/terminal.cc
++++ b/src/terminal.cc
+@@ -47,6 +47,11 @@
+ GS_DEFINE_CLEANUP_FUNCTION0(TerminalOptions*, gs_local_options_free, terminal_options_free)
+ #define gs_free_options __attribute__ ((cleanup(gs_local_options_free)))
+
++/* fix for musl */
++#ifndef W_EXITCODE
++#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
++#endif
++
+ /* Wait-for-exit helper */
+
+ typedef struct {
diff --git a/x11-terms/gnome-terminal/gnome-terminal-3.44.1.ebuild b/x11-terms/gnome-terminal/gnome-terminal-3.44.1.ebuild
index ee6bad56441b..079de738bb03 100644
--- a/x11-terms/gnome-terminal/gnome-terminal-3.44.1.ebuild
+++ b/x11-terms/gnome-terminal/gnome-terminal-3.44.1.ebuild
@@ -47,6 +47,7 @@ DOC_CONTENTS="To get previous working directory inherited in new opened tab, or
. /etc/profile.d/vte-2.91.sh"
src_prepare() {
+ eapply "${FILESDIR}"/${P}-fix-missing-wexitcode.patch
if ! use vanilla; then
# https://bugzilla.gnome.org/show_bug.cgi?id=695371
# Fedora patches: