Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ada/libgpr/
Date: Fri, 13 Sep 2019 17:25:26
Message-Id: 1568395503.79688437283a41740908dea22cba4a4fdee34bb3.tupone@gentoo
1 commit: 79688437283a41740908dea22cba4a4fdee34bb3
2 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 13 17:25:03 2019 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 13 17:25:03 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79688437
7
8 dev-ada/libgpr: simplify using ada eclass
9
10 Package-Manager: Portage-2.3.69, Repoman-2.3.16
11 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
12
13 dev-ada/libgpr/libgpr-2019-r1.ebuild | 60 ++++++++++++++++++++++++++++++++++++
14 1 file changed, 60 insertions(+)
15
16 diff --git a/dev-ada/libgpr/libgpr-2019-r1.ebuild b/dev-ada/libgpr/libgpr-2019-r1.ebuild
17 new file mode 100644
18 index 00000000000..01d8cf7cfbd
19 --- /dev/null
20 +++ b/dev-ada/libgpr/libgpr-2019-r1.ebuild
21 @@ -0,0 +1,60 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +ADA_COMPAT=( gnat_201{6,7,8,9} )
28 +inherit ada toolchain-funcs multiprocessing
29 +
30 +MYP=gprbuild-${PV}-20190517-194D8
31 +
32 +DESCRIPTION="Ada library to handle GPRbuild project files"
33 +HOMEPAGE="http://libre.adacore.com/"
34 +SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf8e8031e87a8f1d425093
35 + -> ${MYP}-src.tar.gz"
36 +LICENSE="GPL-3"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~x86"
39 +IUSE="+shared static-libs static-pic"
40 +
41 +RDEPEND="dev-ada/xmlada[shared?,static-libs?,static-pic?,${ADA_USEDEP}]
42 + !net-libs/grpc"
43 +DEPEND="${RDEPEND}
44 + dev-ada/gprbuild[${ADA_USEDEP}]"
45 +REQUIRED_USE="${ADA_REQUIRED_USE}"
46 +
47 +S="${WORKDIR}"/${MYP}-src
48 +
49 +src_configure() {
50 + emake prefix="${D}"/usr setup
51 +}
52 +
53 +src_compile() {
54 + build () {
55 + gprbuild -p -m -j$(makeopts_jobs) -XBUILD=production -v \
56 + -XLIBRARY_TYPE=$1 -XXMLADA_BUILD=$1 \
57 + gpr/gpr.gpr -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} || die
58 + }
59 + if use shared; then
60 + build relocatable
61 + fi
62 + if use static-libs; then
63 + build static
64 + fi
65 + if use static-pic; then
66 + build static-pic
67 + fi
68 +}
69 +
70 +src_install() {
71 + if use static-libs; then
72 + emake DESTDIR="${D}" libgpr.install.static
73 + fi
74 + for kind in shared static-pic; do
75 + if use ${kind}; then
76 + emake DESTDIR="${D}" libgpr.install.${kind}
77 + fi
78 + done
79 + rm -r "${D}"/usr/share/gpr/manifests || die
80 + einstalldocs
81 +}