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