diff options
Diffstat (limited to 'sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild')
-rw-r--r-- | sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild b/sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild new file mode 100644 index 000000000000..a15045952615 --- /dev/null +++ b/sci-mathematics/alectryon/alectryon-1.4.0-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..10} ) + +inherit elisp-common distutils-r1 + +DESCRIPTION="Toolkit for literate programming in Coq" +HOMEPAGE="https://github.com/cpitclaudel/alectryon/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/cpitclaudel/${PN}.git" +else + SRC_URI="https://github.com/cpitclaudel/${PN}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="doc emacs" + +RDEPEND=" + dev-python/beautifulsoup4[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/dominate[${PYTHON_USEDEP}] + dev-python/myst_parser[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + dev-python/sphinx[${PYTHON_USEDEP}] + sci-mathematics/coq-serapi +" +DEPEND="${RDEPEND}" +BDEPEND=" + emacs? ( + >=app-editors/emacs-23.1:* + app-emacs/flycheck + app-emacs/proofgeneral + ) +" + +DOCS=( CHANGES.rst CITATION.bib README.rst ) +PATCHES=( "${FILESDIR}"/${P}-setup.cfg-version.patch ) +SITEFILE="50${PN}-gentoo.el" + +src_compile() { + python_foreach_impl distutils-r1_python_compile + + use doc && emake -C ./recipes/sphinx latexpdf + use emacs && elisp-compile ./etc/elisp/alectryon.el +} + +src_install() { + python_foreach_impl distutils-r1_python_install + einstalldocs + + if use doc ; then + docinto html + dodoc ./recipes/sphinx/_build/html/* + docinto pdf + dodoc ./recipes/sphinx/_build/latex/alectryon-demo.pdf + docinto latex + dodoc ./recipes/sphinx/_build/latex/alectryon-demo.tex + fi + if use emacs ; then + elisp-install ${PN} ./etc/elisp/${PN}.el{,c} + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |