neovim-0.1.1-r1.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit cmake-utils flag-o-matic
  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 ~x86"
  13. fi
  14. LICENSE="Apache-2.0 vim"
  15. SLOT="0"
  16. IUSE="+nvimpager perl python +jemalloc"
  17. CDEPEND="dev-lang/luajit:2
  18. >=dev-libs/libtermkey-0.17
  19. >=dev-libs/libuv-1.2.0
  20. >=dev-libs/msgpack-0.6.0_pre20150220
  21. >=dev-libs/unibilium-1.1.1
  22. dev-libs/libvterm
  23. dev-lua/lpeg
  24. dev-lua/messagepack
  25. jemalloc? ( dev-libs/jemalloc )
  26. "
  27. DEPEND="${CDEPEND}
  28. virtual/libiconv
  29. virtual/libintl"
  30. RDEPEND="${CDEPEND}
  31. perl? ( dev-lang/perl )
  32. python? ( dev-python/neovim-python-client )"
  33. CMAKE_BUILD_TYPE=RelWithDebInfo
  34. src_prepare() {
  35. # use our system vim dir
  36. sed -e '/^# define SYS_VIMRC_FILE/s|$VIM|'"${EPREFIX}"'/etc/vim|' \
  37. -i src/nvim/globals.h || die
  38. # add eclass to bash filetypes
  39. sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die
  40. # make less.sh macro actually work with neovim
  41. sed -e 's|vim |nvim |g' -i runtime/macros/less.sh || die
  42. cmake-utils_src_prepare
  43. }
  44. src_configure() {
  45. export USE_BUNDLED_DEPS=OFF
  46. append-cflags "-Wno-error"
  47. local mycmakeargs=(
  48. $(cmake-utils_use_enable jemalloc JEMALLOC)
  49. -DLIBUNIBILIUM_USE_STATIC=OFF
  50. -DLIBTERMKEY_USE_STATIC=OFF
  51. -DLIBVTERM_USE_STATIC=OFF
  52. )
  53. cmake-utils_src_configure
  54. }
  55. src_install() {
  56. cmake-utils_src_install
  57. # install a default configuration file
  58. insinto /etc/vim
  59. doins "${FILESDIR}"/sysinit.vim
  60. # conditionally install a symlink for nvimpager
  61. if use nvimpager; then
  62. dosym /usr/share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
  63. fi
  64. }