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/files/, app-editors/neovim/
Date: Sun, 25 Oct 2015 19:39:06
Message-Id: 1445801923.9274f23ab2d62a055f7987f35d00d64d375a6c41.tranquility@gentoo
1 commit: 9274f23ab2d62a055f7987f35d00d64d375a6c41
2 Author: Ole Reifschneider <tranquility <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 25 19:35:27 2015 +0000
4 Commit: Ole Reifschneider <tranquility <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 25 19:38:43 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9274f23a
7
8 app-editors/neovim: Add new snapshot and patch automagic jemalloc dep
9
10 Package-Manager: portage-2.2.23
11
12 app-editors/neovim/Manifest | 1 +
13 app-editors/neovim/files/automagic-jemalloc.patch | 35 ++++++++++
14 app-editors/neovim/metadata.xml | 1 +
15 app-editors/neovim/neovim-0.0.0_pre20151025.ebuild | 80 ++++++++++++++++++++++
16 4 files changed, 117 insertions(+)
17
18 diff --git a/app-editors/neovim/Manifest b/app-editors/neovim/Manifest
19 index 8ea700a..1dbc37f 100644
20 --- a/app-editors/neovim/Manifest
21 +++ b/app-editors/neovim/Manifest
22 @@ -2,3 +2,4 @@ DIST neovim-0.0.0_pre20150627.tar.xz 4715400 SHA256 5e5769c81a60637b731dc13e7584
23 DIST neovim-0.0.0_pre20150727.tar.xz 4703336 SHA256 da9bd3070ac60691be4e033947548c13b0ede86b2422d66bd207ac2310b735c1 SHA512 db225fff860d730d4514a33c363ed7748949aaeb3a5fb31c0775120d31219a9fad154ff6f457c4ea25aff666e34dc0e7c8ab1acbc3bbe73bed17d01c67d13627 WHIRLPOOL 23b553f6be136f42c7279d332e1c917083d48aa0ae27df949972ce4eae93d07ea301f9b5853d3d320cc4a6366a483f3f9d43e016607d500646c71ea33e5ffdb8
24 DIST neovim-0.0.0_pre20150814.tar.xz 4718836 SHA256 e7abdb0b3a44ec3c312b06aa825caca4520f1b857045c45c925e8005e2bf3ada SHA512 638e6807929880c2648bd2d0efde509842423488272926bb3ae89a6681144b86fe5137ef313ae102fe8c2fa82819fe96e0dcc0a8d45e3ccaf18b207cf9c1aad1 WHIRLPOOL f1ca40e0bef46da63c466e0fcc51bcf37c57f64009a680f6e51cb1cf3b0d481011dff33957b5da38dfe8d55978c368efe9d905d4f26a272e915470fab239dcff
25 DIST neovim-0.0.0_pre20151022.tar.xz 4947140 SHA256 8b090b130f6eb47021d872e8e33691cbd6169f7f0650389cfd0a3bfc194bafc5 SHA512 262b37d1937982bd86f436ecc9c055fdbd650a227c7da77d203e26c9a885b32dc584b4b098f7f2bcea31e7fdb40b51c5a7d337ca4b794b0114c1115e642406ea WHIRLPOOL ca6e50a0225bfea9161c2b7432886377e6a9962fdde3f35f8a091fc26b35fb44d87d4a327b56b428dbcee9d91f66fe2365a33b158b92bf1b5cff08d326e91320
26 +DIST neovim-0.0.0_pre20151025.tar.xz 4947384 SHA256 62b3bd93e0395c3f2d1f829a1e4e444ac081de1acc99114f6ceba7d61a7055a3 SHA512 a0390097cc0cfae401779ddd229a6237fa63522caaa6515dfff025b506b83e2597a10711bae0a1a60770d2a244963aa56af58f734885ce73091a19865a420bf0 WHIRLPOOL becfec39f4aa1a22f48991f17dbca003f38dfa6b085ed6043e34ed7e852217dddd3e4fce4d33873b0385e1b46754ae11db21ce47cbecd12822e5073d38a5fda1
27
28 diff --git a/app-editors/neovim/files/automagic-jemalloc.patch b/app-editors/neovim/files/automagic-jemalloc.patch
29 new file mode 100644
30 index 0000000..a08fc07
31 --- /dev/null
32 +++ b/app-editors/neovim/files/automagic-jemalloc.patch
33 @@ -0,0 +1,35 @@
34 +commit bb3c3cbee65ef42b2b3048afae008c719bc2056a
35 +Author: Ole Reifschneider <mail@×××××××××××××××××.de>
36 +Date: Sat Oct 24 18:48:01 2015 +0200
37 +
38 + Make jemalloc optional
39 +
40 + Don't enable it automagically if it exists
41 +
42 +diff --git a/CMakeLists.txt b/CMakeLists.txt
43 +index 348e138..53e3873 100644
44 +--- a/CMakeLists.txt
45 ++++ b/CMakeLists.txt
46 +@@ -260,12 +260,16 @@ if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MA
47 + message(FATAL_ERROR "Sanitizers are only supported for Clang.")
48 + endif()
49 +
50 +-if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN)
51 +- message(STATUS "Sanitizers have been enabled; don't use jemalloc.")
52 +-else()
53 +- find_package(JeMalloc)
54 +- if(JEMALLOC_FOUND)
55 +- include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS})
56 ++option(ENABLE_JEMALLOC "enable jemalloc" OFF)
57 ++
58 ++if (ENABLE_JEMALLOC)
59 ++ if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN)
60 ++ message(STATUS "Sanitizers have been enabled; don't use jemalloc.")
61 ++ else()
62 ++ find_package(JeMalloc)
63 ++ if(JEMALLOC_FOUND)
64 ++ include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS})
65 ++ endif()
66 + endif()
67 + endif()
68 +
69
70 diff --git a/app-editors/neovim/metadata.xml b/app-editors/neovim/metadata.xml
71 index 4ead8c2..c15da2e 100644
72 --- a/app-editors/neovim/metadata.xml
73 +++ b/app-editors/neovim/metadata.xml
74 @@ -4,6 +4,7 @@
75 <herd>vim</herd>
76 <use>
77 <flag name='nvimpager'>Install nvimpager symlink to less.sh macro</flag>
78 + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations</flag>
79 </use>
80 <upstream>
81 <remote-id type="github">neovim/neovim</remote-id>
82
83 diff --git a/app-editors/neovim/neovim-0.0.0_pre20151025.ebuild b/app-editors/neovim/neovim-0.0.0_pre20151025.ebuild
84 new file mode 100644
85 index 0000000..c202ad7
86 --- /dev/null
87 +++ b/app-editors/neovim/neovim-0.0.0_pre20151025.ebuild
88 @@ -0,0 +1,80 @@
89 +# Copyright 1999-2015 Gentoo Foundation
90 +# Distributed under the terms of the GNU General Public License v2
91 +# $Id$
92 +
93 +EAPI=5
94 +inherit cmake-utils flag-o-matic
95 +
96 +DESCRIPTION="Vim-fork focused on extensibility and agility."
97 +HOMEPAGE="https://github.com/neovim/neovim"
98 +if [[ ${PV} == 9999 ]]; then
99 + inherit git-r3
100 + EGIT_REPO_URI="git://github.com/neovim/neovim.git"
101 +else
102 + SRC_URI="https://dev.gentoo.org/~tranquility/distfiles/${P}.tar.xz"
103 + KEYWORDS="~amd64 ~x86"
104 +fi
105 +
106 +LICENSE="Apache-2.0 vim"
107 +SLOT="0"
108 +IUSE="+nvimpager perl python jemalloc"
109 +
110 +CDEPEND="dev-lang/luajit:2
111 + >=dev-libs/libtermkey-0.17
112 + >=dev-libs/libuv-1.2.0
113 + >=dev-libs/msgpack-0.6.0_pre20150220
114 + >=dev-libs/unibilium-1.1.1
115 + dev-libs/libvterm
116 + dev-lua/lpeg
117 + dev-lua/messagepack
118 + jemalloc? ( dev-libs/jemalloc )
119 +"
120 +DEPEND="${CDEPEND}
121 + virtual/libiconv
122 + virtual/libintl"
123 +RDEPEND="${CDEPEND}
124 + perl? ( dev-lang/perl )
125 + python? ( dev-python/neovim-python-client )"
126 +
127 +src_prepare() {
128 + # use our system vim dir
129 + sed -e '/^# define SYS_VIMRC_FILE/s|$VIM|'"${EPREFIX}"'/etc/vim|' \
130 + -i src/nvim/os/unix_defs.h || die
131 +
132 + # add eclass to bash filetypes
133 + sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die
134 +
135 + # make less.sh macro actually work with neovim
136 + sed -e 's|vim |nvim |g' -i runtime/macros/less.sh || die
137 +
138 + # make sure the jemalloc dependency is not automagic
139 + epatch "${FILESDIR}"/automagic-jemalloc.patch
140 +
141 + cmake-utils_src_prepare
142 +}
143 +
144 +src_configure() {
145 + export USE_BUNDLED_DEPS=OFF
146 + append-cflags "-Wno-error"
147 + local mycmakeargs=(
148 + $(cmake-utils_use_enable jemalloc JEMALLOC)
149 + -DCMAKE_BUILD_TYPE=RelWithDebInfo
150 + -DLIBUNIBILIUM_USE_STATIC=OFF
151 + -DLIBTERMKEY_USE_STATIC=OFF
152 + -DLIBVTERM_USE_STATIC=OFF
153 + )
154 + cmake-utils_src_configure
155 +}
156 +
157 +src_install() {
158 + cmake-utils_src_install
159 +
160 + # install a default configuration file
161 + insinto /etc/vim
162 + doins "${FILESDIR}"/nvimrc
163 +
164 + # conditionally install a symlink for nvimpager
165 + if use nvimpager; then
166 + dosym /usr/share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
167 + fi
168 +}