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/gps/, dev-ada/gps/files/
Date: Tue, 21 Nov 2017 20:47:32
Message-Id: 1511297230.282d7dccde2a231a6b08136a794567b794afd567.tupone@gentoo
1 commit: 282d7dccde2a231a6b08136a794567b794afd567
2 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 21 20:47:10 2017 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 21 20:47:10 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=282d7dcc
7
8 dev-ada/gps: Add GPS (IDE) to gentoo
9
10 Package-Manager: Portage-2.3.13, Repoman-2.3.3
11
12 dev-ada/gps/Manifest | 1 +
13 dev-ada/gps/files/gps-2017-gentoo.patch | 165 ++++++++++++++++++++++++++++++++
14 dev-ada/gps/gps-2017.ebuild | 66 +++++++++++++
15 dev-ada/gps/metadata.xml | 13 +++
16 4 files changed, 245 insertions(+)
17
18 diff --git a/dev-ada/gps/Manifest b/dev-ada/gps/Manifest
19 new file mode 100644
20 index 00000000000..4baa367cf94
21 --- /dev/null
22 +++ b/dev-ada/gps/Manifest
23 @@ -0,0 +1 @@
24 +DIST gps-gpl-2017-src.tar.gz 41216830 BLAKE2B 51ca89c38fa81888a9cf1831cf97f7e0ad72c444328a29063249a4fe72bbdc8357552d470872e9fbbeaf349ef0427b59fa41a0efb56200a07a9426343c731a57 SHA512 101ecef7f183de1da0c2b09d77f284a5e8c5ae56f34a897c8d471e79fe9a2832742608ff5251197ba2a52b5d9dfee6c6937fc22cd55f6d8f38359b070393cb64
25
26 diff --git a/dev-ada/gps/files/gps-2017-gentoo.patch b/dev-ada/gps/files/gps-2017-gentoo.patch
27 new file mode 100644
28 index 00000000000..4fe39ea239f
29 --- /dev/null
30 +++ b/dev-ada/gps/files/gps-2017-gentoo.patch
31 @@ -0,0 +1,165 @@
32 +--- gps-9999/aclocal.m4.old 2017-05-13 21:59:20.129039064 +0200
33 ++++ gps-9999/aclocal.m4 2017-05-13 22:02:12.637234659 +0200
34 +@@ -37,7 +37,7 @@
35 + HAVE_GNAT_PROJECT_$1=yes
36 + else
37 + # Try with "gnatls", in case gprls was not available
38 +- if AC_TRY_COMMAND([gnat ls -Pconftest.gpr system.ads > /dev/null 2>conftest.out])
39 ++ if AC_TRY_COMMAND([@GNAT@ ls -Pconftest.gpr system.ads > /dev/null 2>conftest.out])
40 + then
41 + HAVE_GNAT_PROJECT_$1=yes
42 + else
43 +@@ -156,7 +156,7 @@
44 +
45 + AC_DEFUN(AM_PATH_GNAT,
46 + [
47 +- AC_PATH_PROG(GNATMAKE, gnatmake, no)
48 ++ AC_PATH_PROG(GNATMAKE, @GNATMAKE@, no)
49 +
50 + if test x$GNATMAKE = xno ; then
51 + AC_MSG_ERROR(I could not find gnatmake. See the file 'INSTALL' for more details.)
52 +@@ -279,7 +279,7 @@
53 + AC_MSG_RESULT($GTK_PREFIX $GLIB_PREFIX $ATK_PREFIX $PANGO_PREFIX $CAIRO_PREFIX)
54 + fi
55 +
56 +- AC_PATH_PROG(GNATDRV, gnat, no)
57 ++ AC_PATH_PROG(GNATDRV, @GNAT@, no)
58 + min_gtk_version=ifelse([$1], ,2.0.0,$1)
59 + AC_MSG_CHECKING(for GtkAda - version >= $min_gtk_version)
60 + GTKADA_PRJ=`$GNATDRV ls -vP1 -Pgtkada 2>&1 | grep gtkada.gpr | grep Parsing | cut -d'"' -f2 | head -1`
61 +--- gps-gps-17.0/templates_parser/templates_parser.gpr.old 2017-05-18 21:34:42.892039427 +0200
62 ++++ gps-gps-17.0/templates_parser/templates_parser.gpr 2017-05-18 21:35:16.661512990 +0200
63 +@@ -55,7 +55,7 @@
64 +
65 + end Naming;
66 +
67 +- Common_Options := ("-gnat05");
68 ++ Common_Options := ("-gnat05", "-fPIC");
69 + -- Common options used for the Debug and Release modes
70 +
71 + Debug_Options :=
72 +--- gps-gps-17.0/shared.gpr.in.old 2017-05-18 21:35:56.475892075 +0200
73 ++++ gps-gps-17.0/shared.gpr.in 2017-05-18 21:36:24.972447550 +0200
74 +@@ -24,7 +24,7 @@
75 + end IDE;
76 +
77 + package Compiler is
78 +- Common := ("-g", "-gnat12");
79 ++ Common := ("-g", "-gnat12", "-fPIC");
80 + Optimize := ();
81 +
82 + case OS is
83 +@@ -83,6 +83,7 @@
84 + when "false" =>
85 + null;
86 + end case;
87 ++ for Driver use External ("CC", "gcc");
88 + end Linker;
89 +
90 + end Shared;
91 +--- gps-gps-17.0/common/common_with_xmlada.gpr.in.old 2017-05-18 21:37:25.302506085 +0200
92 ++++ gps-gps-17.0/common/common_with_xmlada.gpr.in 2017-05-18 21:37:58.472988222 +0200
93 +@@ -13,7 +13,7 @@
94 + for Switches ("Ada") use Shared.Compiler'Switches ("Ada");
95 + for Switches ("C") use Shared.Compiler'Switches ("C");
96 + for Switches ("test_htables.adb") use ("-g", "-O2", "-gnatwue");
97 +- for Switches ("s-memory.adb") use ("-g", "-O2", "-gnatpg");
98 ++ for Switches ("s-memory.adb") use ("-g", "-O2", "-gnatpg", "-fPIC");
99 +
100 + No_Checks := ("-g", "-O2", "-gnat2012", "-gnatpn");
101 +
102 +--- gps-gps-17.0/common/common_no_xmlada.gpr.in.old 2017-05-18 21:37:31.406410812 +0200
103 ++++ gps-gps-17.0/common/common_no_xmlada.gpr.in 2017-05-18 21:38:14.796733359 +0200
104 +@@ -12,7 +12,7 @@
105 + for Switches ("Ada") use Shared.Compiler'Switches ("Ada");
106 + for Switches ("C") use Shared.Compiler'Switches ("C");
107 + for Switches ("test_htables.adb") use ("-g", "-O2", "-gnatwue");
108 +- for Switches ("s-memory.adb") use ("-g", "-O2", "-gnatpg");
109 ++ for Switches ("s-memory.adb") use ("-g", "-O2", "-gnatpg", "-fPIC");
110 +
111 + No_Checks := ("-g", "-O2", "-gnat2012", "-gnatpn");
112 +
113 +--- gps-gps-17.0/widgets/widgets.gpr.old 2017-05-18 22:26:05.117847006 +0200
114 ++++ gps-gps-17.0/widgets/widgets.gpr 2017-05-18 22:21:01.646368091 +0200
115 +@@ -12,6 +12,7 @@
116 + package Compiler extends Shared.Compiler is
117 + for Switches ("C") use
118 + Shared.Compiler'Switches ("C") & GnatColl_Gtk.Gtk_Include;
119 ++ for Driver ("C") use External ("CC", "gcc");
120 + end Compiler;
121 +
122 + package IDE renames Shared.IDE;
123 +--- gps-gps-17.0/cli/Makefile.old 2017-05-19 08:07:44.591042479 +0200
124 ++++ gps-gps-17.0/cli/Makefile 2017-05-19 08:08:50.086991123 +0200
125 +@@ -1,8 +1,9 @@
126 + GPRBUILD=gprbuild
127 + GPRCLEAN=gprclean
128 ++GPRBUILD_FLAGS=0
129 +
130 + all default:
131 +- $(GPRBUILD) -p -Pcli
132 ++ $(GPRBUILD) $(GPRBUILD_FLAGS) -p -Pcli
133 +
134 + clean:
135 + $(GPRCLEAN) -q -r -Pcli
136 +--- gps-gps-17.0/gps/gps.gpr.old 2017-05-19 09:24:19.438123599 +0200
137 ++++ gps-gps-17.0/gps/gps.gpr 2017-05-19 09:24:58.639492518 +0200
138 +@@ -75,7 +75,7 @@
139 + end case;
140 + for Switches ("Ada") use Linker'Switches ("Ada")
141 + & Shared.Linker'Switches ("Ada");
142 +-
143 ++ for Driver use External ("CC", "gcc");
144 + -- for Switches ("Ada") use ("-lgmem");
145 + -- for Switches ("Ada") use ("-pg");
146 + end Linker;
147 +--- gps-gps-17.0/testsuite/Makefile.old 2017-05-19 11:08:48.966913663 +0200
148 ++++ gps-gps-17.0/testsuite/Makefile 2017-05-19 11:06:17.245366714 +0200
149 +@@ -1,5 +1,6 @@
150 + GPRBUILD=gprbuild
151 + GPRCLEAN=gprclean
152 ++GPRBUILD_FLAGS=
153 +
154 + SYS := $(shell gcc -dumpmachine)
155 + ifeq ($(OS),Windows_NT)
156 +@@ -14,7 +14,7 @@
157 + endif
158 +
159 + all default: package
160 +- $(GPRBUILD) -P testsuite_drivers.gpr -m -XOS=${OS} -j0 -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
161 ++ $(GPRBUILD) $(GPRBUILD_FLAGS) -P testsuite_drivers.gpr -m -XOS=${OS} -j0 -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
162 +
163 + package:
164 + mkdir -p share/doc
165 +--- gps-gps-17.0/testsuite/testsuite_drivers.gpr.old 2017-05-19 11:21:20.645705481 +0200
166 ++++ gps-gps-17.0/testsuite/testsuite_drivers.gpr 2017-05-19 11:15:42.163206405 +0200
167 +@@ -10,6 +10,10 @@
168 + for Object_Dir use "obj";
169 + for Exec_Dir use "bin";
170 +
171 ++ package Compiler is
172 ++ for Switches ("Ada") use ("-fPIC");
173 ++ end Compiler;
174 ++
175 + package Builder is
176 + for Switches ("Ada") use ("-gnat12", "-ws", "-g", "-j0", "-m", "-gnaty");
177 + end Builder;
178 +--- gps-gps-17.0/Makefile.in.old 2017-05-19 11:49:47.172018411 +0200
179 ++++ gps-gps-17.0/Makefile.in 2017-05-19 11:50:24.653412280 +0200
180 +@@ -10,7 +10,7 @@
181 + INSTALL_PROGRAM = @INSTALL_PROGRAM@
182 + INSTALL_DATA = @INSTALL_DATA@
183 + GNATCOLL_INSTALL = @GNATCOLL_INSTALL@
184 +-prefix = @prefix@
185 ++prefix = $(DESTDIR)@prefix@
186 + bindir = $(prefix)/bin
187 + sharedir = $(prefix)/share
188 + examplesdir = $(prefix)/share/examples/gps
189 +--- gps-gps-17.0/docs/Makefile.in.old 2017-05-19 11:54:52.805076624 +0200
190 ++++ gps-gps-17.0/docs/Makefile.in 2017-05-19 11:55:24.332566945 +0200
191 +@@ -1,4 +1,4 @@
192 +-prefix = @prefix@
193 ++prefix = $(DESTDIR)@prefix@
194 + docdir = $(prefix)/share/doc/gps
195 + sharedir = $(prefix)/share/gps
196 +
197
198 diff --git a/dev-ada/gps/gps-2017.ebuild b/dev-ada/gps/gps-2017.ebuild
199 new file mode 100644
200 index 00000000000..a07971aa8bb
201 --- /dev/null
202 +++ b/dev-ada/gps/gps-2017.ebuild
203 @@ -0,0 +1,66 @@
204 +# Copyright 1999-2017 Gentoo Foundation
205 +# Distributed under the terms of the GNU General Public License v2
206 +
207 +EAPI=6
208 +PYTHON_COMPAT=( python2_7 )
209 +inherit python-single-r1 autotools
210 +
211 +MYP=${PN}-gpl-${PV}-src
212 +
213 +DESCRIPTION="The GNAT Programming Studio"
214 +HOMEPAGE="http://libre.adacore.com/tools/gps/"
215 +SRC_URI="http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deed03b
216 + -> ${MYP}.tar.gz"
217 +
218 +LICENSE="GPL-3"
219 +SLOT="0"
220 +KEYWORDS="~amd64"
221 +IUSE=""
222 +
223 +RDEPEND="${PYTHON_DEPS}
224 + >=dev-ada/gnatcoll-2017[gtk,iconv,projects,pygobject,shared,sqlite,tools]
225 + >=dev-ada/gtkada-2017
226 + dev-ada/libadalang
227 + dev-libs/gobject-introspection
228 + dev-libs/libffi
229 + sys-devel/llvm:=
230 + sys-devel/clang:=
231 + x11-themes/adwaita-icon-theme
232 + x11-themes/hicolor-icon-theme
233 + dev-python/pep8[${PYTHON_USEDEP}]
234 + dev-python/jedi[${PYTHON_USEDEP}]"
235 +
236 +DEPEND="${RDEPEND}"
237 +
238 +S="${WORKDIR}"/${MYP}
239 +
240 +PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
241 +
242 +pkg_setup() {
243 + GCC=${ADA:-$(tc-getCC)}
244 + GNATLS="${GCC/gcc/gnatls}"
245 + GNAT="${GCC/gcc/gnat}"
246 + GNATMAKE="${GCC/gcc/gnatmake}"
247 + if [[ -z "$(type ${GNATLS} 2>/dev/null)" ]] ; then
248 + eerror "You need a gcc compiler that provides the Ada Compiler:"
249 + eerror "1) use gcc-config to select the right compiler or"
250 + eerror "2) set ADA=gcc-6.3.0 in make.conf"
251 + die "ada compiler not available"
252 + fi
253 + python-single-r1_pkg_setup
254 +}
255 +
256 +src_prepare() {
257 + default
258 + mv configure.{in,ac} || die
259 + sed -i \
260 + -e "s:@GNATMAKE@:${GNATMAKE}:g" \
261 + -e "s:@GNAT@:${GNAT}:g" \
262 + aclocal.m4 \
263 + || die
264 + eautoreconf
265 +}
266 +
267 +src_compile() {
268 + emake GPRBUILD_FLAGS="-v ${MAKEOPTS}"
269 +}
270
271 diff --git a/dev-ada/gps/metadata.xml b/dev-ada/gps/metadata.xml
272 new file mode 100644
273 index 00000000000..eb9ac43cfff
274 --- /dev/null
275 +++ b/dev-ada/gps/metadata.xml
276 @@ -0,0 +1,13 @@
277 +<?xml version="1.0" encoding="UTF-8"?>
278 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
279 +<pkgmetadata>
280 + <maintainer type="person">
281 + <email>tupone@g.o</email>
282 + <name>Tupone Alfredo</name>
283 + </maintainer>
284 + <longdescription lang="en">
285 + GPS is a lightweight, extensible IDE, intended to develop
286 + high-integrity software in Ada and SPARK, with support for C and C++
287 + as well.
288 + </longdescription>
289 +</pkgmetadata>