diff options
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/neovim/Manifest | 1 | ||||
-rw-r--r-- | app-editors/neovim/files/automagic-jemalloc.patch | 35 | ||||
-rw-r--r-- | app-editors/neovim/metadata.xml | 1 | ||||
-rw-r--r-- | app-editors/neovim/neovim-0.0.0_pre20151025.ebuild | 80 |
4 files changed, 117 insertions, 0 deletions
diff --git a/app-editors/neovim/Manifest b/app-editors/neovim/Manifest index 8ea700a3a5a8..1dbc37f54907 100644 --- a/app-editors/neovim/Manifest +++ b/app-editors/neovim/Manifest @@ -2,3 +2,4 @@ DIST neovim-0.0.0_pre20150627.tar.xz 4715400 SHA256 5e5769c81a60637b731dc13e7584 DIST neovim-0.0.0_pre20150727.tar.xz 4703336 SHA256 da9bd3070ac60691be4e033947548c13b0ede86b2422d66bd207ac2310b735c1 SHA512 db225fff860d730d4514a33c363ed7748949aaeb3a5fb31c0775120d31219a9fad154ff6f457c4ea25aff666e34dc0e7c8ab1acbc3bbe73bed17d01c67d13627 WHIRLPOOL 23b553f6be136f42c7279d332e1c917083d48aa0ae27df949972ce4eae93d07ea301f9b5853d3d320cc4a6366a483f3f9d43e016607d500646c71ea33e5ffdb8 DIST neovim-0.0.0_pre20150814.tar.xz 4718836 SHA256 e7abdb0b3a44ec3c312b06aa825caca4520f1b857045c45c925e8005e2bf3ada SHA512 638e6807929880c2648bd2d0efde509842423488272926bb3ae89a6681144b86fe5137ef313ae102fe8c2fa82819fe96e0dcc0a8d45e3ccaf18b207cf9c1aad1 WHIRLPOOL f1ca40e0bef46da63c466e0fcc51bcf37c57f64009a680f6e51cb1cf3b0d481011dff33957b5da38dfe8d55978c368efe9d905d4f26a272e915470fab239dcff DIST neovim-0.0.0_pre20151022.tar.xz 4947140 SHA256 8b090b130f6eb47021d872e8e33691cbd6169f7f0650389cfd0a3bfc194bafc5 SHA512 262b37d1937982bd86f436ecc9c055fdbd650a227c7da77d203e26c9a885b32dc584b4b098f7f2bcea31e7fdb40b51c5a7d337ca4b794b0114c1115e642406ea WHIRLPOOL ca6e50a0225bfea9161c2b7432886377e6a9962fdde3f35f8a091fc26b35fb44d87d4a327b56b428dbcee9d91f66fe2365a33b158b92bf1b5cff08d326e91320 +DIST neovim-0.0.0_pre20151025.tar.xz 4947384 SHA256 62b3bd93e0395c3f2d1f829a1e4e444ac081de1acc99114f6ceba7d61a7055a3 SHA512 a0390097cc0cfae401779ddd229a6237fa63522caaa6515dfff025b506b83e2597a10711bae0a1a60770d2a244963aa56af58f734885ce73091a19865a420bf0 WHIRLPOOL becfec39f4aa1a22f48991f17dbca003f38dfa6b085ed6043e34ed7e852217dddd3e4fce4d33873b0385e1b46754ae11db21ce47cbecd12822e5073d38a5fda1 diff --git a/app-editors/neovim/files/automagic-jemalloc.patch b/app-editors/neovim/files/automagic-jemalloc.patch new file mode 100644 index 000000000000..a08fc07b28c7 --- /dev/null +++ b/app-editors/neovim/files/automagic-jemalloc.patch @@ -0,0 +1,35 @@ +commit bb3c3cbee65ef42b2b3048afae008c719bc2056a +Author: Ole Reifschneider <mail@ole-reifschneider.de> +Date: Sat Oct 24 18:48:01 2015 +0200 + + Make jemalloc optional + + Don't enable it automagically if it exists + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 348e138..53e3873 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -260,12 +260,16 @@ if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MA + message(FATAL_ERROR "Sanitizers are only supported for Clang.") + endif() + +-if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) +- message(STATUS "Sanitizers have been enabled; don't use jemalloc.") +-else() +- find_package(JeMalloc) +- if(JEMALLOC_FOUND) +- include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS}) ++option(ENABLE_JEMALLOC "enable jemalloc" OFF) ++ ++if (ENABLE_JEMALLOC) ++ if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) ++ message(STATUS "Sanitizers have been enabled; don't use jemalloc.") ++ else() ++ find_package(JeMalloc) ++ if(JEMALLOC_FOUND) ++ include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS}) ++ endif() + endif() + endif() + diff --git a/app-editors/neovim/metadata.xml b/app-editors/neovim/metadata.xml index 4ead8c2a61bf..c15da2ea5362 100644 --- a/app-editors/neovim/metadata.xml +++ b/app-editors/neovim/metadata.xml @@ -4,6 +4,7 @@ <herd>vim</herd> <use> <flag name='nvimpager'>Install nvimpager symlink to less.sh macro</flag> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations</flag> </use> <upstream> <remote-id type="github">neovim/neovim</remote-id> diff --git a/app-editors/neovim/neovim-0.0.0_pre20151025.ebuild b/app-editors/neovim/neovim-0.0.0_pre20151025.ebuild new file mode 100644 index 000000000000..c202ad7c97be --- /dev/null +++ b/app-editors/neovim/neovim-0.0.0_pre20151025.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit cmake-utils flag-o-matic + +DESCRIPTION="Vim-fork focused on extensibility and agility." +HOMEPAGE="https://github.com/neovim/neovim" +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="git://github.com/neovim/neovim.git" +else + SRC_URI="https://dev.gentoo.org/~tranquility/distfiles/${P}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="Apache-2.0 vim" +SLOT="0" +IUSE="+nvimpager perl python jemalloc" + +CDEPEND="dev-lang/luajit:2 + >=dev-libs/libtermkey-0.17 + >=dev-libs/libuv-1.2.0 + >=dev-libs/msgpack-0.6.0_pre20150220 + >=dev-libs/unibilium-1.1.1 + dev-libs/libvterm + dev-lua/lpeg + dev-lua/messagepack + jemalloc? ( dev-libs/jemalloc ) +" +DEPEND="${CDEPEND} + virtual/libiconv + virtual/libintl" +RDEPEND="${CDEPEND} + perl? ( dev-lang/perl ) + python? ( dev-python/neovim-python-client )" + +src_prepare() { + # use our system vim dir + sed -e '/^# define SYS_VIMRC_FILE/s|$VIM|'"${EPREFIX}"'/etc/vim|' \ + -i src/nvim/os/unix_defs.h || die + + # add eclass to bash filetypes + sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die + + # make less.sh macro actually work with neovim + sed -e 's|vim |nvim |g' -i runtime/macros/less.sh || die + + # make sure the jemalloc dependency is not automagic + epatch "${FILESDIR}"/automagic-jemalloc.patch + + cmake-utils_src_prepare +} + +src_configure() { + export USE_BUNDLED_DEPS=OFF + append-cflags "-Wno-error" + local mycmakeargs=( + $(cmake-utils_use_enable jemalloc JEMALLOC) + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DLIBUNIBILIUM_USE_STATIC=OFF + -DLIBTERMKEY_USE_STATIC=OFF + -DLIBVTERM_USE_STATIC=OFF + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # install a default configuration file + insinto /etc/vim + doins "${FILESDIR}"/nvimrc + + # conditionally install a symlink for nvimpager + if use nvimpager; then + dosym /usr/share/nvim/runtime/macros/less.sh /usr/bin/nvimpager + fi +} |