dev-ruby/metaclass-0.0.4-r0: add alpha keyword
[gentoo.git] / dev-lisp / ecls / ecls-16.1.2-r1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit eutils multilib
7
8 # test phase only works if ecls already installed #516876
9 RESTRICT="test"
10
11 MY_P=ecl-${PV}
12
13 DESCRIPTION="ECL is an embeddable Common Lisp implementation"
14 HOMEPAGE="https://common-lisp.net/project/ecl/"
15 SRC_URI="https://common-lisp.net/project/ecl/files/release/${PV}/${MY_P}.tgz"
16
17 LICENSE="BSD LGPL-2"
18 SLOT="0/${PV}"
19 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
20 IUSE="cxx debug emacs gengc precisegc cpu_flags_x86_sse +threads +unicode +libatomic X"
21
22 CDEPEND="dev-libs/gmp:0
23                 virtual/libffi
24                 libatomic? ( dev-libs/libatomic_ops )
25                 >=dev-libs/boehm-gc-7.1[threads?]
26                 >=dev-lisp/asdf-2.33-r3:="
27 DEPEND="${CDEPEND}
28                 app-text/texi2html
29                 emacs? ( virtual/emacs >=app-eselect/eselect-emacs-1.12 )"
30 RDEPEND="${CDEPEND}"
31
32 S="${WORKDIR}"/${MY_P}
33
34 pkg_setup () {
35         if use gengc || use precisegc ; then
36                 ewarn "You have enabled the generational garbage collector or"
37                 ewarn "the precise collection routines. These features are not very stable"
38                 ewarn "at the moment and may cause crashes."
39                 ewarn "Don't enable them unless you know what you're doing."
40         fi
41 }
42
43 src_prepare() {
44         epatch "${FILESDIR}"/${PV}-headers-gentoo.patch
45         cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
46 }
47
48 src_configure() {
49         econf \
50                 --with-system-gmp \
51                 --enable-boehm=system \
52                 --enable-longdouble=yes \
53                 --with-dffi \
54                 $(use_with cxx) \
55                 $(use_enable gengc) \
56                 $(use_enable precisegc) \
57                 $(use_with debug debug-cflags) \
58                 $(use_enable libatomic libatomic system) \
59                 $(use_with cpu_flags_x86_sse sse) \
60                 $(use_enable threads) \
61                 $(use_with threads __thread) \
62                 $(use_enable unicode) \
63                 $(use_with unicode unicode-names) \
64                 $(use_with X x) \
65                 $(use_with X clx)
66 }
67
68 src_compile() {
69         if use emacs; then
70                 local ETAGS=$(eselect --brief etags list | sed -ne '/emacs/{p;q}')
71                 [[ -n ${ETAGS} ]] || die "No etags implementation found"
72                 pushd build > /dev/null || die
73                 emake ETAGS=${ETAGS} TAGS
74                 popd > /dev/null
75         else
76                 touch build/TAGS
77         fi
78
79         #parallel make fails
80         emake -j1 || die "Compilation failed"
81 }
82
83 src_install () {
84         emake DESTDIR="${D}" install || die "Installation failed"
85
86         dodoc README.md CHANGELOG
87         dodoc "${FILESDIR}"/README.Gentoo
88         pushd build/doc
89         newman ecl.man ecl.1
90         newman ecl-config.man ecl-config.1
91         popd
92 }