Gentoo Archives: gentoo-commits

From: Erik Falor <ewfalor@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/lisp:master commit in: dev-scheme/chibi-scheme/
Date: Tue, 01 Jul 2014 03:46:19
Message-Id: 1404186564.856fccb34deb24e0949292120d948e451c57b4c5.erik_falor@gentoo
1 commit: 856fccb34deb24e0949292120d948e451c57b4c5
2 Author: Erik Falor <ewfalor <AT> gmail <DOT> com>
3 AuthorDate: Tue Jul 1 03:49:24 2014 +0000
4 Commit: Erik Falor <ewfalor <AT> gmail <DOT> com>
5 CommitDate: Tue Jul 1 03:49:24 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=856fccb3
7
8 dev-scheme/chibi-scheme: bump to version 0.7
9
10 ---
11 dev-scheme/chibi-scheme/chibi-scheme-0.7.ebuild | 68 +++++++++++++++++++++++++
12 1 file changed, 68 insertions(+)
13
14 diff --git a/dev-scheme/chibi-scheme/chibi-scheme-0.7.ebuild b/dev-scheme/chibi-scheme/chibi-scheme-0.7.ebuild
15 new file mode 100644
16 index 0000000..fac4290
17 --- /dev/null
18 +++ b/dev-scheme/chibi-scheme/chibi-scheme-0.7.ebuild
19 @@ -0,0 +1,68 @@
20 +# Copyright 1999-2014 Gentoo Foundation
21 +# Distributed under the terms of the GNU General Public License v2
22 +# $Header: $
23 +
24 +EAPI=5
25 +
26 +DESCRIPTION="A very tiny Scheme implementation with decent speed and native hygienic macros."
27 +SRC_URI="http://abrek.synthcode.com/${P}.tgz"
28 +HOMEPAGE="http://synthcode.com/scheme/"
29 +
30 +LICENSE="BSD"
31 +SLOT="0"
32 +KEYWORDS="~amd64 ~x86"
33 +IUSE="boehm-gc"
34 +
35 +DEPEND="boehm-gc? ( dev-libs/boehm-gc )"
36 +RDEPEND="${DEPEND}"
37 +
38 +export EXTRA_EMAKE+="PREFIX=/usr $(use boehm-gc && echo SEXP_USE_BOEHM=1)"
39 +
40 +src_prepare() {
41 + # Upstream uses a D variable in its Makefile which conflicts with
42 + # the variable predifined by ebuild D="${PORTAGE_BUILDDIR}/image"
43 + sed 's,\([^[:alpha:]]\)D\([^[:alpha:]]\),\1chibiD\2,' -i Makefile \
44 + || die "sed Makefile failed"
45 +
46 + # Upstream calls ldconfig in the install target, which goes outside
47 + # of the ebuild Sandbox. We'll call ldconfig ourselves after merging
48 + # the package.
49 + sed '/ldconfig/d' -i Makefile \
50 + || die "sed Makefile failed"
51 +
52 + # Incorporate local system's LDFLAGS into the chibi-scheme executable
53 + sed 's/$(CC) $(XCPPFLAGS) $(XCFLAGS) -o $@ $< -L. -lchibi-scheme/& $(LDFLAGS)/' -i Makefile \
54 + || die "sed Makefile failed"
55 +
56 + # Incorporate local system's LDFLAGS into the chibi-scheme executable
57 + sed 's/$(CC) $(XCPPFLAGS) $(XCFLAGS) -o $@ $< -L. -lchibi-scheme/& $(LDFLAGS)/' -i Makefile \
58 + || die "sed Makefile failed"
59 +
60 + # Set SONAME in libchibi-scheme.so
61 + sed '/^libchibi-scheme/{ n; s/$(CC) $(CLIBFLAGS) -o $@ $^ $(XLDFLAGS)/& -Wl,-soname,libchibi-scheme.so/}' -i Makefile \
62 + || die "sed Makefile failed"
63 +
64 + # Incorporate local system's LDFLAGS into Chibi's compiled modules
65 + sed 's/$(CC) $(CLIBFLAGS) $(XCPPFLAGS) $(XCFLAGS) -o $@ $< -L. $(XLIBS) -lchibi-scheme/& $(LDFLAGS)/' -i Makefile.libs \
66 + || die "sed Makefile.libs failed"
67 +
68 + # Force soname symlinks to be relative to installation directory
69 + sed 's/$(LN) -s -f /$(LN) -s -f -r /' -i Makefile \
70 + || die "sed Makefile failed"
71 +
72 +}
73 +
74 +# When the number of jobs > 1, the Makefile lets things get ahead of themselves
75 +# and sometimes later targets will fail because libchibi-scheme.so doesn't yet
76 +# exist.
77 +src_compile() {
78 + emake -j1
79 +}
80 +
81 +src_test() {
82 + LD_LIBRARY_PATH="${S}" emake test
83 +}
84 +
85 +src_install() {
86 + emake DESTDIR="${D}" ${EXTRA_EMAKE} install
87 +}