1 |
commit: 79d31f8585e3cab9c6a7dcbcf643be5456303933 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 16 16:21:46 2021 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 16 18:24:52 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79d31f85 |
7 |
|
8 |
x11-terms/rxvt-unicode: do not segfault on exit with USE=perl and recent Perl versions |
9 |
|
10 |
As addressed upstream and subsequently accepted by Debian. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/764386 |
13 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
14 |
|
15 |
.../rxvt-unicode-9.22-perl-segfault-on-exit.patch | 36 +++++++ |
16 |
x11-terms/rxvt-unicode/rxvt-unicode-9.22-r8.ebuild | 116 +++++++++++++++++++++ |
17 |
2 files changed, 152 insertions(+) |
18 |
|
19 |
diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-perl-segfault-on-exit.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-perl-segfault-on-exit.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..0a3cb1ec4cd |
22 |
--- /dev/null |
23 |
+++ b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-perl-segfault-on-exit.patch |
24 |
@@ -0,0 +1,36 @@ |
25 |
+Backported from the upstream CVS repository, see: |
26 |
+http://cvs.schmorp.de/rxvt-unicode/src/rxvtperl.h?r1=1.28&r2=1.29 |
27 |
+http://cvs.schmorp.de/rxvt-unicode/src/rxvtperl.xs?r1=1.246&r2=1.247 |
28 |
+ |
29 |
+--- rxvt-unicode/src/rxvtperl.h 2012/06/12 10:45:53 1.28 |
30 |
++++ rxvt-unicode/src/rxvtperl.h 2020/06/30 07:31:24 1.29 |
31 |
+@@ -51,7 +51,9 @@ |
32 |
+ { |
33 |
+ char **perl_environ; |
34 |
+ |
35 |
++ #if 0 // see rxvtperl.xs |
36 |
+ ~rxvt_perl_interp (); |
37 |
++ #endif |
38 |
+ |
39 |
+ void init (); |
40 |
+ void init (rxvt_term *term); |
41 |
+--- rxvt-unicode/src/rxvtperl.xs 2020/01/20 09:35:12 1.246 |
42 |
++++ rxvt-unicode/src/rxvtperl.xs 2020/06/30 07:31:24 1.247 |
43 |
+@@ -372,6 +372,9 @@ |
44 |
+ |
45 |
+ static PerlInterpreter *perl; |
46 |
+ |
47 |
++#if 0 /* we are not a library anymore, so doing this is just not worth it */ |
48 |
++/*THINK/TODO: this has the side effect of, of course, not calling destructors. */ |
49 |
++/* but therse are not guaranteed anyway... */ |
50 |
+ rxvt_perl_interp::~rxvt_perl_interp () |
51 |
+ { |
52 |
+ if (perl) |
53 |
+@@ -381,6 +384,7 @@ |
54 |
+ PERL_SYS_TERM (); |
55 |
+ } |
56 |
+ } |
57 |
++#endif |
58 |
+ |
59 |
+ void |
60 |
+ rxvt_perl_interp::init () |
61 |
|
62 |
diff --git a/x11-terms/rxvt-unicode/rxvt-unicode-9.22-r8.ebuild b/x11-terms/rxvt-unicode/rxvt-unicode-9.22-r8.ebuild |
63 |
new file mode 100644 |
64 |
index 00000000000..c689716a01b |
65 |
--- /dev/null |
66 |
+++ b/x11-terms/rxvt-unicode/rxvt-unicode-9.22-r8.ebuild |
67 |
@@ -0,0 +1,116 @@ |
68 |
+# Copyright 1999-2021 Gentoo Authors |
69 |
+# Distributed under the terms of the GNU General Public License v2 |
70 |
+ |
71 |
+EAPI=7 |
72 |
+ |
73 |
+inherit autotools desktop systemd prefix |
74 |
+ |
75 |
+COLOUR_PATCH_NAME="${PN}-9.22_24-bit-color_cpixl-20201108.patch" |
76 |
+ |
77 |
+DESCRIPTION="rxvt clone with xft and unicode support" |
78 |
+HOMEPAGE="http://software.schmorp.de/pkg/rxvt-unicode.html" |
79 |
+SRC_URI="http://dist.schmorp.de/rxvt-unicode/Attic/${P}.tar.bz2 |
80 |
+ https://dev.gentoo.org/~marecki/dists/${PN}/${COLOUR_PATCH_NAME}.xz" |
81 |
+ |
82 |
+LICENSE="GPL-3" |
83 |
+SLOT="0" |
84 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris" |
85 |
+IUSE="-24-bit-color 256-color blink fading-colors +font-styles gdk-pixbuf iso14755 +mousewheel |
86 |
+ +perl -sgrmouse startup-notification unicode3 +utmp +wtmp xft" |
87 |
+ |
88 |
+RESTRICT="test" |
89 |
+ |
90 |
+RDEPEND=">=sys-libs/ncurses-5.7-r6:= |
91 |
+ media-libs/fontconfig |
92 |
+ x11-libs/libX11 |
93 |
+ x11-libs/libXrender |
94 |
+ gdk-pixbuf? ( x11-libs/gdk-pixbuf ) |
95 |
+ kernel_Darwin? ( dev-perl/Mac-Pasteboard ) |
96 |
+ perl? ( dev-lang/perl:= ) |
97 |
+ startup-notification? ( x11-libs/startup-notification ) |
98 |
+ xft? ( x11-libs/libXft )" |
99 |
+DEPEND="${RDEPEND} |
100 |
+ x11-base/xorg-proto" |
101 |
+BDEPEND="virtual/pkgconfig" |
102 |
+ |
103 |
+PATCHES=( |
104 |
+ "${FILESDIR}"/${PN}-9.06-case-insensitive-fs.patch |
105 |
+ "${FILESDIR}"/${PN}-9.21-xsubpp.patch |
106 |
+ "${FILESDIR}"/${PN}-9.22-perl-segfault-on-exit.patch |
107 |
+ "${FILESDIR}"/${PN}-9.22-sgr-mouse-mode-flag.patch |
108 |
+ "${WORKDIR}"/${COLOUR_PATCH_NAME} |
109 |
+) |
110 |
+DOCS=( |
111 |
+ Changes |
112 |
+ README.FAQ |
113 |
+ doc/README.xvt |
114 |
+ doc/changes.txt |
115 |
+ doc/etc/${PN}.term{cap,info} |
116 |
+ doc/rxvt-tabbed |
117 |
+) |
118 |
+ |
119 |
+src_prepare() { |
120 |
+ default |
121 |
+ |
122 |
+ # kill the rxvt-unicode terminfo file - #192083 |
123 |
+ sed -i -e "/rxvt-unicode.terminfo/d" doc/Makefile.in || die "sed failed" |
124 |
+ |
125 |
+ # use xsubpp from Prefix - #506500 |
126 |
+ hprefixify -q '"' -w "/xsubpp/" src/Makefile.in |
127 |
+ |
128 |
+ eautoreconf |
129 |
+} |
130 |
+ |
131 |
+src_configure() { |
132 |
+ # --enable-everything goes first: the order of the arguments matters |
133 |
+ econf --enable-everything \ |
134 |
+ $(use_enable 24-bit-color) \ |
135 |
+ $(use_enable 256-color) \ |
136 |
+ $(use_enable blink text-blink) \ |
137 |
+ $(use_enable fading-colors fading) \ |
138 |
+ $(use_enable font-styles) \ |
139 |
+ $(use_enable gdk-pixbuf pixbuf) \ |
140 |
+ $(use_enable iso14755) \ |
141 |
+ $(use_enable mousewheel) \ |
142 |
+ $(use_enable perl) \ |
143 |
+ $(use_enable sgrmouse) \ |
144 |
+ $(use_enable startup-notification) \ |
145 |
+ $(use_enable unicode3) \ |
146 |
+ $(use_enable utmp) \ |
147 |
+ $(use_enable wtmp) \ |
148 |
+ $(use_enable xft) |
149 |
+} |
150 |
+ |
151 |
+src_compile() { |
152 |
+ default |
153 |
+ |
154 |
+ sed -i \ |
155 |
+ -e 's/RXVT_BASENAME = "rxvt"/RXVT_BASENAME = "urxvt"/' \ |
156 |
+ "${S}"/doc/rxvt-tabbed || die |
157 |
+} |
158 |
+ |
159 |
+src_install() { |
160 |
+ default |
161 |
+ |
162 |
+ systemd_douserunit "${FILESDIR}"/urxvtd.service |
163 |
+ |
164 |
+ make_desktop_entry urxvt rxvt-unicode utilities-terminal \ |
165 |
+ "System;TerminalEmulator" |
166 |
+} |
167 |
+ |
168 |
+pkg_postinst() { |
169 |
+ if use 24-bit-color; then |
170 |
+ ewarn |
171 |
+ ewarn "You have enabled 24-bit colour support in ${PN}, which is UNOFFICIAL and INCOMPLETE." |
172 |
+ ewarn "You may or may not encounter visual glitches or stability issues. When in doubt," |
173 |
+ ewarn "rebuild =${CATEGORY}/${PF} with USE=-24-bit-color (the default setting)." |
174 |
+ ewarn |
175 |
+ fi |
176 |
+ |
177 |
+ if use sgrmouse; then |
178 |
+ ewarn |
179 |
+ ewarn "Support for the SGR 1006 mouse extension in ${PN} is UNOFFICIAL and provided as-is." |
180 |
+ ewarn "When in doubt, rebuild =${CATEGORY}/${PF} with USE=-sgrmouse (the default setting)." |
181 |
+ ewarn |
182 |
+ fi |
183 |
+} |