/[gentoo-x86]/dev-scheme/bigloo/bigloo-3.4a_p3.ebuild
Gentoo

Contents of /dev-scheme/bigloo/bigloo-3.4a_p3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Nov 7 20:13:01 2012 UTC (22 months, 1 week ago) by tetromino
Branch: MAIN
Changes since 1.1: +3 -3 lines
Slot gstreamer dependencies in preparation for gstreamer-1.0.

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)

1 # Copyright 1999-2012 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.4a_p3.ebuild,v 1.1 2010/10/06 19:13:29 chiiph Exp $
4
5 EAPI="3"
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 PATCHSET="1"
15
16 DESCRIPTION="Bigloo is a Scheme implementation."
17 HOMEPAGE="http://www-sop.inria.fr/indes/fp/Bigloo/bigloo.html"
18 SRC_URI="ftp://ftp-sop.inria.fr/members/Cyprien.Nicolas/mirror/bigloo-${BGL_RELEASE}-patchset-${PATCHSET}.tbz2
19 ftp://ftp-sop.inria.fr/indes/fp/Bigloo/${MY_P}.tar.gz"
20
21 LICENSE="GPL-2"
22 SLOT="0"
23 KEYWORDS="~amd64 ~ppc ~x86"
24 IUSE="bglpkg calendar crypto debug doc emacs gmp gstreamer java mail multimedia packrat sqlite srfi1 srfi27 ssl text threads web"
25
26 # bug 254916 for >=dev-libs/boehm-gc-7.1
27 DEPEND=">=dev-libs/boehm-gc-7.1[threads?]
28 emacs? ( virtual/emacs )
29 gmp? ( dev-libs/gmp )
30 gstreamer? ( media-libs/gstreamer:0.10 media-libs/gst-plugins-base:0.10 )
31 java? ( >=virtual/jdk-1.5 app-arch/zip )
32 sqlite? ( dev-db/sqlite:3 )
33 ssl? ( dev-libs/openssl )
34 "
35 RDEPEND="${DEPEND}"
36
37 S=${WORKDIR}/${MY_P/-[ab]*/}
38
39 SITEFILE="50bigloo-gentoo.el"
40
41 pkg_setup() {
42 if use gstreamer; then
43 if ! use threads; then
44 die "USE Dependency: 'gstreamer' needs 'threads'. You may enable 'threads', or disable 'gstreamer'."
45 fi
46
47 if ! use multimedia; then
48 die "USE Dependency: 'gstreamer' needs 'multimedia'."
49 fi
50 fi
51
52 if use packrat && ! use srfi1; then
53 die "USE Dependency: 'packrat' needs 'srfi1'."
54 fi
55
56 if use srfi27; then
57 # 'dev-scheme/bigloo srfi27' should be added in arch/amd64/package.use.mask
58 if use amd64; then
59 ewarn "srfi27 is known to only work on 32-bit architectures." \
60 "The USE is ignored on amd64."
61 elif ! use gmp; then
62 die "USE Dependency: 'srfi27' needs 'gmp'."
63 fi
64 fi
65
66 if use bglpkg && ! (use sqlite && use web); then
67 die "USE Dependency: 'bglpkg' needs both 'sqlite' and 'web'."
68 fi
69
70 java-pkg-opt-2_pkg_setup
71 }
72
73 src_prepare() {
74 EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" \
75 EPATCH_FORCE="yes" epatch
76
77 # bglmem is not built according to the EFLAGS
78 # (which forces LDFLAGS, see emake below)
79 ebegin "Adding EFLAGS to BMEMFLAGS"
80 sed -i 's/BMEMFLAGS[^=]\+= /&$(EFLAGS) /' bde/bmem/Makefile
81 eend $?
82
83 # Removing bundled boehm-gc
84 rm -rf gc || die
85 }
86
87 src_configure() {
88 filter-flags -fomit-frame-pointer
89
90 local myconf=""
91
92 # Filter Zile emacs replacement. Bug #336717
93 if use emacs; then
94 myconf="--bee=full --emacs=${EMACS} --lispdir=${SITELISP}/${PN}"
95 else
96 myconf="--emacs=false"
97 fi
98
99 # dev-java/ibm-jdk-bin fails during configure, bug #331279
100 # api/crypto java tests show failures, I'm looking into it
101 if use java; then
102 sed -e "s/^\(jcflags=\)\(.*\)/\\1\"\\2 $(java-pkg_javac-args)\"/" \
103 -e 's/jcflags=$jcflags/jcflags="$jcflags"/'\
104 -i configure
105 myconf="${myconf}
106 --jvm=yes"
107 fi
108
109 # No pkglib/pkgcomp in IUSE, I don't see any need besides bglpkg
110 # One or the other could be added upon user request
111 if use bglpkg; then
112 myconf="${myconf}
113 --enable-bglpkg --enable-pkgcomp --enable-pkglib"
114 else
115 myconf="${myconf}
116 --disable-bglpkg --disable-pkgcomp --disable-pkglib"
117 fi
118
119 # srfi27 management
120 if use amd64; then
121 myconf="${myconf}
122 --disable-srfi27"
123 else
124 myconf="${myconf}
125 $(use_enable srfi27)"
126 fi
127
128 # Put every non quoted configure opt into myconf, for the einfo below
129 myconf="
130 --prefix=/usr
131 --libdir=/usr/$(get_libdir)
132 --benchmark=yes
133 --coflags=
134 --customgc=no
135 --sharedbde=no
136 --sharedcompiler=no
137 --strip=no
138 $(use debug && echo --debug)
139 ${myconf}
140 $(use_enable calendar)
141 $(use_enable crypto)
142 $(use_enable gmp)
143 $(use_enable gstreamer)
144 $(use_enable mail)
145 $(use_enable multimedia)
146 $(use_enable packrat)
147 $(use_enable sqlite)
148 $(use_enable srfi1)
149 $(use_enable ssl)
150 $(use_enable text)
151 $(use_enable threads)
152 $(use_enable web)
153 "
154
155 einfo "Configuring bigloo with:" \
156 "--ldflags=\"${LDFLAGS}\" $(echo ${myconf} | sed 's/\n\t\t/ /g')"
157
158 # Bigloo doesn't use autoconf and consequently a lot of options used by econf give errors
159 # Manuel Serrano says: "Please, dont talk to me about autoconf. I simply dont want to hear about it..."
160 ./configure --ldflags="${LDFLAGS}" ${myconf} || die "configure failed"
161 }
162
163 src_compile() {
164 emake EFLAGS='-ldopt "$(LDFLAGS)"' || die "emake failed"
165
166 if use emacs; then
167 einfo "Compiling bee..."
168 emake -j1 compile-bee EFLAGS='-ldopt "$(LDFLAGS)"' || die "compiling bee failed"
169 fi
170 }
171
172 # default thinks that target doesn't exist
173 src_test() {
174 emake -j1 test || die "emake test failed"
175 }
176
177 src_install() {
178 # Makefile:671:install: install-progs install-docs
179 emake DESTDIR="${D}" install-progs || die "install failed"
180
181 if use emacs; then
182 einfo "Installing bee..."
183 emake DESTDIR="${D}" install-bee || die "install-bee failed"
184 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
185 else
186 # Fix EMACS*=false in Makefile.config
187 sed -i 's:^\(EMACS=\).*$:\1:' "${D}"/usr/$(get_libdir)/bigloo/${BGL_RELEASE}/Makefile.config \
188 || die "dosed EMACS failed"
189 sed -i 's:^\(EMACSBRAND=\).*$:\1:' "${D}"/usr/$(get_libdir)/bigloo/${BGL_RELEASE}/Makefile.config \
190 || die "dosed EMACSBRAND failed"
191 fi
192
193 dodoc ChangeLog README || die "dodoc failed"
194 newdoc LICENSE COPYING || die "newdoc failed"
195
196 cd "${S}/manuals"
197 if use doc; then
198 dohtml -r . || die "dohtml failed"
199 doinfo *.info* || die "doinfo failed"
200 fi
201
202 for man in *.man; do
203 newman ${man} ${man/.man/.1} || die "newman ${man} ${man/.man/.1} failed"
204 done
205 }
206
207 pkg_postinst() {
208 if use emacs; then
209 elisp-site-regen
210 elog "In order to use the bee-mode, add"
211 elog " (require 'bmacs)"
212 elog "to your ~/.emacs file"
213 fi
214 }
215
216 pkg_postrm() {
217 use emacs && elisp-site-regen
218 }

  ViewVC Help
Powered by ViewVC 1.1.20