8bb71fe888b0c462a910872573e90575c727a1ca
[gentoo.git] / dev-ada / libadalang / libadalang-2018-r1.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 PYTHON_COMPAT=( python2_7 )
7
8 inherit python-single-r1
9
10 MYP=${PN}-gpl-${PV}-src
11 DESCRIPTION="high performance semantic engine for the Ada programming language"
12 HOMEPAGE="https://libre.adacore.com/"
13 SRC_URI="http://mirrors.cdn.adacore.com/art/5b0cf9adc7a4475263382c18
14         -> ${MYP}.tar.gz"
15
16 LICENSE="GPL-3 gcc-runtime-library-exception-3.1"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="gnat_2016 gnat_2017 +gnat_2018 gnat_2019 +shared static-libs"
20
21 RDEPEND="dev-python/pyyaml
22         dev-ada/gnatcoll-bindings[gnat_2016=,gnat_2017=,gnat_2018=,gnat_2019=]
23         dev-ada/gnatcoll-bindings[iconv,shared=,static-libs=]
24         ${PYTHON_DEPS}"
25 DEPEND="${RDEPEND}
26         >=dev-ada/langkit-2018"
27 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
28
29 S="${WORKDIR}"/${MYP}
30
31 PATCHES=(
32         "${FILESDIR}"/${P}-gentoo.patch
33         "${FILESDIR}"/${PN}-2017-gentoo.patch
34 )
35
36 src_configure() {
37         ada/manage.py -v debug generate || die
38 }
39
40 src_compile() {
41         ada/manage.py \
42                 -v \
43                 $(use_enable shared) \
44                 $(use_enable static-libs static) \
45                 build \
46                 --build-mode='prod' || die
47 }
48
49 src_test () {
50         ada/manage.py test | grep FAILED && die
51 }
52
53 src_install () {
54         ada/manage.py \
55                 $(use_enable shared) \
56                 $(use_enable static-libs static) \
57                 install "${D}"usr || die
58         python_domodule build/python/libadalang.py
59         rm -r "${D}"usr/python || die
60 }