Gentoo Archives: gentoo-commits

From: Jason Donenfeld <zx2c4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-terms/rxvt/files/, x11-terms/rxvt/
Date: Mon, 01 May 2017 17:12:38
Message-Id: 1493658744.fabb4eec7e2144c418733c13c958c931cc691bb2.zx2c4@gentoo
1 commit: fabb4eec7e2144c418733c13c958c931cc691bb2
2 Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 1 15:45:45 2017 +0000
4 Commit: Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
5 CommitDate: Mon May 1 17:12:24 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fabb4eec
7
8 x11-terms/rxvt: add patch for integer overflow
9
10 Package-Manager: Portage-2.3.5, Repoman-2.3.2
11
12 .../rxvt/files/rxvt-2.7.10-integer-overflow.patch | 11 +++
13 x11-terms/rxvt/rxvt-2.7.10-r5.ebuild | 93 ++++++++++++++++++++++
14 2 files changed, 104 insertions(+)
15
16 diff --git a/x11-terms/rxvt/files/rxvt-2.7.10-integer-overflow.patch b/x11-terms/rxvt/files/rxvt-2.7.10-integer-overflow.patch
17 new file mode 100644
18 index 00000000000..edb13856ed7
19 --- /dev/null
20 +++ b/x11-terms/rxvt/files/rxvt-2.7.10-integer-overflow.patch
21 @@ -0,0 +1,11 @@
22 +--- rxvt-2.7.10/src/command.c 2003-03-26 07:01:23.000000000 +0100
23 ++++ rxvt-2.7.10-patched/src/command.c 2017-04-27 12:06:05.682072274 +0200
24 +@@ -2096,7 +2096,7 @@
25 + i = ch - CSI_ICH;
26 + ndef = get_byte_array_bit(csi_defaults, i);
27 + for (p = 0; p < nargs; p++)
28 +- if (arg[p] == -1)
29 ++ if (arg[p] < 0 || arg[p] > 30000)
30 + arg[p] = ndef;
31 +
32 + #ifdef DEBUG_CMD
33
34 diff --git a/x11-terms/rxvt/rxvt-2.7.10-r5.ebuild b/x11-terms/rxvt/rxvt-2.7.10-r5.ebuild
35 new file mode 100644
36 index 00000000000..58b2e6901f7
37 --- /dev/null
38 +++ b/x11-terms/rxvt/rxvt-2.7.10-r5.ebuild
39 @@ -0,0 +1,93 @@
40 +# Copyright 1999-2017 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=5
44 +
45 +inherit eutils flag-o-matic libtool toolchain-funcs
46 +
47 +DESCRIPTION="A nice small x11 terminal"
48 +HOMEPAGE="http://rxvt.sourceforge.net/
49 + http://www.giga.it.okayama-u.ac.jp/~ishihara/opensource/"
50 +SRC_URI="mirror://sourceforge/rxvt/${P}.tar.gz
51 + http://www.giga.it.okayama-u.ac.jp/~ishihara/opensource/${P}-xim-fix.patch.gz"
52 +
53 +LICENSE="GPL-2"
54 +SLOT="0"
55 +KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86"
56 +IUSE="motif cjk xgetdefault linguas_ja linuxkeys"
57 +
58 +RDEPEND="x11-libs/libX11
59 + x11-libs/libXpm
60 + x11-libs/libXext
61 + motif? ( >=x11-libs/motif-2.3:0 )"
62 +DEPEND="${RDEPEND}
63 + x11-proto/xproto"
64 +
65 +src_prepare() {
66 + tc-export AR
67 +
68 + epatch "${FILESDIR}"/${P}-line-scroll.patch\
69 + "${FILESDIR}"/${P}-asneeded.patch
70 + use motif && epatch "${FILESDIR}"/${P}-azz4.diff
71 + if use cjk ; then
72 + epatch "${DISTDIR}"/${P}-xim-fix.patch.gz
73 + if use linguas_ja ; then
74 + epatch "${FILESDIR}"/${P}-rk.patch
75 + fi
76 + fi
77 +
78 + epatch "${FILESDIR}"/${P}-CVE-2008-1142-DISPLAY.patch
79 + epatch "${FILESDIR}"/${P}-integer-overflow.patch
80 + elibtoolize
81 +}
82 +
83 +src_compile() {
84 + local term
85 + if [ -n "${RXVT_TERM}" ] ; then
86 + term="${RXVT_TERM}"
87 + else
88 + term="rxvt"
89 + fi
90 +
91 + # bug #22325
92 + use linuxkeys && append-flags -DLINUX_KEYS
93 +
94 + econf \
95 + --enable-everything \
96 + --enable-rxvt-scroll \
97 + --enable-next-scroll \
98 + --enable-xterm-scroll \
99 + --enable-transparency \
100 + --enable-xpm-background \
101 + --enable-utmp \
102 + --enable-wtmp \
103 + --enable-mousewheel \
104 + --enable-slipwheeling \
105 + --enable-smart-resize \
106 + --enable-256-color \
107 + --enable-menubar \
108 + $(use_enable cjk languages) \
109 + --enable-xim \
110 + --enable-shared \
111 + --enable-keepscrolling \
112 + --with-term=${term} \
113 + $(use_enable xgetdefault)
114 +}
115 +
116 +src_install() {
117 + emake DESTDIR="${D}" install
118 +
119 + cd "${S}"/doc
120 + dodoc README* *.txt BUGS FAQ
121 + dohtml *.html
122 +}
123 +
124 +pkg_postinst() {
125 + einfo
126 + einfo "If you want to change default TERM variable other than rxvt,"
127 + einfo "set RXVT_TERM environment variable and then emerge rxvt."
128 + einfo "Especially, if you use rxvt under monochrome X you might need to run"
129 + einfo "\t RXVT_TERM=rxvt-basic emerge rxvt"
130 + einfo "otherwise curses based program will not work."
131 + einfo
132 +}