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/gvim/
Date: Sun, 08 Apr 2018 21:37:10
Message-Id: 1523223414.80c7123e4565333a0005c01e7f0dd570fbd39d8a.monsieurp@gentoo
1 commit: 80c7123e4565333a0005c01e7f0dd570fbd39d8a
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 8 21:36:19 2018 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 8 21:36:54 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80c7123e
7
8 app-editors/gvim: remove vulnerable versions.
9
10 Bug: https://bugs.gentoo.org/636186
11 Package-Manager: Portage-2.3.24, Repoman-2.3.6
12
13 app-editors/gvim/Manifest | 3 -
14 app-editors/gvim/gvim-8.0.0386.ebuild | 407 ----------------------------------
15 app-editors/gvim/gvim-8.0.1188.ebuild | 371 -------------------------------
16 3 files changed, 781 deletions(-)
17
18 diff --git a/app-editors/gvim/Manifest b/app-editors/gvim/Manifest
19 index b15b79a97f8..e389e37e215 100644
20 --- a/app-editors/gvim/Manifest
21 +++ b/app-editors/gvim/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/gvim/gvim-8.0.0386.ebuild b/app-editors/gvim/gvim-8.0.0386.ebuild
32 deleted file mode 100644
33 index 66c0627eb45..00000000000
34 --- a/app-editors/gvim/gvim-8.0.0386.ebuild
35 +++ /dev/null
36 @@ -1,407 +0,0 @@
37 -# Copyright 1999-2017 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 gnome2-utils versionator bash-completion-r1 prefix python-r1
45 -
46 -if [[ ${PV} == 9999* ]] ; then
47 - inherit git-r3
48 - EGIT_REPO_URI="https://github.com/vim/vim.git"
49 - EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
50 -else
51 - SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
52 - https://dev.gentoo.org/~radhermit/vim/vim-8.0.0106-gentoo-patches.tar.bz2"
53 - KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
54 -fi
55 -
56 -DESCRIPTION="GUI version of the Vim text editor"
57 -HOMEPAGE="http://www.vim.org/ https://github.com/vim/vim"
58 -
59 -SLOT="0"
60 -LICENSE="vim"
61 -IUSE="acl aqua cscope debug gnome gtk gtk3 lua luajit motif neXt netbeans nls perl python racket ruby selinux session tcl"
62 -REQUIRED_USE="
63 - luajit? ( lua )
64 - python? (
65 - || ( $(python_gen_useflags '*') )
66 - ?? ( $(python_gen_useflags 'python2*') )
67 - ?? ( $(python_gen_useflags 'python3*') )
68 - )
69 -"
70 -
71 -RDEPEND="
72 - ~app-editors/vim-core-${PV}
73 - >=app-eselect/eselect-vi-1.1
74 - >=sys-libs/ncurses-5.2-r2:0=
75 - x11-libs/libICE
76 - x11-libs/libSM
77 - x11-libs/libXext
78 - x11-libs/libXt
79 - acl? ( kernel_linux? ( sys-apps/acl ) )
80 - !aqua? (
81 - gtk3? (
82 - x11-libs/gtk+:3
83 - x11-libs/libXft
84 - )
85 - !gtk3? (
86 - gtk? (
87 - >=x11-libs/gtk+-2.6:2
88 - x11-libs/libXft
89 - gnome? ( >=gnome-base/libgnomeui-2.6 )
90 - )
91 - !gtk? (
92 - motif? ( >=x11-libs/motif-2.3:0 )
93 - !motif? (
94 - neXt? ( x11-libs/neXtaw )
95 - !neXt? ( x11-libs/libXaw )
96 - )
97 - )
98 - )
99 - )
100 - cscope? ( dev-util/cscope )
101 - lua? (
102 - luajit? ( dev-lang/luajit:2= )
103 - !luajit? ( dev-lang/lua:0[deprecated] )
104 - )
105 - nls? ( virtual/libintl )
106 - perl? ( dev-lang/perl:= )
107 - python? ( ${PYTHON_DEPS} )
108 - racket? ( dev-scheme/racket )
109 - ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 dev-lang/ruby:2.1 ) )
110 - selinux? ( sys-libs/libselinux )
111 - session? ( x11-libs/libSM )
112 - tcl? ( dev-lang/tcl:0= )
113 -"
114 -DEPEND="${RDEPEND}
115 - dev-util/ctags
116 - sys-devel/autoconf
117 - virtual/pkgconfig
118 - nls? ( sys-devel/gettext )
119 -"
120 -
121 -S=${WORKDIR}/vim-${PV}
122 -
123 -pkg_setup() {
124 - # people with broken alphabets run into trouble. bug 82186.
125 - unset LANG LC_ALL
126 - export LC_COLLATE="C"
127 -
128 - # Gnome sandbox silliness. bug #114475.
129 - mkdir -p "${T}"/home
130 - export HOME="${T}"/home
131 -}
132 -
133 -src_prepare() {
134 - if [[ ${PV} != 9999* ]] ; then
135 - # Gentoo patches to fix runtime issues, cross-compile errors, etc
136 - eapply "${WORKDIR}"/patches/
137 - fi
138 -
139 - # Fixup a script to use awk instead of nawk
140 - sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
141 - || die "mve.awk sed failed"
142 -
143 - # Read vimrc and gvimrc from /etc/vim
144 - echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
145 - echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
146 -
147 - # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
148 - # Hopefully this pattern won't break for a while at least.
149 - # This fixes bug 29398 (27 Sep 2003 agriffis)
150 - sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
151 - "${S}"/runtime/doc/syntax.txt \
152 - "${S}"/runtime/doc/tagsrch.txt \
153 - "${S}"/runtime/doc/usr_29.txt \
154 - "${S}"/runtime/menu.vim \
155 - "${S}"/src/configure.ac || die 'sed failed'
156 -
157 - # Don't be fooled by /usr/include/libc.h. When found, vim thinks
158 - # this is NeXT, but it's actually just a file in dev-libs/9libs
159 - # This fixes bug 43885 (20 Mar 2004 agriffis)
160 - sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
161 -
162 - # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
163 - # correctly. To avoid some really entertaining error messages about stuff
164 - # which isn't even in the source file being invalid, we'll do some trickery
165 - # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
166 - find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
167 -
168 - # Try to avoid sandbox problems. Bug #114475.
169 - if [[ -d "${S}"/src/po ]] ; then
170 - sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
171 - "${S}"/src/po/Makefile
172 - fi
173 -
174 - if version_is_at_least 7.3.122 ; then
175 - cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
176 - fi
177 -
178 - # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
179 - if version_is_at_least 7.3 ; then
180 - sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
181 - "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
182 - fi
183 -
184 - eapply_user
185 -}
186 -
187 -src_configure() {
188 - local myconf=()
189 -
190 - # Fix bug 37354: Disallow -funroll-all-loops on amd64
191 - # Bug 57859 suggests that we want to do this for all archs
192 - filter-flags -funroll-all-loops
193 -
194 - # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
195 - # everyone since previous flag filtering bugs have turned out to affect
196 - # multiple archs...
197 - replace-flags -O3 -O2
198 -
199 - # Fix bug 18245: Prevent "make" from the following chain:
200 - # (1) Notice configure.ac is newer than auto/configure
201 - # (2) Rebuild auto/configure
202 - # (3) Notice auto/configure is newer than auto/config.mk
203 - # (4) Run ./configure (with wrong args) to remake auto/config.mk
204 - sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
205 - rm -f src/auto/configure
206 - emake -j1 -C src autoconf
207 -
208 - # This should fix a sandbox violation (see bug 24447). The hvc
209 - # things are for ppc64, see bug 86433.
210 - for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc* ; do
211 - [[ -e ${file} ]] && addwrite $file
212 - done
213 -
214 - use debug && append-flags "-DDEBUG"
215 -
216 - myconf=(
217 - --with-features=huge
218 - --disable-gpm
219 - --enable-multibyte
220 - $(use_enable acl)
221 - $(use_enable cscope)
222 - $(use_enable lua luainterp)
223 - $(use_with luajit)
224 - $(use_enable netbeans)
225 - $(use_enable nls)
226 - $(use_enable perl perlinterp)
227 - $(use_enable racket mzschemeinterp)
228 - $(use_enable ruby rubyinterp)
229 - $(use_enable selinux)
230 - $(use_enable session xsmp)
231 - $(use_enable tcl tclinterp)
232 - )
233 -
234 - if use python ; then
235 - py_add_interp() {
236 - local v
237 -
238 - [[ ${EPYTHON} == python3* ]] && v=3
239 - myconf+=(
240 - --enable-python${v}interp
241 - vi_cv_path_python${v}="${PYTHON}"
242 - )
243 - }
244 -
245 - python_foreach_impl py_add_interp
246 - else
247 - myconf+=(
248 - --disable-pythoninterp
249 - --disable-python3interp
250 - )
251 - fi
252 -
253 - # --with-features=huge forces on cscope even if we --disable it. We need
254 - # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
255 - if ! use cscope ; then
256 - sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \
257 - die "couldn't disable cscope"
258 - fi
259 -
260 - # gvim's GUI preference order is as follows:
261 - # aqua CARBON (not tested)
262 - # -aqua gtk3 GTK3
263 - # -aqua -gtk3 gnome GNOME2
264 - # -aqua -gtk3 -gnome gtk GTK2
265 - # -aqua -gtk -gtk3 motif MOTIF
266 - # -aqua -gtk -gtk3 -motif neXt NEXTAW
267 - # -aqua -gtk -gtk3 -motif -neXt ATHENA
268 - echo ; echo
269 - if use aqua ; then
270 - einfo "Building gvim with the Carbon GUI"
271 - myconf+=(
272 - --enable-darwin
273 - --enable-gui=carbon
274 - )
275 - elif use gtk3 ; then
276 - myconf+=( --enable-gtk3-check )
277 - einfo "Building gvim with the gtk+-3 GUI"
278 - myconf+=( --enable-gui=gtk3 )
279 - elif use gtk ; then
280 - myconf+=( --enable-gtk2-check )
281 - if use gnome ; then
282 - einfo "Building gvim with the Gnome 2 GUI"
283 - myconf+=( --enable-gui=gnome2 )
284 - else
285 - einfo "Building gvim with the gtk+-2 GUI"
286 - myconf+=( --enable-gui=gtk2 )
287 - fi
288 - elif use motif ; then
289 - einfo "Building gvim with the MOTIF GUI"
290 - myconf+=( --enable-gui=motif )
291 - elif use neXt ; then
292 - einfo "Building gvim with the neXtaw GUI"
293 - myconf+=( --enable-gui=nextaw )
294 - else
295 - einfo "Building gvim with the Athena GUI"
296 - myconf+=( --enable-gui=athena )
297 - fi
298 - echo ; echo
299 -
300 - # let package manager strip binaries
301 - export ac_cv_prog_STRIP="$(type -P true ) faking strip"
302 -
303 - # keep prefix env contained within the EPREFIX
304 - use prefix && myconf+=( --without-local-dir )
305 -
306 - if [[ ${CHOST} == *-interix* ]]; then
307 - # avoid finding of this function, to avoid having to patch either
308 - # configure or the source, which would be much more hackish.
309 - # after all vim does it right, only interix is badly broken (again)
310 - export ac_cv_func_sigaction=no
311 - fi
312 -
313 - econf \
314 - --with-modified-by=Gentoo-${PVR} \
315 - --with-vim-name=gvim \
316 - --with-x \
317 - "${myconf[@]}"
318 -}
319 -
320 -src_compile() {
321 - # The following allows emake to be used
322 - emake -j1 -C src auto/osdef.h objects
323 -
324 - emake
325 -}
326 -
327 -src_test() {
328 - echo
329 - einfo "Starting vim tests. Several error messages will be shown"
330 - einfo "while the tests run. This is normal behaviour and does not"
331 - einfo "indicate a fault."
332 - echo
333 - ewarn "If the tests fail, your terminal may be left in a strange"
334 - ewarn "state. Usually, running 'reset' will fix this."
335 - echo
336 -
337 - # Don't let vim talk to X
338 - unset DISPLAY
339 -
340 - # Make gvim not try to connect to X. See :help gui-x11-start in vim for how
341 - # this evil trickery works.
342 - ln -s "${S}"/src/gvim "${S}"/src/testvim || die
343 -
344 - # Make sure our VIMPROG is used.
345 - sed -i 's:\.\./vim:../testvim:' src/testdir/test49.vim || die
346 -
347 - # Don't do additional GUI tests.
348 - emake -j1 VIMPROG=../testvim -C src/testdir nongui
349 -}
350 -
351 -# Make convenience symlinks, hopefully without stepping on toes. Some
352 -# of these links are "owned" by the vim ebuild when it is installed,
353 -# but they might be good for gvim as well (see bug 45828)
354 -update_vim_symlinks() {
355 - local f syms
356 - syms="vimdiff rvim rview"
357 - einfo "Calling eselect vi update..."
358 - # Call this with --if-unset to respect user's choice (bug 187449)
359 - eselect vi update --if-unset
360 -
361 - # Make or remove convenience symlink, vim -> gvim
362 - if [[ -f "${EROOT}"/usr/bin/gvim ]]; then
363 - ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null
364 - elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then
365 - rm "${EROOT}"/usr/bin/vim
366 - fi
367 -
368 - # Make or remove convenience symlinks to vim
369 - if [[ -f "${EROOT}"/usr/bin/vim ]]; then
370 - for f in ${syms}; do
371 - ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null
372 - done
373 - else
374 - for f in ${syms}; do
375 - if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then
376 - rm -f "${EROOT}"/usr/bin/${f}
377 - fi
378 - done
379 - fi
380 -
381 - # This will still break if you merge then remove the vi package,
382 - # but there's only so much you can do, eh? Unfortunately we don't
383 - # have triggers like are done in rpm-land.
384 -}
385 -
386 -src_install() {
387 - local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
388 -
389 - dobin src/gvim
390 - dosym gvim /usr/bin/gvimdiff
391 - dosym gvim /usr/bin/evim
392 - dosym gvim /usr/bin/eview
393 - dosym gvim /usr/bin/gview
394 - dosym gvim /usr/bin/rgvim
395 - dosym gvim /usr/bin/rgview
396 -
397 - emake -C src DESTDIR="${D}" DATADIR="${EPREFIX}"/usr/share install-icons
398 -
399 - dodir /usr/share/man/man1
400 - echo ".so vim.1" > "${ED}"/usr/share/man/man1/gvim.1
401 - echo ".so vim.1" > "${ED}"/usr/share/man/man1/gview.1
402 - echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/gvimdiff.1
403 -
404 - insinto /etc/vim
405 - newins "${FILESDIR}"/gvimrc-r1 gvimrc
406 - eprefixify "${ED}"/etc/vim/gvimrc
407 -
408 - doicon -s scalable "${FILESDIR}"/gvim.svg
409 -
410 - # bash completion script, bug #79018.
411 - newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
412 -
413 - # don't install vim desktop file
414 - rm "${ED}"/usr/share/applications/vim.desktop || die "failed to remove vim.desktop"
415 -}
416 -
417 -pkg_postinst() {
418 - # Update documentation tags (from vim-doc.eclass)
419 - update_vim_helptags
420 -
421 - # Update fdo mime stuff, bug #78394
422 - fdo-mime_desktop_database_update
423 -
424 - # Update icon cache
425 - gnome2_icon_cache_update
426 -
427 - # Make convenience symlinks
428 - update_vim_symlinks
429 -}
430 -
431 -pkg_postrm() {
432 - # Update documentation tags (from vim-doc.eclass)
433 - update_vim_helptags
434 -
435 - # Update fdo mime stuff, bug #78394
436 - fdo-mime_desktop_database_update
437 -
438 - # Update icon cache
439 - gnome2_icon_cache_update
440 -
441 - # Make convenience symlinks
442 - update_vim_symlinks
443 -}
444
445 diff --git a/app-editors/gvim/gvim-8.0.1188.ebuild b/app-editors/gvim/gvim-8.0.1188.ebuild
446 deleted file mode 100644
447 index b19e4d69230..00000000000
448 --- a/app-editors/gvim/gvim-8.0.1188.ebuild
449 +++ /dev/null
450 @@ -1,371 +0,0 @@
451 -# Copyright 1999-2017 Gentoo Foundation
452 -# Distributed under the terms of the GNU General Public License v2
453 -
454 -EAPI=6
455 -VIM_VERSION="8.0"
456 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
457 -PYTHON_REQ_USE=threads
458 -inherit vim-doc flag-o-matic xdg-utils gnome2-utils versionator bash-completion-r1 prefix python-single-r1
459 -
460 -if [[ ${PV} == 9999* ]]; then
461 - inherit git-r3
462 - EGIT_REPO_URI="https://github.com/vim/vim.git"
463 - EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
464 -else
465 - SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
466 - https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
467 - KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
468 -fi
469 -
470 -DESCRIPTION="GUI version of the Vim text editor"
471 -HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
472 -
473 -SLOT="0"
474 -LICENSE="vim"
475 -IUSE="acl aqua cscope debug gnome gtk gtk3 lua luajit motif neXt netbeans nls perl python racket ruby selinux session tcl"
476 -REQUIRED_USE="
477 - luajit? ( lua )
478 - python? ( ${PYTHON_REQUIRED_USE} )
479 -"
480 -
481 -RDEPEND="
482 - ~app-editors/vim-core-${PV}
483 - >=app-eselect/eselect-vi-1.1
484 - >=sys-libs/ncurses-5.2-r2:0=
485 - x11-libs/libICE
486 - x11-libs/libSM
487 - x11-libs/libXext
488 - x11-libs/libXt
489 - acl? ( kernel_linux? ( sys-apps/acl ) )
490 - !aqua? (
491 - gtk3? (
492 - x11-libs/gtk+:3
493 - x11-libs/libXft
494 - )
495 - !gtk3? (
496 - gtk? (
497 - >=x11-libs/gtk+-2.6:2
498 - x11-libs/libXft
499 - gnome? ( >=gnome-base/libgnomeui-2.6 )
500 - )
501 - !gtk? (
502 - motif? ( >=x11-libs/motif-2.3:0 )
503 - !motif? (
504 - neXt? ( x11-libs/neXtaw )
505 - !neXt? ( x11-libs/libXaw )
506 - )
507 - )
508 - )
509 - )
510 - cscope? ( dev-util/cscope )
511 - lua? (
512 - luajit? ( dev-lang/luajit:2= )
513 - !luajit? ( dev-lang/lua:0[deprecated] )
514 - )
515 - nls? ( virtual/libintl )
516 - perl? ( dev-lang/perl:= )
517 - python? ( ${PYTHON_DEPS} )
518 - racket? ( dev-scheme/racket )
519 - ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 ) )
520 - selinux? ( sys-libs/libselinux )
521 - session? ( x11-libs/libSM )
522 - tcl? ( dev-lang/tcl:0= )
523 -"
524 -DEPEND="${RDEPEND}
525 - dev-util/ctags
526 - sys-devel/autoconf
527 - virtual/pkgconfig
528 - nls? ( sys-devel/gettext )
529 -"
530 -
531 -S=${WORKDIR}/vim-${PV}
532 -
533 -pkg_setup() {
534 - # people with broken alphabets run into trouble. bug 82186.
535 - unset LANG LC_ALL
536 - export LC_COLLATE="C"
537 -
538 - # Gnome sandbox silliness. bug #114475.
539 - mkdir -p "${T}"/home || die
540 - export HOME="${T}"/home
541 -
542 - use python && python-single-r1_pkg_setup
543 -}
544 -
545 -src_prepare() {
546 - if [[ ${PV} != 9999* ]]; then
547 - # Gentoo patches to fix runtime issues, cross-compile errors, etc
548 - eapply "${WORKDIR}"/patches/
549 - fi
550 -
551 - # Fixup a script to use awk instead of nawk
552 - sed -i -e \
553 - '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
554 - "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
555 -
556 - # Read vimrc and gvimrc from /etc/vim
557 - echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
558 - >> "${S}"/src/feature.h || die "echo failed"
559 - echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
560 - >> "${S}"/src/feature.h || die "echo failed"
561 -
562 - # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
563 - # Hopefully this pattern won't break for a while at least.
564 - # This fixes bug 29398 (27 Sep 2003 agriffis)
565 - sed -i -e \
566 - 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
567 - "${S}"/runtime/doc/syntax.txt \
568 - "${S}"/runtime/doc/tagsrch.txt \
569 - "${S}"/runtime/doc/usr_29.txt \
570 - "${S}"/runtime/menu.vim \
571 - "${S}"/src/configure.ac || die 'sed failed'
572 -
573 - # Don't be fooled by /usr/include/libc.h. When found, vim thinks
574 - # this is NeXT, but it's actually just a file in dev-libs/9libs
575 - # This fixes bug 43885 (20 Mar 2004 agriffis)
576 - sed -i -e \
577 - 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
578 -
579 - # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
580 - # correctly. To avoid some really entertaining error messages about stuff
581 - # which isn't even in the source file being invalid, we'll do some trickery
582 - # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
583 - find "${S}" -name '*.c' | while read c; do
584 - echo >> "$c" || die "echo failed"
585 - done
586 -
587 - # Try to avoid sandbox problems. Bug #114475.
588 - if [[ -d "${S}"/src/po ]]; then
589 - sed -i -e \
590 - '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
591 - "${S}"/src/po/Makefile || die
592 - fi
593 -
594 - cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
595 -
596 - # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
597 - sed -i -e \
598 - "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
599 - "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
600 -
601 - eapply_user
602 -}
603 -
604 -src_configure() {
605 - local myconf=()
606 -
607 - # Fix bug 37354: Disallow -funroll-all-loops on amd64
608 - # Bug 57859 suggests that we want to do this for all archs
609 - filter-flags -funroll-all-loops
610 -
611 - # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
612 - # everyone since previous flag filtering bugs have turned out to affect
613 - # multiple archs...
614 - replace-flags -O3 -O2
615 -
616 - # Fix bug 18245: Prevent "make" from the following chain:
617 - # (1) Notice configure.ac is newer than auto/configure
618 - # (2) Rebuild auto/configure
619 - # (3) Notice auto/configure is newer than auto/config.mk
620 - # (4) Run ./configure (with wrong args) to remake auto/config.mk
621 - sed -i -e \
622 - 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
623 - rm -v src/auto/configure || die "rm failed"
624 - emake -j1 -C src autoconf
625 -
626 - # This should fix a sandbox violation (see bug 24447). The hvc
627 - # things are for ppc64, see bug 86433.
628 - local file
629 - for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
630 - if [[ -e ${file} ]]; then
631 - addwrite $file
632 - fi
633 - done
634 -
635 - use debug && append-flags "-DDEBUG"
636 -
637 - myconf=(
638 - --with-features=huge
639 - --disable-gpm
640 - --enable-multibyte
641 - $(use_enable acl)
642 - $(use_enable cscope)
643 - $(use_enable lua luainterp)
644 - $(use_with luajit)
645 - $(use_enable netbeans)
646 - $(use_enable nls)
647 - $(use_enable perl perlinterp)
648 - $(use_enable python pythoninterp)
649 - $(use_enable python python3interp)
650 - $(use_enable racket mzschemeinterp)
651 - $(use_enable ruby rubyinterp)
652 - $(use_enable selinux)
653 - $(use_enable session xsmp)
654 - $(use_enable tcl tclinterp)
655 - )
656 -
657 - # --with-features=huge forces on cscope even if we --disable it. We need
658 - # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
659 - if ! use cscope; then
660 - sed -i -e \
661 - '/# define FEAT_CSCOPE/d' src/feature.h || die "couldn't disable cscope"
662 - fi
663 -
664 - # gvim's GUI preference order is as follows:
665 - # aqua CARBON (not tested)
666 - # -aqua gtk3 GTK3
667 - # -aqua -gtk3 gnome GNOME2
668 - # -aqua -gtk3 -gnome gtk GTK2
669 - # -aqua -gtk -gtk3 motif MOTIF
670 - # -aqua -gtk -gtk3 -motif neXt NEXTAW
671 - # -aqua -gtk -gtk3 -motif -neXt ATHENA
672 - echo ; echo
673 - if use aqua; then
674 - einfo "Building gvim with the Carbon GUI"
675 - myconf+=(
676 - --enable-darwin
677 - --enable-gui=carbon
678 - )
679 - elif use gtk3; then
680 - myconf+=( --enable-gtk3-check )
681 - einfo "Building gvim with the gtk+-3 GUI"
682 - myconf+=( --enable-gui=gtk3 )
683 - elif use gtk; then
684 - myconf+=( --enable-gtk2-check )
685 - if use gnome; then
686 - einfo "Building gvim with the Gnome 2 GUI"
687 - myconf+=( --enable-gui=gnome2 )
688 - else
689 - einfo "Building gvim with the gtk+-2 GUI"
690 - myconf+=( --enable-gui=gtk2 )
691 - fi
692 - elif use motif; then
693 - einfo "Building gvim with the MOTIF GUI"
694 - myconf+=( --enable-gui=motif )
695 - elif use neXt; then
696 - einfo "Building gvim with the neXtaw GUI"
697 - myconf+=( --enable-gui=nextaw )
698 - else
699 - einfo "Building gvim with the Athena GUI"
700 - myconf+=( --enable-gui=athena )
701 - fi
702 - echo ; echo
703 -
704 - # let package manager strip binaries
705 - export ac_cv_prog_STRIP="$(type -P true ) faking strip"
706 -
707 - # keep prefix env contained within the EPREFIX
708 - use prefix && myconf+=( --without-local-dir )
709 -
710 - if [[ ${CHOST} == *-interix* ]]; then
711 - # avoid finding of this function, to avoid having to patch either
712 - # configure or the source, which would be much more hackish.
713 - # after all vim does it right, only interix is badly broken (again)
714 - export ac_cv_func_sigaction=no
715 - fi
716 -
717 - econf \
718 - --with-modified-by=Gentoo-${PVR} \
719 - --with-vim-name=gvim \
720 - --with-x \
721 - "${myconf[@]}"
722 -}
723 -
724 -src_compile() {
725 - # The following allows emake to be used
726 - emake -j1 -C src auto/osdef.h objects
727 -
728 - emake
729 -}
730 -
731 -src_test() {
732 - echo
733 - einfo "Starting vim tests. Several error messages will be shown"
734 - einfo "while the tests run. This is normal behaviour and does not"
735 - einfo "indicate a fault."
736 - echo
737 - ewarn "If the tests fail, your terminal may be left in a strange"
738 - ewarn "state. Usually, running 'reset' will fix this."
739 - echo
740 -
741 - # Don't let vim talk to X
742 - unset DISPLAY
743 -
744 - # Make gvim not try to connect to X. See :help gui-x11-start in vim for how
745 - # this evil trickery works.
746 - ln -s "${S}"/src/gvim "${S}"/src/testvim || die
747 -
748 - # Make sure our VIMPROG is used.
749 - sed -i -e 's:\.\./vim:../testvim:' src/testdir/test49.vim || die
750 -
751 - # Don't do additional GUI tests.
752 - emake -j1 VIMPROG=../testvim -C src/testdir nongui
753 -}
754 -
755 -# Call eselect vi update with --if-unset
756 -# to respect user's choice (bug 187449)
757 -eselect_vi_update() {
758 - einfo "Calling eselect vi update..."
759 - eselect vi update --if-unset
760 - eend $?
761 -}
762 -
763 -src_install() {
764 - local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
765 -
766 - dobin src/gvim
767 - dosym gvim /usr/bin/gvimdiff
768 - dosym gvim /usr/bin/evim
769 - dosym gvim /usr/bin/eview
770 - dosym gvim /usr/bin/gview
771 - dosym gvim /usr/bin/rgvim
772 - dosym gvim /usr/bin/rgview
773 -
774 - emake -C src DESTDIR="${D}" DATADIR="${EPREFIX}"/usr/share install-icons
775 -
776 - dodir /usr/share/man/man1
777 - echo ".so vim.1" > "${ED}"/usr/share/man/man1/gvim.1 || die "echo failed"
778 - echo ".so vim.1" > "${ED}"/usr/share/man/man1/gview.1 || die "echo failed"
779 - echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/gvimdiff.1 || \
780 - die "echo failed"
781 -
782 - insinto /etc/vim
783 - newins "${FILESDIR}"/gvimrc-r1 gvimrc
784 - eprefixify "${ED}"/etc/vim/gvimrc
785 -
786 - doicon -s scalable "${FILESDIR}"/gvim.svg
787 -
788 - # bash completion script, bug #79018.
789 - newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
790 -
791 - # don't install vim desktop file
792 - rm -v "${ED}"/usr/share/applications/vim.desktop || die "failed to remove vim.desktop"
793 -}
794 -
795 -pkg_postinst() {
796 - # Update documentation tags (from vim-doc.eclass)
797 - update_vim_helptags
798 -
799 - # Update fdo mime stuff, bug #78394
800 - xdg_desktop_database_update
801 -
802 - # Update icon cache
803 - gnome2_icon_cache_update
804 -
805 - # Call eselect vi update
806 - eselect_vi_update
807 -}
808 -
809 -pkg_postrm() {
810 - # Update documentation tags (from vim-doc.eclass)
811 - update_vim_helptags
812 -
813 - # Update fdo mime stuff, bug #78394
814 - xdg_desktop_database_update
815 -
816 - # Update icon cache
817 - gnome2_icon_cache_update
818 -
819 - # Call eselect vi update
820 - eselect_vi_update
821 -}