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