summaryrefslogtreecommitdiff
path: root/sci-mathematics/alectryon/alectryon-1.4.0-r2.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/alectryon/alectryon-1.4.0-r2.ebuild')
-rw-r--r--sci-mathematics/alectryon/alectryon-1.4.0-r2.ebuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/sci-mathematics/alectryon/alectryon-1.4.0-r2.ebuild b/sci-mathematics/alectryon/alectryon-1.4.0-r2.ebuild
new file mode 100644
index 000000000000..b8969f14aa7c
--- /dev/null
+++ b/sci-mathematics/alectryon/alectryon-1.4.0-r2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+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() {
+ distutils-r1_src_compile
+
+ use doc && emake -C ./recipes/sphinx latexpdf
+ use emacs && elisp-compile ./etc/elisp/alectryon.el
+}
+
+src_install() {
+ distutils-r1_src_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
+}