Gentoo Archives: gentoo-commits

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