dev-ada/libgpr: remove old versions
[gentoo.git] / dev-ada / gnat_util / gnat_util-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 inherit toolchain-funcs multiprocessing
7
8 MYP=${PN}-gpl-${PV}
9
10 DESCRIPTION="Provides access to GNAT compiler internals for AdaCore utilities"
11 HOMEPAGE="http://libre.adacore.com"
12 SRC_URI="http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27a6b
13         -> ${MYP}-src.tar.gz"
14
15 LICENSE="GPL-3"
16 SLOT="0"
17 KEYWORDS="amd64 x86"
18 IUSE="+gnat_2018 gnat_2019 +shared static-libs static-pic"
19
20 RDEPEND="gnat_2018? ( dev-lang/gnat-gpl:7.3.1 )
21         gnat_2019? ( dev-lang/gnat-gpl:8.3.1 )"
22 DEPEND="${RDEPEND}
23         dev-ada/gprbuild[gnat_2018(-)?,gnat_2019(-)?]"
24 REQUIRED_USE="^^ ( gnat_2018 gnat_2019 )"
25
26 S="${WORKDIR}"/${MYP}-src
27
28 PATCHES=( "${FILESDIR}"/${PN}-2017-gentoo.patch )
29
30 src_compile() {
31         if use gnat_2018; then
32                 GCC_PV=7.3.1
33         else
34                 GCC_PV=8.3.1
35         fi
36         GNATMAKE=${CHOST}-gnatmake-${GCC_PV}
37         emake GNATMAKE="${GNATMAKE} ${ADAFLAGS}" \
38                 BUILDER="gprbuild -j$(makeopts_jobs)" generate_sources
39         if use static-libs; then
40                 emake BUILDER="gprbuild -v -j$(makeopts_jobs)" build-static
41         fi
42         for kind in shared static-pic; do
43                 if use ${kind}; then
44                         emake BUILDER="gprbuild -v -j$(makeopts_jobs)" \
45                                 build-${kind}
46                 fi
47         done
48 }
49
50 src_install() {
51         if use static-libs; then
52                 emake prefix="${D}"/usr install-static
53         fi
54         for kind in shared static-pic; do
55                 if use ${kind}; then
56                         emake prefix="${D}"/usr install-${kind}
57                 fi
58         done
59         einstalldocs
60 }