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