logo

overlay

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

vis-0.5.ebuild (1590B)


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