Gentoo Archives: gentoo-commits

From: "Maciej Barć" <xgqt@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/alectryon/files/, sci-mathematics/alectryon/
Date: Sat, 05 Mar 2022 04:44:55
Message-Id: 1646455258.a3045b07e451738d566af36b38e96dbf76d8659c.xgqt@gentoo
1 commit: a3045b07e451738d566af36b38e96dbf76d8659c
2 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 5 04:39:08 2022 +0000
4 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 5 04:40:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3045b07
7
8 sci-mathematics/alectryon: new package; add 1.4.0
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
12
13 sci-mathematics/alectryon/Manifest | 1 +
14 sci-mathematics/alectryon/alectryon-1.4.0.ebuild | 78 ++++++++++++++++++++++
15 .../alectryon/files/50alectryon-gentoo.el | 3 +
16 sci-mathematics/alectryon/metadata.xml | 23 +++++++
17 4 files changed, 105 insertions(+)
18
19 diff --git a/sci-mathematics/alectryon/Manifest b/sci-mathematics/alectryon/Manifest
20 new file mode 100644
21 index 000000000000..77bdaf1a36dc
22 --- /dev/null
23 +++ b/sci-mathematics/alectryon/Manifest
24 @@ -0,0 +1 @@
25 +DIST alectryon-1.4.0.tar.gz 312436 BLAKE2B 7f1e58670fbba0b31a4e4bc6502dffa72931ae3495c38b53987406a05aac9d3d1a34d75c89b7b85a6122ee6a7ce30970f8cf3190a5916e416e56854313077d4c SHA512 1310a04c8584147b38af8edb19cc95bd71043f5d00f55cbf4d5649dad9eede5bd01dba6fb23b85acf7cb9e9619fd01e5f83d8d37064f0b43f706589b9ec8aeef
26
27 diff --git a/sci-mathematics/alectryon/alectryon-1.4.0.ebuild b/sci-mathematics/alectryon/alectryon-1.4.0.ebuild
28 new file mode 100644
29 index 000000000000..bdbf53a0c35b
30 --- /dev/null
31 +++ b/sci-mathematics/alectryon/alectryon-1.4.0.ebuild
32 @@ -0,0 +1,78 @@
33 +# Copyright 1999-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +
38 +PYTHON_COMPAT=( python3_{8..10} )
39 +
40 +inherit elisp-common distutils-r1
41 +
42 +DESCRIPTION="Toolkit for literate programming in Coq"
43 +HOMEPAGE="https://github.com/cpitclaudel/alectryon/"
44 +
45 +if [[ "${PV}" == *9999* ]] ; then
46 + inherit git-r3
47 + EGIT_REPO_URI="https://github.com/cpitclaudel/${PN}.git"
48 +else
49 + SRC_URI="https://github.com/cpitclaudel/${PN}/archive/v${PV}.tar.gz
50 + -> ${P}.tar.gz"
51 + KEYWORDS="~amd64"
52 +fi
53 +
54 +LICENSE="MIT"
55 +SLOT="0"
56 +IUSE="doc emacs"
57 +
58 +RDEPEND="
59 + dev-python/beautifulsoup4[${PYTHON_USEDEP}]
60 + dev-python/docutils[${PYTHON_USEDEP}]
61 + dev-python/dominate[${PYTHON_USEDEP}]
62 + dev-python/myst_parser[${PYTHON_USEDEP}]
63 + dev-python/pygments[${PYTHON_USEDEP}]
64 + dev-python/sphinx[${PYTHON_USEDEP}]
65 + sci-mathematics/coq-serapi
66 +"
67 +DEPEND="${RDEPEND}"
68 +BDEPEND="
69 + emacs? (
70 + >=app-editors/emacs-23.1:*
71 + app-emacs/flycheck
72 + app-emacs/proofgeneral
73 + )
74 +"
75 +
76 +DOCS=( CHANGES.rst CITATION.bib README.rst )
77 +SITEFILE="50${PN}-gentoo.el"
78 +
79 +src_compile() {
80 + python_foreach_impl distutils-r1_python_compile
81 +
82 + use doc && emake -C ./recipes/sphinx latexpdf
83 + use emacs && elisp-compile ./etc/elisp/alectryon.el
84 +}
85 +
86 +src_install() {
87 + python_foreach_impl distutils-r1_python_install
88 + einstalldocs
89 +
90 + if use doc ; then
91 + docinto html
92 + dodoc ./recipes/sphinx/_build/html/*
93 + docinto pdf
94 + dodoc ./recipes/sphinx/_build/latex/alectryon-demo.pdf
95 + docinto latex
96 + dodoc ./recipes/sphinx/_build/latex/alectryon-demo.tex
97 + fi
98 + if use emacs ; then
99 + elisp-install ${PN} ./etc/elisp/${PN}.el{,c}
100 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
101 + fi
102 +}
103 +
104 +pkg_postinst() {
105 + use emacs && elisp-site-regen
106 +}
107 +
108 +pkg_postrm() {
109 + use emacs && elisp-site-regen
110 +}
111
112 diff --git a/sci-mathematics/alectryon/files/50alectryon-gentoo.el b/sci-mathematics/alectryon/files/50alectryon-gentoo.el
113 new file mode 100644
114 index 000000000000..2d6ca63cdd6d
115 --- /dev/null
116 +++ b/sci-mathematics/alectryon/files/50alectryon-gentoo.el
117 @@ -0,0 +1,3 @@
118 +(add-to-list 'load-path "@SITELISP@")
119 +(autoload 'alectryon-mode "alectryon" "Mode for Literate Coq files." t)
120 +(add-hook 'coq-mode-hook #'alectryon-mode t)
121
122 diff --git a/sci-mathematics/alectryon/metadata.xml b/sci-mathematics/alectryon/metadata.xml
123 new file mode 100644
124 index 000000000000..67c427e81f35
125 --- /dev/null
126 +++ b/sci-mathematics/alectryon/metadata.xml
127 @@ -0,0 +1,23 @@
128 +<?xml version="1.0" encoding="UTF-8"?>
129 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
130 +
131 +<pkgmetadata>
132 + <maintainer type="project">
133 + <email>sci-mathematics@g.o</email>
134 + <name>Gentoo Mathematics Project</name>
135 + </maintainer>
136 + <longdescription>
137 + A library to process Coq and Lean snippets embedded in text documents,
138 + showing goals and messages for each input sentence. Also a literate
139 + programming toolkit. The goal of Alectryon is to make it easy to write
140 + textbooks, blog posts, and other documents that mix interactive proofs and
141 + prose.
142 + Alectryon originally supported Coq only. Support for Lean is preliminary
143 + and restricted to Lean 3.
144 + </longdescription>
145 + <upstream>
146 + <changelog>https://github.com/cpitclaudel/alectryon/releases/</changelog>
147 + <bugs-to>https://github.com/cpitclaudel/alectryon/issues/</bugs-to>
148 + <remote-id type="github">cpitclaudel/alectryon</remote-id>
149 + </upstream>
150 +</pkgmetadata>