Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/acl2/
Date: Thu, 07 Oct 2021 11:20:57
Message-Id: 1633605646.a068c3fa5bf8f506a6a93e6c5fba3da56522942f.andrewammerlaan@gentoo
1 commit: a068c3fa5bf8f506a6a93e6c5fba3da56522942f
2 Author: Lucas Mitrak <lucas <AT> lucasmitrak <DOT> com>
3 AuthorDate: Fri Oct 1 07:33:58 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 7 11:20:46 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=a068c3fa
7
8 sci-mathematics/acl2: Fix sed expression, clearer books install
9
10 * Fix sed expression which does not execute at all
11 * Move books down to original install location
12
13 Currently, the sed expression
14 `/5/a export ACL2_SYSTEM_BOOKS=/usr/share/acl2/books/` does not modify
15 the acl2 executable script. The sed expression's intended behavior
16 seems to be adding the enviroment variable `ACL2_SYSTEM_BOOKS` to the
17 fifth line on the final script; however, no modification is made.
18 A new sed expression must replace it, namely
19 `5iexport ACL2_SYSTEM_BOOKS=/usr/share/acl2/books/` which accomplishes
20 inserting the enviroment variable into the script. This enviroment
21 variable is recommended when the books directory resides outside
22 where the executable was built [1].
23 In addition, the command `doins -r books` should be moved further down
24 for the sake of clarity. This way the src_install() function modifies
25 the files at the top and installs them at the bottom. Also, now
26 the command `doins -r books` is beside the other similar commands.
27
28 [1] https://raw.githubusercontent.com/acl2/acl2/master/doc.lisp
29
30 Package-Manager: Portage-3.0.20, Repoman-3.0.3
31 Signed-off-by: Lucas Mitrak <lucas <AT> lucasmitrak.com>
32 Closes: https://github.com/gentoo/sci/pull/1115
33 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
34
35 sci-mathematics/acl2/acl2-8.3-r2.ebuild | 89 +++++++++++++++++++++++++++++++++
36 sci-mathematics/acl2/acl2-8.4-r1.ebuild | 89 +++++++++++++++++++++++++++++++++
37 2 files changed, 178 insertions(+)
38
39 diff --git a/sci-mathematics/acl2/acl2-8.3-r2.ebuild b/sci-mathematics/acl2/acl2-8.3-r2.ebuild
40 new file mode 100644
41 index 000000000..03cd890b4
42 --- /dev/null
43 +++ b/sci-mathematics/acl2/acl2-8.3-r2.ebuild
44 @@ -0,0 +1,89 @@
45 +# Copyright 1999-2021 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=8
49 +
50 +inherit elisp-common
51 +
52 +DESCRIPTION="Industrial strength theorem prover"
53 +HOMEPAGE="https://www.cs.utexas.edu/users/moore/acl2/"
54 +SRC_URI="https://github.com/acl2/acl2/archive/${PV}/${P}.tar.gz"
55 +
56 +SLOT="0"
57 +LICENSE="BSD"
58 +KEYWORDS="~amd64 ~x86"
59 +IUSE="books doc emacs"
60 +
61 +BDEPEND="
62 + dev-lisp/sbcl
63 + emacs? ( >=app-editors/emacs-23.1:* )
64 +"
65 +DEPEND="
66 + dev-lisp/sbcl:=
67 + books? ( dev-lang/perl )
68 + doc? ( dev-lang/perl )
69 +"
70 +RDEPEND="${DEPEND}"
71 +
72 +PATCHES=( "${FILESDIR}"/${PN}-use_make_variable.patch )
73 +
74 +src_prepare() {
75 + find . -type f -name "*.bak" -delete
76 + find . -type f -name "*.orig" -delete
77 + # Remove sparc binary inadvertently included in upstream
78 + rm books/workshops/2003/schmaltz-al-sammane-et-al/support/acl2link || die
79 + default
80 +}
81 +
82 +src_compile() {
83 + emake LISP="sbcl --noinform --noprint \
84 + --no-sysinit --no-userinit --disable-debugger"
85 +
86 + if use books; then
87 + emake "ACL2=${S}/saved_acl2" basic
88 + fi
89 +
90 + if use doc; then
91 + emake "ACL2=${S}/saved_acl2" DOC
92 + fi
93 +
94 + if use emacs; then
95 + elisp-compile emacs/*.el
96 + fi
97 +}
98 +
99 +src_install() {
100 + local SAVED_NAME=saved_acl2
101 + sed -e "s:${S}:/usr/share/acl2:g" -i ${SAVED_NAME} || die
102 + if use books; then
103 + sed -e "5iexport ACL2_SYSTEM_BOOKS=/usr/share/acl2/books/" \
104 + -i ${SAVED_NAME} || die
105 + fi
106 + dobin ${SAVED_NAME}
107 +
108 + insinto /usr/share/acl2
109 + doins ${SAVED_NAME}.core
110 +
111 + if use books; then
112 + doins -r books
113 + fi
114 +
115 + DOCS=( books/README.md )
116 + if use doc; then
117 + HTML_DOCS=( doc/HTML/. )
118 + fi
119 + einstalldocs
120 +
121 + if use emacs; then
122 + elisp-install ${PN} emacs/*{.el,elc}
123 + doins TAGS
124 + fi
125 +}
126 +
127 +pkg_postinst() {
128 + use emacs && elisp-site-regen
129 +}
130 +
131 +pkg_postrm() {
132 + use emacs && elisp-site-regen
133 +}
134
135 diff --git a/sci-mathematics/acl2/acl2-8.4-r1.ebuild b/sci-mathematics/acl2/acl2-8.4-r1.ebuild
136 new file mode 100644
137 index 000000000..cb1098877
138 --- /dev/null
139 +++ b/sci-mathematics/acl2/acl2-8.4-r1.ebuild
140 @@ -0,0 +1,89 @@
141 +# Copyright 1999-2021 Gentoo Authors
142 +# Distributed under the terms of the GNU General Public License v2
143 +
144 +EAPI=8
145 +
146 +inherit elisp-common
147 +
148 +DESCRIPTION="Industrial strength theorem prover"
149 +HOMEPAGE="https://www.cs.utexas.edu/users/moore/acl2/"
150 +SRC_URI="https://github.com/acl2/acl2/archive/${PV}/${P}.tar.gz"
151 +
152 +SLOT="0"
153 +LICENSE="BSD"
154 +KEYWORDS="~amd64 ~x86"
155 +IUSE="books doc emacs"
156 +
157 +BDEPEND="
158 + >=dev-lisp/sbcl-1.5.2
159 + emacs? ( >=app-editors/emacs-23.1:* )
160 +"
161 +DEPEND="
162 + dev-lisp/sbcl:=
163 + books? ( dev-lang/perl )
164 + doc? ( dev-lang/perl )
165 +"
166 +RDEPEND="${DEPEND}"
167 +
168 +PATCHES=( "${FILESDIR}"/${PN}-use_make_variable.patch )
169 +
170 +src_prepare() {
171 + find . -type f -name "*.bak" -delete
172 + find . -type f -name "*.orig" -delete
173 + # Remove sparc binary inadvertently included in upstream
174 + rm books/workshops/2003/schmaltz-al-sammane-et-al/support/acl2link || die
175 + default
176 +}
177 +
178 +src_compile() {
179 + emake LISP="sbcl --noinform --noprint \
180 + --no-sysinit --no-userinit --disable-debugger"
181 +
182 + if use books; then
183 + emake "ACL2=${S}/saved_acl2" basic
184 + fi
185 +
186 + if use doc; then
187 + emake "ACL2=${S}/saved_acl2" DOC
188 + fi
189 +
190 + if use emacs; then
191 + elisp-compile emacs/*.el
192 + fi
193 +}
194 +
195 +src_install() {
196 + local SAVED_NAME=saved_acl2
197 + sed -e "s:${S}:/usr/share/acl2:g" -i ${SAVED_NAME} || die
198 + if use books; then
199 + sed -e "5iexport ACL2_SYSTEM_BOOKS=/usr/share/acl2/books/" \
200 + -i ${SAVED_NAME} || die
201 + fi
202 + dobin ${SAVED_NAME}
203 +
204 + insinto /usr/share/acl2
205 + doins ${SAVED_NAME}.core
206 +
207 + if use books; then
208 + doins -r books
209 + fi
210 +
211 + DOCS=( books/README.md )
212 + if use doc; then
213 + HTML_DOCS=( doc/HTML/. )
214 + fi
215 + einstalldocs
216 +
217 + if use emacs; then
218 + elisp-install ${PN} emacs/*{.el,elc}
219 + doins TAGS
220 + fi
221 +}
222 +
223 +pkg_postinst() {
224 + use emacs && elisp-site-regen
225 +}
226 +
227 +pkg_postrm() {
228 + use emacs && elisp-site-regen
229 +}