/[gentoo-x86]/dev-scheme/bigloo/bigloo-3.6a.ebuild
Gentoo

Contents of /dev-scheme/bigloo/bigloo-3.6a.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Jul 15 10:05:34 2011 UTC (3 years, 1 month ago) by xarthisius
Branch: MAIN
Changes since 1.3: +2 -2 lines
ppc stable wrt #368071

(Portage version: 2.2.0_alpha43/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-scheme/bigloo/bigloo-3.6a.ebuild,v 1.3 2011/06/21 11:49:22 hwoarang Exp $
4
5 EAPI="4"
6
7 inherit elisp-common multilib eutils flag-o-matic java-pkg-opt-2
8
9 MY_P=${PN}${PV/_p/-}
10 MY_P=${MY_P/_alpha*/-alpha}
11 MY_P=${MY_P/_beta*/-beta}
12
13 BGL_RELEASE=${PV/_*/}
14
15 DESCRIPTION="Bigloo is a Scheme implementation."
16 HOMEPAGE="http://www-sop.inria.fr/indes/fp/Bigloo/bigloo.html"
17 SRC_URI="ftp://ftp-sop.inria.fr/indes/fp/Bigloo/${MY_P}.tar.gz"
18
19 LICENSE="GPL-2 LGPL-2"
20 SLOT="0"
21 KEYWORDS="amd64 ppc x86"
22 IUSE="bglpkg calendar crypto debug doc emacs gmp java mail multimedia openpgp packrat sqlite srfi1 srfi27 ssl text threads web"
23 REQUIRED_USE="
24 bglpkg? ( web )
25 openpgp? ( crypto )
26 packrat? ( srfi1 )
27 srfi27? ( x86? ( gmp ) )
28 "
29
30 # bug 254916 for >=dev-libs/boehm-gc-7.1
31 DEPEND=">=dev-libs/boehm-gc-7.1[threads?]
32 emacs? ( virtual/emacs )
33 gmp? ( dev-libs/gmp )
34 java? ( >=virtual/jdk-1.5 app-arch/zip )
35 sqlite? ( dev-db/sqlite:3 )
36 ssl? ( dev-libs/openssl )
37 "
38 RDEPEND="${DEPEND}"
39
40 S=${WORKDIR}/${MY_P/-[ab]*/}
41
42 SITEFILE="50bigloo-gentoo.el"
43
44 pkg_pretend() {
45 if use srfi27 && use amd64; then
46 #TODO: 'dev-scheme/bigloo srfi27' in arch/amd64/package.use.mask?
47 ewarn "srfi27 is known to only work on 32-bit architectures." \
48 "This IUSE is ignored on amd64."
49 fi
50 }
51
52 src_prepare() {
53 # Removing bundled boehm-gc
54 rm -rf gc || die
55
56 # Fix some printf format warnings
57 epatch "${FILESDIR}/${PN}-${BGL_RELEASE}-fix_printf_format_warnings.patch"
58
59 # bug 354751: Fix '[a-z]' sed range for non ascii LC_COLLATE order
60 sed 's/a-z/[:alpha:]/' -i configure autoconf/* || die 'sed s/a-z/[:alpha:]/ failed'
61
62 java-pkg-opt-2_src_prepare
63 }
64
65 src_configure() {
66 filter-flags -fomit-frame-pointer
67
68 local myconf=""
69
70 # Filter Zile emacs replacement. Bug #336717
71 if use emacs; then
72 myconf="--bee=full --emacs=${EMACS} --lispdir=${SITELISP}/${PN}"
73 else
74 myconf="--emacs=false"
75 fi
76
77 # Add JCFLAGS to the configure script
78 # (api/{crypto,openpgp} jvm tests show failures)
79 if use java; then
80 sed -e "s/^\(jcflags=\)\(.*\)/\\1\"\\2 $(java-pkg_javac-args)\"/" \
81 -e 's/jcflags=$jcflags/jcflags="$jcflags"/'\
82 -i configure
83 myconf="${myconf}
84 --jvm=yes"
85 fi
86
87 # No pkglib/pkgcomp in IUSE, I don't see any need besides bglpkg
88 # One or the other could be added upon user request
89 if use bglpkg; then
90 myconf="${myconf}
91 --enable-bglpkg --enable-pkgcomp --enable-pkglib"
92 else
93 myconf="${myconf}
94 --disable-bglpkg --disable-pkgcomp --disable-pkglib"
95 fi
96
97 # srfi27 management
98 if use amd64; then
99 myconf="${myconf}
100 --disable-srfi27"
101 else
102 myconf="${myconf}
103 $(use_enable srfi27)"
104 fi
105
106 # Put every non quoted configure opt into myconf, for the einfo below
107 myconf="
108 --prefix=/usr
109 --libdir=/usr/$(get_libdir)
110 --benchmark=yes
111 --coflags=
112 --customgc=no
113 --sharedbde=no
114 --sharedcompiler=no
115 --strip=no
116 $(use debug && echo --debug)
117 ${myconf}
118 $(use_enable calendar)
119 $(use_enable crypto)
120 $(use_enable gmp)
121 --disable-gstreamer
122 $(use_enable mail)
123 $(use_enable multimedia)
124 $(use_enable openpgp)
125 $(use_enable packrat)
126 --disable-phone
127 $(use_enable sqlite)
128 $(use_enable srfi1)
129 $(use_enable ssl)
130 $(use_enable text)
131 $(use_enable threads)
132 $(use_enable web)
133 "
134
135 einfo "Configuring bigloo with:" \
136 "--ldflags=\"${LDFLAGS}\" $(echo ${myconf} | sed 's/\n\t\t/ /g')"
137
138 # Bigloo doesn't use autoconf and consequently a lot of options used by econf give errors
139 # Manuel Serrano says: "Please, dont talk to me about autoconf. I simply dont want to hear about it..."
140 ./configure --ldflags="${LDFLAGS}" ${myconf} || die "configure failed"
141 }
142
143 src_compile() {
144 emake EFLAGS='-ldopt "$(LDFLAGS)"' || die "emake failed"
145
146 if use emacs; then
147 einfo "Compiling bee..."
148 emake compile-bee EFLAGS='-ldopt "$(LDFLAGS)"' || die "compiling bee failed"
149 fi
150 }
151
152 # default thinks that target doesn't exist
153 src_test() {
154 emake -j1 test || die "emake test failed"
155 }
156
157 src_install() {
158 # Makefile:671:install: install-progs install-docs
159 emake DESTDIR="${D}" install-progs || die "install failed"
160
161 if use emacs; then
162 einfo "Installing bee..."
163 emake DESTDIR="${D}" install-bee || die "install-bee failed"
164 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
165 else
166 # Fix EMACS*=false in Makefile.config
167 sed -i \
168 -e 's:^\(EMACS=\).*$:\1:' \
169 -e 's:^\(EMACSBRAND=\).*$:\1:' \
170 "${D}"/usr/$(get_libdir)/bigloo/${BGL_RELEASE}/Makefile.config \
171 || die "sed !emacs in Makefile.config failed"
172 fi
173
174 dodoc ChangeLog README || die "dodoc failed"
175
176 pushd "${S}/manuals" &>/dev/null
177 if use doc; then
178 dohtml -r . || die "dohtml failed"
179 doinfo *.info* || die "doinfo failed"
180 fi
181
182 for man in *.man; do
183 newman ${man} ${man/.man/.1} || die "newman ${man} ${man/.man/.1} failed"
184 done
185 popd &>/dev/null
186
187 # Remove created directories which remains empty
188 pushd "${D}/usr" &>/dev/null
189 rmdir -p doc/bigloo-${BGL_RELEASE} info man/man1 || die "rm empty dirs failed"
190 popd &>/dev/null
191 }
192
193 pkg_preinst() {
194 java-pkg-opt-2_pkg_preinst
195 }
196
197 pkg_postinst() {
198 if use emacs; then
199 elisp-site-regen
200 elog "In order to use the bee-mode, add"
201 elog " (require 'bmacs)"
202 elog "to your ~/.emacs file"
203 fi
204 }
205
206 pkg_postrm() {
207 use emacs && elisp-site-regen
208 }

  ViewVC Help
Powered by ViewVC 1.1.20