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/gnatcoll/files/, dev-ada/gnatcoll/
Date: Sat, 24 Jun 2017 16:45:31
Message-Id: 1498322711.c5228848bed1923663fd665c3cf91c5ad37ba5e8.tupone@gentoo
1 commit: c5228848bed1923663fd665c3cf91c5ad37ba5e8
2 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 24 16:45:11 2017 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 24 16:45:11 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5228848
7
8 dev-ada/gnatcoll: Add version 2017
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.1
11
12 dev-ada/gnatcoll/Manifest | 1 +
13 dev-ada/gnatcoll/files/gnatcoll-2017-gentoo.patch | 224 ++++++++++++++++++++++
14 dev-ada/gnatcoll/gnatcoll-2017.ebuild | 129 +++++++++++++
15 3 files changed, 354 insertions(+)
16
17 diff --git a/dev-ada/gnatcoll/Manifest b/dev-ada/gnatcoll/Manifest
18 index e3d320cc8a1..c8f53f37aaf 100644
19 --- a/dev-ada/gnatcoll/Manifest
20 +++ b/dev-ada/gnatcoll/Manifest
21 @@ -1 +1,2 @@
22 DIST gnatcoll-gpl-2016-src.tar.gz 5687584 SHA256 8cc7cc01db548447a78e3d6d35a35867514beb625009abbcd3be124c1e259b3b SHA512 8cf06e7c5d58d3b159855534791e7969882e04856ba9d03982a63dcfc630f5b5910c6cad57fec9b00c3d04008b0cb0a1fb238e349766348fa4548868238ede8a WHIRLPOOL d37c12bb6242d92104e89b7c1d9a9cd94d802137ee32faa58687700a822db69e2739372376d12032228843c2a5356f8085d6072715b8bc1bda411039d20b55f5
23 +DIST gnatcoll-gpl-2017-src.tar.gz 5785988 SHA256 66168ee795a67dde3b8a8d0fe6663a776d1bdf50091e6cdd47f3837d89afd434 SHA512 e8b7f2c00816597f33496168bf8928841a2037e517908810761849e23633b2c229d47e4bfaa808e5a619da52bc165f17b8aefa5dee39ecf1a6773b3b1db80363 WHIRLPOOL a0fbda792b282ecb184057efa98332f0b790c9412ba6fec541fbcb8c57cab48f64df6ff81017c283e599cda858d668f5f8fcf5b7bd771c23f34a84a6d16f4c79
24
25 diff --git a/dev-ada/gnatcoll/files/gnatcoll-2017-gentoo.patch b/dev-ada/gnatcoll/files/gnatcoll-2017-gentoo.patch
26 new file mode 100644
27 index 00000000000..2c3efd2c29f
28 --- /dev/null
29 +++ b/dev-ada/gnatcoll/files/gnatcoll-2017-gentoo.patch
30 @@ -0,0 +1,224 @@
31 +--- gnatcoll-gpl-2016-src/Makefile.old 2017-01-20 19:39:07.131398270 +0100
32 ++++ gnatcoll-gpl-2016-src/Makefile 2017-01-20 19:42:30.088728844 +0100
33 +@@ -49,12 +49,12 @@
34 + @${RM} src/gnatcoll-atomic.adb
35 +
36 + @echo "====== Building $(@F) libraries ======"
37 +- ${GPRBUILD} ${GPRBLD_OPTS} -Pgnatcoll_full
38 ++ ${GPRBUILD} ${GPRBLD_OPTS} -Pgnatcoll_full -cargs ${ADAFLAGS}
39 +
40 + @# Need to build libgnatcoll_gtk separately, because its project files
41 + @# requires gtkada.gpr, which might not exist on the machine.
42 + ifeq (${WITH_GTK},yes)
43 +- ${GPRBUILD} ${GPRBLD_OPTS} -Psrc/gnatcoll_gtk
44 ++ ${GPRBUILD} ${GPRBLD_OPTS} -Psrc/gnatcoll_gtk -cargs ${ADAFLAGS}
45 + endif
46 +
47 + build_tools/%: build_library_type/%
48 +@@ -63,7 +63,7 @@
49 + @# They are not build as part of the above because only the Main from
50 + @# gnatcoll_full.gpr are build. We could use aggregate projects to
51 + @# speed things up.
52 +- ${GPRBUILD} ${GPRBLD_OPTS} -q -Psrc/gnatcoll_tools
53 ++ ${GPRBUILD} ${GPRBLD_OPTS} -q -Psrc/gnatcoll_tools -cargs ${ADAFLAGS}
54 +
55 + #######################################################################
56 + # install
57 +--- gnatcoll-gpl-2015-src/src/gnatcoll_iconv.gpr.old 2017-01-07 08:58:01.361112843 +0100
58 ++++ gnatcoll-gpl-2015-src/src/gnatcoll_iconv.gpr 2017-01-07 08:58:23.653687385 +0100
59 +@@ -26,6 +26,7 @@
60 +
61 + package Compiler is
62 + for Switches ("Ada") use GnatColl_Shared.Compiler'Switches ("Ada");
63 ++ for Driver ("C") use External ("GCC", "gcc");
64 + for Switches ("C") use GnatColl_Shared.Compiler'Switches ("C")
65 + & GnatColl_Shared.Iconv_Include;
66 + end Compiler;
67 +--- gnatcoll-gpl-2015-src/src/gnatcoll_sqlite.gpr.old 2017-01-07 09:00:17.146448202 +0100
68 ++++ gnatcoll-gpl-2015-src/src/gnatcoll_sqlite.gpr 2017-01-07 09:00:44.884885281 +0100
69 +@@ -60,8 +60,9 @@
70 +
71 + -- force full optimization for sqlite, we do not debug it
72 + -- in any case.
73 + "-O3") & Gnatcoll_Shared.Sqlite_Switches;
74 + end case;
75 ++ for Driver ("C") use External ("GCC", "gcc");
76 + end Compiler;
77 +
78 + package Linker is
79 +--- gnatcoll-gpl-2015-src/src/gnatcoll_postgres.gpr.old 2017-01-07 09:05:09.177756146 +0100
80 ++++ gnatcoll-gpl-2015-src/src/gnatcoll_postgres.gpr 2017-01-07 09:05:34.282279733 +0100
81 +@@ -38,6 +38,7 @@
82 + for Switches ("C") use
83 + GnatColl_Shared.Compiler'Switches ("C");
84 + end case;
85 ++ for Driver ("C") use External ("GCC", "gcc");
86 + end Compiler;
87 +
88 + package Linker is
89 +--- gnatcoll-gpl-2016-src/gnatcoll_shared.gpr.in.old 2017-01-20 19:50:03.222808656 +0100
90 ++++ gnatcoll-gpl-2016-src/gnatcoll_shared.gpr.in 2017-01-20 19:50:28.200399274 +0100
91 +@@ -13,7 +13,7 @@
92 +
93 + type Yes_No is ("yes", "no");
94 + Gtk : Yes_No := External ("GTK", "@WITH_GTK@");
95 +- Python : Yes_No := External ("PYTHON", "@WITH_PYTHON@");
96 ++ Python : Yes_No := "@WITH_PYTHON@";
97 + Syslog : Yes_No := External ("SYSLOG", "@WITH_SYSLOG@");
98 + Postgres : Yes_No := External ("POSTGRES", "@WITH_POSTGRES@");
99 + type Sqlite_Inclusion is ("yes", "no", "embedded");
100 +--- gnatcoll-gpl-2016-src/src/gnatcoll__libgpr.gpr.old 2017-02-04 15:56:11.685079607 +0100
101 ++++ gnatcoll-gpl-2016-src/src/gnatcoll__libgpr.gpr 2017-02-04 15:57:00.383221978 +0100
102 +@@ -49,6 +49,8 @@
103 + package Builder renames GnatColl_Shared.Builder;
104 +
105 + package Compiler is
106 ++ for Driver ("C") use External ("GCC", "gcc");
107 ++
108 + for Switches ("Ada") use GnatColl_Shared.Compiler'Switches ("Ada");
109 + for Switches ("C") use GnatColl_Shared.Compiler'Switches ("C");
110 + for Switches ("sinfo.adb") use Compiler'Switches ("Ada") & ("-gnatg");
111 +--- gnatcoll-gpl-2016-src/src/gnatcoll__nogpr.gpr.old 2017-02-04 15:58:41.008450044 +0100
112 ++++ gnatcoll-gpl-2016-src/src/gnatcoll__nogpr.gpr 2017-02-04 15:59:02.815066080 +0100
113 +@@ -64,6 +64,7 @@
114 + for Switches ("Ada") use GnatColl_Shared.Compiler'Switches ("Ada");
115 + for Switches ("C") use GnatColl_Shared.Compiler'Switches ("C");
116 + for Switches ("sinfo.adb") use Compiler'Switches ("Ada") & ("-gnatg");
117 ++ for Driver ("C") use External ("GCC", "gcc");
118 +
119 + case GnatColl_Shared.Atomics is
120 + when "intrinsic" =>
121 +--- gnatcoll-gpl-2016-src/aclocal.m4.old 2017-04-06 08:25:14.796699365 +0200
122 ++++ gnatcoll-gpl-2016-src/aclocal.m4 2017-04-06 08:25:36.622318016 +0200
123 +@@ -45,7 +45,7 @@
124 + cat > conftest.ada <<EOF
125 + [$3]
126 + EOF
127 +- if AC_TRY_COMMAND([gnatchop -q conftest.ada && $1 $2 >/dev/null 2>conftest.out])
128 ++ if AC_TRY_COMMAND([${GNATCHOP} -q conftest.ada && $1 $2 >/dev/null 2>conftest.out])
129 + then
130 + : Success
131 + $4
132 +@@ -68,7 +68,7 @@
133 + AC_DEFUN(AM_HAS_INTRINSIC_SYNC_COUNTERS,
134 + [
135 + AC_MSG_CHECKING([whether platform supports atomic inc/dec])
136 +- AM_TRY_ADA([gnatmake], [check.adb],
137 ++ AM_TRY_ADA([${GNATMAKE}], [check.adb],
138 + [
139 + with Interfaces; use Interfaces;
140 + procedure Check is
141 +--- gnatcoll-gpl-2016-src/testsuite/json/__init__.py.old 2017-04-24 17:52:34.158513249 +0200
142 ++++ gnatcoll-gpl-2016-src/testsuite/json/__init__.py 2017-04-24 17:52:52.636207017 +0200
143 +@@ -21,7 +21,7 @@
144 + @requires_not_aix # Storage_Error on that machine
145 + @chdir("MB28-001")
146 + def test_MB28_001(self):
147 +- self.runexec(["python", "make_json.py"])
148 ++ self.runexec(["python2.7", "make_json.py"])
149 + self.gprbuild()
150 + self.runexec("json_stack_test", "test.out")
151 +
152 +--- gnatcoll-gpl-2016-src/testsuite/projects/aggregate_create/c1/c.gpr.old 2017-04-24 18:00:21.652975475 +0200
153 ++++ gnatcoll-gpl-2016-src/testsuite/projects/aggregate_create/c1/c.gpr 2017-04-24 18:01:23.035983670 +0200
154 +@@ -15,5 +15,6 @@
155 + for Default_Switches ("ada") use
156 + ("-g", "-gnatQ", "-O1", "-gnatf", "-gnato", "-gnatwa.Xe", "-gnaty");
157 ++ for Driver ("c") use External ("GCC", "gcc");
158 + end Compiler;
159 +
160 + end c;
161 +--- gnatcoll-gpl-2016-src/testsuite/projects/aggregate_create/c2/c.gpr.old 2017-04-24 18:01:28.394896928 +0200
162 ++++ gnatcoll-gpl-2016-src/testsuite/projects/aggregate_create/c2/c.gpr 2017-04-24 18:01:44.343638682 +0200
163 +@@ -15,5 +15,6 @@
164 + for Default_Switches ("ada") use
165 + ("-g", "-gnatQ", "-O1", "-gnatf", "-gnato", "-gnatwa.Xe", "-gnaty");
166 ++ for Driver ("C") use External ("GCC", "gcc");
167 + end Compiler;
168 +
169 + end c;
170 +--- gnatcoll-gpl-2016-src/testsuite/projects/__init__.py.old 2017-04-24 19:10:30.465246199 +0200
171 ++++ gnatcoll-gpl-2016-src/testsuite/projects/__init__.py 2017-04-24 19:10:42.768035080 +0200
172 +@@ -105,25 +105,6 @@
173 + self.gprbuild("default.gpr")
174 + self.runexec("main", "")
175 +
176 +- @support.requires_not_windows
177 +- @chdir("N918-040")
178 +- def test_bareboard(self):
179 +- self.create_fake_bb_compiler('install', 'arm-eabi', '6.1.0w', '3.4.6')
180 +-
181 +- # Make sure auto.cgpr is not deleted on exit
182 +- try:
183 +- os.unlink('auto.cgpr')
184 +- except:
185 +- pass
186 +- self.gprbuild('main_prj', switches=['--autoconf=auto.cgpr'])
187 +- m = re.search('for Target use "(.*?)"', open('auto.cgpr').read())
188 +- target = m.group(1)
189 +-
190 +- def customFilter(actual):
191 +- return actual.replace(target, "<native>")
192 +-
193 +- self.runexec(['sh', 'test.sh'], 'test.out', customFilter=customFilter)
194 +-
195 + @chdir("NB12-045")
196 + def test_NB12_045(self):
197 + # Test registering attribute in unknown package
198 +--- gnatcoll-gpl-2016-src/testsuite/xref/tabs/default.gpr.old 2017-04-24 20:01:55.535913959 +0200
199 ++++ gnatcoll-gpl-2016-src/testsuite/xref/tabs/default.gpr 2017-04-24 20:02:51.740950192 +0200
200 +@@ -1,3 +1,6 @@
201 + project Default is
202 + for Languages use ("Ada", "C");
203 ++ package Compiler is
204 ++ for Driver ("C") use External ("GCC", "gcc");
205 ++ end Compiler;
206 + end Default;
207 +--- gnatcoll-gpl-2016-src/testsuite/xref/doc1/dummy.gpr.old 2017-04-24 20:04:12.012574064 +0200
208 ++++ gnatcoll-gpl-2016-src/testsuite/xref/doc1/dummy.gpr 2017-04-24 20:04:54.025853974 +0200
209 +@@ -6,4 +6,7 @@
210 + for Body_Suffix ("c++") use ".cc";
211 + end Naming;
212 +
213 ++ package Compiler is
214 ++ for Driver ("C") use External ("GCC", "gcc");
215 ++ end Compiler;
216 + end Dummy;
217 +--- gnatcoll-gpl-2016-src/src/tools/gnatcoll_db2ada.adb.old 2017-04-24 21:36:09.193973179 +0200
218 ++++ gnatcoll-gpl-2016-src/src/tools/gnatcoll_db2ada.adb 2017-04-24 21:36:16.029858932 +0200
219 +@@ -211,7 +211,7 @@
220 +
221 + declare
222 + Output : constant String := Get_Command_Output
223 +- (Command => "python",
224 ++ (Command => "python2.7",
225 + Arguments => Args,
226 + Input => "",
227 + Status => Status'Access,
228 +--- gnatcoll-gpl-2017-src/src/gnatcoll_python.gpr.old 2017-06-24 18:06:19.702063079 +0200
229 ++++ gnatcoll-gpl-2017-src/src/gnatcoll_python.gpr 2017-06-24 18:05:04.276103652 +0200
230 +@@ -60,6 +60,7 @@
231 +
232 + for Switches ("C") use
233 +- ("-g", "-O2") & GnatColl_Shared.Python_Cflags;
234 ++ ("-g", "-O2", "-fPIC") & GnatColl_Shared.Python_Cflags;
235 ++ for Driver ("C") use External ("GCC", "gcc");
236 + end Compiler;
237 +
238 + package Linker is
239 +--- gnatcoll-gpl-2017-src/src/gnatcoll_gtk.gpr.old 2017-06-24 18:37:22.164631219 +0200
240 ++++ gnatcoll-gpl-2017-src/src/gnatcoll_gtk.gpr 2017-06-24 18:37:55.763186201 +0200
241 +@@ -71,11 +71,12 @@
242 + for Switches ("Ada") use GnatColl_Shared.Compiler'Switches ("Ada");
243 +
244 + for Switches ("C") use
245 +- ("-g", "-O2")
246 ++ ("-g", "-O2", "-fPIC")
247 + & GnatColl_Shared.Python_Cflags
248 + & GnatColl_Shared.Pygtk_Include
249 + & GnatColl_Shared.PyGobject_Include
250 + & Gtk_Include;
251 ++ for Driver ("C") use External ("GCC", "gcc");
252 + end Compiler;
253 +
254 + package Linker is
255
256 diff --git a/dev-ada/gnatcoll/gnatcoll-2017.ebuild b/dev-ada/gnatcoll/gnatcoll-2017.ebuild
257 new file mode 100644
258 index 00000000000..64a817fd92c
259 --- /dev/null
260 +++ b/dev-ada/gnatcoll/gnatcoll-2017.ebuild
261 @@ -0,0 +1,129 @@
262 +# Copyright 1999-2017 Gentoo Foundation
263 +# Distributed under the terms of the GNU General Public License v2
264 +
265 +EAPI=6
266 +PYTHON_COMPAT=( python2_7 )
267 +inherit multilib multiprocessing autotools python-single-r1
268 +
269 +MYP=${PN}-gpl-${PV}
270 +
271 +DESCRIPTION="GNAT Component Collection"
272 +HOMEPAGE="http://libre.adacore.com"
273 +SRC_URI="http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deed016
274 + -> ${MYP}-src.tar.gz"
275 +
276 +LICENSE="GPL-3"
277 +SLOT="0"
278 +KEYWORDS="~amd64"
279 +IUSE="gmp gtk iconv postgresql pygobject projects readline +shared sqlite
280 + static syslog"
281 +
282 +RDEPEND="dev-lang/gnat-gpl:*
283 + ${PYTHON_DEPS}
284 + gmp? ( dev-libs/gmp:* )
285 + gtk? (
286 + dev-ada/gtkada
287 + dev-libs/atk
288 + dev-libs/glib
289 + x11-libs/cairo
290 + x11-libs/gdk-pixbuf
291 + x11-libs/gtk+:3
292 + x11-libs/pango
293 + )
294 + pygobject? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
295 + postgresql? ( dev-db/postgresql:* )
296 + sqlite? ( dev-db/sqlite )
297 + projects? (
298 + >=dev-ada/gprbuild-2017[static?,shared?]
299 + )"
300 +DEPEND="${RDEPEND}
301 + dev-ada/gprbuild"
302 +
303 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
304 + pygobject? ( gtk )"
305 +
306 +S="${WORKDIR}"/${MYP}-src
307 +
308 +PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
309 +
310 +pkg_setup() {
311 + GCC=${ADA:-$(tc-getCC)}
312 + GNATMAKE="${GCC/gcc/gnatmake}"
313 + GNATCHOP="${GCC/gcc/gnatchop}"
314 + if [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then
315 + eerror "You need a gcc compiler that provides the Ada Compiler:"
316 + eerror "1) use gcc-config to select the right compiler or"
317 + eerror "2) set ADA=gcc-4.9.4 in make.conf"
318 + die "ada compiler not available"
319 + fi
320 + python-single-r1_pkg_setup
321 +}
322 +
323 +src_prepare() {
324 + default
325 + mv configure.{in,ac} || die
326 + eautoreconf
327 +}
328 +
329 +src_configure() {
330 + if use sqlite; then
331 + myConf="--with-sqlite=$(get_libdir)"
332 + else
333 + myConf="--without-sqlite"
334 + fi
335 + if use gtk ; then
336 + myConf="$myConf --with-gtk=3.0"
337 + else
338 + myConf="$myConf --with-gtk=no"
339 + fi
340 + econf \
341 + GNATCHOP="${GNATCHOP}" \
342 + GNATMAKE="${GNATMAKE}" \
343 + --with-python \
344 + $(use_with gmp) \
345 + $(use_with iconv) \
346 + $(use_with postgresql) \
347 + $(use_enable projects) \
348 + $(use_enable pygobject) \
349 + $(use_enable readline gpl) \
350 + $(use_enable readline) \
351 + $(use_enable syslog) \
352 + --with-python-exec=${EPYTHON} \
353 + --enable-shared-python \
354 + --disable-pygtk \
355 + CC=${GCC} \
356 + $myConf
357 +}
358 +
359 +src_compile() {
360 + if use shared; then
361 + emake PROCESSORS=$(makeopts_jobs) GPRBUILD_OPTIONS=-v GCC=${GCC} \
362 + build_library_type/relocatable
363 + fi
364 + if use static; then
365 + emake PROCESSORS=$(makeopts_jobs) GPRBUILD_OPTIONS=-v GCC=${GCC} \
366 + build_library_type/static
367 + fi
368 + python_fix_shebang .
369 +}
370 +
371 +src_install() {
372 + if use shared; then
373 + emake prefix="${D}usr" install_library_type/relocatable
374 + fi
375 + if use static; then
376 + emake prefix="${D}usr" install_library_type/static
377 + fi
378 + emake prefix="${D}usr" install_gps_plugin
379 + einstalldocs
380 +}
381 +
382 +src_test() {
383 + # The test suite is in
384 + # To run you need to have the ada compiler available as gcc
385 + # Even in this case there are still some problem
386 + # Going into the testsuite directory and running
387 + # ./run.py -v -v
388 + # run here (having enabled most USE flags)
389 + true
390 +}