1 |
commit: d0b7028da122660de6ad71010485af125e3ff1dc |
2 |
Author: Panagiotis Christopoulos (pchrist) <pchrist <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 28 00:35:37 2013 +0000 |
4 |
Commit: Panagiotis Christopoulos <pchrist <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 28 00:35:37 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=d0b7028d |
7 |
|
8 |
gambit-4.6.6-r2.ebuild: work in progress for bumping to 4.6.6 in the main tree |
9 |
|
10 |
--- |
11 |
dev-scheme/gambit/gambit-4.6.6-r2.ebuild | 98 ++++++++++++++++++++++++++++++ |
12 |
dev-scheme/gambit/metadata.xml | 3 + |
13 |
2 files changed, 101 insertions(+), 0 deletions(-) |
14 |
|
15 |
diff --git a/dev-scheme/gambit/gambit-4.6.6-r2.ebuild b/dev-scheme/gambit/gambit-4.6.6-r2.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..f4bfe68 |
18 |
--- /dev/null |
19 |
+++ b/dev-scheme/gambit/gambit-4.6.6-r2.ebuild |
20 |
@@ -0,0 +1,98 @@ |
21 |
+# Copyright 1999-2012 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Header: $ |
24 |
+ |
25 |
+EAPI="4" |
26 |
+ |
27 |
+inherit eutils elisp-common |
28 |
+ |
29 |
+MY_PN=gambc |
30 |
+MY_PV=${PV//./_} |
31 |
+MY_P=${MY_PN}-v${MY_PV} |
32 |
+ |
33 |
+DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter." |
34 |
+HOMEPAGE="http://www.iro.umontreal.ca/~gambit/" |
35 |
+SRC_URI="http://www.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz" |
36 |
+ |
37 |
+LICENSE="|| ( Apache-2.0 LGPL-2.1 )" |
38 |
+SLOT="0" |
39 |
+#KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos" |
40 |
+KEYWORDS="" |
41 |
+ |
42 |
+DEPEND="emacs? ( virtual/emacs ) |
43 |
+ doc? ( sys-apps/texinfo )" |
44 |
+RDEPEND="" |
45 |
+ |
46 |
+SITEFILE="50gambit-gentoo.el" |
47 |
+ |
48 |
+S=${WORKDIR}/${MY_P} #-devel |
49 |
+ |
50 |
+IUSE="emacs static gbootstrap debug noopts doc" |
51 |
+ |
52 |
+# 13Nov12 pchrist |
53 |
+# To check before this hits the tree: |
54 |
+# 1. what bootstrap target actually does |
55 |
+# 2. whether gboostrap use flag is ok to be used as local use flag |
56 |
+# 3. Doc, what is going on there, what if latex is not installed, |
57 |
+# what if pdf2ps is not installed etc. |
58 |
+# 4. more testing on configure flags |
59 |
+# 5. there is -O1 optimization flag, probably disables user's CFLAGS , bad |
60 |
+# 6. check if emacs configuration is correct |
61 |
+ |
62 |
+src_configure() { |
63 |
+ #echo "------"; |
64 |
+ #echo $USE; |
65 |
+ #echo "------"; |
66 |
+ #die; |
67 |
+ local t=$(tc-getCC); |
68 |
+ local tt="${t##*-}" |
69 |
+ [[ "${tt}" == "gcc" ]] && echo yes || echo no |
70 |
+ econf \ |
71 |
+ $(use_enable !static shared) \ |
72 |
+ $(use_enable debug) \ |
73 |
+ $(use_enable debug profile) \ |
74 |
+ $(use_enable debug coverage) \ |
75 |
+ $([[ "${tt}" == "gcc" ]] \ |
76 |
+ && use !noopts \ |
77 |
+ && echo \ |
78 |
+ "--enable-gcc-opts \ |
79 |
+ --enable-c-opt" \ |
80 |
+ || echo \ |
81 |
+ "--disable-gcc-opts \ |
82 |
+ --disable-c-opt") \ |
83 |
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
84 |
+ --enable-single-host \ |
85 |
+ --disable-absolute-shared-libs |
86 |
+} |
87 |
+ |
88 |
+src_compile() { |
89 |
+ #emake bootstrap || die |
90 |
+ |
91 |
+ if use gbootstrap; then |
92 |
+ einfo "Starting bootstrap..." |
93 |
+ emake bootstrap || die "emake bootstrap failed" |
94 |
+ einfo "Cleaning..." |
95 |
+ emake bootclean || die "emake bootclean failed" |
96 |
+ einfo "Compiling in normal mode." |
97 |
+ emake || die "emake failed the second time" |
98 |
+ else |
99 |
+ einfo "Compiling in normal mode." |
100 |
+ emake || die "emake failed" |
101 |
+ fi |
102 |
+ |
103 |
+ if use emacs; then |
104 |
+ elisp-compile misc/*.el || die "failed to compile elisp files" |
105 |
+ fi |
106 |
+} |
107 |
+ |
108 |
+src_install() { |
109 |
+ emake DESTDIR="${D}" install || die "emake install failed" |
110 |
+} |
111 |
+ |
112 |
+pkg_postinst() { |
113 |
+ use emacs && elisp-site-regen |
114 |
+} |
115 |
+ |
116 |
+pkg_postrm() { |
117 |
+ use emacs && elisp-site-regen |
118 |
+} |
119 |
|
120 |
diff --git a/dev-scheme/gambit/metadata.xml b/dev-scheme/gambit/metadata.xml |
121 |
index 136fb59..b7d9243 100644 |
122 |
--- a/dev-scheme/gambit/metadata.xml |
123 |
+++ b/dev-scheme/gambit/metadata.xml |
124 |
@@ -5,4 +5,7 @@ |
125 |
<use> |
126 |
<flag name='gbootstrap'>Rebuild some C sources</flag> |
127 |
</use> |
128 |
+<use> |
129 |
+ <flag name='noopts'>Disable upstream's optimizations</flag> |
130 |
+</use> |
131 |
</pkgmetadata> |