Gentoo Archives: gentoo-commits

From: Ole Reifschneider <tranquility@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/neovim/, app-editors/neovim/files/
Date: Sun, 01 Nov 2015 21:59:42
Message-Id: 1446415127.5b486fad4015dc4479a9f413d08534828ae68ba8.tranquility@gentoo
1 commit: 5b486fad4015dc4479a9f413d08534828ae68ba8
2 Author: Ole Reifschneider <tranquility <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 1 21:58:24 2015 +0000
4 Commit: Ole Reifschneider <tranquility <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 1 21:58:47 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b486fad
7
8 app-editors/neovim: Bump version to 0.1.0
9
10 Package-Manager: portage-2.2.23
11
12 app-editors/neovim/Manifest | 1 +
13 app-editors/neovim/files/sysinit.vim | 105 +++++++++++++++++++++++++++++++++
14 app-editors/neovim/neovim-0.1.0.ebuild | 78 ++++++++++++++++++++++++
15 3 files changed, 184 insertions(+)
16
17 diff --git a/app-editors/neovim/Manifest b/app-editors/neovim/Manifest
18 index 1dbc37f..9c1e930 100644
19 --- a/app-editors/neovim/Manifest
20 +++ b/app-editors/neovim/Manifest
21 @@ -3,3 +3,4 @@ DIST neovim-0.0.0_pre20150727.tar.xz 4703336 SHA256 da9bd3070ac60691be4e03394754
22 DIST neovim-0.0.0_pre20150814.tar.xz 4718836 SHA256 e7abdb0b3a44ec3c312b06aa825caca4520f1b857045c45c925e8005e2bf3ada SHA512 638e6807929880c2648bd2d0efde509842423488272926bb3ae89a6681144b86fe5137ef313ae102fe8c2fa82819fe96e0dcc0a8d45e3ccaf18b207cf9c1aad1 WHIRLPOOL f1ca40e0bef46da63c466e0fcc51bcf37c57f64009a680f6e51cb1cf3b0d481011dff33957b5da38dfe8d55978c368efe9d905d4f26a272e915470fab239dcff
23 DIST neovim-0.0.0_pre20151022.tar.xz 4947140 SHA256 8b090b130f6eb47021d872e8e33691cbd6169f7f0650389cfd0a3bfc194bafc5 SHA512 262b37d1937982bd86f436ecc9c055fdbd650a227c7da77d203e26c9a885b32dc584b4b098f7f2bcea31e7fdb40b51c5a7d337ca4b794b0114c1115e642406ea WHIRLPOOL ca6e50a0225bfea9161c2b7432886377e6a9962fdde3f35f8a091fc26b35fb44d87d4a327b56b428dbcee9d91f66fe2365a33b158b92bf1b5cff08d326e91320
24 DIST neovim-0.0.0_pre20151025.tar.xz 4947384 SHA256 62b3bd93e0395c3f2d1f829a1e4e444ac081de1acc99114f6ceba7d61a7055a3 SHA512 a0390097cc0cfae401779ddd229a6237fa63522caaa6515dfff025b506b83e2597a10711bae0a1a60770d2a244963aa56af58f734885ce73091a19865a420bf0 WHIRLPOOL becfec39f4aa1a22f48991f17dbca003f38dfa6b085ed6043e34ed7e852217dddd3e4fce4d33873b0385e1b46754ae11db21ce47cbecd12822e5073d38a5fda1
25 +DIST neovim-0.1.0.tar.gz 7644673 SHA256 2a14bbbde800b87f5d1b4e0c145cab9a8fc0513d6e7ad851d43cd3a4d821fd58 SHA512 7a577ee1470e1e9b80368ae10c215465ddfdfdac541bf08d81d68a459a3f9485c8cb1feba1450facb64185021f0d4dfd3bd93c53b98ac1cecbbafbe5e6b1404c WHIRLPOOL 7727371ff70c24be6d2fda9bc626a4fdebe4a03e237f7441a3e1cddb2ff7877d015c7ed1c19744e9e4ce8391d31fd8ac01f99782f1c634aa35783f35ddff7dc8
26
27 diff --git a/app-editors/neovim/files/sysinit.vim b/app-editors/neovim/files/sysinit.vim
28 new file mode 100644
29 index 0000000..635fc62
30 --- /dev/null
31 +++ b/app-editors/neovim/files/sysinit.vim
32 @@ -0,0 +1,105 @@
33 +" Default Gentoo configuration file for neovim
34 +" Based on the default vimrc shipped by Gentoo with app-editors/vim-core
35 +" $Id$
36 +
37 +" You can override any of these settings on a global basis via the
38 +" "/etc/vim/nvimrc.local" file, and on a per-user basis via "~/.nvimrc".
39 +" You may need to create these.
40 +
41 +" Neovim comes with sensible defaults, see:
42 +" https://github.com/neovim/neovim/issues/2676
43 +" Most of the general settings from Gentoo's vimrc have been dropped here.
44 +" We add only some necessary fixes and a few Gentoo specific settings.
45 +
46 +" {{{ Locale settings
47 +" If we have a BOM, always honour that rather than trying to guess.
48 +if &fileencodings !~? "ucs-bom"
49 + set fileencodings^=ucs-bom
50 +endif
51 +
52 +" Always check for UTF-8 when trying to determine encodings.
53 +if &fileencodings !~? "utf-8"
54 + " If we have to add this, the default encoding is not Unicode.
55 + let g:added_fenc_utf8 = 1
56 + set fileencodings+=utf-8
57 +endif
58 +" }}}
59 +
60 +" {{{ Fix &shell, see bug #101665.
61 +if "" == &shell
62 + if executable("/bin/bash")
63 + set shell=/bin/bash
64 + elseif executable("/bin/sh")
65 + set shell=/bin/sh
66 + endif
67 +endif
68 +"}}}
69 +
70 +" {{{ Our default /bin/sh is bash, not ksh, so syntax highlighting for .sh
71 +" files should default to bash. See :help sh-syntax and bug #101819.
72 +if has("eval")
73 + let is_bash=1
74 +endif
75 +" }}}
76 +
77 +" {{{ Autocommands
78 +if has("autocmd")
79 +
80 +augroup gentoo
81 + au!
82 +
83 + " Gentoo-specific settings for ebuilds. These are the federally-mandated
84 + " required tab settings. See the following for more information:
85 + " http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml
86 + " Note that the rules below are very minimal and don't cover everything.
87 + " Better to emerge app-vim/gentoo-syntax, which provides full syntax,
88 + " filetype and indent settings for all things Gentoo.
89 + au BufRead,BufNewFile *.e{build,class} set ts=4 sw=4 noexpandtab
90 +
91 + " In text files, limit the width of text to 78 characters, but be careful
92 + " that we don't override the user's setting.
93 + autocmd BufNewFile,BufRead *.txt
94 + \ if &tw == 0 && ! exists("g:leave_my_textwidth_alone") |
95 + \ setlocal textwidth=78 |
96 + \ endif
97 +
98 + " When editing a file, always jump to the last cursor position
99 + autocmd BufReadPost *
100 + \ if ! exists("g:leave_my_cursor_position_alone") |
101 + \ if line("'\"") > 0 && line ("'\"") <= line("$") |
102 + \ exe "normal g'\"" |
103 + \ endif |
104 + \ endif
105 +
106 + " When editing a crontab file, set backupcopy to yes rather than auto. See
107 + " :help crontab and bug #53437.
108 + autocmd FileType crontab set backupcopy=yes
109 +
110 + " If we previously detected that the default encoding is not UTF-8
111 + " (g:added_fenc_utf8), assume that a file with only ASCII characters (or no
112 + " characters at all) isn't a Unicode file, but is in the default encoding.
113 + " Except of course if a byte-order mark is in effect.
114 + autocmd BufReadPost *
115 + \ if exists("g:added_fenc_utf8") && &fileencoding == "utf-8" &&
116 + \ ! &bomb && search('[\x80-\xFF]','nw') == 0 && &modifiable |
117 + \ set fileencoding= |
118 + \ endif
119 +
120 + " Strip trailing spaces on write
121 + autocmd BufWritePre *.e{build,class}
122 + \ if ! exists("g:leave_my_trailing_space_alone") |
123 + \ :%s/\s\+$//e |
124 + \ endif
125 +
126 +augroup END
127 +
128 +endif " has("autocmd")
129 +" }}}
130 +
131 +" {{{ nvimrc.local
132 +if filereadable("/etc/vim/nvimrc.local")
133 + source /etc/vim/nvimrc.local
134 +endif
135 +" }}}
136 +
137 +" vim: set tw=80 sw=2 sts=2 et foldmethod=marker :
138
139 diff --git a/app-editors/neovim/neovim-0.1.0.ebuild b/app-editors/neovim/neovim-0.1.0.ebuild
140 new file mode 100644
141 index 0000000..06623da
142 --- /dev/null
143 +++ b/app-editors/neovim/neovim-0.1.0.ebuild
144 @@ -0,0 +1,78 @@
145 +# Copyright 1999-2015 Gentoo Foundation
146 +# Distributed under the terms of the GNU General Public License v2
147 +# $Id$
148 +
149 +EAPI=5
150 +inherit cmake-utils eutils flag-o-matic
151 +
152 +DESCRIPTION="Vim-fork focused on extensibility and agility."
153 +HOMEPAGE="https://neovim.io"
154 +if [[ ${PV} == 9999 ]]; then
155 + inherit git-r3
156 + EGIT_REPO_URI="git://github.com/neovim/neovim.git"
157 +else
158 + SRC_URI="https://github.com/neovim/neovim/archive/v${PV}.tar.gz -> ${P}.tar.gz"
159 + KEYWORDS="~amd64 ~x86"
160 +fi
161 +
162 +LICENSE="Apache-2.0 vim"
163 +SLOT="0"
164 +IUSE="+nvimpager perl python +jemalloc"
165 +
166 +CDEPEND="dev-lang/luajit:2
167 + >=dev-libs/libtermkey-0.17
168 + >=dev-libs/libuv-1.2.0
169 + >=dev-libs/msgpack-0.6.0_pre20150220
170 + >=dev-libs/unibilium-1.1.1
171 + dev-libs/libvterm
172 + dev-lua/lpeg
173 + dev-lua/messagepack
174 + jemalloc? ( dev-libs/jemalloc )
175 +"
176 +DEPEND="${CDEPEND}
177 + virtual/libiconv
178 + virtual/libintl"
179 +RDEPEND="${CDEPEND}
180 + perl? ( dev-lang/perl )
181 + python? ( dev-python/neovim-python-client )"
182 +
183 +CMAKE_BUILD_TYPE=RelWithDebInfo
184 +
185 +src_prepare() {
186 + # use our system vim dir
187 + sed -e '/^# define SYS_VIMRC_FILE/s|$VIM|'"${EPREFIX}"'/etc/vim|' \
188 + -i src/nvim/os/unix_defs.h || die
189 +
190 + # add eclass to bash filetypes
191 + sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die
192 +
193 + # make less.sh macro actually work with neovim
194 + sed -e 's|vim |nvim |g' -i runtime/macros/less.sh || die
195 +
196 + cmake-utils_src_prepare
197 +}
198 +
199 +src_configure() {
200 + export USE_BUNDLED_DEPS=OFF
201 + append-cflags "-Wno-error"
202 + local mycmakeargs=(
203 + $(cmake-utils_use_enable jemalloc JEMALLOC)
204 + -DLIBUNIBILIUM_USE_STATIC=OFF
205 + -DLIBTERMKEY_USE_STATIC=OFF
206 + -DLIBVTERM_USE_STATIC=OFF
207 + )
208 + cmake-utils_src_configure
209 +}
210 +
211 +src_install() {
212 + cmake-utils_src_install
213 +
214 + # install a default configuration file
215 + insinto /etc/vim
216 + doins "${FILESDIR}"/sysinit.vim
217 +
218 + # conditionally install a symlink for nvimpager
219 + if use nvimpager; then
220 + dosym /usr/share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
221 + fi
222 +}