1 |
commit: 41d32bc6b2bd13a6d30e056da207be67d9340038 |
2 |
Author: Nobel Barakat <nobelbarakat <AT> google <DOT> com> |
3 |
AuthorDate: Fri Jan 7 18:23:50 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 9 01:14:21 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41d32bc6 |
7 |
|
8 |
app-editors/gvim: version bump to v8.2.3950. |
9 |
|
10 |
This is needed to resolve CVE-2021-4136, CVE-2021-4166, CVE-2021-4187, |
11 |
CVE-2021-4192, and CVE-2021-4193. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/829658 |
14 |
Signed-off-by: Nobel Barakat <nobelbarakat <AT> google.com> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/23688 |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
app-editors/gvim/Manifest | 1 + |
19 |
app-editors/gvim/gvim-8.2.3950.ebuild | 383 ++++++++++++++++++++++++++++++++++ |
20 |
2 files changed, 384 insertions(+) |
21 |
|
22 |
diff --git a/app-editors/gvim/Manifest b/app-editors/gvim/Manifest |
23 |
index 667cc80e1a7a..67a02daea629 100644 |
24 |
--- a/app-editors/gvim/Manifest |
25 |
+++ b/app-editors/gvim/Manifest |
26 |
@@ -5,3 +5,4 @@ DIST vim-8.2.3567.tar.gz 15771981 BLAKE2B 5a10ce998769b73a9c3b30fccb84e90eef8242 |
27 |
DIST vim-8.2.3582.tar.gz 15778667 BLAKE2B c8eaa95fa4fde6514168a9f42a712a78442a7fe504b59158e2e7717b8025a59cb4d8948451d72418b29f2b7cf3619cd765ef43e1304d73f81a6cba405f9706e7 SHA512 f476f24390807b71a0e02729f1815b3743b6b42cdd28a414e9ceaf0aa3fd4cab91e3550a669b1c64b4cd83207515cfe2b4acf2358a6def60e216e101c979037e |
28 |
DIST vim-8.2.3669.tar.gz 15810783 BLAKE2B edac6dabfbeb11057c7b15830b30ec555a10942494bc89d7d85b4c701b5ff8f7413887e4e33e7b812057177ffebd2cdc74e69e86080a86cfee529b1da45156bb SHA512 83d172f7e1a3c5a8ea6238f2766bf077463d32d429111c08e5b28b8aafb8aea584807023281abf3b1710d61820fec8d2b808b42b5c50058d5eb4eb917deb19ab |
29 |
DIST vim-8.2.3741.tar.gz 15812097 BLAKE2B 5cd90d4c86774a63a020ac8f245005e3f7df030c1334f989862b17b70d7859d751f79dcaf98eb5216c23df6ce63f3406cb5cb3c643f9e8170987f4f705a49833 SHA512 19ee7cc27642253ad989e6e32ab96faa46b5e1feebba00cadd018af2de186358d686cfa5efbc8e5da00a14ceb42c226acfc81cb11cd87f34ec7ca901c98df814 |
30 |
+DIST vim-8.2.3950.tar.gz 15865929 BLAKE2B e713895f847194845c1a794fc796e97678b11686f51f9a33898d92cf1d3927c6d49cd24024b6c5cbbad82b45ab8293f6d4663f14e66a56cc8b361a5fabdbb0b0 SHA512 d9176f74a1b753fb9118362350b3da16f176c7bc5cc57b41dab1f470c1e80830e4a6f4851d5a090d6efdb272186bd8f6a8a5e08e5da5ae0474560cb32dd626be |
31 |
|
32 |
diff --git a/app-editors/gvim/gvim-8.2.3950.ebuild b/app-editors/gvim/gvim-8.2.3950.ebuild |
33 |
new file mode 100644 |
34 |
index 000000000000..a68b9011e15f |
35 |
--- /dev/null |
36 |
+++ b/app-editors/gvim/gvim-8.2.3950.ebuild |
37 |
@@ -0,0 +1,383 @@ |
38 |
+# Copyright 1999-2021 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+ |
43 |
+# Please bump with app-editors/vim-core and app-editors/gvim |
44 |
+ |
45 |
+VIM_VERSION="8.2" |
46 |
+LUA_COMPAT=( lua5-1 luajit ) |
47 |
+PYTHON_COMPAT=( python3_{7..10} ) |
48 |
+PYTHON_REQ_USE="threads(+)" |
49 |
+USE_RUBY="ruby24 ruby25 ruby26 ruby27" |
50 |
+ |
51 |
+inherit vim-doc flag-o-matic xdg-utils bash-completion-r1 prefix lua-single python-single-r1 ruby-single |
52 |
+ |
53 |
+if [[ ${PV} == 9999* ]]; then |
54 |
+ inherit git-r3 |
55 |
+ EGIT_REPO_URI="https://github.com/vim/vim.git" |
56 |
+ EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV} |
57 |
+else |
58 |
+ SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz |
59 |
+ https://dev.gentoo.org/~zlogene/distfiles/app-editors/vim/vim-8.2.0360-gentoo-patches.tar.xz" |
60 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris" |
61 |
+fi |
62 |
+S="${WORKDIR}"/vim-${PV} |
63 |
+ |
64 |
+DESCRIPTION="GUI version of the Vim text editor" |
65 |
+HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" |
66 |
+ |
67 |
+LICENSE="vim" |
68 |
+SLOT="0" |
69 |
+IUSE="acl aqua crypt cscope debug gtk gtk2 lua motif neXt netbeans nls perl python racket ruby selinux session sound tcl" |
70 |
+REQUIRED_USE=" |
71 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
72 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
73 |
+" |
74 |
+ |
75 |
+RDEPEND=" |
76 |
+ ~app-editors/vim-core-${PV} |
77 |
+ >=app-eselect/eselect-vi-1.1 |
78 |
+ >=sys-libs/ncurses-5.2-r2:0= |
79 |
+ x11-libs/libICE |
80 |
+ x11-libs/libSM |
81 |
+ x11-libs/libXext |
82 |
+ x11-libs/libXt |
83 |
+ acl? ( kernel_linux? ( sys-apps/acl ) ) |
84 |
+ !aqua? ( |
85 |
+ gtk? ( |
86 |
+ x11-libs/gtk+:3 |
87 |
+ x11-libs/libXft |
88 |
+ ) |
89 |
+ !gtk? ( |
90 |
+ gtk2? ( |
91 |
+ >=x11-libs/gtk+-2.6:2 |
92 |
+ x11-libs/libXft |
93 |
+ ) |
94 |
+ !gtk2? ( |
95 |
+ motif? ( >=x11-libs/motif-2.3:0 ) |
96 |
+ !motif? ( |
97 |
+ neXt? ( x11-libs/neXtaw ) |
98 |
+ !neXt? ( x11-libs/libXaw ) |
99 |
+ ) |
100 |
+ ) |
101 |
+ ) |
102 |
+ ) |
103 |
+ crypt? ( dev-libs/libsodium:= ) |
104 |
+ cscope? ( dev-util/cscope ) |
105 |
+ lua? ( |
106 |
+ ${LUA_DEPS} |
107 |
+ $(lua_gen_impl_dep 'deprecated' lua5-1) |
108 |
+ ) |
109 |
+ nls? ( virtual/libintl ) |
110 |
+ perl? ( dev-lang/perl:= ) |
111 |
+ python? ( ${PYTHON_DEPS} ) |
112 |
+ racket? ( dev-scheme/racket ) |
113 |
+ ruby? ( ${RUBY_DEPS} ) |
114 |
+ selinux? ( sys-libs/libselinux ) |
115 |
+ session? ( x11-libs/libSM ) |
116 |
+ sound? ( media-libs/libcanberra ) |
117 |
+ tcl? ( dev-lang/tcl:0= ) |
118 |
+" |
119 |
+DEPEND="${RDEPEND}" |
120 |
+# configure runs the Lua interpreter |
121 |
+BDEPEND=" |
122 |
+ sys-devel/autoconf |
123 |
+ virtual/pkgconfig |
124 |
+ lua? ( ${LUA_DEPS} ) |
125 |
+ nls? ( sys-devel/gettext ) |
126 |
+" |
127 |
+ |
128 |
+# various failures (bugs #630042 and #682320) |
129 |
+RESTRICT="test" |
130 |
+ |
131 |
+pkg_setup() { |
132 |
+ # people with broken alphabets run into trouble. bug 82186. |
133 |
+ unset LANG LC_ALL |
134 |
+ export LC_COLLATE="C" |
135 |
+ |
136 |
+ # Gnome sandbox silliness. bug #114475. |
137 |
+ mkdir -p "${T}"/home || die |
138 |
+ export HOME="${T}"/home |
139 |
+ |
140 |
+ use lua && lua-single_pkg_setup |
141 |
+ use python && python-single-r1_pkg_setup |
142 |
+} |
143 |
+ |
144 |
+src_prepare() { |
145 |
+ if [[ ${PV} != 9999* ]]; then |
146 |
+ # Gentoo patches to fix runtime issues, cross-compile errors, etc |
147 |
+ eapply "${WORKDIR}"/patches/ |
148 |
+ fi |
149 |
+ |
150 |
+ # Fixup a script to use awk instead of nawk |
151 |
+ sed -i -e \ |
152 |
+ '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ |
153 |
+ "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed" |
154 |
+ |
155 |
+ # Read vimrc and gvimrc from /etc/vim |
156 |
+ echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \ |
157 |
+ >> "${S}"/src/feature.h || die "echo failed" |
158 |
+ echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ |
159 |
+ >> "${S}"/src/feature.h || die "echo failed" |
160 |
+ |
161 |
+ # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. |
162 |
+ # Hopefully this pattern won't break for a while at least. |
163 |
+ # This fixes bug 29398 (27 Sep 2003 agriffis) |
164 |
+ sed -i -e \ |
165 |
+ 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
166 |
+ "${S}"/runtime/doc/syntax.txt \ |
167 |
+ "${S}"/runtime/doc/tagsrch.txt \ |
168 |
+ "${S}"/runtime/doc/usr_29.txt \ |
169 |
+ "${S}"/runtime/menu.vim \ |
170 |
+ "${S}"/src/configure.ac || die 'sed failed' |
171 |
+ |
172 |
+ # Don't be fooled by /usr/include/libc.h. When found, vim thinks |
173 |
+ # this is NeXT, but it's actually just a file in dev-libs/9libs |
174 |
+ # This fixes bug 43885 (20 Mar 2004 agriffis) |
175 |
+ sed -i -e \ |
176 |
+ 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed' |
177 |
+ |
178 |
+ # gcc on sparc32 has this, uhm, interesting problem with detecting EOF |
179 |
+ # correctly. To avoid some really entertaining error messages about stuff |
180 |
+ # which isn't even in the source file being invalid, we'll do some trickery |
181 |
+ # to make the error never occur. bug 66162 (02 October 2004 ciaranm) |
182 |
+ find "${S}" -name '*.c' | while read c; do |
183 |
+ echo >> "$c" || die "echo failed" |
184 |
+ done |
185 |
+ |
186 |
+ # Try to avoid sandbox problems. Bug #114475. |
187 |
+ if [[ -d "${S}"/src/po ]]; then |
188 |
+ sed -i -e \ |
189 |
+ '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
190 |
+ "${S}"/src/po/Makefile || die |
191 |
+ fi |
192 |
+ |
193 |
+ cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" |
194 |
+ |
195 |
+ # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 |
196 |
+ sed -i -e \ |
197 |
+ "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
198 |
+ "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
199 |
+ |
200 |
+ eapply_user |
201 |
+} |
202 |
+ |
203 |
+src_configure() { |
204 |
+ local myconf=() |
205 |
+ |
206 |
+ # Fix bug 37354: Disallow -funroll-all-loops on amd64 |
207 |
+ # Bug 57859 suggests that we want to do this for all archs |
208 |
+ filter-flags -funroll-all-loops |
209 |
+ |
210 |
+ # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for |
211 |
+ # everyone since previous flag filtering bugs have turned out to affect |
212 |
+ # multiple archs... |
213 |
+ replace-flags -O3 -O2 |
214 |
+ |
215 |
+ # Fix bug 18245: Prevent "make" from the following chain: |
216 |
+ # (1) Notice configure.ac is newer than auto/configure |
217 |
+ # (2) Rebuild auto/configure |
218 |
+ # (3) Notice auto/configure is newer than auto/config.mk |
219 |
+ # (4) Run ./configure (with wrong args) to remake auto/config.mk |
220 |
+ sed -i -e \ |
221 |
+ 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" |
222 |
+ rm -v src/auto/configure || die "rm failed" |
223 |
+ emake -j1 -C src autoconf |
224 |
+ |
225 |
+ # This should fix a sandbox violation (see bug 24447). The hvc |
226 |
+ # things are for ppc64, see bug 86433. |
227 |
+ local file |
228 |
+ for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do |
229 |
+ if [[ -e ${file} ]]; then |
230 |
+ addwrite $file |
231 |
+ fi |
232 |
+ done |
233 |
+ |
234 |
+ use debug && append-flags "-DDEBUG" |
235 |
+ |
236 |
+ myconf=( |
237 |
+ --with-features=huge |
238 |
+ --disable-gpm |
239 |
+ --with-gnome=no |
240 |
+ $(use_enable sound canberra) |
241 |
+ $(use_enable acl) |
242 |
+ $(use_enable crypt libsodium) |
243 |
+ $(use_enable cscope) |
244 |
+ $(use_enable netbeans) |
245 |
+ $(use_enable nls) |
246 |
+ $(use_enable perl perlinterp) |
247 |
+ $(use_enable python python3interp) |
248 |
+ $(use_with python python3-command "${PYTHON}") |
249 |
+ $(use_enable racket mzschemeinterp) |
250 |
+ $(use_enable ruby rubyinterp) |
251 |
+ $(use_enable selinux) |
252 |
+ $(use_enable session xsmp) |
253 |
+ $(use_enable tcl tclinterp) |
254 |
+ ) |
255 |
+ |
256 |
+ # --with-features=huge forces on cscope even if we --disable it. We need |
257 |
+ # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) |
258 |
+ if ! use cscope; then |
259 |
+ sed -i -e \ |
260 |
+ '/# define FEAT_CSCOPE/d' src/feature.h || die "couldn't disable cscope" |
261 |
+ fi |
262 |
+ |
263 |
+ if use lua; then |
264 |
+ myconf+=( |
265 |
+ --enable-luainterp |
266 |
+ $(use_with lua_single_target_luajit luajit) |
267 |
+ --with-lua-prefix="${EPREFIX}/usr" |
268 |
+ ) |
269 |
+ fi |
270 |
+ |
271 |
+ # gvim's GUI preference order is as follows: |
272 |
+ # aqua CARBON (not tested) |
273 |
+ # -aqua gtk GTK3 |
274 |
+ # -aqua -gtk gtk2 GTK2 |
275 |
+ # -aqua -gtk -gtk motif MOTIF |
276 |
+ # -aqua -gtk -gtk -motif neXt NEXTAW |
277 |
+ # -aqua -gtk -gtk -motif -neXt ATHENA |
278 |
+ echo ; echo |
279 |
+ if use aqua; then |
280 |
+ einfo "Building gvim with the Carbon GUI" |
281 |
+ myconf+=( |
282 |
+ --enable-darwin |
283 |
+ --enable-gui=carbon |
284 |
+ ) |
285 |
+ elif use gtk; then |
286 |
+ myconf+=( --enable-gtk3-check ) |
287 |
+ einfo "Building gvim with the gtk+-3 GUI" |
288 |
+ myconf+=( --enable-gui=gtk3 ) |
289 |
+ elif use gtk2; then |
290 |
+ myconf+=( --enable-gtk2-check ) |
291 |
+ einfo "Building gvim with the gtk+-2 GUI" |
292 |
+ myconf+=( --enable-gui=gtk2 ) |
293 |
+ elif use motif; then |
294 |
+ einfo "Building gvim with the MOTIF GUI" |
295 |
+ myconf+=( --enable-gui=motif ) |
296 |
+ elif use neXt; then |
297 |
+ einfo "Building gvim with the neXtaw GUI" |
298 |
+ myconf+=( --enable-gui=nextaw ) |
299 |
+ else |
300 |
+ einfo "Building gvim with the Athena GUI" |
301 |
+ myconf+=( --enable-gui=athena ) |
302 |
+ fi |
303 |
+ echo ; echo |
304 |
+ |
305 |
+ # let package manager strip binaries |
306 |
+ export ac_cv_prog_STRIP="$(type -P true ) faking strip" |
307 |
+ |
308 |
+ # keep prefix env contained within the EPREFIX |
309 |
+ use prefix && myconf+=( --without-local-dir ) |
310 |
+ |
311 |
+ if [[ ${CHOST} == *-interix* ]]; then |
312 |
+ # avoid finding of this function, to avoid having to patch either |
313 |
+ # configure or the source, which would be much more hackish. |
314 |
+ # after all vim does it right, only interix is badly broken (again) |
315 |
+ export ac_cv_func_sigaction=no |
316 |
+ fi |
317 |
+ |
318 |
+ econf \ |
319 |
+ --with-modified-by=Gentoo-${PVR} \ |
320 |
+ --with-vim-name=gvim \ |
321 |
+ --with-x \ |
322 |
+ "${myconf[@]}" |
323 |
+} |
324 |
+ |
325 |
+src_compile() { |
326 |
+ # The following allows emake to be used |
327 |
+ emake -j1 -C src auto/osdef.h objects |
328 |
+ |
329 |
+ emake |
330 |
+} |
331 |
+ |
332 |
+src_test() { |
333 |
+ einfo |
334 |
+ einfo "Starting vim tests. Several error messages will be shown" |
335 |
+ einfo "while the tests run. This is normal behaviour and does not" |
336 |
+ einfo "indicate a fault." |
337 |
+ einfo |
338 |
+ ewarn "If the tests fail, your terminal may be left in a strange" |
339 |
+ ewarn "state. Usually, running 'reset' will fix this." |
340 |
+ einfo |
341 |
+ |
342 |
+ # Don't let vim talk to X |
343 |
+ unset DISPLAY |
344 |
+ |
345 |
+ # Make gvim not try to connect to X. See :help gui-x11-start in vim for how |
346 |
+ # this evil trickery works. |
347 |
+ ln -s "${S}"/src/gvim "${S}"/src/testvim || die |
348 |
+ |
349 |
+ # Make sure our VIMPROG is used. |
350 |
+ sed -i -e 's:\.\./vim:../testvim:' src/testdir/test49.vim || die |
351 |
+ |
352 |
+ # Don't do additional GUI tests. |
353 |
+ emake -j1 VIMPROG=../testvim -C src/testdir nongui |
354 |
+} |
355 |
+ |
356 |
+# Call eselect vi update with --if-unset |
357 |
+# to respect user's choice (bug 187449) |
358 |
+eselect_vi_update() { |
359 |
+ einfo "Calling eselect vi update..." |
360 |
+ eselect vi update --if-unset |
361 |
+ eend $? |
362 |
+} |
363 |
+ |
364 |
+src_install() { |
365 |
+ local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} |
366 |
+ |
367 |
+ dobin src/gvim |
368 |
+ dosym gvim /usr/bin/gvimdiff |
369 |
+ dosym gvim /usr/bin/evim |
370 |
+ dosym gvim /usr/bin/eview |
371 |
+ dosym gvim /usr/bin/gview |
372 |
+ dosym gvim /usr/bin/rgvim |
373 |
+ dosym gvim /usr/bin/rgview |
374 |
+ |
375 |
+ emake -C src DESTDIR="${D}" DATADIR="${EPREFIX}"/usr/share install-icons |
376 |
+ |
377 |
+ dodir /usr/share/man/man1 |
378 |
+ echo ".so vim.1" > "${ED}"/usr/share/man/man1/gvim.1 || die "echo failed" |
379 |
+ echo ".so vim.1" > "${ED}"/usr/share/man/man1/gview.1 || die "echo failed" |
380 |
+ echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/gvimdiff.1 || \ |
381 |
+ die "echo failed" |
382 |
+ |
383 |
+ insinto /etc/vim |
384 |
+ newins "${FILESDIR}"/gvimrc-r1 gvimrc |
385 |
+ eprefixify "${ED}"/etc/vim/gvimrc |
386 |
+ |
387 |
+ # bash completion script, bug #79018. |
388 |
+ newbashcomp "${FILESDIR}"/${PN}-completion ${PN} |
389 |
+ |
390 |
+ # don't install vim desktop file |
391 |
+ rm -v "${ED}"/usr/share/applications/vim.desktop || die "failed to remove vim.desktop" |
392 |
+} |
393 |
+ |
394 |
+pkg_postinst() { |
395 |
+ # update documentation tags (from vim-doc.eclass) |
396 |
+ update_vim_helptags |
397 |
+ |
398 |
+ # update fdo mime stuff, bug #78394 |
399 |
+ xdg_desktop_database_update |
400 |
+ |
401 |
+ # update icon cache |
402 |
+ xdg_icon_cache_update |
403 |
+ |
404 |
+ # call eselect vi update |
405 |
+ eselect_vi_update |
406 |
+} |
407 |
+ |
408 |
+pkg_postrm() { |
409 |
+ # update documentation tags (from vim-doc.eclass) |
410 |
+ update_vim_helptags |
411 |
+ |
412 |
+ # update fdo mime stuff, bug #78394 |
413 |
+ xdg_desktop_database_update |
414 |
+ |
415 |
+ # update icon cache |
416 |
+ xdg_icon_cache_update |
417 |
+ |
418 |
+ # call eselect vi update |
419 |
+ eselect_vi_update |
420 |
+} |