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/gprbuild/
Date: Mon, 26 Jun 2017 20:06:47
Message-Id: 1498507391.e8347eefda91406fa8553e4328584b66df8010ad.tupone@gentoo
1 commit: e8347eefda91406fa8553e4328584b66df8010ad
2 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 26 20:03:11 2017 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 26 20:03:11 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8347eef
7
8 dev-ada/gprbuild: add gnat_2016 and gnat_2017 use flags to select the compiler
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.1
11
12 dev-ada/gprbuild/gprbuild-2017.ebuild | 39 +++++++++++++----------------------
13 dev-ada/gprbuild/metadata.xml | 15 +++++++++-----
14 2 files changed, 24 insertions(+), 30 deletions(-)
15
16 diff --git a/dev-ada/gprbuild/gprbuild-2017.ebuild b/dev-ada/gprbuild/gprbuild-2017.ebuild
17 index 277fb5c5f3f..60fa7d00f00 100644
18 --- a/dev-ada/gprbuild/gprbuild-2017.ebuild
19 +++ b/dev-ada/gprbuild/gprbuild-2017.ebuild
20 @@ -18,39 +18,26 @@ SRC_URI="
21 LICENSE="GPL-3"
22 SLOT="0"
23 KEYWORDS="~amd64"
24 -IUSE="bootstrap +shared static static-pic"
25 +IUSE="bootstrap gnat_2016 gnat_2017 +shared static static-pic"
26
27 -DEPEND="dev-lang/gnat-gpl:=
28 - !bootstrap? ( dev-ada/xmlada[static] )"
29 +DEPEND="
30 + !bootstrap? ( dev-ada/xmlada[static,gnat_2016=,gnat_2017=] )
31 + gnat_2016? ( =dev-lang/gnat-gpl-2016 )
32 + gnat_2017? ( =dev-lang/gnat-gpl-2017 )"
33 RDEPEND="${DEPEND}"
34
35 S="${WORKDIR}"/${MYP}-src
36
37 -REQUIRED_USE="bootstrap? ( !shared !static !static-pic )"
38 +REQUIRED_USE="bootstrap? ( !shared !static !static-pic )
39 + ^^ ( gnat_2016 gnat_2017 )"
40 PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
41
42 -pkg_setup() {
43 - GCC=${ADA:-$(tc-getCC)}
44 - gnatbase=$(basename ${GCC})
45 - if use bootstrap; then
46 - gnatpath=$(dirname ${GCC})
47 -
48 - GNATMAKE="${gnatbase/gcc/gnatmake}"
49 - if [[ ${gnatpath} != "." ]] ; then
50 - GNATMAKE="${gnatpath}/${GNATMAKE}"
51 - fi
52 -
53 - if [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then
54 - eerror "You need a gcc compiler that provides the Ada Compiler:"
55 - eerror "1) use gcc-config to select the right compiler or"
56 - eerror "2) set ADA in make.conf"
57 - die "ada compiler not available"
58 - fi
59 - fi
60 -}
61 -
62 src_prepare() {
63 - GCC_PV=${gnatbase#*gcc-}
64 + if use gnat_2016; then
65 + GCC_PV=4.9.4
66 + else
67 + GCC_PV=6.3.0
68 + fi
69 sed -e "s:@VER@:${GCC_PV}:g" "${FILESDIR}"/${P}.xml > gnat-${GCC_PV}.xml
70 default
71 }
72 @@ -63,7 +50,9 @@ bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls"
73 lib_progs="gprlib gprbind"
74
75 src_compile() {
76 + GCC=${CHOST}-gcc-${GCC_PV}
77 if use bootstrap; then
78 + GNATMAKE=${CHOST}-gnatmake-${GCC_PV}
79 local xmlada_src="../xmlada-gpl-${PV}-src"
80 incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
81 -I${xmlada_src}/schema -I${xmlada_src}/unicode \
82
83 diff --git a/dev-ada/gprbuild/metadata.xml b/dev-ada/gprbuild/metadata.xml
84 index 521d595c3ff..4cf88165a98 100644
85 --- a/dev-ada/gprbuild/metadata.xml
86 +++ b/dev-ada/gprbuild/metadata.xml
87 @@ -6,15 +6,20 @@
88 <name>Tupone Alfredo</name>
89 </maintainer>
90 <use>
91 + <flag name="gnat_2016">Compile with dev-lang/gnat-gpl-2016</flag>
92 + <flag name="gnat_2017">Compile with dev-lang/gnat-gpl-2017</flag>
93 <flag name="shared">Build shared library</flag>
94 <flag name="static">Build static library</flag>
95 <flag name="static-pic">Build static library with pic code</flag>
96 </use>
97 <longdescription lang="en">
98 - XML/Ada is a set of modules that provide a simple manipulation of XML streams. It supports the whole XML 1.1 specifications, and can parse any file that follows this standard (including the contents of the DTD, although no validation of the document is done based on those).
99 -
100 - It also provides support for a number of other standard associated with XML, like SAX, DOM and XML schemas.
101 -
102 - In addition, it includes a module to manipulate Unicode streams, since this is required by the XML standard.
103 + GPRbuild is an advanced software tool designed to help automate the
104 + construction of multi-language systems. It removes complexity from
105 + multi-language development by allowing developers to quickly and easily
106 + compile and link software written in a combination of languages
107 + including Ada, Assembler, C, C++, and Fortran. Easily extendable by
108 + users to cover new toolchains and languages it is primarily aimed at
109 + projects of all sizes organized into subsystems and libraries and is
110 + particularly well-suited for compiled languages.
111 </longdescription>
112 </pkgmetadata>