cw-1.0.16-r3.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="A non-intrusive real-time ANSI color wrapper for common unix-based commands"
  6. HOMEPAGE="http://cwrapper.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/cwrapper/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE=""
  12. src_prepare() {
  13. epatch \
  14. "${FILESDIR}"/${PV}-ldflags.patch \
  15. "${FILESDIR}"/${PV}-path.patch \
  16. "${FILESDIR}"/${PV}-collision.patch \
  17. "${FILESDIR}"/${PV}-format-security.patch
  18. tc-export CC
  19. }
  20. src_compile() {
  21. emake local
  22. }
  23. src_install() {
  24. insinto /usr/share/cw
  25. doins etc/*
  26. exeinto /usr/libexec/cw
  27. doexe def/*
  28. doman man/cwu*
  29. newman man/cw.* color-wrapper
  30. dodoc CHANGES CONTRIB INSTALL README PLATFORM doc/README*
  31. dobin bin/{cwu,colorcfg}
  32. # app-misc/color currently conflicts; hopefully 'colors' is safe
  33. newbin bin/color colors
  34. # media-radio/unixcw currently conflicts;
  35. newbin bin/cw color-wrapper
  36. }
  37. pkg_postinst() {
  38. ebegin "Updating definition files"
  39. cwu /usr/libexec/cw /usr/bin/color-wrapper # >/dev/null
  40. eend $?
  41. elog "To enable color-wrapper, as your user, run:"
  42. elog " colorcfg [1|2|3]"
  43. elog "to add relevant environment variables to your ~/.bash_profile"
  44. elog "Run colorcfg without options to see what [1|2|3] means."
  45. elog
  46. elog "After sourcing your ~/.bash_profile, commands for which definitions"
  47. elog "are provided should have colored output."
  48. elog
  49. elog "To enable/disable colored output, run: 'colors [on|off]'."
  50. }