Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/vim/
Date: Sun, 03 Oct 2021 21:18:18
Message-Id: 1633295722.0e8316bb3a0c6714fb3806cd5d86ba26a373a1d5.sam@gentoo
1 commit: 0e8316bb3a0c6714fb3806cd5d86ba26a373a1d5
2 Author: Robert Kolchmeyer <rkolchmeyer <AT> google <DOT> com>
3 AuthorDate: Tue Sep 28 00:45:32 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 3 21:15:22 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e8316bb
7
8 app-editors/vim: Version bump (v8.2.3428)
9
10 Bug: https://bugs.gentoo.org/811870
11 Closes: https://bugs.gentoo.org/811870
12 Signed-off-by: Robert Kolchmeyer <rkolchmeyer <AT> google.com>
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 app-editors/vim/Manifest | 1 +
16 app-editors/vim/vim-8.2.3428.ebuild | 335 ++++++++++++++++++++++++++++++++++++
17 2 files changed, 336 insertions(+)
18
19 diff --git a/app-editors/vim/Manifest b/app-editors/vim/Manifest
20 index 9f17c290c49..ba93bb167e0 100644
21 --- a/app-editors/vim/Manifest
22 +++ b/app-editors/vim/Manifest
23 @@ -1,2 +1,3 @@
24 DIST vim-8.2.0360-gentoo-patches.tar.xz 2612 BLAKE2B a9273a686b31dd873b25bfc07f7bc254f11038bde275ae4e6f56513a14e0268fdc1032ae847d1d7f8539f8a657217011770ccb4685998f34722383ec7bfb1a15 SHA512 00bc8eb8b20a4a6f3bbd179bb90d42fa6727c8eaae5b625e95e52c33638d456ef36d06b51c542ecaffb237c0b4f7aa72dc3bae7fe00144d55ab0d2fa51950f3b
25 DIST vim-8.2.0814.tar.gz 14953478 BLAKE2B fd4155ec749bd9a705e8114ff7f8cc321182c9286733ff2f665e265ec0af830f9e70c730b8d0215f6db1f73a8e2f878d22932a72c8dbfe921591be7adcdaab00 SHA512 4ddd9e2d30719f931cadd1a4de5700736f641f4b074378d9ea1462a90b81975ce8e8c3ca2e3a1e15ac0288824eef5b0f0a3e31482f7637c450c6d7e52c8f40d2
26 +DIST vim-8.2.3428.tar.gz 15715383 BLAKE2B 865842bae0de25c34f255085f6edfe35b6905e220bdcb76372d7289ef1f6c2b2dee2f88e4a5f849d43fa560db4ade1e8e498d86f5651c5218d9153cde5ecddd3 SHA512 7cb473afa0ad6a9728dfc2f7d8ca19a21de329c4790141c7cb815b71c07e92a1ce04a5fcc2a0381c4beb304670d6c08629dc2ed2cb0842998cca2fd846c8cd6b
27
28 diff --git a/app-editors/vim/vim-8.2.3428.ebuild b/app-editors/vim/vim-8.2.3428.ebuild
29 new file mode 100644
30 index 00000000000..146c7f5a378
31 --- /dev/null
32 +++ b/app-editors/vim/vim-8.2.3428.ebuild
33 @@ -0,0 +1,335 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +VIM_VERSION="8.2"
39 +LUA_COMPAT=( lua5-1 luajit )
40 +PYTHON_COMPAT=( python3_{7..10} )
41 +PYTHON_REQ_USE="threads(+)"
42 +USE_RUBY="ruby24 ruby25 ruby26 ruby27"
43 +
44 +inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single desktop xdg-utils
45 +
46 +if [[ ${PV} == 9999* ]] ; then
47 + inherit git-r3
48 + EGIT_REPO_URI="https://github.com/vim/vim.git"
49 +else
50 + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
51 + https://dev.gentoo.org/~zlogene/distfiles/app-editors/vim/vim-8.2.0360-gentoo-patches.tar.xz"
52 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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"
53 +fi
54 +
55 +DESCRIPTION="Vim, an improved vi-style text editor"
56 +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
57 +
58 +SLOT="0"
59 +LICENSE="vim"
60 +IUSE="X acl cscope debug gpm lua ipv6 minimal nls perl python racket ruby selinux sound tcl terminal vim-pager"
61 +REQUIRED_USE="
62 + lua? ( ${LUA_REQUIRED_USE} )
63 + python? ( ${PYTHON_REQUIRED_USE} )
64 + vim-pager? ( !minimal )
65 +"
66 +
67 +RDEPEND="
68 + >=app-eselect/eselect-vi-1.1
69 + >=sys-libs/ncurses-5.2-r2:0=
70 + nls? ( virtual/libintl )
71 + acl? ( kernel_linux? ( sys-apps/acl ) )
72 + cscope? ( dev-util/cscope )
73 + gpm? ( >=sys-libs/gpm-1.19.3 )
74 + lua? ( ${LUA_DEPS}
75 + $(lua_gen_impl_dep 'deprecated' lua5-1)
76 + )
77 + !minimal? ( ~app-editors/vim-core-${PV} )
78 + vim-pager? ( app-editors/vim-core[-minimal] )
79 + perl? ( dev-lang/perl:= )
80 + python? ( ${PYTHON_DEPS} )
81 + racket? ( dev-scheme/racket )
82 + ruby? ( ${RUBY_DEPS} )
83 + selinux? ( sys-libs/libselinux )
84 + sound? ( media-libs/libcanberra )
85 + tcl? ( dev-lang/tcl:0= )
86 + X? ( x11-libs/libXt )
87 +"
88 +
89 +DEPEND="
90 + ${RDEPEND}
91 + sys-devel/autoconf
92 + nls? ( sys-devel/gettext )
93 +"
94 +# configure runs the Lua interpreter
95 +BDEPEND="lua? ( ${LUA_DEPS} )"
96 +
97 +pkg_setup() {
98 + # people with broken alphabets run into trouble. bug 82186.
99 + unset LANG LC_ALL
100 + export LC_COLLATE="C"
101 +
102 + # Gnome sandbox silliness. bug #114475.
103 + mkdir -p "${T}"/home || die "mkdir failed"
104 + export HOME="${T}"/home
105 +
106 + use lua && lua-single_pkg_setup
107 + use python && python-single-r1_pkg_setup
108 +}
109 +
110 +src_prepare() {
111 + if [[ ${PV} != 9999* ]] ; then
112 + # Gentoo patches to fix runtime issues, cross-compile errors, etc
113 + eapply "${WORKDIR}"/patches/
114 + fi
115 +
116 + # Fixup a script to use awk instead of nawk
117 + sed -i -e \
118 + '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
119 + "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
120 +
121 + # Read vimrc and gvimrc from /etc/vim
122 + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
123 + >> "${S}"/src/feature.h || die "echo failed"
124 + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
125 + >> "${S}"/src/feature.h || die "echo failed"
126 +
127 + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
128 + # Hopefully this pattern won't break for a while at least.
129 + # This fixes bug 29398 (27 Sep 2003 agriffis)
130 + sed -i -e \
131 + 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
132 + "${S}"/runtime/doc/syntax.txt \
133 + "${S}"/runtime/doc/tagsrch.txt \
134 + "${S}"/runtime/doc/usr_29.txt \
135 + "${S}"/runtime/menu.vim \
136 + "${S}"/src/configure.ac || die 'sed failed'
137 +
138 + # Don't be fooled by /usr/include/libc.h. When found, vim thinks
139 + # this is NeXT, but it's actually just a file in dev-libs/9libs
140 + # This fixes bug 43885 (20 Mar 2004 agriffis)
141 + sed -i -e \
142 + 's/ libc\.h / /' \
143 + "${S}"/src/configure.ac || die 'sed failed'
144 +
145 + # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
146 + # correctly. To avoid some really entertaining error messages about stuff
147 + # which isn't even in the source file being invalid, we'll do some trickery
148 + # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
149 + find "${S}" -name '*.c' | while read c; do
150 + echo >> "$c" || die "echo failed"
151 + done
152 +
153 + # conditionally make the manpager.sh script
154 + if use vim-pager; then
155 + cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed"
156 + #!/bin/sh
157 + sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
158 + vim \\
159 + -c 'let no_plugin_maps = 1' \\
160 + -c 'set nolist nomod ft=man ts=8' \\
161 + -c 'let g:showmarks_enable=0' \\
162 + -c 'runtime! macros/less.vim' -
163 + _EOF_
164 + fi
165 +
166 + # Try to avoid sandbox problems. Bug #114475.
167 + if [[ -d "${S}"/src/po ]]; then
168 + sed -i -e \
169 + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
170 + "${S}"/src/po/Makefile || die "sed failed"
171 + fi
172 +
173 + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
174 +
175 + sed -i -e \
176 + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
177 + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
178 +
179 + eapply_user
180 +}
181 +
182 +src_configure() {
183 + local myconf=()
184 +
185 + # Fix bug 37354: Disallow -funroll-all-loops on amd64
186 + # Bug 57859 suggests that we want to do this for all archs
187 + filter-flags -funroll-all-loops
188 +
189 + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
190 + # everyone since previous flag filtering bugs have turned out to affect
191 + # multiple archs...
192 + replace-flags -O3 -O2
193 +
194 + # Fix bug 18245: Prevent "make" from the following chain:
195 + # (1) Notice configure.ac is newer than auto/configure
196 + # (2) Rebuild auto/configure
197 + # (3) Notice auto/configure is newer than auto/config.mk
198 + # (4) Run ./configure (with wrong args) to remake auto/config.mk
199 + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
200 + rm src/auto/configure || die "rm failed"
201 + emake -j1 -C src autoconf
202 +
203 + # This should fix a sandbox violation (see bug 24447). The hvc
204 + # things are for ppc64, see bug 86433.
205 + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
206 + if [[ -e "${file}" ]]; then
207 + addwrite $file
208 + fi
209 + done
210 +
211 + if use minimal; then
212 + myconf=(
213 + --with-features=tiny
214 + --disable-nls
215 + --disable-canberra
216 + --disable-acl
217 + --enable-gui=no
218 + --without-x
219 + --disable-darwin
220 + --disable-luainterp
221 + --disable-perlinterp
222 + --disable-pythoninterp
223 + --disable-mzschemeinterp
224 + --disable-rubyinterp
225 + --disable-selinux
226 + --disable-tclinterp
227 + --disable-gpm
228 + )
229 + else
230 + use debug && append-flags "-DDEBUG"
231 +
232 + myconf=(
233 + --with-features=huge
234 + $(use_enable sound canberra)
235 + $(use_enable acl)
236 + $(use_enable cscope)
237 + $(use_enable gpm)
238 + $(use_enable nls)
239 + $(use_enable perl perlinterp)
240 + $(use_enable python python3interp)
241 + $(use_with python python3-command "${PYTHON}")
242 + $(use_enable racket mzschemeinterp)
243 + $(use_enable ruby rubyinterp)
244 + $(use_enable selinux)
245 + $(use_enable tcl tclinterp)
246 + $(use_enable terminal)
247 + )
248 +
249 + # --with-features=huge forces on cscope even if we --disable it. We need
250 + # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
251 + if ! use cscope; then
252 + sed -i -e \
253 + '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed"
254 + fi
255 +
256 + if use lua; then
257 + myconf+=(
258 + --enable-luainterp
259 + $(use_with lua_single_target_luajit luajit)
260 + --with-lua-prefix="${EPREFIX}/usr"
261 + )
262 + fi
263 +
264 + if ! use ipv6; then
265 + myconf+=(
266 + vim_cv_ipv6_networking=no
267 + )
268 + fi
269 +
270 + # don't test USE=X here ... see bug #19115
271 + # but need to provide a way to link against X ... see bug #20093
272 + myconf+=(
273 + --enable-gui=no
274 + --disable-darwin
275 + $(use_with X x)
276 + )
277 + fi
278 +
279 + # let package manager strip binaries
280 + export ac_cv_prog_STRIP="$(type -P true ) faking strip"
281 +
282 + # keep prefix env contained within the EPREFIX
283 + use prefix && myconf+=( --without-local-dir )
284 +
285 + econf \
286 + --with-modified-by=Gentoo-${PVR} \
287 + "${myconf[@]}"
288 +}
289 +
290 +src_compile() {
291 + # The following allows emake to be used
292 + emake -j1 -C src auto/osdef.h objects
293 +
294 + emake
295 +}
296 +
297 +src_test() {
298 + einfo
299 + einfo "Starting vim tests. Several error messages will be shown"
300 + einfo "while the tests run. This is normal behaviour and does not"
301 + einfo "indicate a fault."
302 + einfo
303 + ewarn "If the tests fail, your terminal may be left in a strange"
304 + ewarn "state. Usually, running 'reset' will fix this."
305 + einfo
306 +
307 + # Don't let vim talk to X
308 + unset DISPLAY
309 +
310 + emake -j1 -C src/testdir nongui
311 +}
312 +
313 +# Call eselect vi update with --if-unset
314 +# to respect user's choice (bug 187449)
315 +eselect_vi_update() {
316 + einfo "Calling eselect vi update..."
317 + eselect vi update --if-unset
318 + eend $?
319 +}
320 +
321 +src_install() {
322 + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
323 +
324 + # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
325 + # managed by eselect-vi
326 + dobin src/vim
327 + if ! use minimal ; then
328 + dosym vim /usr/bin/vimdiff
329 + fi
330 + dosym vim /usr/bin/rvim
331 + dosym vim /usr/bin/rview
332 + if use vim-pager ; then
333 + dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
334 + dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
335 + insinto ${vimfiles}/macros
336 + doins runtime/macros/manpager.sh
337 + fperms a+x ${vimfiles}/macros/manpager.sh
338 + fi
339 +
340 + domenu runtime/vim.desktop
341 +
342 + newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
343 +
344 + # keep in sync with 'complete ... -F' list
345 + bashcomp_alias vim ex vi view rvim rview vimdiff
346 +}
347 +
348 +pkg_postinst() {
349 + # Update documentation tags (from vim-doc.eclass)
350 + update_vim_helptags
351 +
352 + # Call eselect vi update
353 + eselect_vi_update
354 +
355 + # update desktop file mime cache
356 + xdg_desktop_database_update
357 +}
358 +
359 +pkg_postrm() {
360 + # Update documentation tags (from vim-doc.eclass)
361 + update_vim_helptags
362 +
363 + # Call eselect vi update
364 + eselect_vi_update
365 +
366 + # update desktop file mime cache
367 + xdg_desktop_database_update
368 +}