1 |
commit: b971c48e8bae5f61643351aa483b6f6d10467fb4 |
2 |
Author: Vaibhav Rustagi <vaibhavrustagi <AT> google <DOT> com> |
3 |
AuthorDate: Thu Nov 3 05:56:01 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 3 06:32:00 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b971c48e |
7 |
|
8 |
app-editors/vim: version bump to v9.0.0828. |
9 |
|
10 |
This is needed to resolve CVE-2022-3705. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/879257 |
13 |
Signed-off-by: Vaibhav Rustagi <vaibhavrustagi <AT> google.com> |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
app-editors/vim/Manifest | 1 + |
17 |
app-editors/vim/vim-9.0.0828-r1.ebuild | 371 +++++++++++++++++++++++++++++++++ |
18 |
2 files changed, 372 insertions(+) |
19 |
|
20 |
diff --git a/app-editors/vim/Manifest b/app-editors/vim/Manifest |
21 |
index 851bdd1c8721..7ce52533f482 100644 |
22 |
--- a/app-editors/vim/Manifest |
23 |
+++ b/app-editors/vim/Manifest |
24 |
@@ -1,4 +1,5 @@ |
25 |
DIST vim-9.0.0099.tar.gz 16712565 BLAKE2B b3277ebda0bb40601d995935422006d1a266bb862be612e69abd057a7342d13457ded5cb4743cf43a09b7d2001438f5a426ba12c30947bb7c193188c5fc13cf7 SHA512 ca0dea7b7fd78cf9c7cd4656611d066540f9d81ab17bcb75c79f0e989bdcfb769940ea29f75445c554b159e9eb3b2c4f9d77448254c3e4e4457b1bf721936498 |
26 |
DIST vim-9.0.0399.tar.gz 16833387 BLAKE2B f9d6588920b49ef32b82d012e1c4f8a34dc505267b67027a3b4302dd99d7987645c29a91fdb234fffa873b342488b4d9c85d05d3fe7a332042781881a61bea5e SHA512 6b261bf3aaa355e7a42de1785b134bccc51086495578730b9bc3b8e048679caa3a901e576a360cba5f1aa4d164c7f162a3f916e945b3f5f71e893ea30e0ca826 |
27 |
DIST vim-9.0.0655.tar.gz 16804127 BLAKE2B e021ff4dd370cdd9b39fb9df0a12309215abd780ec297760b92b6caf924882465b28f9ba65d94ad75a229eb01c8f393f24a29a11919a96d78bb6fb45ef2971e3 SHA512 aa267941e835eecbeeffa7989fb525bdf4269f84d9c88d135a26d74ab7d025487863405b6e0f1391023c30193a122ed3e85a7a71bd4dc48058f3fe3377798f38 |
28 |
+DIST vim-9.0.0828.tar.gz 16782339 BLAKE2B 6b997c1c828338d64a8b204a1e232676ec075834b1b7e74c2fc671e315f9bf6026b0c419ebb3c31e7ce58dbca23828ca11d866b2bfcb73f8a86fb31fa0d51b00 SHA512 03f93515039a2f275a8fe6b84bbac5875ffff17768ab3201e111eba4897a2485fe4ccfe238151f393334c7a6ea77eddd8898f0b816e26dbdb884f4e6bcbd2943 |
29 |
DIST vim-patches-vim-9.0.0049-patches.tar.gz 2743 BLAKE2B dff3e215b235e1cbc2c62b1af2d1414d10b794dbee9f5e7797fb3d34e00c2e065c339d4c82bf28aed53e0b5f2f8f1ee5c7ce69851cd63360788609bf144ac922 SHA512 7d5c64d674fa77048fdca7287072c0e488723133e254c10711dbadf750416c368725327ca9b76f332017bc70aa544a9baef671765eabf0d172d39921ffd7d942 |
30 |
|
31 |
diff --git a/app-editors/vim/vim-9.0.0828-r1.ebuild b/app-editors/vim/vim-9.0.0828-r1.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..f9e1c2239e75 |
34 |
--- /dev/null |
35 |
+++ b/app-editors/vim/vim-9.0.0828-r1.ebuild |
36 |
@@ -0,0 +1,371 @@ |
37 |
+# Copyright 1999-2022 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=8 |
41 |
+ |
42 |
+# Please bump with app-editors/vim-core and app-editors/gvim |
43 |
+ |
44 |
+VIM_VERSION="9.0" |
45 |
+LUA_COMPAT=( lua5-{1..4} luajit ) |
46 |
+PYTHON_COMPAT=( python3_{8..11} ) |
47 |
+PYTHON_REQ_USE="threads(+)" |
48 |
+USE_RUBY="ruby27 ruby30 ruby31" |
49 |
+ |
50 |
+inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single toolchain-funcs desktop xdg-utils |
51 |
+ |
52 |
+if [[ ${PV} == 9999* ]] ; then |
53 |
+ inherit git-r3 |
54 |
+ EGIT_REPO_URI="https://github.com/vim/vim.git" |
55 |
+else |
56 |
+ SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz |
57 |
+ https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-9.0.0049-patches.tar.gz" |
58 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
59 |
+fi |
60 |
+ |
61 |
+DESCRIPTION="Vim, an improved vi-style text editor" |
62 |
+HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" |
63 |
+ |
64 |
+LICENSE="vim" |
65 |
+SLOT="0" |
66 |
+IUSE="X acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" |
67 |
+REQUIRED_USE=" |
68 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
69 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
70 |
+ vim-pager? ( !minimal ) |
71 |
+" |
72 |
+ |
73 |
+RDEPEND=" |
74 |
+ >=app-eselect/eselect-vi-1.1 |
75 |
+ >=sys-libs/ncurses-5.2-r2:0= |
76 |
+ nls? ( virtual/libintl ) |
77 |
+ acl? ( kernel_linux? ( sys-apps/acl ) ) |
78 |
+ crypt? ( dev-libs/libsodium:= ) |
79 |
+ cscope? ( dev-util/cscope ) |
80 |
+ gpm? ( >=sys-libs/gpm-1.19.3 ) |
81 |
+ lua? ( ${LUA_DEPS} |
82 |
+ $(lua_gen_impl_dep 'deprecated' lua5-1) |
83 |
+ ) |
84 |
+ ~app-editors/vim-core-${PV} |
85 |
+ !<app-editors/vim-core-8.2.4328-r1 |
86 |
+ vim-pager? ( app-editors/vim-core[-minimal] ) |
87 |
+ perl? ( dev-lang/perl:= ) |
88 |
+ python? ( ${PYTHON_DEPS} ) |
89 |
+ racket? ( dev-scheme/racket ) |
90 |
+ ruby? ( ${RUBY_DEPS} ) |
91 |
+ selinux? ( sys-libs/libselinux ) |
92 |
+ sound? ( media-libs/libcanberra ) |
93 |
+ tcl? ( dev-lang/tcl:0= ) |
94 |
+ X? ( x11-libs/libXt ) |
95 |
+" |
96 |
+DEPEND="${RDEPEND}" |
97 |
+# configure runs the Lua interpreter |
98 |
+BDEPEND=" |
99 |
+ sys-devel/autoconf |
100 |
+ lua? ( ${LUA_DEPS} ) |
101 |
+ nls? ( sys-devel/gettext ) |
102 |
+" |
103 |
+PDEPEND="!minimal? ( app-vim/gentoo-syntax )" |
104 |
+ |
105 |
+pkg_setup() { |
106 |
+ # people with broken alphabets run into trouble. bug #82186. |
107 |
+ unset LANG LC_ALL |
108 |
+ export LC_COLLATE="C" |
109 |
+ |
110 |
+ use lua && lua-single_pkg_setup |
111 |
+ use python && python-single-r1_pkg_setup |
112 |
+} |
113 |
+ |
114 |
+src_prepare() { |
115 |
+ |
116 |
+ if [[ ${PV} != 9999* ]] ; then |
117 |
+ # Gentoo patches to fix runtime issues, cross-compile errors, etc |
118 |
+ eapply "${WORKDIR}"/vim-patches-vim-9.0.0049-patches |
119 |
+ fi |
120 |
+ |
121 |
+ # Fixup a script to use awk instead of nawk |
122 |
+ sed -i -e \ |
123 |
+ '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ |
124 |
+ "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed" |
125 |
+ |
126 |
+ # Read vimrc and gvimrc from /etc/vim |
127 |
+ echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \ |
128 |
+ >> "${S}"/src/feature.h || die "echo failed" |
129 |
+ echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ |
130 |
+ >> "${S}"/src/feature.h || die "echo failed" |
131 |
+ |
132 |
+ # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. |
133 |
+ # Hopefully this pattern won't break for a while at least. |
134 |
+ # This fixes bug #29398 (27 Sep 2003 agriffis) |
135 |
+ sed -i -e \ |
136 |
+ 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
137 |
+ "${S}"/runtime/doc/syntax.txt \ |
138 |
+ "${S}"/runtime/doc/tagsrch.txt \ |
139 |
+ "${S}"/runtime/doc/usr_29.txt \ |
140 |
+ "${S}"/runtime/menu.vim \ |
141 |
+ "${S}"/src/configure.ac || die 'sed failed' |
142 |
+ |
143 |
+ # Don't be fooled by /usr/include/libc.h. When found, vim thinks |
144 |
+ # this is NeXT, but it's actually just a file in dev-libs/9libs |
145 |
+ # This fixes bug #43885 (20 Mar 2004 agriffis) |
146 |
+ sed -i -e \ |
147 |
+ 's/ libc\.h / /' \ |
148 |
+ "${S}"/src/configure.ac || die 'sed failed' |
149 |
+ |
150 |
+ # gcc on sparc32 has this, uhm, interesting problem with detecting EOF |
151 |
+ # correctly. To avoid some really entertaining error messages about stuff |
152 |
+ # which isn't even in the source file being invalid, we'll do some trickery |
153 |
+ # to make the error never occur. bug 66162 (02 October 2004 ciaranm) |
154 |
+ find "${S}" -name '*.c' | while read c; do |
155 |
+ echo >> "$c" || die "echo failed" |
156 |
+ done |
157 |
+ |
158 |
+ # conditionally make the manpager.sh script |
159 |
+ if use vim-pager; then |
160 |
+ cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed" |
161 |
+ #!/bin/sh |
162 |
+ sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\ |
163 |
+ vim \\ |
164 |
+ -c 'let no_plugin_maps = 1' \\ |
165 |
+ -c 'set nolist nomod ft=man ts=8' \\ |
166 |
+ -c 'let g:showmarks_enable=0' \\ |
167 |
+ -c 'runtime! macros/less.vim' - |
168 |
+ _EOF_ |
169 |
+ fi |
170 |
+ |
171 |
+ # Try to avoid sandbox problems. Bug #114475. |
172 |
+ if [[ -d "${S}"/src/po ]]; then |
173 |
+ sed -i -e \ |
174 |
+ '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
175 |
+ "${S}"/src/po/Makefile || die "sed failed" |
176 |
+ fi |
177 |
+ |
178 |
+ cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" |
179 |
+ |
180 |
+ sed -i -e \ |
181 |
+ "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
182 |
+ "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
183 |
+ |
184 |
+ # Fix bug 18245: Prevent "make" from the following chain: |
185 |
+ # (1) Notice configure.ac is newer than auto/configure |
186 |
+ # (2) Rebuild auto/configure |
187 |
+ # (3) Notice auto/configure is newer than auto/config.mk |
188 |
+ # (4) Run ./configure (with wrong args) to remake auto/config.mk |
189 |
+ sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" |
190 |
+ rm src/auto/configure || die "rm failed" |
191 |
+ |
192 |
+ eapply_user |
193 |
+} |
194 |
+ |
195 |
+src_configure() { |
196 |
+ |
197 |
+ # Fix bug #37354: Disallow -funroll-all-loops on amd64 |
198 |
+ # Bug #57859 suggests that we want to do this for all archs |
199 |
+ filter-flags -funroll-all-loops |
200 |
+ |
201 |
+ # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for |
202 |
+ # everyone since previous flag filtering bugs have turned out to affect |
203 |
+ # multiple archs... |
204 |
+ replace-flags -O3 -O2 |
205 |
+ |
206 |
+ emake -j1 -C src autoconf |
207 |
+ |
208 |
+ # This should fix a sandbox violation (see bug #24447). The hvc |
209 |
+ # things are for ppc64, see bug #86433. |
210 |
+ for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do |
211 |
+ if [[ -e "${file}" ]]; then |
212 |
+ addwrite ${file} |
213 |
+ fi |
214 |
+ done |
215 |
+ |
216 |
+ local myconf=() |
217 |
+ if use minimal; then |
218 |
+ myconf=( |
219 |
+ --with-features=tiny |
220 |
+ --disable-nls |
221 |
+ --disable-canberra |
222 |
+ --disable-acl |
223 |
+ --enable-gui=no |
224 |
+ --without-x |
225 |
+ --disable-darwin |
226 |
+ --disable-luainterp |
227 |
+ --disable-perlinterp |
228 |
+ --disable-pythoninterp |
229 |
+ --disable-mzschemeinterp |
230 |
+ --disable-rubyinterp |
231 |
+ --disable-selinux |
232 |
+ --disable-tclinterp |
233 |
+ --disable-gpm |
234 |
+ ) |
235 |
+ else |
236 |
+ use debug && append-flags "-DDEBUG" |
237 |
+ |
238 |
+ myconf=( |
239 |
+ --with-features=huge |
240 |
+ $(use_enable sound canberra) |
241 |
+ $(use_enable acl) |
242 |
+ $(use_enable crypt libsodium) |
243 |
+ $(use_enable cscope) |
244 |
+ $(use_enable gpm) |
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 tcl tclinterp) |
253 |
+ $(use_enable terminal) |
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 "sed failed" |
261 |
+ fi |
262 |
+ |
263 |
+ if use lua; then |
264 |
+ # -DLUA_COMPAT_OPENLIB=1 is required to enable the |
265 |
+ # deprecated (in 5.1) luaL_openlib API (#874690) |
266 |
+ use lua_single_target_lua5-1 && append-cppflags -DLUA_COMPAT_OPENLIB=1 |
267 |
+ |
268 |
+ myconf+=( |
269 |
+ --enable-luainterp |
270 |
+ $(use_with lua_single_target_luajit luajit) |
271 |
+ --with-lua-prefix="${EPREFIX}/usr" |
272 |
+ ) |
273 |
+ fi |
274 |
+ |
275 |
+ # don't test USE=X here ... see bug #19115 |
276 |
+ # but need to provide a way to link against X ... see bug #20093 |
277 |
+ myconf+=( |
278 |
+ --enable-gui=no |
279 |
+ --disable-darwin |
280 |
+ $(use_with X x) |
281 |
+ ) |
282 |
+ fi |
283 |
+ |
284 |
+ # let package manager strip binaries |
285 |
+ export ac_cv_prog_STRIP="$(type -P true ) faking strip" |
286 |
+ |
287 |
+ # keep prefix env contained within the EPREFIX |
288 |
+ use prefix && myconf+=( --without-local-dir ) |
289 |
+ |
290 |
+ if tc-is-cross-compiler ; then |
291 |
+ export vim_cv_getcwd_broken=no \ |
292 |
+ vim_cv_memmove_handles_overlap=yes \ |
293 |
+ vim_cv_stat_ignores_slash=yes \ |
294 |
+ vim_cv_terminfo=yes \ |
295 |
+ vim_cv_toupper_broken=no |
296 |
+ fi |
297 |
+ |
298 |
+ econf \ |
299 |
+ --with-modified-by=Gentoo-${PVR} \ |
300 |
+ "${myconf[@]}" |
301 |
+} |
302 |
+ |
303 |
+src_compile() { |
304 |
+ # The following allows emake to be used |
305 |
+ emake -j1 -C src auto/osdef.h objects |
306 |
+ |
307 |
+ emake |
308 |
+} |
309 |
+ |
310 |
+src_test() { |
311 |
+ einfo |
312 |
+ einfo "Starting vim tests. Several error messages will be shown" |
313 |
+ einfo "while the tests run. This is normal behaviour and does not" |
314 |
+ einfo "indicate a fault." |
315 |
+ einfo |
316 |
+ ewarn "If the tests fail, your terminal may be left in a strange" |
317 |
+ ewarn "state. Usually, running 'reset' will fix this." |
318 |
+ einfo |
319 |
+ |
320 |
+ # Don't let vim talk to X |
321 |
+ unset DISPLAY |
322 |
+ |
323 |
+ # Arch and opensuse seem to do this and at this point, I'm willing |
324 |
+ # to try anything to avoid random test hangs! |
325 |
+ export TERM=xterm |
326 |
+ |
327 |
+ # See https://github.com/vim/vim/blob/f08b0eb8691ff09f98bc4beef986ece1c521655f/src/testdir/runtest.vim#L5 |
328 |
+ # for more information on test variables we can use. |
329 |
+ # Note that certain variables need vim-compatible regex (not PCRE), see e.g. |
330 |
+ # http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml. |
331 |
+ # |
332 |
+ # Skipped tests: |
333 |
+ # - Test_expand_star_star |
334 |
+ # Hangs because of a recursive symlink in /usr/include/nodejs (bug #616680) |
335 |
+ # - Test_exrc |
336 |
+ # Looks in wrong location? (bug #742710) |
337 |
+ # - Test_job_tty_in_out |
338 |
+ # Fragile and depends on TERM(?) |
339 |
+ # - Test_spelldump_bang |
340 |
+ # Hangs. |
341 |
+ # - Test_fuzzy_completion_env |
342 |
+ # Too sensitive to leaked environment variables. |
343 |
+ # - Test_term_mouse_multiple_clicks_to_select_mode |
344 |
+ # Hangs. |
345 |
+ # - Test_spelldump |
346 |
+ # Hangs. |
347 |
+ export TEST_SKIP_PAT='\(Test_expand_star_star\|Test_exrc\|Test_job_tty_in_out\|Test_spelldump_bang\|Test_fuzzy_completion_env\|Test_term_mouse_multiple_clicks_to_select_mode\|Test_spelldump\)' |
348 |
+ |
349 |
+ emake -j1 -C src/testdir nongui |
350 |
+} |
351 |
+ |
352 |
+# Call eselect vi update with --if-unset |
353 |
+# to respect user's choice (bug #187449) |
354 |
+eselect_vi_update() { |
355 |
+ ebegin "Calling eselect vi update" |
356 |
+ eselect vi update --if-unset |
357 |
+ eend $? |
358 |
+} |
359 |
+ |
360 |
+src_install() { |
361 |
+ local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} |
362 |
+ |
363 |
+ # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are |
364 |
+ # managed by eselect-vi |
365 |
+ dobin src/vim |
366 |
+ if ! use minimal ; then |
367 |
+ dosym vim /usr/bin/vimdiff |
368 |
+ fi |
369 |
+ dosym vim /usr/bin/rvim |
370 |
+ dosym vim /usr/bin/rview |
371 |
+ if use vim-pager ; then |
372 |
+ dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager |
373 |
+ dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager |
374 |
+ insinto ${vimfiles}/macros |
375 |
+ doins runtime/macros/manpager.sh |
376 |
+ fperms a+x ${vimfiles}/macros/manpager.sh |
377 |
+ fi |
378 |
+ |
379 |
+ domenu runtime/vim.desktop |
380 |
+ |
381 |
+ newbashcomp "${FILESDIR}"/${PN}-completion ${PN} |
382 |
+ |
383 |
+ # keep in sync with 'complete ... -F' list |
384 |
+ bashcomp_alias vim ex vi view rvim rview vimdiff |
385 |
+} |
386 |
+ |
387 |
+pkg_postinst() { |
388 |
+ # Update documentation tags (from vim-doc.eclass) |
389 |
+ update_vim_helptags |
390 |
+ |
391 |
+ # Call eselect vi update |
392 |
+ eselect_vi_update |
393 |
+ |
394 |
+ # update desktop file mime cache |
395 |
+ xdg_desktop_database_update |
396 |
+} |
397 |
+ |
398 |
+pkg_postrm() { |
399 |
+ # Update documentation tags (from vim-doc.eclass) |
400 |
+ update_vim_helptags |
401 |
+ |
402 |
+ # Call eselect vi update |
403 |
+ eselect_vi_update |
404 |
+ |
405 |
+ # update desktop file mime cache |
406 |
+ xdg_desktop_database_update |
407 |
+} |