1 |
commit: a6f6f061395b002f7612771fb0cc50e0280e91a8 |
2 |
Author: Maciej Barć <xgqt <AT> protonmail <DOT> com> |
3 |
AuthorDate: Mon Feb 1 01:57:55 2021 +0000 |
4 |
Commit: Maciej Barć <xgqt <AT> protonmail <DOT> com> |
5 |
CommitDate: Mon Feb 1 03:41:52 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a6f6f061 |
7 |
|
8 |
dev-scheme/gerbil: new pkg; add version 0.16 and 9999 |
9 |
|
10 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
11 |
Signed-off-by: Maciej Barć <xgqt <AT> protonmail.com> |
12 |
|
13 |
dev-scheme/gerbil/Manifest | 1 + |
14 |
dev-scheme/gerbil/files/gerbil_home.sh | 6 ++ |
15 |
dev-scheme/gerbil/gerbil-0.16.ebuild | 112 +++++++++++++++++++++++++++++++ |
16 |
dev-scheme/gerbil/gerbil-9999.ebuild | 119 +++++++++++++++++++++++++++++++++ |
17 |
dev-scheme/gerbil/metadata.xml | 34 ++++++++++ |
18 |
5 files changed, 272 insertions(+) |
19 |
|
20 |
diff --git a/dev-scheme/gerbil/Manifest b/dev-scheme/gerbil/Manifest |
21 |
new file mode 100644 |
22 |
index 00000000..d1147d68 |
23 |
--- /dev/null |
24 |
+++ b/dev-scheme/gerbil/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST gerbil-0.16.tar.gz 1715765 BLAKE2B 74cd501b19c8f124f9478c73080e92c2ba0bf92e8cb9faa4cba492b2def8a61633897b67def4200e53962ccf22287f58cf7fdd33604104acc80bde12dd58b07c SHA512 46782b4b71a3b437501b825f2f164e53b285d3a4cdba8f04485edaaa589d8500535c06a47a1464fc537ab7546413dde37c8d6a16a5e076a99ccf255905ed105d |
27 |
|
28 |
diff --git a/dev-scheme/gerbil/files/gerbil_home.sh b/dev-scheme/gerbil/files/gerbil_home.sh |
29 |
new file mode 100644 |
30 |
index 00000000..8e695985 |
31 |
--- /dev/null |
32 |
+++ b/dev-scheme/gerbil/files/gerbil_home.sh |
33 |
@@ -0,0 +1,6 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+ |
38 |
+GERBIL_HOME="${EPREFIX}/usr/share/gerbil" |
39 |
+export GERBIL_HOME |
40 |
|
41 |
diff --git a/dev-scheme/gerbil/gerbil-0.16.ebuild b/dev-scheme/gerbil/gerbil-0.16.ebuild |
42 |
new file mode 100644 |
43 |
index 00000000..b5ddf8a9 |
44 |
--- /dev/null |
45 |
+++ b/dev-scheme/gerbil/gerbil-0.16.ebuild |
46 |
@@ -0,0 +1,112 @@ |
47 |
+# Copyright 1999-2021 Gentoo Authors |
48 |
+# Distributed under the terms of the GNU General Public License v2 |
49 |
+ |
50 |
+EAPI=7 |
51 |
+ |
52 |
+inherit elisp-common toolchain-funcs wrapper |
53 |
+ |
54 |
+DESCRIPTION="Dialect of Scheme designed for Systems Programming" |
55 |
+HOMEPAGE=" |
56 |
+ https://cons.io/ |
57 |
+ https://github.com/vyzo/gerbil |
58 |
+" |
59 |
+ |
60 |
+if [[ "${PV}" == *9999* ]]; then |
61 |
+ inherit git-r3 |
62 |
+ EGIT_REPO_URI="https://github.com/vyzo/${PN}.git" |
63 |
+else |
64 |
+ SRC_URI="https://github.com/vyzo/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
65 |
+ KEYWORDS="~amd64" |
66 |
+fi |
67 |
+ |
68 |
+LICENSE="Apache-2.0 LGPL-2.1" |
69 |
+SLOT="0" |
70 |
+IUSE="emacs leveldb lmdb mysql +sqlite +xml yaml +zlib" |
71 |
+ |
72 |
+BDEPEND=" |
73 |
+ emacs? ( >=app-editors/emacs-23.1:* ) |
74 |
+" |
75 |
+DEPEND=" |
76 |
+ dev-scheme/gambit |
77 |
+ leveldb? ( dev-libs/leveldb ) |
78 |
+ lmdb? ( dev-db/lmdb ) |
79 |
+ mysql? ( dev-db/mariadb:* ) |
80 |
+ sqlite? ( dev-db/sqlite ) |
81 |
+ xml? ( dev-libs/libxml2 ) |
82 |
+ yaml? ( dev-libs/libyaml ) |
83 |
+ zlib? ( sys-libs/zlib ) |
84 |
+" |
85 |
+RDEPEND="${DEPEND}" |
86 |
+ |
87 |
+S="${WORKDIR}/${P}/src" |
88 |
+ |
89 |
+src_configure() { |
90 |
+ # Just to be safe, because './configure --help' says: |
91 |
+ # "Set default GERBIL_HOME (environment variable still overrides)" |
92 |
+ unset GERBIL_HOME |
93 |
+ |
94 |
+ local myconf=( |
95 |
+ $(use_enable leveldb) |
96 |
+ $(use_enable lmdb) |
97 |
+ $(use_enable mysql) |
98 |
+ $(use_enable xml libxml) |
99 |
+ $(use_enable yaml libyaml) |
100 |
+ $(usex sqlite '' '--disable-sqlite') |
101 |
+ $(usex zlib '' '--disable-zlib') |
102 |
+ --prefix="${D}/usr/share/${PN}" |
103 |
+ ) |
104 |
+ # This is not a standard 'configure' script! |
105 |
+ gsi ./configure "${myconf[@]}" \ |
106 |
+ || die "Failed to configure using the 'configure' script" |
107 |
+} |
108 |
+ |
109 |
+src_compile() { |
110 |
+ # The 'build.sh' script uses environment variables that are exported |
111 |
+ # by portage, ie.: CFLAGS, LDFLAGS, ... |
112 |
+ sh ./build.sh \ |
113 |
+ || die "Failed to compile using the 'build.sh' script" |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ mkdir -p "${D}/usr/share/${PN}" \ |
118 |
+ || die "Failed to make ${D}/usr/share/${PN} directory" |
119 |
+ gsi ./install \ |
120 |
+ || die "Failed to install using the 'install' script" |
121 |
+ |
122 |
+ sed -i "s|${D}|${EPREFIX}|g" "${D}/usr/share/${PN}/bin/gxc" \ |
123 |
+ || die "Failed to fix the 'gxc' executable script" |
124 |
+ |
125 |
+ mv "${D}/usr/share/${PN}/share/emacs" "${D}/usr/share/emacs" \ |
126 |
+ || die "Failed to fix '/usr/share/emacs' install path" |
127 |
+ mv "${D}/usr/share/${PN}/share/${PN}/TAGS" "${D}/usr/share/${PN}/TAGS" \ |
128 |
+ || die "Failed to fix '/usr/share/gerbil/TAGS' install path" |
129 |
+ |
130 |
+ # Compile the 'gerbil-mode.el' |
131 |
+ # FIXME: Doesn't autoload |
132 |
+ if use emacs; then |
133 |
+ pushd "${D}/usr/share/emacs/site-lisp/gerbil" || die |
134 |
+ elisp-compile *.el || die |
135 |
+ popd || die |
136 |
+ fi |
137 |
+ |
138 |
+ # Create wrappers for gerbil executables in GERBIL_HOME (/usr/share/gerbil) |
139 |
+ pushd "${D}/usr/share/${PN}/bin" || die |
140 |
+ local gx_bin |
141 |
+ for gx_bin in *; do |
142 |
+ make_wrapper "${gx_bin}" "env GERBIL_HOME=\"${EPREFIX}/usr/share/${PN}\" ${EPREFIX}/usr/share/${PN}/bin/${gx_bin}" |
143 |
+ done |
144 |
+ popd || die |
145 |
+ |
146 |
+ # Without this the programs compiled with gxc will break! |
147 |
+ # FIXME: Patch gerbil to compile with te correct 'GERBIL_HOME'? |
148 |
+ insinto "/etc/profile.d" |
149 |
+ doins "${FILESDIR}/gerbil_home.sh" |
150 |
+} |
151 |
+ |
152 |
+pkg_postinst() { |
153 |
+ use emacs && elisp-site-regen |
154 |
+} |
155 |
+ |
156 |
+pkg_postrm() { |
157 |
+ use emacs && elisp-site-regen |
158 |
+} |
159 |
|
160 |
diff --git a/dev-scheme/gerbil/gerbil-9999.ebuild b/dev-scheme/gerbil/gerbil-9999.ebuild |
161 |
new file mode 100644 |
162 |
index 00000000..831c6b68 |
163 |
--- /dev/null |
164 |
+++ b/dev-scheme/gerbil/gerbil-9999.ebuild |
165 |
@@ -0,0 +1,119 @@ |
166 |
+# Copyright 1999-2021 Gentoo Authors |
167 |
+# Distributed under the terms of the GNU General Public License v2 |
168 |
+ |
169 |
+EAPI=7 |
170 |
+ |
171 |
+inherit elisp-common toolchain-funcs wrapper |
172 |
+ |
173 |
+DESCRIPTION="Dialect of Scheme designed for Systems Programming" |
174 |
+HOMEPAGE=" |
175 |
+ https://cons.io/ |
176 |
+ https://github.com/vyzo/gerbil |
177 |
+" |
178 |
+ |
179 |
+if [[ "${PV}" == *9999* ]]; then |
180 |
+ inherit git-r3 |
181 |
+ EGIT_REPO_URI="https://github.com/vyzo/${PN}.git" |
182 |
+else |
183 |
+ SRC_URI="https://github.com/vyzo/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
184 |
+ KEYWORDS="~amd64" |
185 |
+fi |
186 |
+ |
187 |
+LICENSE="Apache-2.0 LGPL-2.1" |
188 |
+SLOT="0" |
189 |
+IUSE="emacs leveldb lmdb mysql +sqlite +xml yaml +zlib" |
190 |
+ |
191 |
+BDEPEND=" |
192 |
+ emacs? ( >=app-editors/emacs-23.1:* ) |
193 |
+" |
194 |
+DEPEND=" |
195 |
+ dev-scheme/gambit |
196 |
+ leveldb? ( dev-libs/leveldb ) |
197 |
+ lmdb? ( dev-db/lmdb ) |
198 |
+ mysql? ( dev-db/mariadb:* ) |
199 |
+ sqlite? ( dev-db/sqlite ) |
200 |
+ xml? ( dev-libs/libxml2 ) |
201 |
+ yaml? ( dev-libs/libyaml ) |
202 |
+ zlib? ( sys-libs/zlib ) |
203 |
+" |
204 |
+RDEPEND="${DEPEND}" |
205 |
+ |
206 |
+S="${WORKDIR}/${P}/src" |
207 |
+ |
208 |
+src_prepare() { |
209 |
+ default |
210 |
+ |
211 |
+ sed -i "s|gcc|$(tc-getCC)|g" ./build.sh || die "Failed to fix CC setting" |
212 |
+ sed -i "s|-O2|${CFLAGS}|g" ./build.sh || die "Failed to fix CFLAGS setting" |
213 |
+} |
214 |
+ |
215 |
+src_configure() { |
216 |
+ # Just to be safe, because './configure --help' says: |
217 |
+ # "Set default GERBIL_HOME (environment variable still overrides)" |
218 |
+ unset GERBIL_HOME |
219 |
+ |
220 |
+ local myconf=( |
221 |
+ $(use_enable leveldb) |
222 |
+ $(use_enable lmdb) |
223 |
+ $(use_enable mysql) |
224 |
+ $(use_enable xml libxml) |
225 |
+ $(use_enable yaml libyaml) |
226 |
+ $(usex sqlite '' '--disable-sqlite') |
227 |
+ $(usex zlib '' '--disable-zlib') |
228 |
+ --prefix="${D}/usr/share/${PN}" |
229 |
+ ) |
230 |
+ # This is not a standard 'configure' script! |
231 |
+ gsi ./configure "${myconf[@]}" \ |
232 |
+ || die "Failed to configure using the 'configure' script" |
233 |
+} |
234 |
+ |
235 |
+src_compile() { |
236 |
+ # The 'build.sh' script uses environment variables that are exported |
237 |
+ # by portage, ie.: CFLAGS, LDFLAGS, ... |
238 |
+ sh ./build.sh \ |
239 |
+ || die "Failed to compile using the 'build.sh' script" |
240 |
+} |
241 |
+ |
242 |
+src_install() { |
243 |
+ mkdir -p "${D}/usr/share/${PN}" \ |
244 |
+ || die "Failed to make ${D}/usr/share/${PN} directory" |
245 |
+ gsi ./install \ |
246 |
+ || die "Failed to install using the 'install' script" |
247 |
+ |
248 |
+ sed -i "s|${D}|${EPREFIX}|g" "${D}/usr/share/${PN}/bin/gxc" \ |
249 |
+ || die "Failed to fix the 'gxc' executable script" |
250 |
+ |
251 |
+ mv "${D}/usr/share/${PN}/share/emacs" "${D}/usr/share/emacs" \ |
252 |
+ || die "Failed to fix '/usr/share/emacs' install path" |
253 |
+ mv "${D}/usr/share/${PN}/share/${PN}/TAGS" "${D}/usr/share/${PN}/TAGS" \ |
254 |
+ || die "Failed to fix '/usr/share/gerbil/TAGS' install path" |
255 |
+ |
256 |
+ # Compile the 'gerbil-mode.el' |
257 |
+ # FIXME: Doesn't autoload |
258 |
+ if use emacs; then |
259 |
+ pushd "${D}/usr/share/emacs/site-lisp/gerbil" || die |
260 |
+ elisp-compile *.el || die |
261 |
+ popd || die |
262 |
+ fi |
263 |
+ |
264 |
+ # Create wrappers for gerbil executables in GERBIL_HOME (/usr/share/gerbil) |
265 |
+ pushd "${D}/usr/share/${PN}/bin" || die |
266 |
+ local gx_bin |
267 |
+ for gx_bin in *; do |
268 |
+ make_wrapper "${gx_bin}" "env GERBIL_HOME=\"${EPREFIX}/usr/share/${PN}\" ${EPREFIX}/usr/share/${PN}/bin/${gx_bin}" |
269 |
+ done |
270 |
+ popd || die |
271 |
+ |
272 |
+ # Without this the programs compiled with gxc will break! |
273 |
+ # FIXME: Patch gerbil to compile with te correct 'GERBIL_HOME'? |
274 |
+ insinto "/etc/profile.d" |
275 |
+ doins "${FILESDIR}/gerbil_home.sh" |
276 |
+} |
277 |
+ |
278 |
+pkg_postinst() { |
279 |
+ use emacs && elisp-site-regen |
280 |
+} |
281 |
+ |
282 |
+pkg_postrm() { |
283 |
+ use emacs && elisp-site-regen |
284 |
+} |
285 |
|
286 |
diff --git a/dev-scheme/gerbil/metadata.xml b/dev-scheme/gerbil/metadata.xml |
287 |
new file mode 100644 |
288 |
index 00000000..6f63dff0 |
289 |
--- /dev/null |
290 |
+++ b/dev-scheme/gerbil/metadata.xml |
291 |
@@ -0,0 +1,34 @@ |
292 |
+<?xml version="1.0" encoding="UTF-8"?> |
293 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
294 |
+<pkgmetadata> |
295 |
+ <maintainer type="person"> |
296 |
+ <email>xgqt@××××××××××.com</email> |
297 |
+ <name>Maciej Barć</name> |
298 |
+ </maintainer> |
299 |
+ <use> |
300 |
+ <flag name="leveldb"> |
301 |
+ Add support for using dev-libs/leveldb |
302 |
+ </flag> |
303 |
+ <flag name="lmdb"> |
304 |
+ Add support for using dev-db/lmdb |
305 |
+ </flag> |
306 |
+ <flag name="yaml"> |
307 |
+ Add support for yaml file format |
308 |
+ </flag> |
309 |
+ </use> |
310 |
+ <longdescription lang="en"> |
311 |
+ Gerbil is an opinionated dialect of Scheme designed |
312 |
+ for Systems Programming, with a state of the art macro |
313 |
+ and module system on top of the Gambit runtime. |
314 |
+ The macro system is based on quote-syntax, and provides |
315 |
+ the full meta-syntactic tower with a native implementation |
316 |
+ of syntax-case. It also provides a full-blown module system, |
317 |
+ similar to PLT Scheme’s (Racket) modules. The main difference |
318 |
+ from Racket is that Gerbil modules are single instantiation, |
319 |
+ supporting high performance ahead of time compilation |
320 |
+ and compiled macros. |
321 |
+ </longdescription> |
322 |
+ <upstream> |
323 |
+ <remote-id type="github">vyzo/gerbil</remote-id> |
324 |
+ </upstream> |
325 |
+</pkgmetadata> |