less-488.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. DESCRIPTION="Excellent text file viewer"
  5. HOMEPAGE="http://www.greenwoodsoftware.com/less/"
  6. SRC_URI="http://www.greenwoodsoftware.com/less/${P}.tar.gz"
  7. LICENSE="|| ( GPL-3 BSD-2 )"
  8. SLOT="0"
  9. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  10. IUSE="pcre unicode"
  11. DEPEND=">=app-misc/editor-wrapper-3
  12. >=sys-libs/ncurses-5.2:0=
  13. pcre? ( dev-libs/libpcre )"
  14. RDEPEND="${DEPEND}"
  15. src_prepare() {
  16. chmod a+x configure || die
  17. }
  18. src_configure() {
  19. export ac_cv_lib_ncursesw_initscr=$(usex unicode)
  20. export ac_cv_lib_ncurses_initscr=$(usex !unicode)
  21. econf \
  22. --with-regex=$(usex pcre pcre posix) \
  23. --with-editor="${EPREFIX}"/usr/libexec/editor
  24. }
  25. src_install() {
  26. default
  27. newbin "${FILESDIR}"/lesspipe.sh lesspipe
  28. newenvd "${FILESDIR}"/less.envd 70less
  29. }
  30. pkg_preinst() {
  31. if has_version "<${CATEGORY}/${PN}-483-r1" ; then
  32. elog "The lesspipe.sh symlink has been dropped. If you are still setting"
  33. elog "LESSOPEN to that, you will need to update it to '|lesspipe %s'."
  34. elog "Colorization support has been dropped. If you want that, check out"
  35. elog "the new app-text/lesspipe package."
  36. fi
  37. }