ne-2.5.ebuild 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="the nice editor, easy to use for the beginner and powerful for the wizard"
  6. HOMEPAGE="http://ne.di.unimi.it/"
  7. SRC_URI="${HOMEPAGE}/${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
  11. IUSE=tinfo
  12. DEPEND="
  13. >=sys-libs/ncurses-5.2[tinfo?]
  14. "
  15. RDEPEND="
  16. ${DEPEND}
  17. dev-lang/perl
  18. "
  19. src_prepare() {
  20. sed -i -e 's/-O3//' src/makefile || die
  21. }
  22. src_configure() {
  23. if use tinfo; then
  24. sed -i -e 's|-lcurses|-ltinfo|g' src/makefile || die
  25. else
  26. sed -i -e 's|-lcurses|-lncurses|g' src/makefile || die
  27. fi
  28. }
  29. src_compile() {
  30. emake -C src CC="$(tc-getCC)" \
  31. NE_GLOBAL_DIR="/usr/share/ne" \
  32. OPTS="${CFLAGS}" \
  33. ne || die
  34. }
  35. src_install() {
  36. dobin src/ne
  37. insinto /usr/share/ne/syntax
  38. doins syntax/*.jsf
  39. doman doc/ne.1
  40. dohtml -r doc/html/.
  41. dodoc CHANGES README doc/*.{txt,pdf,texinfo} doc/default.*
  42. }