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