Gentoo Archives: gentoo-commits

From: Tim Harder <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/vim/
Date: Thu, 01 Dec 2016 00:24:08
Message-Id: 1480551831.d5e8c12829d6368a202be979c60e9f27671bf3f6.radhermit@gentoo
1 commit: d5e8c12829d6368a202be979c60e9f27671bf3f6
2 Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 1 00:17:03 2016 +0000
4 Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 1 00:23:51 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5e8c128
7
8 app-editors/vim: version bump to 8.0.0106
9
10 app-editors/vim/Manifest | 2 +
11 app-editors/vim/vim-8.0.0106.ebuild | 349 ++++++++++++++++++++++++++++++++++++
12 2 files changed, 351 insertions(+)
13
14 diff --git a/app-editors/vim/Manifest b/app-editors/vim/Manifest
15 index b4716fe..8c67463 100644
16 --- a/app-editors/vim/Manifest
17 +++ b/app-editors/vim/Manifest
18 @@ -3,3 +3,5 @@ DIST vim-7.4.2102.tar.gz 12838026 SHA256 19c059b2d0e61effcd288e2a18969017cbbc031
19 DIST vim-7.4.542-gentoo-patches.tar.bz2 3307 SHA256 0eb635f13e199de77846e0d363a473882f2186f138158271fabf0975747a2f3d SHA512 446c66764dac2533cc2f2b3d50481971d4c63a4e81d94c545862a1be620179fdcd81a79f2d81737d1188812a6ad41d90e2a752a05acf6913e7a71464f7cecdd9 WHIRLPOOL cfca8feef0eb8096897ef751afb0427acddd008530ded6cf908fcff51be9713da4ea3e5e613d544c5caba400d664ae19ca70925df3a218bec5c8be6f69aadda2
20 DIST vim-7.4.769.tar.gz 12189043 SHA256 c89568f3dfcefd773bfbb0958c1cf58a0b0ceedb9d0c264250b379a77ad02e9e SHA512 00048c1d579c409767308c991e5de4ed54e9e50db7e97b0d148f0667742d5e46047c702bee693a5caf13a1603548ab783f7fa846574841d807ffbaa97d7f611e WHIRLPOOL 28ada4763250bbed6f9a1768e81a79b75db64f0ef25296c5d4825f21d21d6e88ff24d488e841e6ba492e363da6d3a3e75e9ec2f2881a731e7ed261c7d21ffd3c
21 DIST vim-8.0.0005.tar.gz 12909267 SHA256 4ad6b4e8fad6412724a665d974e1be3138a9562a5f4f4aab17debf709c1d3ad3 SHA512 3d62557c6929e554c50f8043658665b907b235f180d8917288fc1434237856df7fa098ecb1823e6edea9e5735564cb55869e535350e52fd8c22423480a49438d WHIRLPOOL a80eec04afb2a797837874ec4b035268a20be7cefa487e44e8e441fb518d46cd7e16a263a6256f49e23e60e737b14dc6a7d93d7c3e579d3da13ccee48536b41b
22 +DIST vim-8.0.0106-gentoo-patches.tar.bz2 2281 SHA256 9823a91b050eb4b001cc50f508d2ad03c7c256ed49183c1af7582318667f48d4 SHA512 39edd9f518c230d2b0486b18aa155572a9eada4a5e21108573d6e66e2eef1276f23b77d766648f018c9cf973a7d03712d8861be6ea13255d7b389912d554a47a WHIRLPOOL d6d01e3944d56762a2a999ee631f89e212360aa030ddd16ea96e32d518ec171e04d8565dcb89e804248d53e4c6e06b19be239ad2316ea88bb57364815b85d26b
23 +DIST vim-8.0.0106.tar.gz 12945768 SHA256 cbace3e7a2db3df73720c4181fa4cdbf7df94310522b1c7a4fd7d6afeaa1e145 SHA512 4e40d9ba8ba694d951be78c653d8fcfebe2b3cc460986ef8e3478f81f2dfd5e4b3c2bc5d22082536b9c275e41beeac343cee0aa1e4de125b71fe95c772e26c20 WHIRLPOOL 569a8f50ebdb7f380f675ed0a4b4aa5e7e226303a8e92db2a8e81f5d8acc0e466620c60c160e2204f3af615b91ca2481eb9716f9c2e6dbdb416050d758a49f09
24
25 diff --git a/app-editors/vim/vim-8.0.0106.ebuild b/app-editors/vim/vim-8.0.0106.ebuild
26 new file mode 100644
27 index 00000000..048d016
28 --- /dev/null
29 +++ b/app-editors/vim/vim-8.0.0106.ebuild
30 @@ -0,0 +1,349 @@
31 +# Copyright 1999-2016 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +# $Id$
34 +
35 +EAPI=6
36 +VIM_VERSION="8.0"
37 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
38 +PYTHON_REQ_USE=threads
39 +inherit eutils vim-doc flag-o-matic fdo-mime versionator bash-completion-r1 python-r1
40 +
41 +if [[ ${PV} == 9999* ]] ; then
42 + inherit git-r3
43 + EGIT_REPO_URI="https://github.com/vim/vim.git"
44 +else
45 + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
46 + https://dev.gentoo.org/~radhermit/vim/vim-8.0.0106-gentoo-patches.tar.bz2"
47 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
48 +fi
49 +
50 +DESCRIPTION="Vim, an improved vi-style text editor"
51 +HOMEPAGE="http://www.vim.org/ https://github.com/vim/vim"
52 +
53 +SLOT="0"
54 +LICENSE="vim"
55 +IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl vim-pager"
56 +REQUIRED_USE="
57 + luajit? ( lua )
58 + python? (
59 + || ( $(python_gen_useflags '*') )
60 + ?? ( $(python_gen_useflags 'python2*') )
61 + ?? ( $(python_gen_useflags 'python3*') )
62 + )
63 +"
64 +
65 +RDEPEND="
66 + >=app-eselect/eselect-vi-1.1
67 + >=sys-libs/ncurses-5.2-r2:0=
68 + nls? ( virtual/libintl )
69 + acl? ( kernel_linux? ( sys-apps/acl ) )
70 + cscope? ( dev-util/cscope )
71 + gpm? ( >=sys-libs/gpm-1.19.3 )
72 + lua? (
73 + luajit? ( dev-lang/luajit:2= )
74 + !luajit? ( dev-lang/lua:0[deprecated] )
75 + )
76 + !minimal? (
77 + ~app-editors/vim-core-${PV}
78 + dev-util/ctags
79 + )
80 + perl? ( dev-lang/perl:= )
81 + python? ( ${PYTHON_DEPS} )
82 + racket? ( dev-scheme/racket )
83 + ruby? ( || ( dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 ) )
84 + selinux? ( sys-libs/libselinux )
85 + tcl? ( dev-lang/tcl:0= )
86 + X? ( x11-libs/libXt )
87 +"
88 +DEPEND="${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
100 + export HOME="${T}"/home
101 +}
102 +
103 +src_prepare() {
104 + if [[ ${PV} != 9999* ]] ; then
105 + # Gentoo patches to fix runtime issues, cross-compile errors, etc
106 + eapply "${WORKDIR}"/patches/
107 + fi
108 +
109 + # Fixup a script to use awk instead of nawk
110 + sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
111 + || die "mve.awk sed failed"
112 +
113 + # Read vimrc and gvimrc from /etc/vim
114 + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
115 + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
116 +
117 + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
118 + # Hopefully this pattern won't break for a while at least.
119 + # This fixes bug 29398 (27 Sep 2003 agriffis)
120 + sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
121 + "${S}"/runtime/doc/syntax.txt \
122 + "${S}"/runtime/doc/tagsrch.txt \
123 + "${S}"/runtime/doc/usr_29.txt \
124 + "${S}"/runtime/menu.vim \
125 + "${S}"/src/configure.ac || die 'sed failed'
126 +
127 + # Don't be fooled by /usr/include/libc.h. When found, vim thinks
128 + # this is NeXT, but it's actually just a file in dev-libs/9libs
129 + # This fixes bug 43885 (20 Mar 2004 agriffis)
130 + sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
131 +
132 + # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
133 + # correctly. To avoid some really entertaining error messages about stuff
134 + # which isn't even in the source file being invalid, we'll do some trickery
135 + # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
136 + find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
137 +
138 + # conditionally make the manpager.sh script
139 + if use vim-pager ; then
140 + cat <<-END > "${S}"/runtime/macros/manpager.sh
141 + #!/bin/sh
142 + sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
143 + vim \\
144 + -c 'let no_plugin_maps = 1' \\
145 + -c 'set nolist nomod ft=man ts=8' \\
146 + -c 'let g:showmarks_enable=0' \\
147 + -c 'runtime! macros/less.vim' -
148 + END
149 + fi
150 +
151 + # Try to avoid sandbox problems. Bug #114475.
152 + if [[ -d "${S}"/src/po ]] ; then
153 + sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
154 + "${S}"/src/po/Makefile
155 + fi
156 +
157 + if version_is_at_least 7.3.122 ; then
158 + cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
159 + fi
160 +
161 + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
162 + if version_is_at_least 7.3 ; then
163 + sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
164 + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
165 + fi
166 +
167 + eapply_user
168 +}
169 +
170 +src_configure() {
171 + local myconf=()
172 +
173 + # Fix bug 37354: Disallow -funroll-all-loops on amd64
174 + # Bug 57859 suggests that we want to do this for all archs
175 + filter-flags -funroll-all-loops
176 +
177 + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
178 + # everyone since previous flag filtering bugs have turned out to affect
179 + # multiple archs...
180 + replace-flags -O3 -O2
181 +
182 + # Fix bug 18245: Prevent "make" from the following chain:
183 + # (1) Notice configure.ac is newer than auto/configure
184 + # (2) Rebuild auto/configure
185 + # (3) Notice auto/configure is newer than auto/config.mk
186 + # (4) Run ./configure (with wrong args) to remake auto/config.mk
187 + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
188 + rm -f src/auto/configure
189 + emake -j1 -C src autoconf
190 +
191 + # This should fix a sandbox violation (see bug 24447). The hvc
192 + # things are for ppc64, see bug 86433.
193 + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc* ; do
194 + [[ -e ${file} ]] && addwrite $file
195 + done
196 +
197 + if use minimal ; then
198 + myconf=(
199 + --with-features=tiny
200 + --disable-nls
201 + --disable-multibyte
202 + --disable-acl
203 + --enable-gui=no
204 + --without-x
205 + --disable-darwin
206 + --disable-luainterp
207 + --disable-perlinterp
208 + --disable-pythoninterp
209 + --disable-mzschemeinterp
210 + --disable-rubyinterp
211 + --disable-selinux
212 + --disable-tclinterp
213 + --disable-gpm
214 + )
215 + else
216 + use debug && append-flags "-DDEBUG"
217 +
218 + myconf=(
219 + --with-features=huge
220 + --enable-multibyte
221 + $(use_enable acl)
222 + $(use_enable cscope)
223 + $(use_enable gpm)
224 + $(use_enable lua luainterp)
225 + $(usex lua "--with-lua-prefix=${EPREFIX}/usr" "")
226 + $(use_with luajit)
227 + $(use_enable nls)
228 + $(use_enable perl perlinterp)
229 + $(use_enable racket mzschemeinterp)
230 + $(use_enable ruby rubyinterp)
231 + $(use_enable selinux)
232 + $(use_enable tcl tclinterp)
233 + )
234 +
235 + if use python ; then
236 + py_add_interp() {
237 + local v
238 +
239 + [[ ${EPYTHON} == python3* ]] && v=3
240 + myconf+=(
241 + --enable-python${v}interp
242 + vi_cv_path_python${v}="${PYTHON}"
243 + )
244 + }
245 +
246 + python_foreach_impl py_add_interp
247 + else
248 + myconf+=(
249 + --disable-pythoninterp
250 + --disable-python3interp
251 + )
252 + fi
253 +
254 + # --with-features=huge forces on cscope even if we --disable it. We need
255 + # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
256 + if ! use cscope ; then
257 + sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \
258 + die "couldn't disable cscope"
259 + fi
260 +
261 + # don't test USE=X here ... see bug #19115
262 + # but need to provide a way to link against X ... see bug #20093
263 + myconf+=(
264 + --enable-gui=no
265 + --disable-darwin
266 + $(use_with X x)
267 + )
268 + fi
269 +
270 + # let package manager strip binaries
271 + export ac_cv_prog_STRIP="$(type -P true ) faking strip"
272 +
273 + # keep prefix env contained within the EPREFIX
274 + use prefix && myconf+=( --without-local-dir )
275 +
276 + econf \
277 + --with-modified-by=Gentoo-${PVR} \
278 + "${myconf[@]}"
279 +}
280 +
281 +src_compile() {
282 + # The following allows emake to be used
283 + emake -j1 -C src auto/osdef.h objects
284 +
285 + emake
286 +}
287 +
288 +src_test() {
289 + echo
290 + einfo "Starting vim tests. Several error messages will be shown"
291 + einfo "while the tests run. This is normal behaviour and does not"
292 + einfo "indicate a fault."
293 + echo
294 + ewarn "If the tests fail, your terminal may be left in a strange"
295 + ewarn "state. Usually, running 'reset' will fix this."
296 + echo
297 +
298 + # Don't let vim talk to X
299 + unset DISPLAY
300 +
301 + emake -j1 -C src/testdir nongui
302 +}
303 +
304 +# Make convenience symlinks, hopefully without stepping on toes. Some
305 +# of these links are "owned" by the vim ebuild when it is installed,
306 +# but they might be good for gvim as well (see bug 45828)
307 +update_vim_symlinks() {
308 + local f syms
309 + syms="vimdiff rvim rview"
310 + einfo "Calling eselect vi update..."
311 + # Call this with --if-unset to respect user's choice (bug 187449)
312 + eselect vi update --if-unset
313 +
314 + # Make or remove convenience symlink, vim -> gvim
315 + if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
316 + ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null
317 + elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
318 + rm "${EROOT}"/usr/bin/vim
319 + fi
320 +
321 + # Make or remove convenience symlinks to vim
322 + if [[ -f "${EROOT}"/usr/bin/vim ]]; then
323 + for f in ${syms}; do
324 + ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null
325 + done
326 + else
327 + for f in ${syms}; do
328 + if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
329 + rm -f "${EROOT}"/usr/bin/${f}
330 + fi
331 + done
332 + fi
333 +
334 + # This will still break if you merge then remove the vi package,
335 + # but there's only so much you can do, eh? Unfortunately we don't
336 + # have triggers like are done in rpm-land.
337 +}
338 +
339 +src_install() {
340 + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
341 +
342 + # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
343 + # managed by eselect-vi
344 + dobin src/vim
345 + dosym vim /usr/bin/vimdiff
346 + dosym vim /usr/bin/rvim
347 + dosym vim /usr/bin/rview
348 + if use vim-pager ; then
349 + dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
350 + dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
351 + insinto ${vimfiles}/macros
352 + doins runtime/macros/manpager.sh
353 + fperms a+x ${vimfiles}/macros/manpager.sh
354 + fi
355 +
356 + newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
357 + # keep in sync with 'complete ... -F' list
358 + bashcomp_alias vim ex vi view rvim rview vimdiff
359 +
360 + # We shouldn't be installing the ex or view man page symlinks, as they
361 + # are managed by eselect-vi
362 + rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
363 +}
364 +
365 +pkg_postinst() {
366 + # Update documentation tags (from vim-doc.eclass)
367 + update_vim_helptags
368 +
369 + # Make convenience symlinks
370 + update_vim_symlinks
371 +}
372 +
373 +pkg_postrm() {
374 + # Update documentation tags (from vim-doc.eclass)
375 + update_vim_helptags
376 +
377 + # Make convenience symlinks
378 + update_vim_symlinks
379 +}