1 |
commit: aea188873a1ce1c3c5feba20c2e6f8d74fc7cbc7 |
2 |
Author: Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de> |
3 |
AuthorDate: Sun Sep 25 17:59:00 2022 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 26 14:48:31 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aea18887 |
7 |
|
8 |
gui-libs/vte: Add new package, version 0.70.0 |
9 |
|
10 |
This is the GTK-4 version of x11-libs/vte. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/866986 |
13 |
Closes: https://github.com/gentoo/gentoo/pull/27443 |
14 |
Signed-off-by: Pascal Jäger <pascal.jaeger <AT> leimstift.de> |
15 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
16 |
|
17 |
gui-libs/vte/Manifest | 2 + |
18 |
.../vte/files/vte-0.66.2-musl-W_EXITCODE.patch | 29 ++++++ |
19 |
gui-libs/vte/metadata.xml | 13 +++ |
20 |
gui-libs/vte/vte-0.70.0.ebuild | 101 +++++++++++++++++++++ |
21 |
4 files changed, 145 insertions(+) |
22 |
|
23 |
diff --git a/gui-libs/vte/Manifest b/gui-libs/vte/Manifest |
24 |
new file mode 100644 |
25 |
index 000000000000..4874bf4d208c |
26 |
--- /dev/null |
27 |
+++ b/gui-libs/vte/Manifest |
28 |
@@ -0,0 +1,2 @@ |
29 |
+DIST vte-0.70.0-command-notify.patch.xz 9040 BLAKE2B 108dd05d00409af90b1fd3e9b5c3b0e5586ac80204cef8840fda935204cbc480fec1193e2a0a2782f98e2b094c3caebbfe61cf18631b16921df05cf3808afd22 SHA512 92123e7f5cb6ef876f2b2b108dbef59bce212efebd64cd790d49d9ee3215344acd848eec5d326fe2c3bd236846ed3b896148024390093491b2f6e2f7c46e2bd1 |
30 |
+DIST vte-0.70.0.tar.bz2 499283 BLAKE2B 694cf4dfee334e9b54bb8e47f862167acbb8ffc7ac8e81889acd4786449cb45944a87a5adaa036f46458c350ca2119bb356e90dfa71f03638c9c2b14d2ccb877 SHA512 362b71296ae39a16b55402f524a39b063f66ae237e6e161ccc89ca2bb1f2a5c43f4d706d9f3bfae12a99fdb81c4e70408c7f3eca2c01316950b0a3a1a1d79423 |
31 |
|
32 |
diff --git a/gui-libs/vte/files/vte-0.66.2-musl-W_EXITCODE.patch b/gui-libs/vte/files/vte-0.66.2-musl-W_EXITCODE.patch |
33 |
new file mode 100644 |
34 |
index 000000000000..b629613feaf6 |
35 |
--- /dev/null |
36 |
+++ b/gui-libs/vte/files/vte-0.66.2-musl-W_EXITCODE.patch |
37 |
@@ -0,0 +1,29 @@ |
38 |
+https://gitlab.gnome.org/GNOME/vte/-/issues/72 |
39 |
+https://bugs.gentoo.org/835489 |
40 |
+https://bugs.gentoo/org/554416 |
41 |
+ |
42 |
+From 1c1de9e9119cf1e0ef45a594ca9bbf306d2209cb Mon Sep 17 00:00:00 2001 |
43 |
+From: |
44 |
+Date: Fri, 12 Mar 2021 08:41:13 -0600 |
45 |
+Subject: [PATCH] Expanded non-standard W_EXITCODE macro for Musl compatibility |
46 |
+ |
47 |
+--- a/src/widget.cc |
48 |
++++ b/src/widget.cc |
49 |
+@@ -20,8 +20,6 @@ |
50 |
+ |
51 |
+ #include "widget.hh" |
52 |
+ |
53 |
+-#include <sys/wait.h> // for W_EXITCODE |
54 |
+- |
55 |
+ #include <exception> |
56 |
+ #include <new> |
57 |
+ #include <string> |
58 |
+@@ -235,7 +233,7 @@ void |
59 |
+ Widget::dispose() noexcept |
60 |
+ { |
61 |
+ if (m_terminal->terminate_child()) { |
62 |
+- int status = W_EXITCODE(0, SIGKILL); |
63 |
++ int status = (0) << 8 | (SIGKILL); // W_EXITCODE(ret, sig) |
64 |
+ emit_child_exited(status); |
65 |
+ } |
66 |
+ } |
67 |
|
68 |
diff --git a/gui-libs/vte/metadata.xml b/gui-libs/vte/metadata.xml |
69 |
new file mode 100644 |
70 |
index 000000000000..da14147f6e15 |
71 |
--- /dev/null |
72 |
+++ b/gui-libs/vte/metadata.xml |
73 |
@@ -0,0 +1,13 @@ |
74 |
+<?xml version="1.0" encoding="UTF-8"?> |
75 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
76 |
+<pkgmetadata> |
77 |
+ <maintainer type="project"> |
78 |
+ <email>gnome@g.o</email> |
79 |
+ <name>Gentoo GNOME Desktop</name> |
80 |
+ </maintainer> |
81 |
+ <use> |
82 |
+ <flag name="icu">Enable legacy charset support using <pkg>dev-libs/icu</pkg></flag> |
83 |
+ <flag name="systemd">Support moving terminal child processes to their own systemd user scopes |
84 |
+ to avoid terminal getting killed due to child causing OOM</flag> |
85 |
+ </use> |
86 |
+</pkgmetadata> |
87 |
|
88 |
diff --git a/gui-libs/vte/vte-0.70.0.ebuild b/gui-libs/vte/vte-0.70.0.ebuild |
89 |
new file mode 100644 |
90 |
index 000000000000..8f8f7969670b |
91 |
--- /dev/null |
92 |
+++ b/gui-libs/vte/vte-0.70.0.ebuild |
93 |
@@ -0,0 +1,101 @@ |
94 |
+# Copyright 1999-2022 Gentoo Authors |
95 |
+# Distributed under the terms of the GNU General Public License v2 |
96 |
+ |
97 |
+EAPI=8 |
98 |
+PYTHON_COMPAT=( python3_{8..11} ) |
99 |
+ |
100 |
+inherit gnome.org meson python-any-r1 vala xdg |
101 |
+ |
102 |
+DESCRIPTION="Library providing a virtual terminal emulator widget" |
103 |
+HOMEPAGE="https://wiki.gnome.org/Apps/Terminal/VTE https://gitlab.gnome.org/GNOME/vte" |
104 |
+ |
105 |
+# Once SIXEL support ships (0.66 or later), might need xterm license (but code might be considered upgraded to LGPL-3+) |
106 |
+LICENSE="LGPL-3+ GPL-3+" |
107 |
+SLOT="2.91-gtk4" # vte_api_version + "-gtk4" in meson.build |
108 |
+IUSE="+crypt debug gtk-doc +icu +introspection systemd +vala vanilla" |
109 |
+KEYWORDS="~amd64" |
110 |
+REQUIRED_USE=" |
111 |
+ gtk-doc? ( introspection ) |
112 |
+ vala? ( introspection ) |
113 |
+" |
114 |
+ |
115 |
+# Upstream is hostile and refuses to upload tarballs. |
116 |
+SRC_URI="https://gitlab.gnome.org/GNOME/${PN}/-/archive/${PV}/${P}.tar.bz2" |
117 |
+SRC_URI="${SRC_URI} !vanilla? ( https://dev.gentoo.org/~mattst88/distfiles/${PN}-0.70.0-command-notify.patch.xz )" |
118 |
+ |
119 |
+DEPEND=" |
120 |
+ >=gui-libs/gtk-4.0.1:4[introspection?] |
121 |
+ >=dev-libs/fribidi-1.0.0 |
122 |
+ >=dev-libs/glib-2.52:2 |
123 |
+ crypt? ( >=net-libs/gnutls-3.2.7:0= ) |
124 |
+ icu? ( dev-libs/icu:= ) |
125 |
+ >=x11-libs/pango-1.22.0 |
126 |
+ >=dev-libs/libpcre2-10.21:= |
127 |
+ systemd? ( >=sys-apps/systemd-220:= ) |
128 |
+ sys-libs/zlib |
129 |
+ introspection? ( >=dev-libs/gobject-introspection-1.56:= ) |
130 |
+ x11-libs/pango[introspection?] |
131 |
+" |
132 |
+RDEPEND="${DEPEND} |
133 |
+ ~gui-libs/vte-common-${PV}[systemd?] |
134 |
+" |
135 |
+BDEPEND=" |
136 |
+ ${PYTHON_DEPS} |
137 |
+ dev-libs/libxml2:2 |
138 |
+ dev-util/glib-utils |
139 |
+ gtk-doc? ( dev-util/gi-docgen ) |
140 |
+ >=sys-devel/gettext-0.19.8 |
141 |
+ virtual/pkgconfig |
142 |
+ vala? ( $(vala_depend) ) |
143 |
+" |
144 |
+ |
145 |
+src_prepare() { |
146 |
+ default |
147 |
+ use vala && vala_setup |
148 |
+ xdg_environment_reset |
149 |
+ |
150 |
+ use elibc_musl && eapply "${FILESDIR}"/${PN}-0.66.2-musl-W_EXITCODE.patch |
151 |
+ |
152 |
+ if ! use vanilla; then |
153 |
+ # Part of https://src.fedoraproject.org/rpms/vte291/raw/f37/f/vte291-cntnr-precmd-preexec-scroll.patch |
154 |
+ # Adds OSC 777 support for desktop notifications in gnome-terminal or elsewhere |
155 |
+ eapply "${WORKDIR}"/${PN}-0.70.0-command-notify.patch |
156 |
+ fi |
157 |
+ |
158 |
+ # -Ddebugg option enables various debug support via VTE_DEBUG, but also ggdb3; strip the latter |
159 |
+ sed -e '/ggdb3/d' -i meson.build || die |
160 |
+ sed -i 's/vte_gettext_domain = vte_api_name/vte_gettext_domain = vte_gtk4_api_name/' meson.build || die |
161 |
+} |
162 |
+ |
163 |
+src_configure() { |
164 |
+ local emesonargs=( |
165 |
+ -Da11y=true |
166 |
+ $(meson_use debug debugg) |
167 |
+ $(meson_use gtk-doc docs) |
168 |
+ $(meson_use introspection gir) |
169 |
+ -Dfribidi=true # pulled in by pango anyhow |
170 |
+ -Dglade=true |
171 |
+ $(meson_use crypt gnutls) |
172 |
+ -Dgtk3=false |
173 |
+ -Dgtk4=true |
174 |
+ $(meson_use icu) |
175 |
+ $(meson_use systemd _systemd) |
176 |
+ $(meson_use vala vapi) |
177 |
+ ) |
178 |
+ meson_src_configure |
179 |
+} |
180 |
+ |
181 |
+src_install() { |
182 |
+ meson_install # not meson_src_install because this would include einstalldocs, which would result in file collisions with x11-libs/vte |
183 |
+ # Remove files that are provided by gui-libs/vte-common |
184 |
+ rm "${ED}"/usr/libexec/vte-urlencode-cwd || die |
185 |
+ rm "${ED}"/etc/profile.d/vte.sh || die |
186 |
+ rm "${ED}"/etc/profile.d/vte.csh || die |
187 |
+ if use systemd; then |
188 |
+ rm "${ED}"/usr/lib/systemd/user/vte-spawn-.scope.d/defaults.conf || die |
189 |
+ fi |
190 |
+ if use gtk-doc; then |
191 |
+ mkdir -p "${ED}"/usr/share/gtk-doc/ || die |
192 |
+ mv "${ED}"/usr/share/doc/vte-${SLOT} "${ED}"/usr/share/gtk-doc/ || die |
193 |
+ fi |
194 |
+} |