Gentoo Archives: gentoo-commits

From: Cyprien Nicolas <c.nicolas+gentoo@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/lisp:master commit in: dev-scheme/bigloo/
Date: Wed, 31 Oct 2012 16:55:54
Message-Id: 1351702526.a3b591e7eb2bbdedd4e380e33fe88b56cedb30c5.fulax@gentoo
1 commit: a3b591e7eb2bbdedd4e380e33fe88b56cedb30c5
2 Author: Cyprien Nicolas (fulax) <c.nicolas+gentoo <AT> gmail <DOT> com>
3 AuthorDate: Wed Oct 31 16:55:26 2012 +0000
4 Commit: Cyprien Nicolas <c.nicolas+gentoo <AT> gmail <DOT> com>
5 CommitDate: Wed Oct 31 16:55:26 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=a3b591e7
7
8 dev-scheme/bigloo: Bump to 3.9a
9
10 Package-Manager: portage-2.2.0_alpha142
11 Manifest-Sign-Key: 0x3D79478FBE63A96F
12
13 ---
14 dev-scheme/bigloo/bigloo-3.9a.ebuild | 242 ++++++++++++++++++++++++++++++++++
15 1 files changed, 242 insertions(+), 0 deletions(-)
16
17 diff --git a/dev-scheme/bigloo/bigloo-3.9a.ebuild b/dev-scheme/bigloo/bigloo-3.9a.ebuild
18 new file mode 100644
19 index 0000000..f16dd07
20 --- /dev/null
21 +++ b/dev-scheme/bigloo/bigloo-3.9a.ebuild
22 @@ -0,0 +1,242 @@
23 +# Copyright 1999-2012 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Header: $
26 +
27 +EAPI="4"
28 +
29 +Months=( "Dec" "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec" )
30 +
31 +inherit elisp-common multilib eutils flag-o-matic java-pkg-opt-2
32 +
33 +MY_P=${PN}${PV/_p/-}
34 +MY_P=${MY_P/_alpha*/-alpha}
35 +MY_P=${MY_P/_beta*/-beta}
36 +
37 +# Handling of alpha and beta releases
38 +if [[ $PV = *_alpha* ]] || [[ $PV = *_beta* ]]; then
39 + date=${PV/*_alpha/}
40 + date=${date/*_beta/}
41 + year=${date:2:2}
42 + month=${date:4:2}
43 + if [ ${month:0:1} = "0" ]; then
44 + # Remove the initial "0" as 08 and 09 are considered as octal values
45 + month=${month:1:1}
46 + fi
47 + month=${Months[$month]}
48 + day=${date:6:2}
49 + MY_P="${MY_P}${day}${month}${year}"
50 +fi
51 +
52 +BGL_RELEASE=${PV/_*/}
53 +
54 +DESCRIPTION="Bigloo is a Scheme implementation."
55 +HOMEPAGE="http://www-sop.inria.fr/indes/fp/Bigloo/bigloo.html"
56 +SRC_URI="ftp://ftp-sop.inria.fr/indes/fp/Bigloo/${MY_P}.tar.gz
57 + ftp://ftp.cnic.fr/gentoo-lisp-overlay/${MY_P}.tar.gz"
58 +
59 +LICENSE="GPL-2 LGPL-2"
60 +SLOT="0"
61 +KEYWORDS="~amd64 ~ppc ~x86"
62 +IUSE="alsa avahi bglpkg calendar crypto csv debug doc emacs flac gmp gstreamer java mail mp3 multimedia openpgp packrat sqlite srfi1 srfi27 ssl text threads web"
63 +REQUIRED_USE="
64 + alsa? ( multimedia )
65 + bglpkg? ( web )
66 + flac? ( alsa )
67 + gstreamer? ( multimedia threads )
68 + mp3? ( alsa )
69 + openpgp? ( crypto )
70 + packrat? ( srfi1 )
71 + srfi27? ( x86? ( gmp ) )
72 +"
73 +
74 +# bug 254916 for >=dev-libs/boehm-gc-7.1
75 +DEPEND=">=dev-libs/boehm-gc-7.1[threads?]
76 + alsa? ( media-libs/alsa-lib )
77 + avahi? ( net-dns/avahi )
78 + emacs? ( virtual/emacs )
79 + flac? ( media-libs/flac )
80 + gmp? ( dev-libs/gmp )
81 + gstreamer? ( media-libs/gstreamer:0.10 media-libs/gst-plugins-base:0.10 )
82 + java? ( >=virtual/jdk-1.5 app-arch/zip )
83 + mp3? ( media-sound/mpg123 )
84 + sqlite? ( dev-db/sqlite:3 )
85 + ssl? ( dev-libs/openssl )
86 +"
87 +RDEPEND="${DEPEND}"
88 +
89 +RESTRICT="mirror"
90 +
91 +S=${WORKDIR}/${MY_P/-[ab]*/}
92 +
93 +SITEFILE="50bigloo-gentoo.el"
94 +
95 +pkg_pretend() {
96 + if use srfi27 && use amd64; then
97 + #TODO: 'dev-scheme/bigloo srfi27' in arch/amd64/package.use.mask?
98 + ewarn "srfi27 is known to only work on 32-bit architectures." \
99 + "This IUSE is ignored on amd64."
100 + fi
101 +}
102 +
103 +src_prepare() {
104 + # Removing bundled boehm-gc
105 + rm -rf gc || die
106 +
107 + # bug 354751: Fix '[a-z]' sed range for non ascii LC_COLLATE order
108 + sed 's/a-z/[:alpha:]/' -i configure autoconf/* || die 'sed s/a-z/[:alpha:]/ failed'
109 +
110 + java-pkg-opt-2_src_prepare
111 +}
112 +
113 +src_configure() {
114 + filter-flags -fomit-frame-pointer
115 +
116 + local myconf=""
117 +
118 + # Filter Zile emacs replacement. Bug #336717
119 + if use emacs; then
120 + myconf="--bee=full --emacs=${EMACS} --lispdir=${SITELISP}/${PN}"
121 + else
122 + myconf="--emacs=false"
123 + fi
124 +
125 + # Add JCFLAGS to the configure script
126 + # (api/{crypto,openpgp} jvm tests show failures)
127 + if use java; then
128 + sed -e "s/^\(jcflags=\)\(.*\)/\\1\"\\2 $(java-pkg_javac-args)\"/" \
129 + -e 's/jcflags=$jcflags/jcflags="$jcflags"/'\
130 + -i configure
131 + myconf="${myconf}
132 + --jvm=yes"
133 + fi
134 +
135 + # No pkglib/pkgcomp in IUSE, I don't see any need besides bglpkg
136 + # One or the other could be added upon user request
137 + if use bglpkg; then
138 + myconf="${myconf}
139 + --enable-bglpkg --enable-pkgcomp --enable-pkglib"
140 + else
141 + myconf="${myconf}
142 + --disable-bglpkg --disable-pkgcomp --disable-pkglib"
143 + fi
144 +
145 + # srfi27 management
146 + if use amd64; then
147 + myconf="${myconf}
148 + --disable-srfi27"
149 + else
150 + myconf="${myconf}
151 + $(use_enable srfi27)"
152 + fi
153 +
154 + # Put every non quoted configure opt into myconf, for the einfo below
155 + myconf="
156 + --prefix=/usr
157 + --libdir=/usr/$(get_libdir)
158 + --benchmark=yes
159 + --coflags=
160 + --customgc=no
161 + --sharedbde=no
162 + --sharedcompiler=no
163 + --strip=no
164 + $(use debug && echo --debug)
165 + ${myconf}
166 + $(use_enable alsa)
167 + $(use_enable avahi)
168 + $(use_enable calendar)
169 + $(use_enable crypto)
170 + $(use_enable csv)
171 + $(use_enable flac)
172 + $(use_enable gmp)
173 + $(use_enable gstreamer)
174 + $(use_enable mail)
175 + $(use_enable mp3 mpg123)
176 + $(use_enable multimedia)
177 + $(use_enable openpgp)
178 + $(use_enable packrat)
179 + --disable-phone
180 + $(use_enable sqlite)
181 + $(use_enable srfi1)
182 + $(use_enable ssl)
183 + $(use_enable text)
184 + $(use_enable threads)
185 + $(use_enable web)
186 +"
187 +
188 + einfo "Configuring bigloo with:" \
189 + "--ldflags=\"${LDFLAGS}\" $(echo ${myconf} | sed 's/\n\t\t/ /g')"
190 +
191 + # Bigloo doesn't use autoconf and consequently a lot of options used by econf give errors
192 + # Manuel Serrano says: "Please, dont talk to me about autoconf. I simply dont want to hear about it..."
193 + ./configure --ldflags="${LDFLAGS}" ${myconf} || die "configure failed"
194 +}
195 +
196 +src_compile() {
197 + emake EFLAGS='-ldopt "$(LDFLAGS)"' || die "emake failed"
198 +
199 + if use emacs; then
200 + einfo "Compiling bee..."
201 + emake compile-bee EFLAGS='-ldopt "$(LDFLAGS)"' || die "compiling bee failed"
202 + fi
203 +}
204 +
205 +# default thinks that target doesn't exist
206 +src_test() {
207 + emake -j1 test || die "emake test failed"
208 +}
209 +
210 +src_install() {
211 + # Makefile:671:install: install-progs install-docs
212 + emake DESTDIR="${D}" install-progs || die "install failed"
213 +
214 + if use emacs; then
215 + einfo "Installing bee..."
216 + emake DESTDIR="${D}" install-bee || die "install-bee failed"
217 + einfo "Installing API-specific emacs files"
218 + cp -v "${S}"/api/*/emacs/*.el "${D}/${SITELISP}/${PN}"
219 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
220 + else
221 + # Fix EMACS*=false in Makefile.config
222 + sed -i \
223 + -e 's:^\(EMACS=\).*$:\1:' \
224 + -e 's:^\(EMACSBRAND=\).*$:\1:' \
225 + "${D}"/usr/$(get_libdir)/bigloo/${BGL_RELEASE}/Makefile.config \
226 + || die "sed !emacs in Makefile.config failed"
227 + fi
228 +
229 + dodoc ChangeLog README || die "dodoc failed"
230 + newdoc LICENSE COPYING || die "newdoc failed"
231 +
232 + pushd "${S}/manuals" &>/dev/null
233 + if use doc; then
234 + dohtml -r . || die "dohtml failed"
235 + doinfo *.info* || die "doinfo failed"
236 + fi
237 +
238 + for man in *.man; do
239 + newman ${man} ${man/.man/.1} || die "newman ${man} ${man/.man/.1} failed"
240 + done
241 + popd &>/dev/null
242 +
243 + # Remove created directories which remains empty
244 + pushd "${D}/usr" &>/dev/null
245 + rmdir -p doc/bigloo-${BGL_RELEASE} info man/man1 || die "rm empty dirs failed"
246 + popd &>/dev/null
247 +}
248 +
249 +pkg_preinst() {
250 + java-pkg-opt-2_pkg_preinst
251 +}
252 +
253 +pkg_postinst() {
254 + if use emacs; then
255 + elisp-site-regen
256 + elog "In order to use the bee-mode, add"
257 + elog " (require 'bmacs)"
258 + elog "to your ~/.emacs file"
259 + fi
260 +}
261 +
262 +pkg_postrm() {
263 + use emacs && elisp-site-regen
264 +}