Gentoo Archives: gentoo-commits

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