epix-1.2.11-r1.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit elisp-common bash-completion-r1 autotools eutils
  5. DESCRIPTION="2- and 3-D plotter for creating images (to be used in LaTeX)"
  6. HOMEPAGE="http://mathcs.holycross.edu/~ahwang/current/ePiX.html"
  7. SRC_URI="http://mathcs.holycross.edu/~ahwang/epix/${P}_withpdf.tar.bz2"
  8. SLOT="0"
  9. LICENSE="GPL-2"
  10. KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
  11. IUSE="doc emacs examples"
  12. DEPEND="
  13. virtual/latex-base
  14. dev-texlive/texlive-pstricks
  15. dev-texlive/texlive-pictures
  16. dev-texlive/texlive-latexextra
  17. dev-tex/xcolor
  18. emacs? ( virtual/emacs )"
  19. RDEPEND="${DEPEND}"
  20. SITEFILE=50${PN}-gentoo.el
  21. src_prepare() {
  22. epatch "${FILESDIR}"/${PN}-1.2.10-autotools.patch
  23. eautoreconf
  24. }
  25. src_configure() {
  26. econf \
  27. --docdir="${EPREFIX}/usr/share/doc/${PF}" \
  28. --disable-epix-el
  29. }
  30. src_install() {
  31. default
  32. if use emacs; then
  33. # do compilation here as the make install target will
  34. # create the .el file
  35. elisp-compile *.el || die "elisp-compile failed!"
  36. elisp-install ${PN} *.elc *.el || die "elisp-install failed!"
  37. elisp-site-file-install "${FILESDIR}/${SITEFILE}"
  38. fi
  39. newbashcomp bash_completions epix
  40. bashcomp_alias epix flix elaps laps
  41. if use doc; then
  42. insinto /usr/share/doc/${PF}
  43. doins doc/*gz
  44. fi
  45. if use examples; then
  46. cd samples
  47. insinto /usr/share/doc/${PF}/examples
  48. doins *.xp *.flx *c *h README
  49. fi
  50. }
  51. pkg_postinst() {
  52. use emacs && elisp-site-regen
  53. }
  54. pkg_postrm() {
  55. use emacs && elisp-site-regen
  56. }