pymacs-0.25-r2.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python{2_7,3_4} )
  5. inherit elisp distutils-r1 vcs-snapshot
  6. DESCRIPTION="A tool that allows both-side communication beetween Python and Emacs Lisp"
  7. HOMEPAGE="http://www.emacswiki.org/emacs/PyMacs"
  8. SRC_URI="https://github.com/pinard/Pymacs/tarball/v${PV} -> ${P}.tar.gz"
  9. LICENSE="GPL-2+"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
  12. IUSE="doc"
  13. DEPEND="doc? ( >=dev-python/docutils-0.7
  14. virtual/latex-base )"
  15. RDEPEND=""
  16. DISTUTILS_IN_SOURCE_BUILD=1
  17. SITEFILE="50${PN}-gentoo.el"
  18. python_prepare_all() {
  19. sed \
  20. -e '/pymacs-python-command/s/@PYTHON@/python/' \
  21. -i pymacs.el.in || die
  22. distutils-r1_python_prepare_all
  23. }
  24. # called by distutils-r1 for every python implementation
  25. python_configure() {
  26. # pre-process the files but don't run distutils
  27. emake PYSETUP=: PYTHON=${EPYTHON}
  28. }
  29. # called once
  30. python_compile_all() {
  31. elisp_src_compile
  32. if use doc; then
  33. VARTEXFONTS="${T}"/fonts emake RST2LATEX=rst2latex.py pymacs.pdf
  34. fi
  35. }
  36. python_install_all() {
  37. elisp_src_install
  38. distutils-r1_python_install_all
  39. dodoc pymacs.rst
  40. use doc && dodoc pymacs.pdf
  41. }