logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

vis-9999.ebuild (1291B)


  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit git-r3
  5. DESCRIPTION="modern, legacy free, simple yet efficient vim-like editor."
  6. HOMEPAGE="https://github.com/martanne/vis"
  7. EGIT_REPO_URI="https://github.com/martanne/vis.git"
  8. LICENSE="ISC"
  9. SLOT="0"
  10. KEYWORDS=""
  11. IUSE="+ncurses lua lpeg selinux test tre"
  12. #TODO: virtual/curses
  13. DEPEND="dev-libs/libtermkey
  14. lua? ( >=dev-lang/lua-5.2:= )
  15. tre? ( dev-libs/tre:= )
  16. ncurses? ( sys-libs/ncurses:= )"
  17. RDEPEND="${DEPEND}
  18. lua? ( lpeg? ( >=dev-lua/lpeg-0.12 ) )
  19. app-eselect/eselect-vi"
  20. src_prepare() {
  21. if use test; then
  22. type -P vim &>/dev/null || sed -i 's/.*vim.*//' test/Makefile || die
  23. fi
  24. sed -i 's|STRIP?=.*|STRIP=true|' Makefile || die
  25. sed -i 's|${DOCPREFIX}/vis|${DOCPREFIX}|' Makefile || die
  26. sed -i 's|DOCUMENTATION = LICENSE|DOCUMENTATION =|' Makefile || die
  27. default
  28. }
  29. src_configure() {
  30. ./configure \
  31. --prefix="${EROOT}usr" \
  32. --docdir="${EROOT}usr/share/doc/${PF}" \
  33. $(use_enable lua) \
  34. $(use_enable ncurses curses) \
  35. $(use_enable selinux) \
  36. $(use_enable tre) || die
  37. }
  38. update_symlinks() {
  39. einfo "Calling eselect vi update --if-unset…"
  40. eselect vi update --if-unset
  41. }
  42. pkg_postrm() {
  43. update_symlinks
  44. }
  45. pkg_postinst() {
  46. update_symlinks
  47. }