mathtex-1.04.ebuild 885 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit toolchain-funcs
  5. DESCRIPTION="Lets you easily embed LaTeX math in your own html pages, blogs, wikis, etc"
  6. HOMEPAGE="http://www.forkosh.com/mathtex.html"
  7. SRC_URI="mirror://gentoo/${P}.zip"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="png"
  12. RDEPEND="app-text/dvipng
  13. virtual/latex-base"
  14. DEPEND=""
  15. S=${WORKDIR}
  16. einfo_run_command() {
  17. einfo "${@}"
  18. ${@} || die
  19. }
  20. src_compile() {
  21. einfo_run_command $(tc-getCC) \
  22. ${CFLAGS} ${LDFLAGS} \
  23. -DLATEX=\"/usr/bin/latex\" \
  24. -DDVIPNG=\"/usr/bin/dvipng\" \
  25. $(use png && echo "-DPNG") \
  26. mathtex.c -o mathtex
  27. }
  28. src_install() {
  29. dobin mathtex
  30. dodoc README
  31. dohtml mathtex.html
  32. }
  33. pkg_postinst() {
  34. elog "To use mathtex in your web-pages, just link /usr/bin/mathtex"
  35. elog "to your cgi-bin subdirectory!"
  36. }