e0242a86fef88665ec7aa63fe1569d8cdff1a9a7
[gentoo.git] / dev-scheme / gambit / gambit-4.9.3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit eutils elisp-common
7
8 MY_PV="${PV//./_}"
9 MY_P="${PN}-v${MY_PV}"
10
11 DESCRIPTION="Gambit-C is a native Scheme to C compiler and interpreter"
12 HOMEPAGE="http://www.iro.umontreal.ca/~gambit/"
13 SRC_URI="http://www-labs.iro.umontreal.ca/~gambit/download/gambit/v${PV%.*}/source/${MY_P}.tgz"
14
15 LICENSE="|| ( Apache-2.0 LGPL-2.1 )"
16 SLOT="0"
17 KEYWORDS="amd64 ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos"
18
19 RDEPEND="ssl? (
20                 !libressl? ( dev-libs/openssl:0= )
21                 libressl? ( dev-libs/libressl:0= )
22         )"
23 DEPEND="
24         ${RDEPEND}
25 "
26 BDEPEND="emacs? ( >=app-editors/emacs-23.1:* )"
27
28 SITEFILE="50gambit-gentoo.el"
29
30 S="${WORKDIR}/${MY_P}" #-devel
31
32 IUSE="emacs libressl ssl static"
33
34 src_configure() {
35         econf $(use_enable !static shared) \
36                 $(use_enable ssl openssl) \
37                 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
38                 --enable-gnu-gcc-specific-options \
39                 --enable-gnu-gcc-no-strict-aliasing \
40                 --enable-single-host \
41                 --disable-absolute-shared-libs \
42                 --enable-type-checking
43 }
44
45 src_compile() {
46         emake bootstrap
47
48         if use emacs; then
49                 elisp-compile misc/*.el || die
50         fi
51 }
52
53 src_install() {
54         emake DESTDIR="${D}" install
55         keepdir /usr/share/"${MY_PN}"
56 }
57
58 pkg_postinst() {
59         use emacs && elisp-site-regen
60 }
61
62 pkg_postrm() {
63         use emacs && elisp-site-regen
64 }