1 |
commit: 4aaeeb19961fc5efbf711e437c155142f98c2383 |
2 |
Author: Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz> |
3 |
AuthorDate: Thu Jul 28 11:53:15 2022 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 29 14:23:38 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aaeeb19 |
7 |
|
8 |
app-editors/gvim: add 9.0.0099 |
9 |
|
10 |
Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/26633 |
12 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
13 |
|
14 |
app-editors/gvim/Manifest | 1 + |
15 |
app-editors/gvim/gvim-9.0.0099.ebuild | 352 ++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 353 insertions(+) |
17 |
|
18 |
diff --git a/app-editors/gvim/Manifest b/app-editors/gvim/Manifest |
19 |
index 2cd6719a8474..f350670d24d5 100644 |
20 |
--- a/app-editors/gvim/Manifest |
21 |
+++ b/app-editors/gvim/Manifest |
22 |
@@ -2,4 +2,5 @@ DIST vim-8.2.0360-gentoo-patches.tar.xz 2612 BLAKE2B a9273a686b31dd873b25bfc07f7 |
23 |
DIST vim-8.2.4586.tar.gz 16251186 BLAKE2B 26471b493397e58d3e3d6f2c0c5cc69a08c294dcd59367a12729d1762cf2043eab0987ec4c370bd1f4cbbc67d10576f8a6dcfcb748d224b2f35476dbade32597 SHA512 354464e51a3cc13e13f3194ef8a4d5ccec978da7eb385337a042a6b2e6b38a253c587815e7c972070c516f59c7d54c89bce6926ae7f7f9635cddfd1d0bd237b9 |
24 |
DIST vim-8.2.5066.tar.gz 16497942 BLAKE2B 613f009f6a03e28305763e471bf55b626f37bb8b0f01324d5a676f6682811e3c4a5c11442af839d06b7d94b3938f5a30306bac576eec5d3c76f4a135a3443bb3 SHA512 27fdd1e86b0488b974a9fd60523b31ba23b581cab4c9bd15aee9ae459e2f2d028d6887adf621ee88244b74d26697fc953b08b587a3a80b316d31b65fc588ce9e |
25 |
DIST vim-9.0.0049.tar.gz 16703106 BLAKE2B 728bbb0091a4cc13bad4109b92b0a468b707fd3279c3050834b3a0bc933fee5b906ee4ec03a082ea1eb043d399c22a9017c71c787200dc87c3d350296e0d6f67 SHA512 e3c86e49da482d9e9e5eb84102d5b3fed0354b1b03f46128a51d66d0889652b87036dcd32a9a348e8937091bd77c899b568003624299b91a621614e06c082ee8 |
26 |
+DIST vim-9.0.0099.tar.gz 16712565 BLAKE2B b3277ebda0bb40601d995935422006d1a266bb862be612e69abd057a7342d13457ded5cb4743cf43a09b7d2001438f5a426ba12c30947bb7c193188c5fc13cf7 SHA512 ca0dea7b7fd78cf9c7cd4656611d066540f9d81ab17bcb75c79f0e989bdcfb769940ea29f75445c554b159e9eb3b2c4f9d77448254c3e4e4457b1bf721936498 |
27 |
DIST vim-patches-vim-9.0.0049-patches.tar.gz 2743 BLAKE2B dff3e215b235e1cbc2c62b1af2d1414d10b794dbee9f5e7797fb3d34e00c2e065c339d4c82bf28aed53e0b5f2f8f1ee5c7ce69851cd63360788609bf144ac922 SHA512 7d5c64d674fa77048fdca7287072c0e488723133e254c10711dbadf750416c368725327ca9b76f332017bc70aa544a9baef671765eabf0d172d39921ffd7d942 |
28 |
|
29 |
diff --git a/app-editors/gvim/gvim-9.0.0099.ebuild b/app-editors/gvim/gvim-9.0.0099.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..bc764c8a6675 |
32 |
--- /dev/null |
33 |
+++ b/app-editors/gvim/gvim-9.0.0099.ebuild |
34 |
@@ -0,0 +1,352 @@ |
35 |
+# Copyright 1999-2022 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=8 |
39 |
+ |
40 |
+# Please bump with app-editors/vim-core and app-editors/vim |
41 |
+ |
42 |
+VIM_VERSION="9.0" |
43 |
+LUA_COMPAT=( lua5-{1..4} luajit ) |
44 |
+PYTHON_COMPAT=( python3_{8..11} ) |
45 |
+PYTHON_REQ_USE="threads(+)" |
46 |
+USE_RUBY="ruby27 ruby30 ruby31" |
47 |
+ |
48 |
+inherit vim-doc flag-o-matic xdg-utils bash-completion-r1 prefix lua-single python-single-r1 ruby-single |
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-9.0.0049-patches.tar.gz" |
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://vim.sourceforge.io/ https://github.com/vim/vim" |
63 |
+ |
64 |
+LICENSE="vim" |
65 |
+SLOT="0" |
66 |
+IUSE="acl aqua crypt cscope debug lua 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 |
+ |
114 |
+# various failures (bugs #630042 and #682320) |
115 |
+RESTRICT="test" |
116 |
+ |
117 |
+pkg_setup() { |
118 |
+ # people with broken alphabets run into trouble. bug 82186. |
119 |
+ unset LANG LC_ALL |
120 |
+ export LC_COLLATE="C" |
121 |
+ |
122 |
+ use lua && lua-single_pkg_setup |
123 |
+ use python && python-single-r1_pkg_setup |
124 |
+} |
125 |
+ |
126 |
+src_prepare() { |
127 |
+ if [[ ${PV} != 9999* ]]; then |
128 |
+ # Gentoo patches to fix runtime issues, cross-compile errors, etc |
129 |
+ eapply "${WORKDIR}/vim-patches-vim-9.0.0049-patches" |
130 |
+ fi |
131 |
+ |
132 |
+ # Fixup a script to use awk instead of nawk |
133 |
+ sed -i -e \ |
134 |
+ '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ |
135 |
+ "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed" |
136 |
+ |
137 |
+ # Read vimrc and gvimrc from /etc/vim |
138 |
+ echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \ |
139 |
+ >> "${S}"/src/feature.h || die "echo failed" |
140 |
+ echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ |
141 |
+ >> "${S}"/src/feature.h || die "echo failed" |
142 |
+ |
143 |
+ # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. |
144 |
+ # Hopefully this pattern won't break for a while at least. |
145 |
+ # This fixes bug 29398 (27 Sep 2003 agriffis) |
146 |
+ sed -i -e \ |
147 |
+ 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
148 |
+ "${S}"/runtime/doc/syntax.txt \ |
149 |
+ "${S}"/runtime/doc/tagsrch.txt \ |
150 |
+ "${S}"/runtime/doc/usr_29.txt \ |
151 |
+ "${S}"/runtime/menu.vim \ |
152 |
+ "${S}"/src/configure.ac || die 'sed failed' |
153 |
+ |
154 |
+ # Don't be fooled by /usr/include/libc.h. When found, vim thinks |
155 |
+ # this is NeXT, but it's actually just a file in dev-libs/9libs |
156 |
+ # This fixes bug 43885 (20 Mar 2004 agriffis) |
157 |
+ sed -i -e \ |
158 |
+ 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed' |
159 |
+ |
160 |
+ # gcc on sparc32 has this, uhm, interesting problem with detecting EOF |
161 |
+ # correctly. To avoid some really entertaining error messages about stuff |
162 |
+ # which isn't even in the source file being invalid, we'll do some trickery |
163 |
+ # to make the error never occur. bug 66162 (02 October 2004 ciaranm) |
164 |
+ find "${S}" -name '*.c' | while read c; do |
165 |
+ echo >> "$c" || die "echo failed" |
166 |
+ done |
167 |
+ |
168 |
+ # Try to avoid sandbox problems. Bug #114475. |
169 |
+ if [[ -d "${S}"/src/po ]]; then |
170 |
+ sed -i -e \ |
171 |
+ '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
172 |
+ "${S}"/src/po/Makefile || die |
173 |
+ fi |
174 |
+ |
175 |
+ cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" |
176 |
+ |
177 |
+ # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 |
178 |
+ sed -i -e \ |
179 |
+ "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
180 |
+ "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
181 |
+ |
182 |
+ # Fix bug 18245: Prevent "make" from the following chain: |
183 |
+ # (1) Notice configure.ac is newer than auto/configure |
184 |
+ # (2) Rebuild auto/configure |
185 |
+ # (3) Notice auto/configure is newer than auto/config.mk |
186 |
+ # (4) Run ./configure (with wrong args) to remake auto/config.mk |
187 |
+ sed -i -e \ |
188 |
+ 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" |
189 |
+ rm -v src/auto/configure || die "rm failed" |
190 |
+ |
191 |
+ # --with-features=huge forces on cscope even if we --disable it. We need |
192 |
+ # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) |
193 |
+ if ! use cscope; then |
194 |
+ sed -i -e \ |
195 |
+ '/# define FEAT_CSCOPE/d' src/feature.h || die "couldn't disable cscope" |
196 |
+ fi |
197 |
+ |
198 |
+ eapply_user |
199 |
+} |
200 |
+ |
201 |
+src_configure() { |
202 |
+ |
203 |
+ # Fix bug 37354: Disallow -funroll-all-loops on amd64 |
204 |
+ # Bug 57859 suggests that we want to do this for all archs |
205 |
+ filter-flags -funroll-all-loops |
206 |
+ |
207 |
+ # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for |
208 |
+ # everyone since previous flag filtering bugs have turned out to affect |
209 |
+ # multiple archs... |
210 |
+ replace-flags -O3 -O2 |
211 |
+ |
212 |
+ emake -j1 -C src autoconf |
213 |
+ |
214 |
+ # This should fix a sandbox violation (see bug 24447). The hvc |
215 |
+ # things are for ppc64, see bug 86433. |
216 |
+ local file |
217 |
+ for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do |
218 |
+ if [[ -e ${file} ]]; then |
219 |
+ addwrite $file |
220 |
+ fi |
221 |
+ done |
222 |
+ |
223 |
+ use debug && append-flags "-DDEBUG" |
224 |
+ |
225 |
+ local myconf=( |
226 |
+ --with-features=huge |
227 |
+ --disable-gpm |
228 |
+ --with-gnome=no |
229 |
+ $(use_enable sound canberra) |
230 |
+ $(use_enable acl) |
231 |
+ $(use_enable crypt libsodium) |
232 |
+ $(use_enable cscope) |
233 |
+ $(use_enable netbeans) |
234 |
+ $(use_enable nls) |
235 |
+ $(use_enable perl perlinterp) |
236 |
+ $(use_enable python python3interp) |
237 |
+ $(use_with python python3-command "${PYTHON}") |
238 |
+ $(use_enable racket mzschemeinterp) |
239 |
+ $(use_enable ruby rubyinterp) |
240 |
+ $(use_enable selinux) |
241 |
+ $(use_enable session xsmp) |
242 |
+ $(use_enable tcl tclinterp) |
243 |
+ ) |
244 |
+ |
245 |
+ if use lua; then |
246 |
+ myconf+=( |
247 |
+ --enable-luainterp |
248 |
+ $(use_with lua_single_target_luajit luajit) |
249 |
+ --with-lua-prefix="${EPREFIX}/usr" |
250 |
+ ) |
251 |
+ fi |
252 |
+ |
253 |
+ # Default is gtk unless aqua or motif are enabled |
254 |
+ echo ; echo |
255 |
+ if use aqua; then |
256 |
+ einfo "Building gvim with the Carbon GUI" |
257 |
+ myconf+=( |
258 |
+ --enable-darwin |
259 |
+ --enable-gui=carbon |
260 |
+ ) |
261 |
+ elif use motif; then |
262 |
+ einfo "Building gvim with the MOTIF GUI" |
263 |
+ myconf+=( --enable-gui=motif ) |
264 |
+ else |
265 |
+ myconf+=( --enable-gtk3-check ) |
266 |
+ einfo "Building gvim with the gtk+-3 GUI" |
267 |
+ myconf+=( --enable-gui=gtk3 ) |
268 |
+ fi |
269 |
+ echo ; echo |
270 |
+ |
271 |
+ # let package manager strip binaries |
272 |
+ export ac_cv_prog_STRIP="$(type -P true ) faking strip" |
273 |
+ |
274 |
+ # keep prefix env contained within the EPREFIX |
275 |
+ use prefix && myconf+=( --without-local-dir ) |
276 |
+ |
277 |
+ if [[ ${CHOST} == *-interix* ]]; then |
278 |
+ # avoid finding of this function, to avoid having to patch either |
279 |
+ # configure or the source, which would be much more hackish. |
280 |
+ # after all vim does it right, only interix is badly broken (again) |
281 |
+ export ac_cv_func_sigaction=no |
282 |
+ fi |
283 |
+ |
284 |
+ econf \ |
285 |
+ --with-modified-by=Gentoo-${PVR} \ |
286 |
+ --with-vim-name=gvim \ |
287 |
+ --with-x \ |
288 |
+ "${myconf[@]}" |
289 |
+} |
290 |
+ |
291 |
+src_compile() { |
292 |
+ # The following allows emake to be used |
293 |
+ emake -j1 -C src auto/osdef.h objects |
294 |
+ |
295 |
+ emake |
296 |
+} |
297 |
+ |
298 |
+src_test() { |
299 |
+ einfo |
300 |
+ einfo "Starting vim tests. Several error messages will be shown" |
301 |
+ einfo "while the tests run. This is normal behaviour and does not" |
302 |
+ einfo "indicate a fault." |
303 |
+ einfo |
304 |
+ ewarn "If the tests fail, your terminal may be left in a strange" |
305 |
+ ewarn "state. Usually, running 'reset' will fix this." |
306 |
+ einfo |
307 |
+ |
308 |
+ # Don't let vim talk to X |
309 |
+ unset DISPLAY |
310 |
+ |
311 |
+ # Make gvim not try to connect to X. See :help gui-x11-start in vim for how |
312 |
+ # this evil trickery works. |
313 |
+ ln -s "${S}"/src/gvim "${S}"/src/testvim || die |
314 |
+ |
315 |
+ # Make sure our VIMPROG is used. |
316 |
+ sed -i -e 's:\.\./vim:../testvim:' src/testdir/test49.vim || die |
317 |
+ |
318 |
+ # Don't do additional GUI tests. |
319 |
+ emake -j1 VIMPROG=../testvim -C src/testdir nongui |
320 |
+} |
321 |
+ |
322 |
+# Call eselect vi update with --if-unset |
323 |
+# to respect user's choice (bug 187449) |
324 |
+eselect_vi_update() { |
325 |
+ ebegin "Calling eselect vi update" |
326 |
+ eselect vi update --if-unset |
327 |
+ eend $? |
328 |
+} |
329 |
+ |
330 |
+src_install() { |
331 |
+ local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} |
332 |
+ |
333 |
+ dobin src/gvim |
334 |
+ dosym gvim /usr/bin/gvimdiff |
335 |
+ dosym gvim /usr/bin/evim |
336 |
+ dosym gvim /usr/bin/eview |
337 |
+ dosym gvim /usr/bin/gview |
338 |
+ dosym gvim /usr/bin/rgvim |
339 |
+ dosym gvim /usr/bin/rgview |
340 |
+ |
341 |
+ emake -C src DESTDIR="${D}" DATADIR="${EPREFIX}"/usr/share install-icons |
342 |
+ |
343 |
+ dodir /usr/share/man/man1 |
344 |
+ echo ".so vim.1" > "${ED}"/usr/share/man/man1/gvim.1 || die "echo failed" |
345 |
+ echo ".so vim.1" > "${ED}"/usr/share/man/man1/gview.1 || die "echo failed" |
346 |
+ echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/gvimdiff.1 || \ |
347 |
+ die "echo failed" |
348 |
+ |
349 |
+ insinto /etc/vim |
350 |
+ newins "${FILESDIR}"/gvimrc-r1 gvimrc |
351 |
+ eprefixify "${ED}"/etc/vim/gvimrc |
352 |
+ |
353 |
+ # bash completion script, bug #79018. |
354 |
+ newbashcomp "${FILESDIR}"/${PN}-completion ${PN} |
355 |
+ |
356 |
+ # don't install vim desktop file |
357 |
+ rm -v "${ED}"/usr/share/applications/vim.desktop || die "failed to remove vim.desktop" |
358 |
+} |
359 |
+ |
360 |
+pkg_postinst() { |
361 |
+ # update documentation tags (from vim-doc.eclass) |
362 |
+ update_vim_helptags |
363 |
+ |
364 |
+ # update fdo mime stuff, bug #78394 |
365 |
+ xdg_desktop_database_update |
366 |
+ |
367 |
+ # update icon cache |
368 |
+ xdg_icon_cache_update |
369 |
+ |
370 |
+ # call eselect vi update |
371 |
+ eselect_vi_update |
372 |
+} |
373 |
+ |
374 |
+pkg_postrm() { |
375 |
+ # update documentation tags (from vim-doc.eclass) |
376 |
+ update_vim_helptags |
377 |
+ |
378 |
+ # update fdo mime stuff, bug #78394 |
379 |
+ xdg_desktop_database_update |
380 |
+ |
381 |
+ # update icon cache |
382 |
+ xdg_icon_cache_update |
383 |
+ |
384 |
+ # call eselect vi update |
385 |
+ eselect_vi_update |
386 |
+} |