bibtex2html-1.98.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. IUSE="doc +ocamlopt"
  6. DESCRIPTION="A bibtex to HTML converter"
  7. SRC_URI="http://www.lri.fr/~filliatr/ftp/bibtex2html/${P}.tar.gz"
  8. HOMEPAGE="http://www.lri.fr/~filliatr/bibtex2html/"
  9. SLOT="0"
  10. LICENSE="GPL-2"
  11. KEYWORDS="amd64 ppc ~ppc64 x86"
  12. RESTRICT="test"
  13. # With use doc we need a latex compiler to generate manual.pdf
  14. # hevea is used for manual.html
  15. # manual.tex needs fullpage.sty
  16. DEPEND=">=dev-lang/ocaml-3.10:=[ocamlopt?]
  17. doc? ( virtual/latex-base
  18. dev-texlive/texlive-latexextra
  19. dev-tex/hevea )"
  20. # We need tex-base for bibtex but also some bibtex styles, so we use latex-base
  21. RDEPEND="virtual/latex-base"
  22. src_prepare() {
  23. epatch "${FILESDIR}/${PN}-1.88-destdir.patch"
  24. # Avoid pre-stripped files
  25. sed -i -e "s/strip/true/" Makefile.in
  26. # For make install
  27. use ocamlopt || sed -i 's/= opt /= noopt /' Makefile.in
  28. }
  29. src_compile() {
  30. export VARTEXFONTS="${T}/fonts"
  31. if use ocamlopt ; then
  32. emake opt
  33. else
  34. emake byte
  35. fi
  36. if use doc; then
  37. emake doc
  38. fi
  39. }
  40. src_install() {
  41. emake DESTDIR="${D}" install
  42. dodoc README CHANGES
  43. if use doc; then
  44. dodoc manual.pdf
  45. dohtml manual.html
  46. fi
  47. }