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: Mon, 01 Feb 2016 05:05:17
Message-Id: 1454302957.952981b3073b875b9dacf397b6bdab6780877ac1.radhermit@gentoo
1 commit: 952981b3073b875b9dacf397b6bdab6780877ac1
2 Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 1 05:02:37 2016 +0000
4 Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 1 05:02:37 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=952981b3
7
8 app-editors/vim: remove old
9
10 app-editors/vim/Manifest | 3 -
11 app-editors/vim/vim-7.4.273.ebuild | 369 -----------------------------------
12 app-editors/vim/vim-7.4.827.ebuild | 384 -------------------------------------
13 3 files changed, 756 deletions(-)
14
15 diff --git a/app-editors/vim/Manifest b/app-editors/vim/Manifest
16 index 613c4da..38cfe40 100644
17 --- a/app-editors/vim/Manifest
18 +++ b/app-editors/vim/Manifest
19 @@ -3,6 +3,3 @@ DIST vim-7.4.1229.tar.gz 12576784 SHA256 8a782e97916d57c44dcd84d38002884e05f3353
20 DIST vim-7.4.542-gentoo-patches.tar.bz2 3307 SHA256 0eb635f13e199de77846e0d363a473882f2186f138158271fabf0975747a2f3d SHA512 446c66764dac2533cc2f2b3d50481971d4c63a4e81d94c545862a1be620179fdcd81a79f2d81737d1188812a6ad41d90e2a752a05acf6913e7a71464f7cecdd9 WHIRLPOOL cfca8feef0eb8096897ef751afb0427acddd008530ded6cf908fcff51be9713da4ea3e5e613d544c5caba400d664ae19ca70925df3a218bec5c8be6f69aadda2
21 DIST vim-7.4.769.tar.gz 12189043 SHA256 c89568f3dfcefd773bfbb0958c1cf58a0b0ceedb9d0c264250b379a77ad02e9e SHA512 00048c1d579c409767308c991e5de4ed54e9e50db7e97b0d148f0667742d5e46047c702bee693a5caf13a1603548ab783f7fa846574841d807ffbaa97d7f611e WHIRLPOOL 28ada4763250bbed6f9a1768e81a79b75db64f0ef25296c5d4825f21d21d6e88ff24d488e841e6ba492e363da6d3a3e75e9ec2f2881a731e7ed261c7d21ffd3c
22 DIST vim-7.4.827-gentoo-patches.tar.bz2 3106 SHA256 1d2bb395fa79dde8e3dbc0a94e4b9591f9cb544d4e52a1ecd2eac4122e55b740 SHA512 122dbcdee115ce0979ce8c5a54623ed405e889fb18967d7c9208d924bd62a7dd615544538040aef19449410c0ea5783c1832a317a1afd056d4d387c43e7a5988 WHIRLPOOL 23afe4d61b8c2f6a4d7e0e3a64a0d7c79a72ea3c317d93e969f01706c666217d19c866db56e0b09428c77d44e2adbf86edbbf4f3dbe521481c234cc66c0bafed
23 -DIST vim-7.4.827.tar.gz 12203128 SHA256 8920db8115c78d260abbb2757ebf0e1e64d6e2f989626435fffad1ef37a9760f SHA512 e055b71afdde347a45d78ff10a672be8b92d00dc0215febe39db8a0b44474a92b40f728cbbdbb2ceefbe6fa08683eed549880e07e6e97dd44c994b7f669a8e6a WHIRLPOOL e86e3b203c29ffd9b0b6536b7a997377bd0914cdb4f2b8775a4ae1fae2ab44f54b6c007e0d1bb08d8272aa8da596577729a9f004e7cf1f4914bf55c402b468e5
24 -DIST vim-7.4.tar.bz2 9843297 SHA256 d0f5a6d2c439f02d97fa21bd9121f4c5abb1f6cd8b5a79d3ca82867495734ade SHA512 65d55da556ee283a364b376d251b70e430b7a157bb5a8ee89565060ff9937907966d416cffd33f701b3314d0fdf16efe00065f66bc8459469f5ae2f713418e0e WHIRLPOOL 914fc2c4fd485196410d853990bb5cc4c0071bc36dc0794655ec05cc0b5f7d2971dea780cc7293fcfbd4495a30a7437a3b1e33a2b6795c10a9f05a2eac3ca6f4
25 -DIST vim-patches-7.4.273.patch.bz2 506378 SHA256 065447179d22602315e2965d135cf9f1db4394ff5655520719f6338ff29e89ca SHA512 029a5cef758e4b201eabbc82458f3e1c3674582715a8c78a7270f3ecd57980b1cef66a0152526fd3505685c27c07f6e6742da48da9ad9546e3cfc2a5e7c11164 WHIRLPOOL 305322e991e9640b80147dd5ceac9dd6dae93a07610f807bbf01c0fdf37cba67ea41a1b2720c8a43da0161c57e0a522086f135efc712fb0106497a21288a872a
26
27 diff --git a/app-editors/vim/vim-7.4.273.ebuild b/app-editors/vim/vim-7.4.273.ebuild
28 deleted file mode 100644
29 index c63f748..0000000
30 --- a/app-editors/vim/vim-7.4.273.ebuild
31 +++ /dev/null
32 @@ -1,369 +0,0 @@
33 -# Copyright 1999-2015 Gentoo Foundation
34 -# Distributed under the terms of the GNU General Public License v2
35 -# $Id$
36 -
37 -EAPI=5
38 -VIM_VERSION="7.4"
39 -PYTHON_COMPAT=( python{2_7,3_3,3_4} )
40 -PYTHON_REQ_USE=threads
41 -inherit eutils vim-doc flag-o-matic fdo-mime versionator bash-completion-r1 python-single-r1
42 -
43 -if [[ ${PV} == 9999* ]] ; then
44 - inherit mercurial
45 - EHG_REPO_URI="https://vim.googlecode.com/hg/"
46 - EHG_PROJECT="vim"
47 -else
48 - VIM_ORG_PATCHES="vim-patches-${PV}.patch.bz2"
49 -
50 - SRC_URI="ftp://ftp.vim.org/pub/vim/unix/vim-${VIM_VERSION}.tar.bz2
51 - https://dev.gentoo.org/~radhermit/vim/${VIM_ORG_PATCHES}"
52 - KEYWORDS="alpha amd64 arm 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"
53 -fi
54 -
55 -DESCRIPTION="Vim, an improved vi-style text editor"
56 -HOMEPAGE="http://www.vim.org/"
57 -
58 -SLOT="0"
59 -LICENSE="vim"
60 -IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl vim-pager"
61 -REQUIRED_USE="
62 - python? ( ${PYTHON_REQUIRED_USE} )
63 - luajit? ( lua )
64 -"
65 -
66 -RDEPEND="
67 - >=app-eselect/eselect-vi-1.1
68 - >=sys-libs/ncurses-5.2-r2
69 - nls? ( virtual/libintl )
70 - acl? ( kernel_linux? ( sys-apps/acl ) )
71 - cscope? ( dev-util/cscope )
72 - gpm? ( >=sys-libs/gpm-1.19.3 )
73 - lua? (
74 - luajit? ( dev-lang/luajit:2= )
75 - !luajit? ( dev-lang/lua:0[deprecated] )
76 - )
77 - !minimal? (
78 - ~app-editors/vim-core-${PV}
79 - dev-util/ctags
80 - )
81 - perl? ( dev-lang/perl:= )
82 - python? ( ${PYTHON_DEPS} )
83 - racket? ( dev-scheme/racket )
84 - ruby? ( || ( dev-lang/ruby:2.1 dev-lang/ruby:2.0 dev-lang/ruby:1.9 dev-lang/ruby:1.8 ) )
85 - selinux? ( sys-libs/libselinux )
86 - tcl? ( dev-lang/tcl:0= )
87 - X? ( x11-libs/libXt )
88 -"
89 -DEPEND="${RDEPEND}
90 - sys-devel/autoconf
91 - >=sys-libs/ncurses-5.2-r2
92 - nls? ( sys-devel/gettext )
93 -"
94 -
95 -S=${WORKDIR}/vim${VIM_VERSION/.}
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
104 - export HOME="${T}"/home
105 -
106 - use python && python-single-r1_pkg_setup
107 -}
108 -
109 -src_prepare() {
110 - if [[ ${PV} != 9999* ]] ; then
111 - if [[ -f "${WORKDIR}"/${VIM_ORG_PATCHES%.bz2} ]] ; then
112 - # Apply any patches available from vim.org for this version
113 - epatch "${WORKDIR}"/${VIM_ORG_PATCHES%.bz2}
114 - fi
115 - fi
116 -
117 - # Fixup a script to use awk instead of nawk
118 - sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
119 - || die "mve.awk sed failed"
120 -
121 - # Read vimrc and gvimrc from /etc/vim
122 - echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
123 - echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
124 -
125 - # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
126 - # Hopefully this pattern won't break for a while at least.
127 - # This fixes bug 29398 (27 Sep 2003 agriffis)
128 - sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
129 - "${S}"/runtime/doc/syntax.txt \
130 - "${S}"/runtime/doc/tagsrch.txt \
131 - "${S}"/runtime/doc/usr_29.txt \
132 - "${S}"/runtime/menu.vim \
133 - "${S}"/src/configure.in || die 'sed failed'
134 -
135 - # Don't be fooled by /usr/include/libc.h. When found, vim thinks
136 - # this is NeXT, but it's actually just a file in dev-libs/9libs
137 - # This fixes bug 43885 (20 Mar 2004 agriffis)
138 - sed -i 's/ libc\.h / /' "${S}"/src/configure.in || 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 echo >> "$c" ; done
145 -
146 - # conditionally make the manpager.sh script
147 - if use vim-pager ; then
148 - cat <<-END > "${S}"/runtime/macros/manpager.sh
149 - #!/bin/sh
150 - sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
151 - vim \\
152 - -c 'let no_plugin_maps = 1' \\
153 - -c 'set nolist nomod ft=man' \\
154 - -c 'let g:showmarks_enable=0' \\
155 - -c 'runtime! macros/less.vim' -
156 - END
157 - fi
158 -
159 - # Try to avoid sandbox problems. Bug #114475.
160 - if [[ -d "${S}"/src/po ]] ; then
161 - sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
162 - "${S}"/src/po/Makefile
163 - fi
164 -
165 - if version_is_at_least 7.3.122 ; then
166 - cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
167 - fi
168 -
169 - # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
170 - if version_is_at_least 7.3 ; then
171 - sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
172 - "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
173 - fi
174 -
175 - epatch_user
176 -}
177 -
178 -src_configure() {
179 - local myconf
180 -
181 - # Fix bug 37354: Disallow -funroll-all-loops on amd64
182 - # Bug 57859 suggests that we want to do this for all archs
183 - filter-flags -funroll-all-loops
184 -
185 - # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
186 - # everyone since previous flag filtering bugs have turned out to affect
187 - # multiple archs...
188 - replace-flags -O3 -O2
189 -
190 - # Fix bug 18245: Prevent "make" from the following chain:
191 - # (1) Notice configure.in is newer than auto/configure
192 - # (2) Rebuild auto/configure
193 - # (3) Notice auto/configure is newer than auto/config.mk
194 - # (4) Run ./configure (with wrong args) to remake auto/config.mk
195 - sed -i 's/ auto.config.mk:/:/' src/Makefile || die "Makefile sed failed"
196 - rm -f src/auto/configure
197 - emake -j1 -C src autoconf
198 -
199 - # This should fix a sandbox violation (see bug 24447). The hvc
200 - # things are for ppc64, see bug 86433.
201 - for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc* ; do
202 - [[ -e ${file} ]] && addwrite $file
203 - done
204 -
205 - if use minimal ; then
206 - myconf="--with-features=tiny \
207 - --disable-nls \
208 - --disable-multibyte \
209 - --disable-acl \
210 - --enable-gui=no \
211 - --without-x \
212 - --disable-darwin \
213 - --disable-luainterp \
214 - --disable-perlinterp \
215 - --disable-pythoninterp \
216 - --disable-mzschemeinterp \
217 - --disable-rubyinterp \
218 - --disable-selinux \
219 - --disable-tclinterp \
220 - --disable-gpm"
221 - else
222 - use debug && append-flags "-DDEBUG"
223 -
224 - myconf="--with-features=huge --enable-multibyte"
225 - myconf+=" $(use_enable acl)"
226 - myconf+=" $(use_enable cscope)"
227 - myconf+=" $(use_enable gpm)"
228 - myconf+=" $(use_enable lua luainterp)"
229 - myconf+=" $(use_with luajit)"
230 - myconf+=" $(use_enable nls)"
231 - myconf+=" $(use_enable perl perlinterp)"
232 - myconf+=" $(use_enable racket mzschemeinterp)"
233 - myconf+=" $(use_enable ruby rubyinterp)"
234 - myconf+=" $(use_enable selinux)"
235 - myconf+=" $(use_enable tcl tclinterp)"
236 -
237 - if use python ; then
238 - if [[ ${EPYTHON} == python3* ]] ; then
239 - myconf+=" --enable-python3interp"
240 - export vi_cv_path_python3="${PYTHON}"
241 - else
242 - myconf+=" --enable-pythoninterp"
243 - export vi_cv_path_python="${PYTHON}"
244 - fi
245 - else
246 - myconf+=" --disable-pythoninterp --disable-python3interp"
247 - fi
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 '/# define FEAT_CSCOPE/d' src/feature.h || \
253 - die "couldn't disable cscope"
254 - fi
255 -
256 - # don't test USE=X here ... see bug #19115
257 - # but need to provide a way to link against X ... see bug #20093
258 - myconf+=" --enable-gui=no --disable-darwin $(use_with X x)"
259 - fi
260 -
261 - # Let Portage do the stripping. Some people like that.
262 - export ac_cv_prog_STRIP="$(type -P true ) faking strip"
263 -
264 - # Keep Gentoo Prefix env contained within the EPREFIX
265 - use prefix && myconf+=" --without-local-dir"
266 -
267 - econf \
268 - --with-modified-by=Gentoo-${PVR} \
269 - ${myconf}
270 -}
271 -
272 -src_compile() {
273 - # The following allows emake to be used
274 - emake -j1 -C src auto/osdef.h objects
275 -
276 - emake
277 -}
278 -
279 -src_test() {
280 - echo
281 - einfo "Starting vim tests. Several error messages will be shown"
282 - einfo "while the tests run. This is normal behaviour and does not"
283 - einfo "indicate a fault."
284 - echo
285 - ewarn "If the tests fail, your terminal may be left in a strange"
286 - ewarn "state. Usually, running 'reset' will fix this."
287 - echo
288 -
289 - # Don't let vim talk to X
290 - unset DISPLAY
291 -
292 - # We've got to call make test from within testdir, since the Makefiles
293 - # don't pass through our VIMPROG argument
294 - cd "${S}"/src/testdir
295 -
296 - # Test 49 won't work inside a portage environment
297 - einfo "Test 49 isn't sandbox-friendly, so it will be skipped."
298 - sed -i 's~test49.out~~g' Makefile
299 -
300 - # We don't want to rebuild vim before running the tests
301 - sed -i 's,: \$(VIMPROG),: ,' Makefile
302 -
303 - # Don't try to do the additional GUI test
304 - emake -j1 VIMPROG=../vim nongui
305 -}
306 -
307 -# Make convenience symlinks, hopefully without stepping on toes. Some
308 -# of these links are "owned" by the vim ebuild when it is installed,
309 -# but they might be good for gvim as well (see bug 45828)
310 -update_vim_symlinks() {
311 - has "${EAPI:-0}" 0 1 2 && use !prefix && EROOT="${ROOT}"
312 - local f syms
313 - syms="vimdiff rvim rview"
314 - einfo "Calling eselect vi update..."
315 - # Call this with --if-unset to respect user's choice (bug 187449)
316 - eselect vi update --if-unset
317 -
318 - # Make or remove convenience symlink, vim -> gvim
319 - if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
320 - ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null
321 - elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
322 - rm "${EROOT}"/usr/bin/vim
323 - fi
324 -
325 - # Make or remove convenience symlinks to vim
326 - if [[ -f "${EROOT}"/usr/bin/vim ]]; then
327 - for f in ${syms}; do
328 - ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null
329 - done
330 - else
331 - for f in ${syms}; do
332 - if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
333 - rm -f "${EROOT}"/usr/bin/${f}
334 - fi
335 - done
336 - fi
337 -
338 - # This will still break if you merge then remove the vi package,
339 - # but there's only so much you can do, eh? Unfortunately we don't
340 - # have triggers like are done in rpm-land.
341 -}
342 -
343 -src_install() {
344 - local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
345 -
346 - # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
347 - # managed by eselect-vi
348 - dobin src/vim
349 - dosym vim /usr/bin/vimdiff
350 - dosym vim /usr/bin/rvim
351 - dosym vim /usr/bin/rview
352 - if use vim-pager ; then
353 - dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
354 - dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
355 - insinto ${vimfiles}/macros
356 - doins runtime/macros/manpager.sh
357 - fperms a+x ${vimfiles}/macros/manpager.sh
358 - fi
359 -
360 - newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
361 -
362 - # We shouldn't be installing the ex or view man page symlinks, as they
363 - # are managed by eselect-vi
364 - rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
365 -}
366 -
367 -pkg_postinst() {
368 - # Update documentation tags (from vim-doc.eclass)
369 - update_vim_helptags
370 -
371 - if [[ -z ${REPLACING_VERSIONS} ]] ; then
372 - if use X ; then
373 - echo
374 - elog "The 'X' USE flag enables vim <-> X communication, like"
375 - elog "updating the xterm titlebar. It does not install a GUI."
376 - fi
377 - echo
378 - elog "To install a GUI version of vim, use the app-editors/gvim"
379 - elog "package."
380 - echo
381 - elog "Vim 7 includes an integrated spell checker. You need to install"
382 - elog "word list files before you can use it. There are ebuilds for"
383 - elog "some of these named app-vim/vim-spell-*. If your language of"
384 - elog "choice is not included, please consult vim-spell.eclass for"
385 - elog "instructions on how to make a package."
386 - echo
387 - ewarn "Note that the English word lists are no longer installed by"
388 - ewarn "default."
389 - fi
390 -
391 - # Make convenience symlinks
392 - update_vim_symlinks
393 -}
394 -
395 -pkg_postrm() {
396 - # Update documentation tags (from vim-doc.eclass)
397 - update_vim_helptags
398 -
399 - # Make convenience symlinks
400 - update_vim_symlinks
401 -}
402
403 diff --git a/app-editors/vim/vim-7.4.827.ebuild b/app-editors/vim/vim-7.4.827.ebuild
404 deleted file mode 100644
405 index a6f60aa..0000000
406 --- a/app-editors/vim/vim-7.4.827.ebuild
407 +++ /dev/null
408 @@ -1,384 +0,0 @@
409 -# Copyright 1999-2015 Gentoo Foundation
410 -# Distributed under the terms of the GNU General Public License v2
411 -# $Id$
412 -
413 -EAPI=5
414 -VIM_VERSION="7.4"
415 -PYTHON_COMPAT=( python{2_7,3_3,3_4} )
416 -PYTHON_REQ_USE=threads
417 -inherit eutils vim-doc flag-o-matic fdo-mime versionator bash-completion-r1 python-r1
418 -
419 -if [[ ${PV} == 9999* ]] ; then
420 - inherit git-r3
421 - EGIT_REPO_URI="https://github.com/vim/vim.git"
422 -else
423 - SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
424 - https://dev.gentoo.org/~radhermit/vim/vim-7.4.827-gentoo-patches.tar.bz2"
425 - 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"
426 -fi
427 -
428 -DESCRIPTION="Vim, an improved vi-style text editor"
429 -HOMEPAGE="http://www.vim.org/"
430 -
431 -SLOT="0"
432 -LICENSE="vim"
433 -IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl vim-pager"
434 -REQUIRED_USE="
435 - luajit? ( lua )
436 - python? (
437 - || ( $(python_gen_useflags '*') )
438 - ?? ( $(python_gen_useflags 'python2*') )
439 - ?? ( $(python_gen_useflags 'python3*') )
440 - )
441 -"
442 -
443 -RDEPEND="
444 - >=app-eselect/eselect-vi-1.1
445 - >=sys-libs/ncurses-5.2-r2
446 - nls? ( virtual/libintl )
447 - acl? ( kernel_linux? ( sys-apps/acl ) )
448 - cscope? ( dev-util/cscope )
449 - gpm? ( >=sys-libs/gpm-1.19.3 )
450 - lua? (
451 - luajit? ( dev-lang/luajit:2= )
452 - !luajit? ( dev-lang/lua:0[deprecated] )
453 - )
454 - !minimal? (
455 - ~app-editors/vim-core-${PV}
456 - dev-util/ctags
457 - )
458 - perl? ( dev-lang/perl:= )
459 - python? ( ${PYTHON_DEPS} )
460 - racket? ( dev-scheme/racket )
461 - ruby? ( || ( dev-lang/ruby:2.2 dev-lang/ruby:2.1 dev-lang/ruby:2.0 ) )
462 - selinux? ( sys-libs/libselinux )
463 - tcl? ( dev-lang/tcl:0= )
464 - X? ( x11-libs/libXt )
465 -"
466 -DEPEND="${RDEPEND}
467 - sys-devel/autoconf
468 - nls? ( sys-devel/gettext )
469 -"
470 -
471 -pkg_setup() {
472 - # people with broken alphabets run into trouble. bug 82186.
473 - unset LANG LC_ALL
474 - export LC_COLLATE="C"
475 -
476 - # Gnome sandbox silliness. bug #114475.
477 - mkdir -p "${T}"/home
478 - export HOME="${T}"/home
479 -}
480 -
481 -src_prepare() {
482 - if [[ ${PV} != 9999* ]] ; then
483 - if [[ -d "${WORKDIR}"/patches/ ]]; then
484 - # Gentoo patches to fix runtime issues, cross-compile errors, etc
485 - EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" \
486 - epatch "${WORKDIR}"/patches/
487 - fi
488 - fi
489 -
490 - # Fixup a script to use awk instead of nawk
491 - sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
492 - || die "mve.awk sed failed"
493 -
494 - # Read vimrc and gvimrc from /etc/vim
495 - echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
496 - echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
497 -
498 - # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
499 - # Hopefully this pattern won't break for a while at least.
500 - # This fixes bug 29398 (27 Sep 2003 agriffis)
501 - sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
502 - "${S}"/runtime/doc/syntax.txt \
503 - "${S}"/runtime/doc/tagsrch.txt \
504 - "${S}"/runtime/doc/usr_29.txt \
505 - "${S}"/runtime/menu.vim \
506 - "${S}"/src/configure.in || die 'sed failed'
507 -
508 - # Don't be fooled by /usr/include/libc.h. When found, vim thinks
509 - # this is NeXT, but it's actually just a file in dev-libs/9libs
510 - # This fixes bug 43885 (20 Mar 2004 agriffis)
511 - sed -i 's/ libc\.h / /' "${S}"/src/configure.in || die 'sed failed'
512 -
513 - # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
514 - # correctly. To avoid some really entertaining error messages about stuff
515 - # which isn't even in the source file being invalid, we'll do some trickery
516 - # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
517 - find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
518 -
519 - # conditionally make the manpager.sh script
520 - if use vim-pager ; then
521 - cat <<-END > "${S}"/runtime/macros/manpager.sh
522 - #!/bin/sh
523 - sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
524 - vim \\
525 - -c 'let no_plugin_maps = 1' \\
526 - -c 'set nolist nomod ft=man ts=8' \\
527 - -c 'let g:showmarks_enable=0' \\
528 - -c 'runtime! macros/less.vim' -
529 - END
530 - fi
531 -
532 - # Try to avoid sandbox problems. Bug #114475.
533 - if [[ -d "${S}"/src/po ]] ; then
534 - sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
535 - "${S}"/src/po/Makefile
536 - fi
537 -
538 - if version_is_at_least 7.3.122 ; then
539 - cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
540 - fi
541 -
542 - # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
543 - if version_is_at_least 7.3 ; then
544 - sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
545 - "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
546 - fi
547 -
548 - epatch_user
549 -}
550 -
551 -src_configure() {
552 - local myconf=()
553 -
554 - # Fix bug 37354: Disallow -funroll-all-loops on amd64
555 - # Bug 57859 suggests that we want to do this for all archs
556 - filter-flags -funroll-all-loops
557 -
558 - # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
559 - # everyone since previous flag filtering bugs have turned out to affect
560 - # multiple archs...
561 - replace-flags -O3 -O2
562 -
563 - # Fix bug 18245: Prevent "make" from the following chain:
564 - # (1) Notice configure.in is newer than auto/configure
565 - # (2) Rebuild auto/configure
566 - # (3) Notice auto/configure is newer than auto/config.mk
567 - # (4) Run ./configure (with wrong args) to remake auto/config.mk
568 - sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
569 - rm -f src/auto/configure
570 - emake -j1 -C src autoconf
571 -
572 - # This should fix a sandbox violation (see bug 24447). The hvc
573 - # things are for ppc64, see bug 86433.
574 - for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc* ; do
575 - [[ -e ${file} ]] && addwrite $file
576 - done
577 -
578 - if use minimal ; then
579 - myconf=(
580 - --with-features=tiny
581 - --disable-nls
582 - --disable-multibyte
583 - --disable-acl
584 - --enable-gui=no
585 - --without-x
586 - --disable-darwin
587 - --disable-luainterp
588 - --disable-perlinterp
589 - --disable-pythoninterp
590 - --disable-mzschemeinterp
591 - --disable-rubyinterp
592 - --disable-selinux
593 - --disable-tclinterp
594 - --disable-gpm
595 - )
596 - else
597 - use debug && append-flags "-DDEBUG"
598 -
599 - myconf=(
600 - --with-features=huge
601 - --enable-multibyte
602 - $(use_enable acl)
603 - $(use_enable cscope)
604 - $(use_enable gpm)
605 - $(use_enable lua luainterp)
606 - $(usex lua "--with-lua-prefix=${EPREFIX}/usr" "")
607 - $(use_with luajit)
608 - $(use_enable nls)
609 - $(use_enable perl perlinterp)
610 - $(use_enable racket mzschemeinterp)
611 - $(use_enable ruby rubyinterp)
612 - $(use_enable selinux)
613 - $(use_enable tcl tclinterp)
614 - )
615 -
616 - if use python ; then
617 - py_add_interp() {
618 - local v
619 -
620 - [[ ${EPYTHON} == python3* ]] && v=3
621 - myconf+=(
622 - --enable-python${v}interp
623 - vi_cv_path_python${v}="${PYTHON}"
624 - )
625 - }
626 -
627 - python_foreach_impl py_add_interp
628 - else
629 - myconf+=(
630 - --disable-pythoninterp
631 - --disable-python3interp
632 - )
633 - fi
634 -
635 - # --with-features=huge forces on cscope even if we --disable it. We need
636 - # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
637 - if ! use cscope ; then
638 - sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \
639 - die "couldn't disable cscope"
640 - fi
641 -
642 - # don't test USE=X here ... see bug #19115
643 - # but need to provide a way to link against X ... see bug #20093
644 - myconf+=(
645 - --enable-gui=no
646 - --disable-darwin
647 - $(use_with X x)
648 - )
649 - fi
650 -
651 - # Let Portage do the stripping. Some people like that.
652 - export ac_cv_prog_STRIP="$(type -P true ) faking strip"
653 -
654 - # Keep Gentoo Prefix env contained within the EPREFIX
655 - use prefix && myconf+=( --without-local-dir )
656 -
657 - econf \
658 - --with-modified-by=Gentoo-${PVR} \
659 - "${myconf[@]}"
660 -}
661 -
662 -src_compile() {
663 - # The following allows emake to be used
664 - emake -j1 -C src auto/osdef.h objects
665 -
666 - emake
667 -}
668 -
669 -src_test() {
670 - echo
671 - einfo "Starting vim tests. Several error messages will be shown"
672 - einfo "while the tests run. This is normal behaviour and does not"
673 - einfo "indicate a fault."
674 - echo
675 - ewarn "If the tests fail, your terminal may be left in a strange"
676 - ewarn "state. Usually, running 'reset' will fix this."
677 - echo
678 -
679 - # Don't let vim talk to X
680 - unset DISPLAY
681 -
682 - # We've got to call make test from within testdir, since the Makefiles
683 - # don't pass through our VIMPROG argument
684 - cd "${S}"/src/testdir
685 -
686 - # Test 49 won't work inside a portage environment
687 - einfo "Test 49 isn't sandbox-friendly, so it will be skipped."
688 - sed -i 's~test49.out~~g' Makefile
689 -
690 - # We don't want to rebuild vim before running the tests
691 - sed -i 's,: \$(VIMPROG),: ,' Makefile
692 -
693 - # Don't try to do the additional GUI test
694 - emake -j1 VIMPROG=../vim nongui
695 -}
696 -
697 -# Make convenience symlinks, hopefully without stepping on toes. Some
698 -# of these links are "owned" by the vim ebuild when it is installed,
699 -# but they might be good for gvim as well (see bug 45828)
700 -update_vim_symlinks() {
701 - local f syms
702 - syms="vimdiff rvim rview"
703 - einfo "Calling eselect vi update..."
704 - # Call this with --if-unset to respect user's choice (bug 187449)
705 - eselect vi update --if-unset
706 -
707 - # Make or remove convenience symlink, vim -> gvim
708 - if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
709 - ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null
710 - elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
711 - rm "${EROOT}"/usr/bin/vim
712 - fi
713 -
714 - # Make or remove convenience symlinks to vim
715 - if [[ -f "${EROOT}"/usr/bin/vim ]]; then
716 - for f in ${syms}; do
717 - ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null
718 - done
719 - else
720 - for f in ${syms}; do
721 - if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
722 - rm -f "${EROOT}"/usr/bin/${f}
723 - fi
724 - done
725 - fi
726 -
727 - # This will still break if you merge then remove the vi package,
728 - # but there's only so much you can do, eh? Unfortunately we don't
729 - # have triggers like are done in rpm-land.
730 -}
731 -
732 -src_install() {
733 - local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
734 -
735 - # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
736 - # managed by eselect-vi
737 - dobin src/vim
738 - dosym vim /usr/bin/vimdiff
739 - dosym vim /usr/bin/rvim
740 - dosym vim /usr/bin/rview
741 - if use vim-pager ; then
742 - dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
743 - dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
744 - insinto ${vimfiles}/macros
745 - doins runtime/macros/manpager.sh
746 - fperms a+x ${vimfiles}/macros/manpager.sh
747 - fi
748 -
749 - newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
750 - # keep in sync with 'complete ... -F' list
751 - bashcomp_alias vim ex vi view rvim rview vimdiff
752 -
753 - # We shouldn't be installing the ex or view man page symlinks, as they
754 - # are managed by eselect-vi
755 - rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
756 -}
757 -
758 -pkg_postinst() {
759 - # Update documentation tags (from vim-doc.eclass)
760 - update_vim_helptags
761 -
762 - if [[ -z ${REPLACING_VERSIONS} ]] ; then
763 - if use X ; then
764 - echo
765 - elog "The 'X' USE flag enables vim <-> X communication, like"
766 - elog "updating the xterm titlebar. It does not install a GUI."
767 - fi
768 - echo
769 - elog "To install a GUI version of vim, use the app-editors/gvim"
770 - elog "package."
771 - echo
772 - elog "Vim 7 includes an integrated spell checker. You need to install"
773 - elog "word list files before you can use it. There are ebuilds for"
774 - elog "some of these named app-vim/vim-spell-*. If your language of"
775 - elog "choice is not included, please consult vim-spell.eclass for"
776 - elog "instructions on how to make a package."
777 - echo
778 - ewarn "Note that the English word lists are no longer installed by"
779 - ewarn "default."
780 - fi
781 -
782 - # Make convenience symlinks
783 - update_vim_symlinks
784 -}
785 -
786 -pkg_postrm() {
787 - # Update documentation tags (from vim-doc.eclass)
788 - update_vim_helptags
789 -
790 - # Make convenience symlinks
791 - update_vim_symlinks
792 -}