htmldoc-1.8.29.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Convert HTML pages into a PDF document"
  6. SRC_URI="http://www.msweet.org/files/project1/${P}-source.tar.bz2"
  7. HOMEPAGE="http://www.msweet.org/projects.php?Z1"
  8. IUSE="fltk"
  9. SLOT="0"
  10. LICENSE="GPL-2"
  11. KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86"
  12. DEPEND=">=media-libs/libpng-1.4:0=
  13. virtual/jpeg:0
  14. fltk? ( x11-libs/fltk:1 )
  15. "
  16. RDEPEND="${DEPEND}"
  17. src_prepare() {
  18. # make sure not to use the libs htmldoc ships with
  19. mkdir foo ; mv jpeg foo/ ; mv png foo/ ; mv zlib foo/
  20. sed -i "s:^#define DOCUMENTATION \"\$prefix/share/doc/htmldoc\":#define DOCUMENTATION \"\$prefix/share/doc/${PF}/html\":" \
  21. configure || die
  22. eapply "${FILESDIR}/${PN}-destdir.patch" \
  23. "${FILESDIR}/${PN}-break.patch"
  24. default
  25. }
  26. src_configure() {
  27. local myconf="$(use_with fltk gui)"
  28. CC=$(tc-getCC) CXX=$(tc-getCXX) \
  29. econf ${myconf}
  30. # Add missing -lfltk_images to LIBS
  31. if use fltk; then
  32. sed -i 's:-lfltk :-lfltk -lfltk_images :g' Makedefs || die
  33. fi
  34. }
  35. src_compile() {
  36. emake
  37. }
  38. src_install() {
  39. emake DESTDIR="${D}" install
  40. # Minor cleanups
  41. mv "${D}/usr/share/doc/htmldoc" "${D}/usr/share/doc/${PF}"
  42. dodir /usr/share/doc/${PF}/html
  43. mv "${D}"/usr/share/doc/${PF}/*.html "${D}/usr/share/doc/${PF}/html"
  44. }