quilt-0.50.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit bash-completion-r1 eutils
  4. DESCRIPTION="quilt patch manager"
  5. HOMEPAGE="https://savannah.nongnu.org/projects/quilt"
  6. SRC_URI="https://savannah.nongnu.org/download/quilt/${P}.tar.gz"
  7. LICENSE="GPL-2"
  8. SLOT="0"
  9. KEYWORDS="amd64 arm ppc ppc64 sparc x86"
  10. IUSE="emacs graphviz"
  11. RDEPEND="sys-apps/ed
  12. dev-util/diffstat
  13. graphviz? ( media-gfx/graphviz )
  14. >=sys-apps/coreutils-8.5"
  15. PDEPEND="emacs? ( app-emacs/quilt-el )"
  16. pkg_setup() {
  17. use graphviz && return 0
  18. echo
  19. elog "If you intend to use the folding functionality (graphical illustration of the"
  20. elog "patch stack) then you'll need to remerge this package with USE=graphviz."
  21. echo
  22. epause 5
  23. }
  24. src_unpack() {
  25. unpack ${A}
  26. cd "${S}"
  27. # Add support for USE=graphviz
  28. use graphviz || epatch "${FILESDIR}/${P}-no-graphviz.patch"
  29. # Some tests are somewhat broken while being run from within portage, work
  30. # fine if you run them manually
  31. rm "${S}"/test/delete.test "${S}"/test/mail.test
  32. }
  33. src_install() {
  34. emake BUILD_ROOT="${D}" install || die "make install failed"
  35. rm -rf "${D}"/usr/share/doc/${P}
  36. dodoc AUTHORS TODO quilt.changes doc/README doc/README.MAIL \
  37. doc/quilt.pdf
  38. rm -rf "${D}"/etc/bash_completion.d
  39. newbashcomp bash_completion ${PN}
  40. # Remove the compat symlinks
  41. rm -rf "${D}"/usr/share/quilt/compat
  42. # Remove Emacs mode; newer version is in app-emacs/quilt-el, bug 247500
  43. rm -rf "${D}"/usr/share/emacs
  44. }