neovim-0.1.5-r1.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils
  5. DESCRIPTION="Vim-fork focused on extensibility and agility."
  6. HOMEPAGE="https://neovim.io"
  7. if [[ ${PV} == 9999 ]]; then
  8. inherit git-r3
  9. EGIT_REPO_URI="git://github.com/neovim/neovim.git"
  10. else
  11. SRC_URI="https://github.com/neovim/neovim/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  12. KEYWORDS="~amd64"
  13. fi
  14. LICENSE="Apache-2.0 vim"
  15. SLOT="0"
  16. IUSE="+clipboard +luajit +nvimpager python ruby +tui +jemalloc"
  17. CDEPEND=">=dev-libs/libuv-1.2.0
  18. >=dev-libs/msgpack-1.0.0
  19. luajit? ( dev-lang/luajit:2 )
  20. !luajit? (
  21. dev-lang/lua:=
  22. dev-lua/LuaBitOp
  23. )
  24. tui? (
  25. >=dev-libs/libtermkey-0.17
  26. >=dev-libs/unibilium-1.1.1
  27. )
  28. dev-libs/libvterm
  29. dev-lua/lpeg[luajit=]
  30. dev-lua/mpack[luajit=]
  31. jemalloc? ( dev-libs/jemalloc )
  32. "
  33. DEPEND="${CDEPEND}
  34. virtual/libiconv
  35. virtual/libintl"
  36. RDEPEND="${CDEPEND}
  37. python? ( dev-python/neovim-python-client )
  38. ruby? ( dev-ruby/neovim-ruby-client )
  39. clipboard? ( || ( x11-misc/xsel x11-misc/xclip ) )"
  40. CMAKE_BUILD_TYPE=RelWithDebInfo
  41. src_prepare() {
  42. # use our system vim dir
  43. sed -e '/^# define SYS_VIMRC_FILE/s|$VIM|'"${EPREFIX}"'/etc/vim|' \
  44. -i src/nvim/globals.h || die
  45. # add eclass to bash filetypes
  46. sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die
  47. cmake-utils_src_prepare
  48. }
  49. src_configure() {
  50. local mycmakeargs=(
  51. -DFEAT_TUI=$(usex tui)
  52. -DENABLE_JEMALLOC=$(usex jemalloc)
  53. )
  54. cmake-utils_src_configure
  55. }
  56. src_install() {
  57. cmake-utils_src_install
  58. # install a default configuration file
  59. insinto /etc/vim
  60. doins "${FILESDIR}"/sysinit.vim
  61. # conditionally install a symlink for nvimpager
  62. if use nvimpager; then
  63. dosym /usr/share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
  64. fi
  65. }