Gentoo Archives: gentoo-commits

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