Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/vim/
Date: Sun, 08 Apr 2018 21:37:09
Message-Id: 1523223412.170bc1bbdbe24c4cac8d00226273838f8f89acf4.monsieurp@gentoo
1 commit: 170bc1bbdbe24c4cac8d00226273838f8f89acf4
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 8 21:35:22 2018 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 8 21:36:52 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=170bc1bb
7
8 app-editors/vim: remove vulnerable versions.
9
10 Bug: https://bugs.gentoo.org/639710
11 Package-Manager: Portage-2.3.24, Repoman-2.3.6
12
13 app-editors/vim/Manifest | 3 -
14 app-editors/vim/vim-8.0.0386.ebuild | 348 ------------------------------------
15 app-editors/vim/vim-8.0.1188.ebuild | 309 --------------------------------
16 3 files changed, 660 deletions(-)
17
18 diff --git a/app-editors/vim/Manifest b/app-editors/vim/Manifest
19 index b15b79a97f8..e389e37e215 100644
20 --- a/app-editors/vim/Manifest
21 +++ b/app-editors/vim/Manifest
22 @@ -1,7 +1,4 @@
23 -DIST vim-8.0.0106-gentoo-patches.tar.bz2 2281 BLAKE2B 8e10c0c56ad97cbae0677ec91b0b35359f6e08b5eb542b00028fd0e243a075551adab4e140a90930cbce4549c3c4bc79a40c0e1a6c13aae18f67d6fc55a80e0e SHA512 39edd9f518c230d2b0486b18aa155572a9eada4a5e21108573d6e66e2eef1276f23b77d766648f018c9cf973a7d03712d8861be6ea13255d7b389912d554a47a
24 -DIST vim-8.0.0386.tar.gz 13000882 BLAKE2B c38c1b75334cae916f76562ec5a06d59c4f2df6123d4b27a0a854dd8ecd9ae6f5d008a94137abe6217fc28d233077d636d30f2c26a5a139ff35f50cb52204f79 SHA512 3169ea4dbc836c724f63d99cd345227f870a3a922beba84a6b42011685c0dd209f6bba8c69af0650c9a57bb47fc541e1150ca8cefb21fcada022259bf4c94a66
25 DIST vim-8.0.0938-gentoo-patches.tar.bz2 2316 BLAKE2B 05a87f32fc5cc65e7f5e4e5a87c654b2040ad39f1555ddde7e0e6f473dc8b520916a795406bb6bbeaf5e7ae8748aacebe7a9679461e48802e69417e945eea827 SHA512 a6062be5e6a5c5b437081312df5742353242b5171bf26da04aa6ca216d2b142b2411a88bc1edd460d28e00a59a210c8e1729e801fac6f1efd86bb2e437a56a2b
26 -DIST vim-8.0.1188.tar.gz 13363260 BLAKE2B 545b2d6e8322b27967c974bb960f4e5ea2c6811d2649ac4c008eb8e6af78fe555a035657704af40026f96f12f83e3cebe435e90d21d7da87980446710424f79f SHA512 9c3733aa894c276de593d6144ee0aaf251092a11f4d0ac603d3d49a282ac6176aa4e88eccfd2527ff53b386bdd0177a85c0942367d68a652b5ca4040390ba49b
27 DIST vim-8.0.1298.tar.gz 13395459 BLAKE2B 4b6e3c4443cd675dc3727e8609b89c422f66c7d32908b5136ee312d48427568a8236214c85135242269b6575e0e1336b0973395a6372664435f8bae4d7bee843 SHA512 7704c493359c1a922f876e4d6f3b4ad265d8ce974a59d51a39e5a4424251105250ffc803bcf6c6750daeb5e6376cbbfd24557b075eacf2b0274d7c432db2f681
28 DIST vim-8.0.1428.tar.gz 13415243 BLAKE2B 88f86c371d0a644212b9e4dc1a15d61244847037f36262a225c361bfc2799b741c128de21ac92bb3fb4a4955894e46d34dc01baa7cbf58f1371d772b36887103 SHA512 f635c53c7e2ca808dc1cb424e6e4b16d8c41c66a86c3c7584444dab3d2482904795fea7c071d65862ae6ac6b2b66b7ad5ac832e1e30f4624d46f220c6f41e2e9
29 DIST vim-8.0.1645.tar.gz 13535252 BLAKE2B a5c7463e85eed12825bdf46d15eb7e7513d62831eba76cbb90af875010b33662b7a6ef2c4c5cecddface415d75e97caf0a670e69835ecd3b4a89704f3b18b905 SHA512 367b9e205e776f84fcfbb92725afd5e7aa66898110d46dbea1a33f7b74c239559e829b5104c45360539c8f2b23c375ed59ccea7ee35a5dd10770400d9a7be085
30
31 diff --git a/app-editors/vim/vim-8.0.0386.ebuild b/app-editors/vim/vim-8.0.0386.ebuild
32 deleted file mode 100644
33 index 796d1755732..00000000000
34 --- a/app-editors/vim/vim-8.0.0386.ebuild
35 +++ /dev/null
36 @@ -1,348 +0,0 @@
37 -# Copyright 1999-2018 Gentoo Foundation
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=6
41 -VIM_VERSION="8.0"
42 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
43 -PYTHON_REQ_USE=threads
44 -inherit eutils vim-doc flag-o-matic fdo-mime versionator bash-completion-r1 python-r1
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/~radhermit/vim/vim-8.0.0106-gentoo-patches.tar.bz2"
52 - KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~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/ https://github.com/vim/vim"
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 - luajit? ( lua )
63 - python? (
64 - || ( $(python_gen_useflags '*') )
65 - ?? ( $(python_gen_useflags 'python2*') )
66 - ?? ( $(python_gen_useflags 'python3*') )
67 - )
68 -"
69 -
70 -RDEPEND="
71 - >=app-eselect/eselect-vi-1.1
72 - >=sys-libs/ncurses-5.2-r2:0=
73 - nls? ( virtual/libintl )
74 - acl? ( kernel_linux? ( sys-apps/acl ) )
75 - cscope? ( dev-util/cscope )
76 - gpm? ( >=sys-libs/gpm-1.19.3 )
77 - lua? (
78 - luajit? ( dev-lang/luajit:2= )
79 - !luajit? ( dev-lang/lua:0[deprecated] )
80 - )
81 - !minimal? (
82 - ~app-editors/vim-core-${PV}
83 - dev-util/ctags
84 - )
85 - perl? ( dev-lang/perl:= )
86 - python? ( ${PYTHON_DEPS} )
87 - racket? ( dev-scheme/racket )
88 - ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 ) )
89 - selinux? ( sys-libs/libselinux )
90 - tcl? ( dev-lang/tcl:0= )
91 - X? ( x11-libs/libXt )
92 -"
93 -DEPEND="${RDEPEND}
94 - sys-devel/autoconf
95 - nls? ( sys-devel/gettext )
96 -"
97 -
98 -pkg_setup() {
99 - # people with broken alphabets run into trouble. bug 82186.
100 - unset LANG LC_ALL
101 - export LC_COLLATE="C"
102 -
103 - # Gnome sandbox silliness. bug #114475.
104 - mkdir -p "${T}"/home
105 - export HOME="${T}"/home
106 -}
107 -
108 -src_prepare() {
109 - if [[ ${PV} != 9999* ]] ; then
110 - # Gentoo patches to fix runtime issues, cross-compile errors, etc
111 - eapply "${WORKDIR}"/patches/
112 - fi
113 -
114 - # Fixup a script to use awk instead of nawk
115 - sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
116 - || die "mve.awk sed failed"
117 -
118 - # Read vimrc and gvimrc from /etc/vim
119 - echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
120 - echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
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 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
126 - "${S}"/runtime/doc/syntax.txt \
127 - "${S}"/runtime/doc/tagsrch.txt \
128 - "${S}"/runtime/doc/usr_29.txt \
129 - "${S}"/runtime/menu.vim \
130 - "${S}"/src/configure.ac || die 'sed failed'
131 -
132 - # Don't be fooled by /usr/include/libc.h. When found, vim thinks
133 - # this is NeXT, but it's actually just a file in dev-libs/9libs
134 - # This fixes bug 43885 (20 Mar 2004 agriffis)
135 - sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
136 -
137 - # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
138 - # correctly. To avoid some really entertaining error messages about stuff
139 - # which isn't even in the source file being invalid, we'll do some trickery
140 - # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
141 - find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
142 -
143 - # conditionally make the manpager.sh script
144 - if use vim-pager ; then
145 - cat <<-END > "${S}"/runtime/macros/manpager.sh
146 - #!/bin/sh
147 - sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
148 - vim \\
149 - -c 'let no_plugin_maps = 1' \\
150 - -c 'set nolist nomod ft=man ts=8' \\
151 - -c 'let g:showmarks_enable=0' \\
152 - -c 'runtime! macros/less.vim' -
153 - END
154 - fi
155 -
156 - # Try to avoid sandbox problems. Bug #114475.
157 - if [[ -d "${S}"/src/po ]] ; then
158 - sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
159 - "${S}"/src/po/Makefile
160 - fi
161 -
162 - if version_is_at_least 7.3.122 ; then
163 - cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
164 - fi
165 -
166 - # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
167 - if version_is_at_least 7.3 ; then
168 - sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
169 - "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
170 - fi
171 -
172 - eapply_user
173 -}
174 -
175 -src_configure() {
176 - local myconf=()
177 -
178 - # Fix bug 37354: Disallow -funroll-all-loops on amd64
179 - # Bug 57859 suggests that we want to do this for all archs
180 - filter-flags -funroll-all-loops
181 -
182 - # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
183 - # everyone since previous flag filtering bugs have turned out to affect
184 - # multiple archs...
185 - replace-flags -O3 -O2
186 -
187 - # Fix bug 18245: Prevent "make" from the following chain:
188 - # (1) Notice configure.ac is newer than auto/configure
189 - # (2) Rebuild auto/configure
190 - # (3) Notice auto/configure is newer than auto/config.mk
191 - # (4) Run ./configure (with wrong args) to remake auto/config.mk
192 - sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
193 - rm -f src/auto/configure
194 - emake -j1 -C src autoconf
195 -
196 - # This should fix a sandbox violation (see bug 24447). The hvc
197 - # things are for ppc64, see bug 86433.
198 - for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc* ; do
199 - [[ -e ${file} ]] && addwrite $file
200 - done
201 -
202 - if use minimal ; then
203 - myconf=(
204 - --with-features=tiny
205 - --disable-nls
206 - --disable-multibyte
207 - --disable-acl
208 - --enable-gui=no
209 - --without-x
210 - --disable-darwin
211 - --disable-luainterp
212 - --disable-perlinterp
213 - --disable-pythoninterp
214 - --disable-mzschemeinterp
215 - --disable-rubyinterp
216 - --disable-selinux
217 - --disable-tclinterp
218 - --disable-gpm
219 - )
220 - else
221 - use debug && append-flags "-DDEBUG"
222 -
223 - myconf=(
224 - --with-features=huge
225 - --enable-multibyte
226 - $(use_enable acl)
227 - $(use_enable cscope)
228 - $(use_enable gpm)
229 - $(use_enable lua luainterp)
230 - $(usex lua "--with-lua-prefix=${EPREFIX}/usr" "")
231 - $(use_with luajit)
232 - $(use_enable nls)
233 - $(use_enable perl perlinterp)
234 - $(use_enable racket mzschemeinterp)
235 - $(use_enable ruby rubyinterp)
236 - $(use_enable selinux)
237 - $(use_enable tcl tclinterp)
238 - )
239 -
240 - if use python ; then
241 - py_add_interp() {
242 - local v
243 -
244 - [[ ${EPYTHON} == python3* ]] && v=3
245 - myconf+=(
246 - --enable-python${v}interp
247 - vi_cv_path_python${v}="${PYTHON}"
248 - )
249 - }
250 -
251 - python_foreach_impl py_add_interp
252 - else
253 - myconf+=(
254 - --disable-pythoninterp
255 - --disable-python3interp
256 - )
257 - fi
258 -
259 - # --with-features=huge forces on cscope even if we --disable it. We need
260 - # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
261 - if ! use cscope ; then
262 - sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \
263 - die "couldn't disable cscope"
264 - fi
265 -
266 - # don't test USE=X here ... see bug #19115
267 - # but need to provide a way to link against X ... see bug #20093
268 - myconf+=(
269 - --enable-gui=no
270 - --disable-darwin
271 - $(use_with X x)
272 - )
273 - fi
274 -
275 - # let package manager strip binaries
276 - export ac_cv_prog_STRIP="$(type -P true ) faking strip"
277 -
278 - # keep prefix env contained within the EPREFIX
279 - use prefix && myconf+=( --without-local-dir )
280 -
281 - econf \
282 - --with-modified-by=Gentoo-${PVR} \
283 - "${myconf[@]}"
284 -}
285 -
286 -src_compile() {
287 - # The following allows emake to be used
288 - emake -j1 -C src auto/osdef.h objects
289 -
290 - emake
291 -}
292 -
293 -src_test() {
294 - echo
295 - einfo "Starting vim tests. Several error messages will be shown"
296 - einfo "while the tests run. This is normal behaviour and does not"
297 - einfo "indicate a fault."
298 - echo
299 - ewarn "If the tests fail, your terminal may be left in a strange"
300 - ewarn "state. Usually, running 'reset' will fix this."
301 - echo
302 -
303 - # Don't let vim talk to X
304 - unset DISPLAY
305 -
306 - emake -j1 -C src/testdir nongui
307 -}
308 -
309 -# Make convenience symlinks, hopefully without stepping on toes. Some
310 -# of these links are "owned" by the vim ebuild when it is installed,
311 -# but they might be good for gvim as well (see bug 45828)
312 -update_vim_symlinks() {
313 - local f syms
314 - syms="vimdiff rvim rview"
315 - einfo "Calling eselect vi update..."
316 - # Call this with --if-unset to respect user's choice (bug 187449)
317 - eselect vi update --if-unset
318 -
319 - # Make or remove convenience symlink, vim -> gvim
320 - if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
321 - ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null
322 - elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
323 - rm "${EROOT}"/usr/bin/vim
324 - fi
325 -
326 - # Make or remove convenience symlinks to vim
327 - if [[ -f "${EROOT}"/usr/bin/vim ]]; then
328 - for f in ${syms}; do
329 - ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null
330 - done
331 - else
332 - for f in ${syms}; do
333 - if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
334 - rm -f "${EROOT}"/usr/bin/${f}
335 - fi
336 - done
337 - fi
338 -
339 - # This will still break if you merge then remove the vi package,
340 - # but there's only so much you can do, eh? Unfortunately we don't
341 - # have triggers like are done in rpm-land.
342 -}
343 -
344 -src_install() {
345 - local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
346 -
347 - # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
348 - # managed by eselect-vi
349 - dobin src/vim
350 - dosym vim /usr/bin/vimdiff
351 - dosym vim /usr/bin/rvim
352 - dosym vim /usr/bin/rview
353 - if use vim-pager ; then
354 - dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
355 - dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
356 - insinto ${vimfiles}/macros
357 - doins runtime/macros/manpager.sh
358 - fperms a+x ${vimfiles}/macros/manpager.sh
359 - fi
360 -
361 - newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
362 - # keep in sync with 'complete ... -F' list
363 - bashcomp_alias vim ex vi view rvim rview vimdiff
364 -
365 - # We shouldn't be installing the ex or view man page symlinks, as they
366 - # are managed by eselect-vi
367 - rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
368 -}
369 -
370 -pkg_postinst() {
371 - # Update documentation tags (from vim-doc.eclass)
372 - update_vim_helptags
373 -
374 - # Make convenience symlinks
375 - update_vim_symlinks
376 -}
377 -
378 -pkg_postrm() {
379 - # Update documentation tags (from vim-doc.eclass)
380 - update_vim_helptags
381 -
382 - # Make convenience symlinks
383 - update_vim_symlinks
384 -}
385
386 diff --git a/app-editors/vim/vim-8.0.1188.ebuild b/app-editors/vim/vim-8.0.1188.ebuild
387 deleted file mode 100644
388 index 5b4fa3b5766..00000000000
389 --- a/app-editors/vim/vim-8.0.1188.ebuild
390 +++ /dev/null
391 @@ -1,309 +0,0 @@
392 -# Copyright 1999-2018 Gentoo Foundation
393 -# Distributed under the terms of the GNU General Public License v2
394 -
395 -EAPI=6
396 -VIM_VERSION="8.0"
397 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
398 -PYTHON_REQ_USE=threads
399 -inherit vim-doc flag-o-matic versionator bash-completion-r1 python-single-r1
400 -
401 -if [[ ${PV} == 9999* ]] ; then
402 - inherit git-r3
403 - EGIT_REPO_URI="https://github.com/vim/vim.git"
404 -else
405 - SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
406 - https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
407 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
408 -fi
409 -
410 -DESCRIPTION="Vim, an improved vi-style text editor"
411 -HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
412 -
413 -SLOT="0"
414 -LICENSE="vim"
415 -IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl terminal vim-pager"
416 -REQUIRED_USE="
417 - luajit? ( lua )
418 - python? ( ${PYTHON_REQUIRED_USE} )
419 -"
420 -
421 -RDEPEND="
422 - >=app-eselect/eselect-vi-1.1
423 - >=sys-libs/ncurses-5.2-r2:0=
424 - nls? ( virtual/libintl )
425 - acl? ( kernel_linux? ( sys-apps/acl ) )
426 - cscope? ( dev-util/cscope )
427 - gpm? ( >=sys-libs/gpm-1.19.3 )
428 - lua? (
429 - luajit? ( dev-lang/luajit:2= )
430 - !luajit? ( dev-lang/lua:0[deprecated] )
431 - )
432 - !minimal? (
433 - ~app-editors/vim-core-${PV}
434 - dev-util/ctags
435 - )
436 - perl? ( dev-lang/perl:= )
437 - python? ( ${PYTHON_DEPS} )
438 - racket? ( dev-scheme/racket )
439 - ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 ) )
440 - selinux? ( sys-libs/libselinux )
441 - tcl? ( dev-lang/tcl:0= )
442 - X? ( x11-libs/libXt )
443 -"
444 -
445 -DEPEND="
446 - ${RDEPEND}
447 - sys-devel/autoconf
448 - nls? ( sys-devel/gettext )
449 -"
450 -
451 -pkg_setup() {
452 - # people with broken alphabets run into trouble. bug 82186.
453 - unset LANG LC_ALL
454 - export LC_COLLATE="C"
455 -
456 - # Gnome sandbox silliness. bug #114475.
457 - mkdir -p "${T}"/home || die "mkdir failed"
458 - export HOME="${T}"/home
459 -
460 - use python && python-single-r1_pkg_setup
461 -}
462 -
463 -src_prepare() {
464 - if [[ ${PV} != 9999* ]] ; then
465 - # Gentoo patches to fix runtime issues, cross-compile errors, etc
466 - eapply "${WORKDIR}"/patches/
467 - fi
468 -
469 - # Fixup a script to use awk instead of nawk
470 - sed -i -e \
471 - '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
472 - "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
473 -
474 - # Read vimrc and gvimrc from /etc/vim
475 - echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
476 - >> "${S}"/src/feature.h || die "echo failed"
477 - echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
478 - >> "${S}"/src/feature.h || die "echo failed"
479 -
480 - # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
481 - # Hopefully this pattern won't break for a while at least.
482 - # This fixes bug 29398 (27 Sep 2003 agriffis)
483 - sed -i -e \
484 - 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
485 - "${S}"/runtime/doc/syntax.txt \
486 - "${S}"/runtime/doc/tagsrch.txt \
487 - "${S}"/runtime/doc/usr_29.txt \
488 - "${S}"/runtime/menu.vim \
489 - "${S}"/src/configure.ac || die 'sed failed'
490 -
491 - # Don't be fooled by /usr/include/libc.h. When found, vim thinks
492 - # this is NeXT, but it's actually just a file in dev-libs/9libs
493 - # This fixes bug 43885 (20 Mar 2004 agriffis)
494 - sed -i -e \
495 - 's/ libc\.h / /' \
496 - "${S}"/src/configure.ac || die 'sed failed'
497 -
498 - # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
499 - # correctly. To avoid some really entertaining error messages about stuff
500 - # which isn't even in the source file being invalid, we'll do some trickery
501 - # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
502 - find "${S}" -name '*.c' | while read c; do
503 - echo >> "$c" || die "echo failed"
504 - done
505 -
506 - # conditionally make the manpager.sh script
507 - if use vim-pager; then
508 - cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed"
509 - #!/bin/sh
510 - sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
511 - vim \\
512 - -c 'let no_plugin_maps = 1' \\
513 - -c 'set nolist nomod ft=man ts=8' \\
514 - -c 'let g:showmarks_enable=0' \\
515 - -c 'runtime! macros/less.vim' -
516 - _EOF_
517 - fi
518 -
519 - # Try to avoid sandbox problems. Bug #114475.
520 - if [[ -d "${S}"/src/po ]]; then
521 - sed -i -e \
522 - '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
523 - "${S}"/src/po/Makefile || die "sed failed"
524 - fi
525 -
526 - cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
527 -
528 - sed -i -e \
529 - "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
530 - "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
531 -
532 - eapply_user
533 -}
534 -
535 -src_configure() {
536 - local myconf=()
537 -
538 - # Fix bug 37354: Disallow -funroll-all-loops on amd64
539 - # Bug 57859 suggests that we want to do this for all archs
540 - filter-flags -funroll-all-loops
541 -
542 - # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
543 - # everyone since previous flag filtering bugs have turned out to affect
544 - # multiple archs...
545 - replace-flags -O3 -O2
546 -
547 - # Fix bug 18245: Prevent "make" from the following chain:
548 - # (1) Notice configure.ac is newer than auto/configure
549 - # (2) Rebuild auto/configure
550 - # (3) Notice auto/configure is newer than auto/config.mk
551 - # (4) Run ./configure (with wrong args) to remake auto/config.mk
552 - sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
553 - rm src/auto/configure || die "rm failed"
554 - emake -j1 -C src autoconf
555 -
556 - # This should fix a sandbox violation (see bug 24447). The hvc
557 - # things are for ppc64, see bug 86433.
558 - for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
559 - if [[ -e "${file}" ]]; then
560 - addwrite $file
561 - fi
562 - done
563 -
564 - if use minimal; then
565 - myconf=(
566 - --with-features=tiny
567 - --disable-nls
568 - --disable-multibyte
569 - --disable-acl
570 - --enable-gui=no
571 - --without-x
572 - --disable-darwin
573 - --disable-luainterp
574 - --disable-perlinterp
575 - --disable-pythoninterp
576 - --disable-mzschemeinterp
577 - --disable-rubyinterp
578 - --disable-selinux
579 - --disable-tclinterp
580 - --disable-gpm
581 - )
582 - else
583 - use debug && append-flags "-DDEBUG"
584 -
585 - myconf=(
586 - --with-features=huge
587 - --enable-multibyte
588 - $(use_enable acl)
589 - $(use_enable cscope)
590 - $(use_enable gpm)
591 - $(use_enable lua luainterp)
592 - $(usex lua "--with-lua-prefix=${EPREFIX}/usr" "")
593 - $(use_with luajit)
594 - $(use_enable nls)
595 - $(use_enable perl perlinterp)
596 - $(use_enable python pythoninterp)
597 - $(use_enable python python3interp)
598 - $(use_enable racket mzschemeinterp)
599 - $(use_enable ruby rubyinterp)
600 - $(use_enable selinux)
601 - $(use_enable tcl tclinterp)
602 - $(use_enable terminal)
603 - )
604 -
605 - # --with-features=huge forces on cscope even if we --disable it. We need
606 - # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
607 - if ! use cscope; then
608 - sed -i -e \
609 - '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed"
610 - fi
611 -
612 - # don't test USE=X here ... see bug #19115
613 - # but need to provide a way to link against X ... see bug #20093
614 - myconf+=(
615 - --enable-gui=no
616 - --disable-darwin
617 - $(use_with X x)
618 - )
619 - fi
620 -
621 - # let package manager strip binaries
622 - export ac_cv_prog_STRIP="$(type -P true ) faking strip"
623 -
624 - # keep prefix env contained within the EPREFIX
625 - use prefix && myconf+=( --without-local-dir )
626 -
627 - econf \
628 - --with-modified-by=Gentoo-${PVR} \
629 - "${myconf[@]}"
630 -}
631 -
632 -src_compile() {
633 - # The following allows emake to be used
634 - emake -j1 -C src auto/osdef.h objects
635 -
636 - emake
637 -}
638 -
639 -src_test() {
640 - einfo
641 - einfo "Starting vim tests. Several error messages will be shown"
642 - einfo "while the tests run. This is normal behaviour and does not"
643 - einfo "indicate a fault."
644 - einfo
645 - ewarn "If the tests fail, your terminal may be left in a strange"
646 - ewarn "state. Usually, running 'reset' will fix this."
647 - einfo
648 -
649 - # Don't let vim talk to X
650 - unset DISPLAY
651 -
652 - emake -j1 -C src/testdir nongui
653 -}
654 -
655 -# Call eselect vi update with --if-unset
656 -# to respect user's choice (bug 187449)
657 -eselect_vi_update() {
658 - einfo "Calling eselect vi update..."
659 - eselect vi update --if-unset
660 - eend $?
661 -}
662 -
663 -src_install() {
664 - local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
665 -
666 - # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
667 - # managed by eselect-vi
668 - dobin src/vim
669 - dosym vim /usr/bin/vimdiff
670 - dosym vim /usr/bin/rvim
671 - dosym vim /usr/bin/rview
672 - if use vim-pager ; then
673 - dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
674 - dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
675 - insinto ${vimfiles}/macros
676 - doins runtime/macros/manpager.sh
677 - fperms a+x ${vimfiles}/macros/manpager.sh
678 - fi
679 -
680 - newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
681 -
682 - # keep in sync with 'complete ... -F' list
683 - bashcomp_alias vim ex vi view rvim rview vimdiff
684 -}
685 -
686 -pkg_postinst() {
687 - # Update documentation tags (from vim-doc.eclass)
688 - update_vim_helptags
689 -
690 - # Call eselect vi update
691 - eselect_vi_update
692 -}
693 -
694 -pkg_postrm() {
695 - # Update documentation tags (from vim-doc.eclass)
696 - update_vim_helptags
697 -
698 - # Call eselect vi update
699 - eselect_vi_update
700 -}