Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/vim-core/
Date: Sun, 03 Oct 2021 21:18:17
Message-Id: 1633295721.06d7d8ab72659b733bfbdadb7ebf64b1109bd86f.sam@gentoo
1 commit: 06d7d8ab72659b733bfbdadb7ebf64b1109bd86f
2 Author: Robert Kolchmeyer <rkolchmeyer <AT> google <DOT> com>
3 AuthorDate: Tue Sep 28 20:04:18 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 3 21:15:21 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06d7d8ab
7
8 app-editors/vim-core: 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 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 app-editors/vim-core/Manifest | 1 +
16 app-editors/vim-core/vim-core-8.2.3428.ebuild | 225 ++++++++++++++++++++++++++
17 2 files changed, 226 insertions(+)
18
19 diff --git a/app-editors/vim-core/Manifest b/app-editors/vim-core/Manifest
20 index 9f17c290c49..ba93bb167e0 100644
21 --- a/app-editors/vim-core/Manifest
22 +++ b/app-editors/vim-core/Manifest
23 @@ -1,2 +1,3 @@
24 DIST vim-8.2.0360-gentoo-patches.tar.xz 2612 BLAKE2B a9273a686b31dd873b25bfc07f7bc254f11038bde275ae4e6f56513a14e0268fdc1032ae847d1d7f8539f8a657217011770ccb4685998f34722383ec7bfb1a15 SHA512 00bc8eb8b20a4a6f3bbd179bb90d42fa6727c8eaae5b625e95e52c33638d456ef36d06b51c542ecaffb237c0b4f7aa72dc3bae7fe00144d55ab0d2fa51950f3b
25 DIST vim-8.2.0814.tar.gz 14953478 BLAKE2B fd4155ec749bd9a705e8114ff7f8cc321182c9286733ff2f665e265ec0af830f9e70c730b8d0215f6db1f73a8e2f878d22932a72c8dbfe921591be7adcdaab00 SHA512 4ddd9e2d30719f931cadd1a4de5700736f641f4b074378d9ea1462a90b81975ce8e8c3ca2e3a1e15ac0288824eef5b0f0a3e31482f7637c450c6d7e52c8f40d2
26 +DIST vim-8.2.3428.tar.gz 15715383 BLAKE2B 865842bae0de25c34f255085f6edfe35b6905e220bdcb76372d7289ef1f6c2b2dee2f88e4a5f849d43fa560db4ade1e8e498d86f5651c5218d9153cde5ecddd3 SHA512 7cb473afa0ad6a9728dfc2f7d8ca19a21de329c4790141c7cb815b71c07e92a1ce04a5fcc2a0381c4beb304670d6c08629dc2ed2cb0842998cca2fd846c8cd6b
27
28 diff --git a/app-editors/vim-core/vim-core-8.2.3428.ebuild b/app-editors/vim-core/vim-core-8.2.3428.ebuild
29 new file mode 100644
30 index 00000000000..f141342833a
31 --- /dev/null
32 +++ b/app-editors/vim-core/vim-core-8.2.3428.ebuild
33 @@ -0,0 +1,225 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +VIM_VERSION="8.2"
39 +inherit estack vim-doc flag-o-matic bash-completion-r1 prefix desktop xdg-utils
40 +
41 +if [[ ${PV} == 9999* ]] ; then
42 + inherit git-r3
43 + EGIT_REPO_URI="https://github.com/vim/vim.git"
44 + EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
45 +else
46 + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
47 + https://dev.gentoo.org/~zlogene/distfiles/app-editors/vim/vim-8.2.0360-gentoo-patches.tar.xz"
48 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
49 +fi
50 +
51 +DESCRIPTION="vim and gvim shared files"
52 +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
53 +
54 +SLOT="0"
55 +LICENSE="vim"
56 +IUSE="nls acl minimal"
57 +
58 +DEPEND="sys-devel/autoconf"
59 +# avoid icon file collision bug #673880
60 +RDEPEND="!!<app-editors/gvim-8.1.0648"
61 +PDEPEND="!minimal? ( app-vim/gentoo-syntax )"
62 +
63 +S=${WORKDIR}/vim-${PV}
64 +
65 +pkg_setup() {
66 + # people with broken alphabets run into trouble. bug 82186.
67 + unset LANG LC_ALL
68 + export LC_COLLATE="C"
69 +
70 + # Gnome sandbox silliness. bug #114475.
71 + mkdir -p "${T}"/home || die "mkdir -p failed"
72 + export HOME="${T}"/home
73 +}
74 +
75 +src_prepare() {
76 + if [[ ${PV} != 9999* ]] ; then
77 + # Gentoo patches to fix runtime issues, cross-compile errors, etc
78 + eapply "${WORKDIR}"/patches
79 + fi
80 +
81 + # Fixup a script to use awk instead of nawk
82 + sed -i \
83 + -e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
84 + "${S}"/runtime/tools/mve.awk || die "sed failed"
85 +
86 + # See #77841. We remove this file after the tarball extraction.
87 + rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed"
88 +
89 + # Read vimrc and gvimrc from /etc/vim
90 + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
91 + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
92 +
93 + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
94 + # Hopefully this pattern won't break for a while at least.
95 + # This fixes bug 29398 (27 Sep 2003 agriffis)
96 + sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
97 + "${S}"/runtime/doc/syntax.txt \
98 + "${S}"/runtime/doc/tagsrch.txt \
99 + "${S}"/runtime/doc/usr_29.txt \
100 + "${S}"/runtime/menu.vim \
101 + "${S}"/src/configure.ac || die 'sed failed'
102 +
103 + # Don't be fooled by /usr/include/libc.h. When found, vim thinks
104 + # this is NeXT, but it's actually just a file in dev-libs/9libs
105 + # This fixes bug 43885 (20 Mar 2004 agriffis)
106 + sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
107 +
108 + # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
109 + # correctly. To avoid some really entertaining error messages about stuff
110 + # which isn't even in the source file being invalid, we'll do some trickery
111 + # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
112 + find "${S}" -name '*.c' | while read c; do
113 + echo >> "$c" || die "echo failed"
114 + done
115 +
116 + # Try to avoid sandbox problems. Bug #114475.
117 + if [[ -d "${S}"/src/po ]]; then
118 + sed -i -e \
119 + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
120 + "${S}"/src/po/Makefile || die "sed failed"
121 + fi
122 +
123 + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
124 +
125 + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
126 + sed -i -e \
127 + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
128 + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
129 +
130 + eapply_user
131 +}
132 +
133 +src_configure() {
134 + local myconf
135 +
136 + # Fix bug 37354: Disallow -funroll-all-loops on amd64
137 + # Bug 57859 suggests that we want to do this for all archs
138 + filter-flags -funroll-all-loops
139 +
140 + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
141 + # everyone since previous flag filtering bugs have turned out to affect
142 + # multiple archs...
143 + replace-flags -O3 -O2
144 +
145 + # Fix bug 18245: Prevent "make" from the following chain:
146 + # (1) Notice configure.ac is newer than auto/configure
147 + # (2) Rebuild auto/configure
148 + # (3) Notice auto/configure is newer than auto/config.mk
149 + # (4) Run ./configure (with wrong args) to remake auto/config.mk
150 + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
151 +
152 + # Remove src/auto/configure file.
153 + rm -v src/auto/configure || die "rm configure failed"
154 +
155 + emake -j1 -C src autoconf
156 +
157 + # This should fix a sandbox violation (see bug 24447). The hvc
158 + # things are for ppc64, see bug 86433.
159 + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
160 + if [[ -e "${file}" ]]; then
161 + addwrite $file
162 + fi
163 + done
164 +
165 + # Let Portage do the stripping. Some people like that.
166 + export ac_cv_prog_STRIP="$(type -P true ) faking strip"
167 +
168 + # Keep Gentoo Prefix env contained within the EPREFIX
169 + use prefix && myconf+=" --without-local-dir"
170 +
171 + econf \
172 + --with-modified-by=Gentoo-${PVR} \
173 + --enable-gui=no \
174 + --without-x \
175 + --disable-darwin \
176 + --disable-perlinterp \
177 + --disable-pythoninterp \
178 + --disable-rubyinterp \
179 + --disable-gpm \
180 + --disable-selinux \
181 + $(use_enable nls) \
182 + $(use_enable acl) \
183 + ${myconf}
184 +}
185 +
186 +src_compile() {
187 + emake -j1 -C src auto/osdef.h objects
188 + emake tools
189 +}
190 +
191 +src_test() { :; }
192 +
193 +src_install() {
194 + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
195 +
196 + dodir /usr/{bin,share/{man/man1,vim}}
197 + emake -C src \
198 + installruntime \
199 + installmanlinks \
200 + installmacros \
201 + installtutor \
202 + installtutorbin \
203 + installtools \
204 + install-languages \
205 + DESTDIR="${D}" \
206 + BINDIR="${EPREFIX}"/usr/bin \
207 + MANDIR="${EPREFIX}"/usr/share/man \
208 + DATADIR="${EPREFIX}"/usr/share
209 +
210 + keepdir ${vimfiles}/keymap
211 +
212 + # default vimrc is installed by vim-core since it applies to
213 + # both vim and gvim
214 + insinto /etc/vim/
215 + newins "${FILESDIR}"/vimrc-r5 vimrc
216 + eprefixify "${ED}"/etc/vim/vimrc
217 +
218 + if use minimal; then
219 + # To save space, install only a subset of the files.
220 + # Helps minimalize the livecd, bug 65144.
221 + eshopts_push -s extglob
222 +
223 + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die "rm failed"
224 + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die "rm failed"
225 + rm -v "${ED}"/usr/bin/vimtutor || die "rm failed"
226 +
227 + local keep_colors="default"
228 + ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )
229 +
230 + local keep_syntax="conf|crontab|fstab|inittab|resolv|sshdconfig"
231 + # tinkering with the next line might make bad things happen ...
232 + keep_syntax="${keep_syntax}|syntax|nosyntax|synload"
233 + ignore=$(rm -fr "${ED}${vimfiles}"/syntax/!(${keep_syntax}).vim )
234 +
235 + eshopts_pop
236 + fi
237 +
238 + newbashcomp "${FILESDIR}"/xxd-completion xxd
239 +
240 + # install gvim icon since both vim/gvim desktop files reference it
241 + doicon -s scalable "${FILESDIR}"/gvim.svg
242 +}
243 +
244 +pkg_postinst() {
245 + # update documentation tags (from vim-doc.eclass)
246 + update_vim_helptags
247 +
248 + # update icon cache
249 + xdg_icon_cache_update
250 +}
251 +
252 +pkg_postrm() {
253 + # Update documentation tags (from vim-doc.eclass)
254 + update_vim_helptags
255 +
256 + # update icon cache
257 + xdg_icon_cache_update
258 +}