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/, dev-ada/gprbuild/files/
Date: Wed, 29 Mar 2017 19:27:39
Message-Id: 1490815644.46dba86bc79018ffa1157f9f06e598de481ebb66.tupone@gentoo
1 commit: 46dba86bc79018ffa1157f9f06e598de481ebb66
2 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 29 19:27:24 2017 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 29 19:27:24 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46dba86b
7
8 dev-ada/gprbuild: Now that dev-ada/xmlada is in, use it to build
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch | 54 +++++++++++++++++
13 dev-ada/gprbuild/gprbuild-2016.ebuild | 74 +++++++++++++++--------
14 dev-ada/gprbuild/metadata.xml | 11 +++-
15 3 files changed, 113 insertions(+), 26 deletions(-)
16
17 diff --git a/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch b/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch
18 index 952c2c0a69d..f3566e87adb 100644
19 --- a/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch
20 +++ b/dev-ada/gprbuild/files/gprbuild-2016-gentoo.patch
21 @@ -160,3 +160,57 @@ diff -Naur gprbuild-gpl-2016-src.old/src/gprinstall-sigint_intercepted.ads gprbu
22 +pragma Convention (C, Sigint_Intercepted);
23 +-- Called when the program is interrupted by Ctrl-C to delete the
24 +-- temporary mapping files and configuration pragmas files.
25 +--- gprbuild-gpl-2016-src/Makefile.in.old 2017-01-19 19:52:41.242907252 +0100
26 ++++ gprbuild-gpl-2016-src/Makefile.in 2017-01-19 19:54:45.822646333 +0100
27 +@@ -25,12 +25,12 @@
28 + host=@host@
29 + target=@target@
30 + build=@build@
31 +-prefix=@prefix@
32 ++prefix=$(DESTDIR)@prefix@
33 + srcdir=@srcdir@
34 + objdir=@objdir@
35 + exec_prefix=@exec_prefix@
36 + datarootdir=@datarootdir@
37 +-datadir=@datadir@
38 ++datadir=$(DESTDIR)@datadir@
39 + bindir=@bindir@
40 + libdir=@libdir@
41 + libexecdir=@libexecdir@
42 +@@ -66,7 +66,7 @@
43 + .PHONY: all distall gprbuild gprconfig gprclean gprinstall gprname gprls
44 +
45 + all:
46 +- $(GPRBUILD_BUILDER)
47 ++ $(GPRBUILD_BUILDER) -cargs:C $(CFLAGS) -cargs:Ada $(ADAFLAGS)
48 +
49 + distall: all install install.dist
50 +
51 +@@ -173,13 +173,13 @@
52 + libgpr.build: $(foreach t, $(LIBGPR_TYPES), libgpr.build.$(t))
53 +
54 + libgpr.build.shared:
55 +- ${BUILDER} -XLIBRARY_TYPE=relocatable -P$(srcdir)/gpr/gpr.gpr
56 ++ ${BUILDER} -XLIBRARY_TYPE=relocatable -P$(srcdir)/gpr/gpr.gpr -cargs:Ada $(ADAFLAGS)
57 +
58 + libgpr.build.static:
59 +- ${BUILDER} -XLIBRARY_TYPE=static -P$(srcdir)/gpr/gpr.gpr
60 ++ ${BUILDER} -XLIBRARY_TYPE=static -P$(srcdir)/gpr/gpr.gpr -cargs:Ada $(ADAFLAGS)
61 +
62 + libgpr.build.static-pic:
63 +- ${BUILDER} -XLIBRARY_TYPE=static-pic -P$(srcdir)/gpr/gpr.gpr
64 ++ ${BUILDER} -XLIBRARY_TYPE=static-pic -P$(srcdir)/gpr/gpr.gpr -cargs:Ada $(ADAFLAGS)
65 +
66 + libgpr.install: $(foreach t, $(LIBGPR_TYPES), libgpr.install.$(t))
67 +
68 +--- gprbuild-gpl-2015-src/gprbuild.gpr.old 2017-01-11 21:44:59.795997896 +0100
69 ++++ gprbuild-gpl-2015-src/gprbuild.gpr 2017-01-11 21:45:07.971998651 +0100
70 +@@ -66,6 +66,7 @@
71 + for Switches ("gpr*.ad?") use
72 + Compiler'Default_Switches ("Ada") & ("-g1");
73 + end case;
74 ++ for Driver ("C") use External ("CC", "gcc");
75 + end Compiler;
76 +
77 + package Binder is
78 + make BUILDER="$(BUILDER)" BUILD="$(BUILD)"
79
80 diff --git a/dev-ada/gprbuild/gprbuild-2016.ebuild b/dev-ada/gprbuild/gprbuild-2016.ebuild
81 index 03d3c2baa53..2fe32aa1093 100644
82 --- a/dev-ada/gprbuild/gprbuild-2016.ebuild
83 +++ b/dev-ada/gprbuild/gprbuild-2016.ebuild
84 @@ -12,19 +12,22 @@ HOMEPAGE="http://libre.adacore.com/"
85 SRC_URI="
86 http://mirrors.cdn.adacore.com/art/57399662c7a447658e0affa8
87 -> ${MYP}-src.tar.gz
88 - http://mirrors.cdn.adacore.com/art/57399978c7a447658e0affc0
89 - -> xmlada-gpl-${PV}-src.tar.gz"
90 + bootstrap? (
91 + http://mirrors.cdn.adacore.com/art/57399978c7a447658e0affc0
92 + -> xmlada-gpl-${PV}-src.tar.gz )"
93
94 LICENSE="GPL-3"
95 SLOT="0"
96 KEYWORDS="~amd64"
97 -IUSE=""
98 +IUSE="bootstrap +shared static static-pic"
99
100 -DEPEND="dev-lang/gnat-gpl"
101 +DEPEND="dev-lang/gnat-gpl
102 + !bootstrap? ( dev-ada/xmlada )"
103 RDEPEND="${DEPEND}"
104
105 S="${WORKDIR}"/${MYP}-src
106
107 +REQUIRED_USE="bootstrap? ( !shared !static !static-pic )"
108 PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
109
110 pkg_setup() {
111 @@ -44,34 +47,55 @@ pkg_setup() {
112 }
113
114 src_configure() {
115 - :
116 + if ! use bootstrap ; then
117 + default
118 + fi
119 }
120
121 bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls"
122 lib_progs="gprlib gprbind"
123
124 src_compile() {
125 - local xmlada_src="../xmlada-gpl-${PV}-src"
126 - incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
127 - -I${xmlada_src}/schema -I${xmlada_src}/unicode \
128 - -I${xmlada_src}/input_sources"
129 - ${GCC} -c ${CFLAGS} src/gpr_imports.c -o gpr_imports.o || die
130 - for bin in ${bin_progs}; do
131 - ${GNATMAKE} -j$(makeopts_jobs) ${incflags} $ADAFLAGS ${bin}-main \
132 - -o ${bin} -largs gpr_imports.o || die
133 - done
134 - for lib in $lib_progs; do
135 - ${GNATMAKE} -j$(makeopts_jobs) ${incflags} ${lib} $ADAFLAGS \
136 - -largs gpr_imports.o || die
137 - done
138 + if use bootstrap; then
139 + local xmlada_src="../xmlada-gpl-${PV}-src"
140 + incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
141 + -I${xmlada_src}/schema -I${xmlada_src}/unicode \
142 + -I${xmlada_src}/input_sources"
143 + $(tc-getCC) -c ${CFLAGS} src/gpr_imports.c -o gpr_imports.o
144 + for bin in ${bin_progs}; do
145 + ${GNATMAKE} -j$(makeopts_jobs) ${incflags} $ADAFLAGS ${bin}-main \
146 + -o ${bin} -largs gpr_imports.o || die
147 + done
148 + for lib in $lib_progs; do
149 + ${GNATMAKE} -j$(makeopts_jobs) ${incflags} ${lib} $ADAFLAGS \
150 + -largs gpr_imports.o || die
151 + done
152 + else
153 + emake PROCESSORS=$(makeopts_jobs) all
154 + for kind in shared static static-pic; do
155 + if use ${kind}; then
156 + emake PROCESSORS=$(makeopts_jobs) libgpr.build.${kind}
157 + fi
158 + done
159 + fi
160 }
161
162 src_install() {
163 - dobin ${bin_progs}
164 - insinto /usr/share/gprconfig
165 - exeinto /usr/libexec/gprbuild
166 - doexe ${lib_progs}
167 - doins share/gprconfig/*.xml
168 - insinto /usr/share/gpr
169 - doins share/_default.gpr
170 + if use bootstrap; then
171 + dobin ${bin_progs}
172 + insinto /usr/share/gprconfig
173 + exeinto /usr/libexec/gprbuild
174 + doexe ${lib_progs}
175 + doins share/gprconfig/*.xml
176 + insinto /usr/share/gpr
177 + doins share/_default.gpr
178 + else
179 + default
180 + for kind in shared static static-pic; do
181 + if use ${kind}; then
182 + emake DESTDIR="${D}" libgpr.install.${kind}
183 + fi
184 + done
185 + fi
186 + einstalldocs
187 }
188
189 diff --git a/dev-ada/gprbuild/metadata.xml b/dev-ada/gprbuild/metadata.xml
190 index d39fc81d0dd..521d595c3ff 100644
191 --- a/dev-ada/gprbuild/metadata.xml
192 +++ b/dev-ada/gprbuild/metadata.xml
193 @@ -5,7 +5,16 @@
194 <email>tupone@g.o</email>
195 <name>Tupone Alfredo</name>
196 </maintainer>
197 + <use>
198 + <flag name="shared">Build shared library</flag>
199 + <flag name="static">Build static library</flag>
200 + <flag name="static-pic">Build static library with pic code</flag>
201 + </use>
202 <longdescription lang="en">
203 - GPRbuild is an advanced software tool designed to help automate the construction of multi-language systems. It removes complexity from multi-language development by allowing developers to quickly and easily compile and link software written in a combination of languages including Ada, Assembler, C, C++, and Fortran. Easily extendable by users to cover new toolchains and languages it is primarily aimed at projects of all sizes organized into subsystems and libraries and is particularly well-suited for compiled languages.
204 + 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).
205 +
206 + It also provides support for a number of other standard associated with XML, like SAX, DOM and XML schemas.
207 +
208 + In addition, it includes a module to manipulate Unicode streams, since this is required by the XML standard.
209 </longdescription>
210 </pkgmetadata>