1 |
commit: 3520c896622945dc7372c17e6655643317ca5b92 |
2 |
Author: Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de> |
3 |
AuthorDate: Mon Sep 26 13:53:31 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=3520c896 |
7 |
|
8 |
gui-libs/vte-common: Add new package, version 0.70.0 |
9 |
|
10 |
To be used by x11-libs/vte and gui-libs/vte. |
11 |
|
12 |
Signed-off-by: Pascal Jäger <pascal.jaeger <AT> leimstift.de> |
13 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
14 |
|
15 |
gui-libs/vte-common/Manifest | 1 + |
16 |
.../files/vte-common-0.70.0-musl-W_EXITCODE.patch | 29 ++++++++ |
17 |
gui-libs/vte-common/metadata.xml | 12 ++++ |
18 |
gui-libs/vte-common/vte-common-0.70.0.ebuild | 78 ++++++++++++++++++++++ |
19 |
4 files changed, 120 insertions(+) |
20 |
|
21 |
diff --git a/gui-libs/vte-common/Manifest b/gui-libs/vte-common/Manifest |
22 |
new file mode 100644 |
23 |
index 000000000000..fce788af39c0 |
24 |
--- /dev/null |
25 |
+++ b/gui-libs/vte-common/Manifest |
26 |
@@ -0,0 +1 @@ |
27 |
+DIST vte-0.70.0.tar.bz2 499283 BLAKE2B 694cf4dfee334e9b54bb8e47f862167acbb8ffc7ac8e81889acd4786449cb45944a87a5adaa036f46458c350ca2119bb356e90dfa71f03638c9c2b14d2ccb877 SHA512 362b71296ae39a16b55402f524a39b063f66ae237e6e161ccc89ca2bb1f2a5c43f4d706d9f3bfae12a99fdb81c4e70408c7f3eca2c01316950b0a3a1a1d79423 |
28 |
|
29 |
diff --git a/gui-libs/vte-common/files/vte-common-0.70.0-musl-W_EXITCODE.patch b/gui-libs/vte-common/files/vte-common-0.70.0-musl-W_EXITCODE.patch |
30 |
new file mode 100644 |
31 |
index 000000000000..b629613feaf6 |
32 |
--- /dev/null |
33 |
+++ b/gui-libs/vte-common/files/vte-common-0.70.0-musl-W_EXITCODE.patch |
34 |
@@ -0,0 +1,29 @@ |
35 |
+https://gitlab.gnome.org/GNOME/vte/-/issues/72 |
36 |
+https://bugs.gentoo.org/835489 |
37 |
+https://bugs.gentoo/org/554416 |
38 |
+ |
39 |
+From 1c1de9e9119cf1e0ef45a594ca9bbf306d2209cb Mon Sep 17 00:00:00 2001 |
40 |
+From: |
41 |
+Date: Fri, 12 Mar 2021 08:41:13 -0600 |
42 |
+Subject: [PATCH] Expanded non-standard W_EXITCODE macro for Musl compatibility |
43 |
+ |
44 |
+--- a/src/widget.cc |
45 |
++++ b/src/widget.cc |
46 |
+@@ -20,8 +20,6 @@ |
47 |
+ |
48 |
+ #include "widget.hh" |
49 |
+ |
50 |
+-#include <sys/wait.h> // for W_EXITCODE |
51 |
+- |
52 |
+ #include <exception> |
53 |
+ #include <new> |
54 |
+ #include <string> |
55 |
+@@ -235,7 +233,7 @@ void |
56 |
+ Widget::dispose() noexcept |
57 |
+ { |
58 |
+ if (m_terminal->terminate_child()) { |
59 |
+- int status = W_EXITCODE(0, SIGKILL); |
60 |
++ int status = (0) << 8 | (SIGKILL); // W_EXITCODE(ret, sig) |
61 |
+ emit_child_exited(status); |
62 |
+ } |
63 |
+ } |
64 |
|
65 |
diff --git a/gui-libs/vte-common/metadata.xml b/gui-libs/vte-common/metadata.xml |
66 |
new file mode 100644 |
67 |
index 000000000000..27f2ae98ad3b |
68 |
--- /dev/null |
69 |
+++ b/gui-libs/vte-common/metadata.xml |
70 |
@@ -0,0 +1,12 @@ |
71 |
+<?xml version="1.0" encoding="UTF-8"?> |
72 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
73 |
+<pkgmetadata> |
74 |
+ <maintainer type="project"> |
75 |
+ <email>gnome@g.o</email> |
76 |
+ <name>Gentoo GNOME Desktop</name> |
77 |
+ </maintainer> |
78 |
+ <use> |
79 |
+ <flag name="systemd">Support moving terminal child processes to their own systemd user scopes |
80 |
+ to avoid terminal getting killed due to child causing OOM</flag> |
81 |
+ </use> |
82 |
+</pkgmetadata> |
83 |
|
84 |
diff --git a/gui-libs/vte-common/vte-common-0.70.0.ebuild b/gui-libs/vte-common/vte-common-0.70.0.ebuild |
85 |
new file mode 100644 |
86 |
index 000000000000..56323d80fd76 |
87 |
--- /dev/null |
88 |
+++ b/gui-libs/vte-common/vte-common-0.70.0.ebuild |
89 |
@@ -0,0 +1,78 @@ |
90 |
+# Copyright 1999-2022 Gentoo Authors |
91 |
+# Distributed under the terms of the GNU General Public License v2 |
92 |
+ |
93 |
+EAPI=8 |
94 |
+PYTHON_COMPAT=( python3_{8..11} ) |
95 |
+ |
96 |
+inherit gnome.org meson python-any-r1 |
97 |
+ |
98 |
+DESCRIPTION="Library providing a virtual terminal emulator widget" |
99 |
+HOMEPAGE="https://wiki.gnome.org/Apps/Terminal/VTE https://gitlab.gnome.org/GNOME/vte" |
100 |
+ |
101 |
+# Once SIXEL support ships (0.66 or later), might need xterm license (but code might be considered upgraded to LGPL-3+) |
102 |
+LICENSE="LGPL-3+ GPL-3+" |
103 |
+SLOT="2.91" # vte_api_version in meson.build |
104 |
+IUSE="systemd" |
105 |
+KEYWORDS="~amd64" |
106 |
+ |
107 |
+# Upstream is hostile and refuses to upload tarballs. |
108 |
+SRC_URI="https://gitlab.gnome.org/GNOME/vte-${PV}/-/archive/${PV}/vte-${PV}.tar.bz2" |
109 |
+ |
110 |
+DEPEND=" |
111 |
+ || ( >=gui-libs/gtk-4.0.1:4 >=x11-libs/gtk+-3.24.22:3 ) |
112 |
+ >=dev-libs/fribidi-1.0.0 |
113 |
+ >=dev-libs/glib-2.52:2 |
114 |
+ >=x11-libs/pango-1.22.0 |
115 |
+ >=dev-libs/libpcre2-10.21 |
116 |
+ systemd? ( >=sys-apps/systemd-220:= ) |
117 |
+ sys-libs/zlib |
118 |
+ x11-libs/pango |
119 |
+" |
120 |
+RDEPEND=" |
121 |
+ !<x11-libs/vte-0.70.0 |
122 |
+" |
123 |
+BDEPEND=" |
124 |
+ ${PYTHON_DEPS} |
125 |
+ dev-libs/libxml2:2 |
126 |
+ dev-util/glib-utils |
127 |
+ >=sys-devel/gettext-0.19.8 |
128 |
+ virtual/pkgconfig |
129 |
+" |
130 |
+ |
131 |
+S="${WORKDIR}/vte-0.70.0" |
132 |
+ |
133 |
+src_prepare() { |
134 |
+ default |
135 |
+ use elibc_musl && eapply "${FILESDIR}"/${PN}-0.70.0-musl-W_EXITCODE.patch |
136 |
+} |
137 |
+ |
138 |
+src_configure() { |
139 |
+ local emesonargs=( |
140 |
+ -Da11y=false |
141 |
+ -Ddebugg=false |
142 |
+ -Ddocs=false |
143 |
+ -Dgir=false |
144 |
+ -Dfribidi=true # pulled in by pango anyhow |
145 |
+ -Dglade=false |
146 |
+ -Dgnutls=false |
147 |
+ -Dgtk3=false |
148 |
+ -Dgtk4=false |
149 |
+ -Dicu=false |
150 |
+ $(meson_use systemd _systemd) |
151 |
+ -Dvapi=false |
152 |
+ ) |
153 |
+ meson_src_configure |
154 |
+} |
155 |
+ |
156 |
+src_install() { |
157 |
+ exeinto /usr/libexec/ |
158 |
+ doexe "${BUILD_DIR}"/src/vte-urlencode-cwd |
159 |
+ insinto /etc/profile.d/ |
160 |
+ newins "${BUILD_DIR}"/src/vte.sh vte-${SLOT}.sh |
161 |
+ newins "${BUILD_DIR}"/src/vte.csh vte-${SLOT}.csh |
162 |
+ if use systemd; then |
163 |
+ insinto /usr/lib/systemd/user/vte-spawn-.scode.d/ |
164 |
+ newins "${S}"/src/vte-spawn-.scope.conf defaults.conf |
165 |
+ fi |
166 |
+ einstalldocs |
167 |
+} |