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/gvim/
Date: Wed, 15 Nov 2017 03:57:47
Message-Id: 1510717875.ff168375ba53eda5d2638f67e1ecb028786baeaa.radhermit@gentoo
1 commit: ff168375ba53eda5d2638f67e1ecb028786baeaa
2 Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 15 03:51:15 2017 +0000
4 Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 15 03:51:15 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff168375
7
8 app-editors/gvim: version bump to 8.0.1298
9
10 app-editors/gvim/Manifest | 1 +
11 app-editors/gvim/gvim-8.0.1298.ebuild | 371 ++++++++++++++++++++++++++++++++++
12 2 files changed, 372 insertions(+)
13
14 diff --git a/app-editors/gvim/Manifest b/app-editors/gvim/Manifest
15 index 7cdcaf7d5e8..cbc6f49ed75 100644
16 --- a/app-editors/gvim/Manifest
17 +++ b/app-editors/gvim/Manifest
18 @@ -5,3 +5,4 @@ DIST vim-8.0.0938.tar.gz 13287289 SHA256 7a07fb164069ce82e5c90ff3831b6f3249e0919
19 DIST vim-8.0.0983.tar.gz 13292263 SHA256 5f3d5307d7055e3a55811546f6c787f1c65d209ae5b83e36c0de16d64fda8bf2 SHA512 985cdcf134c3513a973b4c91a899684a563fca4c347afba2d51892d737c8b58a2008bbf8573a98838da6df16552096e437a5064dc2ef653c7222bbac59ce6136 WHIRLPOOL 98a1ed102182f07e1dc2105b9bae73e1f6c0f7522b25ab91aba4767a3c9d805082a89bd964ab6441fb4185f4076b046a25ca92bf08f0446e4d2a53b0298bb3e0
20 DIST vim-8.0.1056.tar.gz 13309986 SHA256 c061d1ddc0f4001415e68678780eac7121d08877a852fae484e6a93f633aec0c SHA512 19385736d4d97a66a2fb3fd8ce725d42c435da09a41e8b40234048626b28d2fa96c4db96a4313bd30f1c2d3733c52097e147c90e4bc11be80d3fcbf12fa4d13b WHIRLPOOL d81b3166f028867ebf48d43bf249675f16cda0118a2e443606a8cae01b0932d3f8a29ca568d088953d4b9d8afe8299ac207d0213ad247e1c10b9c52ed18514e1
21 DIST vim-8.0.1188.tar.gz 13363260 SHA256 cd92e56493584128bff13d3104631d3d38e66264101a3c5d59e2488f74f738de SHA512 9c3733aa894c276de593d6144ee0aaf251092a11f4d0ac603d3d49a282ac6176aa4e88eccfd2527ff53b386bdd0177a85c0942367d68a652b5ca4040390ba49b WHIRLPOOL 7b19600f086d2f2908fbee5c44876a1775881d9a1cbb54428d4d1db254d14cdbcfe243fe055a754f58027c0166f7dcb1dd13b4db5662793bb7fc014bd76ea504
22 +DIST vim-8.0.1298.tar.gz 13395459 SHA256 5126240843b559251fe6a96d4ce7e1dd3d1de9bcb38556dd9fe63b163629fdf2 SHA512 7704c493359c1a922f876e4d6f3b4ad265d8ce974a59d51a39e5a4424251105250ffc803bcf6c6750daeb5e6376cbbfd24557b075eacf2b0274d7c432db2f681 WHIRLPOOL dbb1f136091ad63b78e7e26ed2ca9d5045b966fe8d7caaeace981c789d679070323a4a345d750e037aa9e0489cf7bd1769f17ac1d590f0624e50dc3276b6a84f
23
24 diff --git a/app-editors/gvim/gvim-8.0.1298.ebuild b/app-editors/gvim/gvim-8.0.1298.ebuild
25 new file mode 100644
26 index 00000000000..b19e4d69230
27 --- /dev/null
28 +++ b/app-editors/gvim/gvim-8.0.1298.ebuild
29 @@ -0,0 +1,371 @@
30 +# Copyright 1999-2017 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +VIM_VERSION="8.0"
35 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
36 +PYTHON_REQ_USE=threads
37 +inherit vim-doc flag-o-matic xdg-utils gnome2-utils versionator bash-completion-r1 prefix python-single-r1
38 +
39 +if [[ ${PV} == 9999* ]]; then
40 + inherit git-r3
41 + EGIT_REPO_URI="https://github.com/vim/vim.git"
42 + EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
43 +else
44 + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
45 + https://dev.gentoo.org/~radhermit/vim/vim-8.0.0938-gentoo-patches.tar.bz2"
46 + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
47 +fi
48 +
49 +DESCRIPTION="GUI version of the Vim text editor"
50 +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
51 +
52 +SLOT="0"
53 +LICENSE="vim"
54 +IUSE="acl aqua cscope debug gnome gtk gtk3 lua luajit motif neXt netbeans nls perl python racket ruby selinux session tcl"
55 +REQUIRED_USE="
56 + luajit? ( lua )
57 + python? ( ${PYTHON_REQUIRED_USE} )
58 +"
59 +
60 +RDEPEND="
61 + ~app-editors/vim-core-${PV}
62 + >=app-eselect/eselect-vi-1.1
63 + >=sys-libs/ncurses-5.2-r2:0=
64 + x11-libs/libICE
65 + x11-libs/libSM
66 + x11-libs/libXext
67 + x11-libs/libXt
68 + acl? ( kernel_linux? ( sys-apps/acl ) )
69 + !aqua? (
70 + gtk3? (
71 + x11-libs/gtk+:3
72 + x11-libs/libXft
73 + )
74 + !gtk3? (
75 + gtk? (
76 + >=x11-libs/gtk+-2.6:2
77 + x11-libs/libXft
78 + gnome? ( >=gnome-base/libgnomeui-2.6 )
79 + )
80 + !gtk? (
81 + motif? ( >=x11-libs/motif-2.3:0 )
82 + !motif? (
83 + neXt? ( x11-libs/neXtaw )
84 + !neXt? ( x11-libs/libXaw )
85 + )
86 + )
87 + )
88 + )
89 + cscope? ( dev-util/cscope )
90 + lua? (
91 + luajit? ( dev-lang/luajit:2= )
92 + !luajit? ( dev-lang/lua:0[deprecated] )
93 + )
94 + nls? ( virtual/libintl )
95 + perl? ( dev-lang/perl:= )
96 + python? ( ${PYTHON_DEPS} )
97 + racket? ( dev-scheme/racket )
98 + ruby? ( || ( dev-lang/ruby:2.4 dev-lang/ruby:2.3 dev-lang/ruby:2.2 ) )
99 + selinux? ( sys-libs/libselinux )
100 + session? ( x11-libs/libSM )
101 + tcl? ( dev-lang/tcl:0= )
102 +"
103 +DEPEND="${RDEPEND}
104 + dev-util/ctags
105 + sys-devel/autoconf
106 + virtual/pkgconfig
107 + nls? ( sys-devel/gettext )
108 +"
109 +
110 +S=${WORKDIR}/vim-${PV}
111 +
112 +pkg_setup() {
113 + # people with broken alphabets run into trouble. bug 82186.
114 + unset LANG LC_ALL
115 + export LC_COLLATE="C"
116 +
117 + # Gnome sandbox silliness. bug #114475.
118 + mkdir -p "${T}"/home || die
119 + export HOME="${T}"/home
120 +
121 + use python && python-single-r1_pkg_setup
122 +}
123 +
124 +src_prepare() {
125 + if [[ ${PV} != 9999* ]]; then
126 + # Gentoo patches to fix runtime issues, cross-compile errors, etc
127 + eapply "${WORKDIR}"/patches/
128 + fi
129 +
130 + # Fixup a script to use awk instead of nawk
131 + sed -i -e \
132 + '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
133 + "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
134 +
135 + # Read vimrc and gvimrc from /etc/vim
136 + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
137 + >> "${S}"/src/feature.h || die "echo failed"
138 + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
139 + >> "${S}"/src/feature.h || die "echo failed"
140 +
141 + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
142 + # Hopefully this pattern won't break for a while at least.
143 + # This fixes bug 29398 (27 Sep 2003 agriffis)
144 + sed -i -e \
145 + 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
146 + "${S}"/runtime/doc/syntax.txt \
147 + "${S}"/runtime/doc/tagsrch.txt \
148 + "${S}"/runtime/doc/usr_29.txt \
149 + "${S}"/runtime/menu.vim \
150 + "${S}"/src/configure.ac || die 'sed failed'
151 +
152 + # Don't be fooled by /usr/include/libc.h. When found, vim thinks
153 + # this is NeXT, but it's actually just a file in dev-libs/9libs
154 + # This fixes bug 43885 (20 Mar 2004 agriffis)
155 + sed -i -e \
156 + 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
157 +
158 + # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
159 + # correctly. To avoid some really entertaining error messages about stuff
160 + # which isn't even in the source file being invalid, we'll do some trickery
161 + # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
162 + find "${S}" -name '*.c' | while read c; do
163 + echo >> "$c" || die "echo failed"
164 + done
165 +
166 + # Try to avoid sandbox problems. Bug #114475.
167 + if [[ -d "${S}"/src/po ]]; then
168 + sed -i -e \
169 + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
170 + "${S}"/src/po/Makefile || die
171 + fi
172 +
173 + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
174 +
175 + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
176 + sed -i -e \
177 + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
178 + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
179 +
180 + eapply_user
181 +}
182 +
183 +src_configure() {
184 + local myconf=()
185 +
186 + # Fix bug 37354: Disallow -funroll-all-loops on amd64
187 + # Bug 57859 suggests that we want to do this for all archs
188 + filter-flags -funroll-all-loops
189 +
190 + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
191 + # everyone since previous flag filtering bugs have turned out to affect
192 + # multiple archs...
193 + replace-flags -O3 -O2
194 +
195 + # Fix bug 18245: Prevent "make" from the following chain:
196 + # (1) Notice configure.ac is newer than auto/configure
197 + # (2) Rebuild auto/configure
198 + # (3) Notice auto/configure is newer than auto/config.mk
199 + # (4) Run ./configure (with wrong args) to remake auto/config.mk
200 + sed -i -e \
201 + 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
202 + rm -v src/auto/configure || die "rm failed"
203 + emake -j1 -C src autoconf
204 +
205 + # This should fix a sandbox violation (see bug 24447). The hvc
206 + # things are for ppc64, see bug 86433.
207 + local file
208 + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
209 + if [[ -e ${file} ]]; then
210 + addwrite $file
211 + fi
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 python pythoninterp)
228 + $(use_enable python python3interp)
229 + $(use_enable racket mzschemeinterp)
230 + $(use_enable ruby rubyinterp)
231 + $(use_enable selinux)
232 + $(use_enable session xsmp)
233 + $(use_enable tcl tclinterp)
234 + )
235 +
236 + # --with-features=huge forces on cscope even if we --disable it. We need
237 + # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
238 + if ! use cscope; then
239 + sed -i -e \
240 + '/# define FEAT_CSCOPE/d' src/feature.h || die "couldn't disable cscope"
241 + fi
242 +
243 + # gvim's GUI preference order is as follows:
244 + # aqua CARBON (not tested)
245 + # -aqua gtk3 GTK3
246 + # -aqua -gtk3 gnome GNOME2
247 + # -aqua -gtk3 -gnome gtk GTK2
248 + # -aqua -gtk -gtk3 motif MOTIF
249 + # -aqua -gtk -gtk3 -motif neXt NEXTAW
250 + # -aqua -gtk -gtk3 -motif -neXt ATHENA
251 + echo ; echo
252 + if use aqua; then
253 + einfo "Building gvim with the Carbon GUI"
254 + myconf+=(
255 + --enable-darwin
256 + --enable-gui=carbon
257 + )
258 + elif use gtk3; then
259 + myconf+=( --enable-gtk3-check )
260 + einfo "Building gvim with the gtk+-3 GUI"
261 + myconf+=( --enable-gui=gtk3 )
262 + elif use gtk; then
263 + myconf+=( --enable-gtk2-check )
264 + if use gnome; then
265 + einfo "Building gvim with the Gnome 2 GUI"
266 + myconf+=( --enable-gui=gnome2 )
267 + else
268 + einfo "Building gvim with the gtk+-2 GUI"
269 + myconf+=( --enable-gui=gtk2 )
270 + fi
271 + elif use motif; then
272 + einfo "Building gvim with the MOTIF GUI"
273 + myconf+=( --enable-gui=motif )
274 + elif use neXt; then
275 + einfo "Building gvim with the neXtaw GUI"
276 + myconf+=( --enable-gui=nextaw )
277 + else
278 + einfo "Building gvim with the Athena GUI"
279 + myconf+=( --enable-gui=athena )
280 + fi
281 + echo ; echo
282 +
283 + # let package manager strip binaries
284 + export ac_cv_prog_STRIP="$(type -P true ) faking strip"
285 +
286 + # keep prefix env contained within the EPREFIX
287 + use prefix && myconf+=( --without-local-dir )
288 +
289 + if [[ ${CHOST} == *-interix* ]]; then
290 + # avoid finding of this function, to avoid having to patch either
291 + # configure or the source, which would be much more hackish.
292 + # after all vim does it right, only interix is badly broken (again)
293 + export ac_cv_func_sigaction=no
294 + fi
295 +
296 + econf \
297 + --with-modified-by=Gentoo-${PVR} \
298 + --with-vim-name=gvim \
299 + --with-x \
300 + "${myconf[@]}"
301 +}
302 +
303 +src_compile() {
304 + # The following allows emake to be used
305 + emake -j1 -C src auto/osdef.h objects
306 +
307 + emake
308 +}
309 +
310 +src_test() {
311 + echo
312 + einfo "Starting vim tests. Several error messages will be shown"
313 + einfo "while the tests run. This is normal behaviour and does not"
314 + einfo "indicate a fault."
315 + echo
316 + ewarn "If the tests fail, your terminal may be left in a strange"
317 + ewarn "state. Usually, running 'reset' will fix this."
318 + echo
319 +
320 + # Don't let vim talk to X
321 + unset DISPLAY
322 +
323 + # Make gvim not try to connect to X. See :help gui-x11-start in vim for how
324 + # this evil trickery works.
325 + ln -s "${S}"/src/gvim "${S}"/src/testvim || die
326 +
327 + # Make sure our VIMPROG is used.
328 + sed -i -e 's:\.\./vim:../testvim:' src/testdir/test49.vim || die
329 +
330 + # Don't do additional GUI tests.
331 + emake -j1 VIMPROG=../testvim -C src/testdir nongui
332 +}
333 +
334 +# Call eselect vi update with --if-unset
335 +# to respect user's choice (bug 187449)
336 +eselect_vi_update() {
337 + einfo "Calling eselect vi update..."
338 + eselect vi update --if-unset
339 + eend $?
340 +}
341 +
342 +src_install() {
343 + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
344 +
345 + dobin src/gvim
346 + dosym gvim /usr/bin/gvimdiff
347 + dosym gvim /usr/bin/evim
348 + dosym gvim /usr/bin/eview
349 + dosym gvim /usr/bin/gview
350 + dosym gvim /usr/bin/rgvim
351 + dosym gvim /usr/bin/rgview
352 +
353 + emake -C src DESTDIR="${D}" DATADIR="${EPREFIX}"/usr/share install-icons
354 +
355 + dodir /usr/share/man/man1
356 + echo ".so vim.1" > "${ED}"/usr/share/man/man1/gvim.1 || die "echo failed"
357 + echo ".so vim.1" > "${ED}"/usr/share/man/man1/gview.1 || die "echo failed"
358 + echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/gvimdiff.1 || \
359 + die "echo failed"
360 +
361 + insinto /etc/vim
362 + newins "${FILESDIR}"/gvimrc-r1 gvimrc
363 + eprefixify "${ED}"/etc/vim/gvimrc
364 +
365 + doicon -s scalable "${FILESDIR}"/gvim.svg
366 +
367 + # bash completion script, bug #79018.
368 + newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
369 +
370 + # don't install vim desktop file
371 + rm -v "${ED}"/usr/share/applications/vim.desktop || die "failed to remove vim.desktop"
372 +}
373 +
374 +pkg_postinst() {
375 + # Update documentation tags (from vim-doc.eclass)
376 + update_vim_helptags
377 +
378 + # Update fdo mime stuff, bug #78394
379 + xdg_desktop_database_update
380 +
381 + # Update icon cache
382 + gnome2_icon_cache_update
383 +
384 + # Call eselect vi update
385 + eselect_vi_update
386 +}
387 +
388 +pkg_postrm() {
389 + # Update documentation tags (from vim-doc.eclass)
390 + update_vim_helptags
391 +
392 + # Update fdo mime stuff, bug #78394
393 + xdg_desktop_database_update
394 +
395 + # Update icon cache
396 + gnome2_icon_cache_update
397 +
398 + # Call eselect vi update
399 + eselect_vi_update
400 +}