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