64108c8c95b39f04949c5f3b4828572224457300
[gentoo.git] / dev-scheme / gauche / gauche-0.9.8.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 inherit autotools eapi7-ver
7
8 MY_P="${P^g}"
9
10 DESCRIPTION="A Unix system friendly Scheme Interpreter"
11 HOMEPAGE="http://practical-scheme.net/gauche/"
12 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
13
14 LICENSE="BSD"
15 SLOT="0/$(ver_cut 1-2)7"
16 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
17 IUSE="ipv6 libressl mbedtls test"
18
19 RDEPEND="sys-libs/gdbm
20         mbedtls? ( net-libs/mbedtls:= )"
21 DEPEND="${RDEPEND}
22         test? (
23                 !libressl? ( dev-libs/openssl:0 )
24                 libressl? ( dev-libs/libressl:0 )
25         )"
26 S="${WORKDIR}/${MY_P}"
27
28 PATCHES=(
29         "${FILESDIR}"/${PN}-ext-ldflags.patch
30         "${FILESDIR}"/${PN}-gauche.m4.patch
31         "${FILESDIR}"/${PN}-info.patch
32         "${FILESDIR}"/${PN}-rfc.tls.patch
33         "${FILESDIR}"/${PN}-xz-info.patch
34 )
35 DOCS=( AUTHORS ChangeLog HACKING.adoc README.adoc )
36
37 src_prepare() {
38         default
39         use ipv6 && sed -i "s/ -4//" ext/tls/ssltest-mod.scm
40
41         eautoconf
42 }
43
44 src_configure() {
45         econf \
46                 $(use_enable ipv6) \
47                 --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt \
48                 --with-libatomic-ops=no \
49                 --with-slib="${EPREFIX}"/usr/share/slib \
50                 --with-tls=axtls$(usex mbedtls ',mbedtls' '')
51 }
52
53 src_test() {
54         emake -j1 -s check
55 }
56
57 src_install() {
58         emake DESTDIR="${D}" install-pkg install-doc
59         einstalldocs
60 }