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/, sci-mathematics/acl2/files/
Date: Sun, 12 Sep 2021 07:38:04
Message-Id: 1631432251.a9a6dc87759ff69f93105d2b85b5cd90755380e5.andrewammerlaan@gentoo
1 commit: a9a6dc87759ff69f93105d2b85b5cd90755380e5
2 Author: Lucas Mitrak <lucas <AT> lucasmitrak <DOT> com>
3 AuthorDate: Mon Aug 9 03:09:54 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 12 07:37:31 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=a9a6dc87
7
8 sci-mathematics/acl2: fix TAGS install, add emacs/doc flags, etc
9
10 * version bump
11 * EAPI bump
12 * Remove eutils because it is no longer necessary and deprecated
13 * inherit elisp-common for compiling/installing emacs files
14 * Add emacs use flag for emacs files and TAGS file
15 * Add app-editor/emacs to BDEPEND if its needed during compilation
16 * Add doc use flag for compiling and installing html docs
17 * Add dev-lang/perl as a DEPEND for doc
18 * Change SRC_URI to upstream and updated github
19 * Update metadata.xml to this new SRC_URI
20 * Add patch which changes `make` to $(MAKE) in GNUmakefile for Q/A
21 * Add src_prepare which deletes *.bak, *.orig, and sparc binary acl2link
22 * Remove `emake certify-books` because certify-books no longer exists
23 * Add `emake basic` because it is the one which is the default [1]
24 * emake basic is much faster so the einfos are removed
25 * Add `emake DOC` to compilation phase if DOC use flag is enabled
26 * Add `elisp-compile` to compilation phase if emacs use flag is enabled
27 * Install README.md always and html docs if doc use flag is enabled
28 * Install emacs files and TAGS file is emacs use flag is enabled
29 * Add `use emacs && elisp-site-regen` to postinst() and postrm() phases
30
31 Currently, sci-mathematics/acl2 will not always install successfully.
32 This is because the TAGS file is only created if the etags program is
33 installed. The etags program is installed when emacs is
34 installed. Therefore, an emacs use flag is added so the TAGS file is
35 installed only when it is enabled. Since app-editors/emacs is required
36 for the CBUILD, the dependency is added to the BDEPEND. In order to
37 compile/install emacs files, the elisp-common eclass is inherited.
38 This compilation and installation only takes place if the emacs use
39 flag is enabled. The `elisp-site-regen` is added to pkg_postinst() and
40 pkg_postrm() with the requirement of the emacs use flag being enabled.
41 If the doc flag is enabled, then `emake DOC` is executed and the html
42 docs are installed; however, the README.md is always installed. Since
43 dev-lang/perl is needed for this compilation, it is added as a
44 conditional requirement. If the books use flag is enabled, then the
45 books will be compiled using `emake basic`. The reason `emake basic`
46 was chosen instead of `emake regression` is because the latter is
47 stated as being "usually unnecessary" [1] and that "most users will not
48 want to use this target" [2] while the former is the default [1]
49 and stated as "a convenient starting place" [3]. Every book is made
50 before for major releases, so it is unecessary to to build all for an
51 install. Since the compilation of the books is much faster, the einfo
52 messages are removed. In addition, the SRC_URI for the previous ebuild
53 is behind in commits [4] and is simply a clone. Therefore, the main
54 github repo replaced it. The metadata is updated to this change also.
55 A src_prepare phase was added which copies debian's Changelog of this
56 package [5]. The entry on 2015-10-21 of this Changelog shows that
57 the *.bak and *.orig files were removed to clean the target. Also,
58 the inadvertent sparc binary acl2link was removed. This sparc binary
59 lacks source code and therefore violates the GNU GPL. Debian filed a
60 bug about this binary and the solution was to delete it [6].
61 A patch is added so a Q/A warning is not given: "make[1]: warning:
62 jobserver unavailable: using -j1. Add '+' to parent make rule".
63 The patch changes a make command to use the variable $(MAKE). This
64 patch will be made available upstream via a github pull request.
65 Finally, eutils is removed due to being depreciated and the EAPI is
66 bumped.
67
68 [1] https://www.cs.utexas.edu/users/moore/acl2/v8-3/combined-manual/
69 index.html?topic=ACL2____BOOKS-CERTIFICATION
70 [2] https://github.com/acl2/acl2/blob/8.3/books/GNUmakefile#L61
71 [3] https://github.com/acl2/acl2/blob/8.3/books/GNUmakefile#L48
72 [4] https://github.com/acl2-devel/acl2-devel
73 [5] https://debian.pkgs.org/9/debian-main-arm64/
74 acl2_7.2dfsg-3_arm64.deb.html
75 [6] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787368
76
77 Closes: https://bugs.gentoo.org/755368
78 Package-Manager: Portage-3.0.20, Repoman-3.0.2
79 Signed-off-by: Lucas Mitrak <lucas <AT> lucasmitrak.com>
80 Closes: https://github.com/gentoo/sci/pull/1109
81 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
82
83 sci-mathematics/acl2/acl2-8.4.ebuild | 86 ++++++++++++++++++++++
84 .../acl2/files/acl2-use_make_variable.patch | 13 ++++
85 sci-mathematics/acl2/metadata.xml | 2 +-
86 3 files changed, 100 insertions(+), 1 deletion(-)
87
88 diff --git a/sci-mathematics/acl2/acl2-8.4.ebuild b/sci-mathematics/acl2/acl2-8.4.ebuild
89 new file mode 100644
90 index 000000000..d0bb4eade
91 --- /dev/null
92 +++ b/sci-mathematics/acl2/acl2-8.4.ebuild
93 @@ -0,0 +1,86 @@
94 +# Copyright 1999-2021 Gentoo Authors
95 +# Distributed under the terms of the GNU General Public License v2
96 +
97 +EAPI=8
98 +
99 +inherit elisp-common
100 +
101 +DESCRIPTION="Industrial strength theorem prover"
102 +HOMEPAGE="https://www.cs.utexas.edu/users/moore/acl2/"
103 +SRC_URI="https://github.com/acl2/acl2/archive/${PV}/${P}.tar.gz"
104 +
105 +SLOT="0"
106 +LICENSE="BSD"
107 +KEYWORDS="~amd64 ~x86"
108 +IUSE="books doc emacs"
109 +
110 +BDEPEND="
111 + dev-lisp/sbcl
112 + emacs? ( >=app-editors/emacs-23.1:* )
113 +"
114 +DEPEND="
115 + dev-lisp/sbcl:=
116 + books? ( dev-lang/perl )
117 + doc? ( dev-lang/perl )
118 +"
119 +RDEPEND="${DEPEND}"
120 +
121 +PATCHES=( "${FILESDIR}"/${PN}-use_make_variable.patch )
122 +
123 +src_prepare() {
124 + find . -type f -name "*.bak" -delete
125 + find . -type f -name "*.orig" -delete
126 + # Remove sparc binary inadvertently included in upstream
127 + rm books/workshops/2003/schmaltz-al-sammane-et-al/support/acl2link || die
128 + default
129 +}
130 +
131 +src_compile() {
132 + emake LISP="sbcl --noinform --noprint \
133 + --no-sysinit --no-userinit --disable-debugger"
134 +
135 + if use books; then
136 + emake "ACL2=${S}/saved_acl2" basic
137 + fi
138 +
139 + if use doc; then
140 + emake "ACL2=${S}/saved_acl2" DOC
141 + fi
142 +
143 + if use emacs; then
144 + elisp-compile emacs/*.el
145 + fi
146 +}
147 +
148 +src_install() {
149 + local SAVED_NAME=saved_acl2
150 + sed -e "s:${S}:/usr/share/acl2:g" -i ${SAVED_NAME} || die
151 + dobin ${SAVED_NAME}
152 +
153 + insinto /usr/share/acl2
154 + doins ${SAVED_NAME}.core
155 + if use books; then
156 + sed -e "/5/a export ACL2_SYSTEM_BOOKS=/usr/share/acl2/books/" \
157 + -i ${SAVED_NAME} || die
158 + doins -r books
159 + fi
160 +
161 + DOCS=( books/README.md )
162 + if use doc; then
163 + HTML_DOCS=( doc/HTML/. )
164 + fi
165 + einstalldocs
166 +
167 + if use emacs; then
168 + elisp-install ${PN} emacs/*{.el,elc}
169 + doins TAGS
170 + fi
171 +}
172 +
173 +pkg_postinst() {
174 + use emacs && elisp-site-regen
175 +}
176 +
177 +pkg_postrm() {
178 + use emacs && elisp-site-regen
179 +}
180
181 diff --git a/sci-mathematics/acl2/files/acl2-use_make_variable.patch b/sci-mathematics/acl2/files/acl2-use_make_variable.patch
182 new file mode 100644
183 index 000000000..32e0f05da
184 --- /dev/null
185 +++ b/sci-mathematics/acl2/files/acl2-use_make_variable.patch
186 @@ -0,0 +1,13 @@
187 +use make variable to avoid QA issue: "make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule"
188 +
189 +--- a/GNUmakefile
190 ++++ b/GNUmakefile
191 +@@ -576,7 +576,7 @@ doc/home-page.html: doc/home-page.lisp
192 + # xdoc::save that populates doc/manual/ (not under books/).
193 + acl2-manual: check-books
194 + rm -rf doc/manual books/system/doc/acl2-manual.cert
195 +- cd books ; make USE_QUICKLISP=1 system/doc/acl2-manual.cert
196 ++ cd books ; $(MAKE) USE_QUICKLISP=1 system/doc/acl2-manual.cert
197 + rm -rf doc/manual/download/*
198 +
199 + # WARNING: The dependency list just below isn't complete, since it
200
201 diff --git a/sci-mathematics/acl2/metadata.xml b/sci-mathematics/acl2/metadata.xml
202 index 6035ff684..b3d826757 100644
203 --- a/sci-mathematics/acl2/metadata.xml
204 +++ b/sci-mathematics/acl2/metadata.xml
205 @@ -20,6 +20,6 @@
206 <flag name="books">build community books, the canonical collection of open-source libraries</flag>
207 </use>
208 <upstream>
209 - <remote-id type="github">acl2-devel/acl2-devel</remote-id>
210 + <remote-id type="github">acl2/acl2</remote-id>
211 </upstream>
212 </pkgmetadata>