Gentoo Archives: gentoo-commits

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