1 |
commit: 6dedf439f0e24e69024fd23ee20450e5184b7696 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 13 06:53:33 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 13 06:57:38 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dedf439 |
7 |
|
8 |
app-eselect/eselect-gnat: Remove last-rited pkg |
9 |
|
10 |
Closes: https://bugs.gentoo.org/362753 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
.../eselect-gnat/eselect-gnat-1.3-r1.ebuild | 35 ---- |
14 |
.../eselect-gnat/eselect-gnat-1.4-r1.ebuild | 38 ---- |
15 |
app-eselect/eselect-gnat/eselect-gnat-1.4.ebuild | 38 ---- |
16 |
.../eselect-gnat/eselect-gnat-1.5-r1.ebuild | 38 ---- |
17 |
app-eselect/eselect-gnat/eselect-gnat-1.5.ebuild | 38 ---- |
18 |
.../eselect-gnat/files/gnat-common-1.3-r1.bash | 222 -------------------- |
19 |
.../eselect-gnat/files/gnat-common-1.4-r1.bash | 225 -------------------- |
20 |
.../eselect-gnat/files/gnat-common-1.5.bash | 225 -------------------- |
21 |
app-eselect/eselect-gnat/files/gnat.eselect-1.3 | 206 ------------------ |
22 |
app-eselect/eselect-gnat/files/gnat.eselect-1.4 | 229 --------------------- |
23 |
app-eselect/eselect-gnat/files/gnat.eselect-1.5 | 225 -------------------- |
24 |
app-eselect/eselect-gnat/metadata.xml | 6 - |
25 |
profiles/package.mask | 7 - |
26 |
profiles/updates/1Q-2015 | 1 - |
27 |
14 files changed, 1533 deletions(-) |
28 |
|
29 |
diff --git a/app-eselect/eselect-gnat/eselect-gnat-1.3-r1.ebuild b/app-eselect/eselect-gnat/eselect-gnat-1.3-r1.ebuild |
30 |
deleted file mode 100644 |
31 |
index c05adffcd12..00000000000 |
32 |
--- a/app-eselect/eselect-gnat/eselect-gnat-1.3-r1.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,35 +0,0 @@ |
35 |
-# Copyright 1999-2016 Gentoo Foundation |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-EAPI=5 |
39 |
- |
40 |
-inherit eutils |
41 |
- |
42 |
-DESCRIPTION="gnat module for eselect" |
43 |
-HOMEPAGE="https://www.gentoo.org" |
44 |
-SRC_URI="" |
45 |
- |
46 |
-LICENSE="GPL-2" |
47 |
-SLOT="0" |
48 |
-KEYWORDS="amd64 ppc x86" |
49 |
- |
50 |
-IUSE="" |
51 |
-RDEPEND="app-admin/eselect" |
52 |
- |
53 |
-S="${WORKDIR}" |
54 |
- |
55 |
-MODULEDIR="/usr/share/eselect/modules" |
56 |
- |
57 |
-# NOTE!! |
58 |
-# This path is duplicated in gnat-eselect module, |
59 |
-# adjust in both locations! |
60 |
-LIBDIR="/usr/share/gnat/lib" |
61 |
- |
62 |
-src_install() { |
63 |
- dodir ${MODULEDIR} |
64 |
- insinto ${MODULEDIR} |
65 |
- newins "${FILESDIR}"/gnat.eselect-${PV} gnat.eselect |
66 |
- dodir ${LIBDIR} |
67 |
- insinto ${LIBDIR} |
68 |
- newins "${FILESDIR}"/gnat-common-${PVR}.bash gnat-common.bash |
69 |
-} |
70 |
|
71 |
diff --git a/app-eselect/eselect-gnat/eselect-gnat-1.4-r1.ebuild b/app-eselect/eselect-gnat/eselect-gnat-1.4-r1.ebuild |
72 |
deleted file mode 100644 |
73 |
index c5e81999f4c..00000000000 |
74 |
--- a/app-eselect/eselect-gnat/eselect-gnat-1.4-r1.ebuild |
75 |
+++ /dev/null |
76 |
@@ -1,38 +0,0 @@ |
77 |
-# Copyright 1999-2016 Gentoo Foundation |
78 |
-# Distributed under the terms of the GNU General Public License v2 |
79 |
- |
80 |
-EAPI=5 |
81 |
- |
82 |
-inherit eutils |
83 |
- |
84 |
-DESCRIPTION="gnat module for eselect" |
85 |
-HOMEPAGE="https://www.gentoo.org" |
86 |
-SRC_URI="" |
87 |
- |
88 |
-LICENSE="GPL-2" |
89 |
-SLOT="0" |
90 |
-KEYWORDS="~amd64 ~ppc ~x86" |
91 |
- |
92 |
-IUSE="" |
93 |
-RDEPEND="app-admin/eselect" |
94 |
- |
95 |
-S="${WORKDIR}" |
96 |
- |
97 |
-MODULEDIR="/usr/share/eselect/modules" |
98 |
- |
99 |
-# NOTE!! |
100 |
-# This path is duplicated in gnat-eselect module, |
101 |
-# adjust in both locations! |
102 |
-LIBDIR="/usr/share/gnat/lib" |
103 |
- |
104 |
-src_install() { |
105 |
- dodir ${MODULEDIR} |
106 |
- insinto ${MODULEDIR} |
107 |
- newins "${FILESDIR}"/gnat.eselect-${PV} gnat.eselect |
108 |
- dodir ${LIBDIR} |
109 |
- insinto ${LIBDIR} |
110 |
- # !ATTN! |
111 |
- # Make sure to adjust version of installed file to a proper one if there is |
112 |
- # a change! |
113 |
- newins "${FILESDIR}"/gnat-common-${PVR}.bash gnat-common.bash |
114 |
-} |
115 |
|
116 |
diff --git a/app-eselect/eselect-gnat/eselect-gnat-1.4.ebuild b/app-eselect/eselect-gnat/eselect-gnat-1.4.ebuild |
117 |
deleted file mode 100644 |
118 |
index 73a6543927f..00000000000 |
119 |
--- a/app-eselect/eselect-gnat/eselect-gnat-1.4.ebuild |
120 |
+++ /dev/null |
121 |
@@ -1,38 +0,0 @@ |
122 |
-# Copyright 1999-2016 Gentoo Foundation |
123 |
-# Distributed under the terms of the GNU General Public License v2 |
124 |
- |
125 |
-EAPI=5 |
126 |
- |
127 |
-inherit eutils |
128 |
- |
129 |
-DESCRIPTION="gnat module for eselect" |
130 |
-HOMEPAGE="https://www.gentoo.org" |
131 |
-SRC_URI="" |
132 |
- |
133 |
-LICENSE="GPL-2" |
134 |
-SLOT="0" |
135 |
-KEYWORDS="~amd64 ~ppc ~x86" |
136 |
- |
137 |
-IUSE="" |
138 |
-RDEPEND="app-admin/eselect" |
139 |
- |
140 |
-S="${WORKDIR}" |
141 |
- |
142 |
-MODULEDIR="/usr/share/eselect/modules" |
143 |
- |
144 |
-# NOTE!! |
145 |
-# This path is duplicated in gnat-eselect module, |
146 |
-# adjust in both locations! |
147 |
-LIBDIR="/usr/share/gnat/lib" |
148 |
- |
149 |
-src_install() { |
150 |
- dodir ${MODULEDIR} |
151 |
- insinto ${MODULEDIR} |
152 |
- newins "${FILESDIR}"/gnat.eselect-${PV} gnat.eselect |
153 |
- dodir ${LIBDIR} |
154 |
- insinto ${LIBDIR} |
155 |
- # !ATTN! |
156 |
- # Make sure to adjust version of installed file to a proper one if there is |
157 |
- # a change! |
158 |
- newins "${FILESDIR}"/gnat-common-1.3-r1.bash gnat-common.bash |
159 |
-} |
160 |
|
161 |
diff --git a/app-eselect/eselect-gnat/eselect-gnat-1.5-r1.ebuild b/app-eselect/eselect-gnat/eselect-gnat-1.5-r1.ebuild |
162 |
deleted file mode 100644 |
163 |
index c3ec41a0702..00000000000 |
164 |
--- a/app-eselect/eselect-gnat/eselect-gnat-1.5-r1.ebuild |
165 |
+++ /dev/null |
166 |
@@ -1,38 +0,0 @@ |
167 |
-# Copyright 1999-2016 Gentoo Foundation |
168 |
-# Distributed under the terms of the GNU General Public License v2 |
169 |
- |
170 |
-EAPI=5 |
171 |
- |
172 |
-inherit eutils |
173 |
- |
174 |
-DESCRIPTION="gnat module for eselect" |
175 |
-HOMEPAGE="https://www.gentoo.org" |
176 |
-SRC_URI="" |
177 |
- |
178 |
-LICENSE="GPL-2" |
179 |
-SLOT="0" |
180 |
-KEYWORDS="~amd64 ~arm ~ppc ~x86 ~sparc" |
181 |
- |
182 |
-IUSE="" |
183 |
-RDEPEND=">=app-admin/eselect-1.2.5" |
184 |
- |
185 |
-S="${WORKDIR}" |
186 |
- |
187 |
-MODULEDIR="/usr/share/eselect/modules" |
188 |
- |
189 |
-# NOTE!! |
190 |
-# This path is duplicated in gnat-eselect module, |
191 |
-# adjust in both locations! |
192 |
-LIBDIR="/usr/share/gnat/lib" |
193 |
- |
194 |
-src_install() { |
195 |
- dodir ${MODULEDIR} |
196 |
- insinto ${MODULEDIR} |
197 |
- newins "${FILESDIR}"/gnat.eselect-${PV} gnat.eselect |
198 |
- dodir ${LIBDIR} |
199 |
- insinto ${LIBDIR} |
200 |
- # !ATTN! |
201 |
- # Make sure to adjust version of installed file to a proper one if there is |
202 |
- # a change! |
203 |
- newins "${FILESDIR}"/gnat-common-${PV}.bash gnat-common.bash |
204 |
-} |
205 |
|
206 |
diff --git a/app-eselect/eselect-gnat/eselect-gnat-1.5.ebuild b/app-eselect/eselect-gnat/eselect-gnat-1.5.ebuild |
207 |
deleted file mode 100644 |
208 |
index fe933b324b5..00000000000 |
209 |
--- a/app-eselect/eselect-gnat/eselect-gnat-1.5.ebuild |
210 |
+++ /dev/null |
211 |
@@ -1,38 +0,0 @@ |
212 |
-# Copyright 1999-2016 Gentoo Foundation |
213 |
-# Distributed under the terms of the GNU General Public License v2 |
214 |
- |
215 |
-EAPI=5 |
216 |
- |
217 |
-inherit eutils |
218 |
- |
219 |
-DESCRIPTION="gnat module for eselect" |
220 |
-HOMEPAGE="https://www.gentoo.org" |
221 |
-SRC_URI="" |
222 |
- |
223 |
-LICENSE="GPL-2" |
224 |
-SLOT="0" |
225 |
-KEYWORDS="~amd64 ~ppc ~x86 ~sparc" |
226 |
- |
227 |
-IUSE="" |
228 |
-RDEPEND=">=app-admin/eselect-1.2.5" |
229 |
- |
230 |
-S="${WORKDIR}" |
231 |
- |
232 |
-MODULEDIR="/usr/share/eselect/modules" |
233 |
- |
234 |
-# NOTE!! |
235 |
-# This path is duplicated in gnat-eselect module, |
236 |
-# adjust in both locations! |
237 |
-LIBDIR="/usr/share/gnat/lib" |
238 |
- |
239 |
-src_install() { |
240 |
- dodir ${MODULEDIR} |
241 |
- insinto ${MODULEDIR} |
242 |
- newins "${FILESDIR}"/gnat.eselect-${PV} gnat.eselect |
243 |
- dodir ${LIBDIR} |
244 |
- insinto ${LIBDIR} |
245 |
- # !ATTN! |
246 |
- # Make sure to adjust version of installed file to a proper one if there is |
247 |
- # a change! |
248 |
- newins "${FILESDIR}"/gnat-common-1.4-r1.bash gnat-common.bash |
249 |
-} |
250 |
|
251 |
diff --git a/app-eselect/eselect-gnat/files/gnat-common-1.3-r1.bash b/app-eselect/eselect-gnat/files/gnat-common-1.3-r1.bash |
252 |
deleted file mode 100644 |
253 |
index d6599451502..00000000000 |
254 |
--- a/app-eselect/eselect-gnat/files/gnat-common-1.3-r1.bash |
255 |
+++ /dev/null |
256 |
@@ -1,222 +0,0 @@ |
257 |
-# Copyright 1999-2015 Gentoo Foundation |
258 |
-# Distributed under the terms of the GNU General Public License v2 |
259 |
- |
260 |
-# |
261 |
-# Original Author: George Shapovalov <george@g.o> |
262 |
-# Purpose: Contains common vars/locations and functions for use by gnat.eclass, |
263 |
-# gnat.eselect and gnatbuild.eclass. |
264 |
-# |
265 |
-# NOTE!!! |
266 |
-# This code should just define vars (try to limit these!) and simple functions. |
267 |
-# No bash extensions!! |
268 |
-# That is, no portage or eclass constructs are allowed! |
269 |
-# |
270 |
- |
271 |
- |
272 |
- |
273 |
-# ---------------------------------- |
274 |
-# Globals |
275 |
- |
276 |
-# Environmantal stuff (for env update) |
277 |
-SPECSDIR="/usr/share/gnat/eselect" |
278 |
-ENVDIR="/etc/env.d" |
279 |
-MARKER="55gnat-" |
280 |
- |
281 |
-# User configurable settings |
282 |
-SETTINGSDIR="/etc/ada" |
283 |
-PRIMELIST="${SETTINGSDIR}/primary_compilers" |
284 |
- |
285 |
-## Lib install locations |
286 |
-## |
287 |
-## Gnat profile dependent files go under under ${LibTop}/${Gnat_Profile}/${PN} |
288 |
-## and common files go unde SpecsDir, DataDir |
289 |
-#PREFIX=/usr |
290 |
-## Replace %LIBDIR% below with $(get_libdir) in eclasses and ebuilds (top level Ok, inherit multilib) |
291 |
-## or $(profile2libdir ${profile}) in this code, eselect module or anywhere |
292 |
-## outside portage (as profile will be available only during actual execution, this only should |
293 |
-## be done inside corresponding functions). |
294 |
-#AdalibSpecsDir=${PREFIX}/include/ada |
295 |
-#AdalibDataDir=${PREFIX}/share/ada |
296 |
-#AdalibLibTop=${PREFIX}/%LIBDIR%/ada |
297 |
- |
298 |
- |
299 |
-# ------------------------------------ |
300 |
-# Helpers |
301 |
-# |
302 |
- |
303 |
-# get_all_profile_components splits gnat profile and returns pace separated list of its components: |
304 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu gcc 4.1 |
305 |
-# args: |
306 |
-# $1 - the string to split |
307 |
-get_all_profile_components() { |
308 |
- local GnatSLOT=${1##*-} |
309 |
- local remainder=${1%-*} |
310 |
- local GnatPkg=${remainder##*-} |
311 |
- remainder=${remainder%-gnat-*} |
312 |
- echo "${remainder} ${GnatPkg} ${GnatSLOT}" |
313 |
-} |
314 |
- |
315 |
-# similar to above, returns only SLOT component: |
316 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> 4.1 |
317 |
-# args: |
318 |
-# $1 - the string to extract the slot from |
319 |
-get_gnat_SLOT() { |
320 |
- echo "${1##*-}" |
321 |
-} |
322 |
- |
323 |
-# returns only Pkg component: |
324 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> gcc |
325 |
-# args: |
326 |
-# $1 - the string to extract the slot from |
327 |
-get_gnat_Pkg() { |
328 |
- local remainder=${1%-*} |
329 |
- echo "${remainder##*-}" |
330 |
-} |
331 |
- |
332 |
-# returns only Arch component: |
333 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu |
334 |
-# args: |
335 |
-# $1 - the string to extract the slot from |
336 |
-get_gnat_Arch() { |
337 |
- echo ${1%-gnat-*} |
338 |
-} |
339 |
- |
340 |
- |
341 |
- |
342 |
-## ------------------------------------------- |
343 |
-# gnat profile and lib detection functions |
344 |
- |
345 |
- |
346 |
-# create a list of all gnat env.d files |
347 |
-# for now use trivial implementation - store name of active profile in the |
348 |
-# env file name, so it gets called 55gnat-${ARCH}-${PN}-${SLOT} |
349 |
-get_env_list() { |
350 |
- for fn in ${ENVDIR}/${MARKER}*; do |
351 |
- echo $(basename ${fn}) |
352 |
- done |
353 |
-} |
354 |
- |
355 |
- |
356 |
- |
357 |
-# find all installed compilers and return a list |
358 |
-find_all_compilers() { |
359 |
- [[ ! -d ${SPECSDIR} ]] && exit |
360 |
- for fn in ${SPECSDIR}/*; do |
361 |
- [[ ! -d ${fn} ]] && echo $(basename ${fn}); |
362 |
- done |
363 |
-} |
364 |
- |
365 |
-# find installed primary compilers and return a list |
366 |
-find_primary_compilers() { |
367 |
- [[ ! -f ${PRIMELIST} ]] && exit |
368 |
- for fn in $(cat ${PRIMELIST}); do |
369 |
- [[ -f ${SPECSDIR}/${fn} ]] && echo ${fn}; |
370 |
- done |
371 |
-} |
372 |
- |
373 |
-# find installed libs and return a list |
374 |
-find_all_libs() { |
375 |
- [[ ! -d ${SPECSDIR} ]] && exit |
376 |
- for fn in ${SPECSDIR}/*; do |
377 |
- [[ -d ${fn} ]] && echo $(basename ${fn}); |
378 |
- done |
379 |
-} |
380 |
- |
381 |
-# find libs that have been built for a given profile |
382 |
-# Arguments: |
383 |
-# $1 - gnat profile for which to detect active libs |
384 |
-find_libs4profile() { |
385 |
- libs=( $(find_all_libs) ) |
386 |
- |
387 |
- for (( i = 0 ; i < ${#libs[@]} ; i = i + 1 )) ; do |
388 |
- [[ -f ${SPECSDIR}/${libs[$i]}/$1 ]] && echo "${libs[$i]}" |
389 |
- done |
390 |
-} |
391 |
- |
392 |
- |
393 |
- |
394 |
- |
395 |
-## ----------------------- |
396 |
-# main action - central part of do_set and helpers |
397 |
- |
398 |
- |
399 |
-# extracts values of the passed var definition from given spec file |
400 |
-# params: |
401 |
-# $1: spec file (as generated by gnabuild.eclass) |
402 |
-# $2: variable name |
403 |
-get_var_from_spec() { |
404 |
- local var=$(grep -e "^ *$2=" $1|cut -d= -f2) |
405 |
- echo ${var} |
406 |
-} |
407 |
- |
408 |
- |
409 |
-# Cycle through given libs and form a ':' separated list of settings for the given |
410 |
-# var. Returned string starts with ':' if there is any non-empty setting, |
411 |
-# otherwise returns empty string. Repeating settings are omitted, that is |
412 |
-# unique entry is added only first time it is encountered. No need to have some |
413 |
-# common dir listed many times in PATH for example. |
414 |
-# |
415 |
-# params: |
416 |
-# $1 - name of env var to process |
417 |
-# $2 - name of gnat profile |
418 |
-# $3.. - list of libs to check (to avoid its composition every time) |
419 |
-# - the list is expanded to list of args at the point of call |
420 |
-get_lib_var_settings() { |
421 |
- local envVar=$1 |
422 |
- local toset=$2 |
423 |
- #echo "get_lib_var_settings params:$@" >> /tmp/eselect-gnat.rep |
424 |
- if [[ "none" != ${3} ]]; then |
425 |
- local envString |
426 |
- local specLine |
427 |
- while [[ -n $3 ]]; do |
428 |
- specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar}) |
429 |
- #echo "$3:${specLine}." >> /tmp/eselect-gnat.rep |
430 |
- if [[ -n ${specLine} ]] && [[ ! ${envString} =~ ${specLine} ]]; then |
431 |
- envString="${envString}:${specLine}" |
432 |
- fi |
433 |
- shift |
434 |
- done |
435 |
- echo "${envString}" |
436 |
- fi |
437 |
-} |
438 |
- |
439 |
- |
440 |
- |
441 |
-# The action! |
442 |
-# Part common for do_set and do_update of gnat.eselect, also used in gnat.eclass |
443 |
-# to set environment during lib build and installation |
444 |
-# |
445 |
-# params: |
446 |
-# $1 - profile to set (toset param inside) |
447 |
-# $2 - envfile |
448 |
- |
449 |
-generate_envFile() { |
450 |
- local toset=$1 |
451 |
- local envfile=$2 |
452 |
- |
453 |
- local binpath="$(get_var_from_spec ${SPECSDIR}/${toset} binpath)" |
454 |
- local libexecpath="$(get_var_from_spec ${SPECSDIR}/${toset} libexecpath)" |
455 |
- local libs=( $(find_libs4profile ${toset}) ) |
456 |
- #echo "generate_envFile: ${libs[@]}" >> /tmp/eselect-gnat.rep |
457 |
- if (( 0 == ${#libs[@]} )); then |
458 |
- libs="none" |
459 |
- fi |
460 |
- |
461 |
- local MyPath="${binpath}:${libexecpath}$(get_lib_var_settings PATH ${toset} ${libs[@]})" |
462 |
- echo "PATH=${MyPath}" > "${envfile}" |
463 |
- echo "ROOTPATH=${MyPath}" >> "${envfile}" |
464 |
- echo "MANPATH=$(get_var_from_spec ${SPECSDIR}/${toset} manpath)$(get_lib_var_settings MANPATH ${toset} ${libs[@]})" >> "${envfile}" |
465 |
- echo "INFOPATH=$(get_var_from_spec ${SPECSDIR}/${toset} infopath)$(get_lib_var_settings INFOPATH ${toset} ${libs[@]})" >> "${envfile}" |
466 |
- # the next three use the common base |
467 |
- local libBase=$(get_var_from_spec ${SPECSDIR}/${toset} ldpath) |
468 |
- echo "LDPATH=${libBase}:${libBase}/adalib$(get_lib_var_settings LDPATH ${toset} ${libs[@]})" >> "${envfile}" |
469 |
- echo "ADA_INCLUDE_PATH=${libBase}/adainclude$(get_lib_var_settings ADA_INCLUDE_PATH ${toset} ${libs[@]})" >> "${envfile}" |
470 |
- echo "ADA_OBJECTS_PATH=${libBase}/adalib$(get_lib_var_settings ADA_OBJECTS_PATH ${toset} ${libs[@]})" >> "${envfile}" |
471 |
- # ADA_PROJECT_PATH may not be set in any of the installed packages, |
472 |
- # we should only create this line if cumulative var is non-empty |
473 |
- My_ProjectPath=$(get_lib_var_settings ADA_PROJECT_PATH ${toset} ${libs[@]}) |
474 |
- if [[ -n ${My_ProjectPath} ]]; then |
475 |
- echo "ADA_PROJECT_PATH=${My_ProjectPath}" >> "${envfile}" |
476 |
- fi |
477 |
-} |
478 |
- |
479 |
|
480 |
diff --git a/app-eselect/eselect-gnat/files/gnat-common-1.4-r1.bash b/app-eselect/eselect-gnat/files/gnat-common-1.4-r1.bash |
481 |
deleted file mode 100644 |
482 |
index 5f3c0c8bf8b..00000000000 |
483 |
--- a/app-eselect/eselect-gnat/files/gnat-common-1.4-r1.bash |
484 |
+++ /dev/null |
485 |
@@ -1,225 +0,0 @@ |
486 |
-# Copyright 1999-2015 Gentoo Foundation |
487 |
-# Distributed under the terms of the GNU General Public License v2 |
488 |
- |
489 |
-# |
490 |
-# Author: George Shapovalov <george@g.o> |
491 |
-# Purpose: Contains common vars/locations and functions for use by gnat.eclass, |
492 |
-# gnat.eselect and gnatbuild.eclass. |
493 |
-# |
494 |
-# NOTE!!! |
495 |
-# This code should just define vars (try to limit these!) and simple functions. |
496 |
-# No bash extensions!! |
497 |
-# That is, no portage or eclass constructs are allowed! |
498 |
-# |
499 |
- |
500 |
- |
501 |
- |
502 |
-# ---------------------------------- |
503 |
-# Globals |
504 |
- |
505 |
-# Environmantal stuff (for env update) |
506 |
-SPECSDIR="/usr/share/gnat/eselect" |
507 |
-ENVDIR="/etc/env.d" |
508 |
-MARKER="55gnat-" |
509 |
- |
510 |
-# User configurable settings |
511 |
-SETTINGSDIR="/etc/ada" |
512 |
-PRIMELIST="${SETTINGSDIR}/primary_compilers" |
513 |
- |
514 |
-## Lib install locations |
515 |
-## |
516 |
-## Gnat profile dependent files go under under ${LibTop}/${Gnat_Profile}/${PN} |
517 |
-## and common files go unde SpecsDir, DataDir |
518 |
-#PREFIX=/usr |
519 |
-## Replace %LIBDIR% below with $(get_libdir) in eclasses and ebuilds (top level Ok, inherit multilib) |
520 |
-## or $(profile2libdir ${profile}) in this code, eselect module or anywhere |
521 |
-## outside portage (as profile will be available only during actual execution, this only should |
522 |
-## be done inside corresponding functions). |
523 |
-#AdalibSpecsDir=${PREFIX}/include/ada |
524 |
-#AdalibDataDir=${PREFIX}/share/ada |
525 |
-#AdalibLibTop=${PREFIX}/%LIBDIR%/ada |
526 |
- |
527 |
- |
528 |
-# ------------------------------------ |
529 |
-# Helpers |
530 |
-# |
531 |
- |
532 |
-# get_all_profile_components splits gnat profile and returns pace separated list of its components: |
533 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu gcc 4.1 |
534 |
-# args: |
535 |
-# $1 - the string to split |
536 |
-get_all_profile_components() { |
537 |
- local GnatSLOT=${1##*-} |
538 |
- local remainder=${1%-*} |
539 |
- local GnatPkg=${remainder##*-} |
540 |
- remainder=${remainder%-gnat-*} |
541 |
- echo "${remainder} ${GnatPkg} ${GnatSLOT}" |
542 |
-} |
543 |
- |
544 |
-# similar to above, returns only SLOT component: |
545 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> 4.1 |
546 |
-# args: |
547 |
-# $1 - the string to extract the slot from |
548 |
-get_gnat_SLOT() { |
549 |
- echo "${1##*-}" |
550 |
-} |
551 |
- |
552 |
-# returns only Pkg component: |
553 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> gcc |
554 |
-# args: |
555 |
-# $1 - the string to extract the slot from |
556 |
-get_gnat_Pkg() { |
557 |
- local remainder=${1%-*} |
558 |
- echo "${remainder##*-}" |
559 |
-} |
560 |
- |
561 |
-# returns only Arch component: |
562 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu |
563 |
-# args: |
564 |
-# $1 - the string to extract the slot from |
565 |
-get_gnat_Arch() { |
566 |
- echo ${1%-gnat-*} |
567 |
-} |
568 |
- |
569 |
- |
570 |
- |
571 |
-## ------------------------------------------- |
572 |
-# gnat profile and lib detection functions |
573 |
- |
574 |
- |
575 |
-# create a list of all gnat env.d files |
576 |
-# for now use trivial implementation - store name of active profile in the |
577 |
-# env file name, so it gets called 55gnat-${ARCH}-${PN}-${SLOT} |
578 |
-get_env_list() { |
579 |
- for fn in ${ENVDIR}/${MARKER}*; do |
580 |
- echo $(basename ${fn}) |
581 |
- done |
582 |
-} |
583 |
- |
584 |
- |
585 |
- |
586 |
-# find all installed compilers and return a list |
587 |
-find_all_compilers() { |
588 |
- [[ ! -d ${SPECSDIR} ]] && exit |
589 |
- for fn in ${SPECSDIR}/*; do |
590 |
- [[ ! -d ${fn} ]] && echo $(basename ${fn}); |
591 |
- done |
592 |
-} |
593 |
- |
594 |
-# find installed primary compilers and return a list |
595 |
-find_primary_compilers() { |
596 |
- [[ ! -f ${PRIMELIST} ]] && exit |
597 |
- for fn in $(cat ${PRIMELIST}); do |
598 |
- [[ -f ${SPECSDIR}/${fn} ]] && echo ${fn}; |
599 |
- done |
600 |
-} |
601 |
- |
602 |
-# find installed libs and return a list |
603 |
-find_all_libs() { |
604 |
- [[ ! -d ${SPECSDIR} ]] && exit |
605 |
- for fn in ${SPECSDIR}/*; do |
606 |
- [[ -d ${fn} ]] && echo $(basename ${fn}); |
607 |
- done |
608 |
-} |
609 |
- |
610 |
-# find libs that have been built for a given profile |
611 |
-# Arguments: |
612 |
-# $1 - gnat profile for which to detect active libs |
613 |
-find_libs4profile() { |
614 |
- libs=( $(find_all_libs) ) |
615 |
- |
616 |
- for (( i = 0 ; i < ${#libs[@]} ; i = i + 1 )) ; do |
617 |
- [[ -f ${SPECSDIR}/${libs[$i]}/$1 ]] && echo "${libs[$i]}" |
618 |
- done |
619 |
-} |
620 |
- |
621 |
- |
622 |
- |
623 |
- |
624 |
-## ----------------------- |
625 |
-# main action - central part of do_set and helpers |
626 |
- |
627 |
- |
628 |
-# extracts values of the passed var definition from given spec file |
629 |
-# params: |
630 |
-# $1: spec file (as generated by gnabuild.eclass) |
631 |
-# $2: variable name |
632 |
-get_var_from_spec() { |
633 |
- local var=$(grep -e "^ *$2=" $1|cut -d= -f2) |
634 |
- echo ${var} |
635 |
-} |
636 |
- |
637 |
- |
638 |
-# Cycle through given libs and form a ':' separated list of settings for the given |
639 |
-# var. Repeating settings are omitted, that is unique entry is added only first |
640 |
-# time it is encountered. |
641 |
-# |
642 |
-# params: |
643 |
-# $1 - name of env var to process |
644 |
-# $2 - name of gnat profile |
645 |
-# $3.. - list of libs to check (to avoid its composition every time) |
646 |
-# - the list is expanded to list of args at the point of call |
647 |
-get_lib_var_settings() { |
648 |
- local envVar=$1 |
649 |
- local toset=$2 |
650 |
- #echo "get_lib_var_settings params:$@" >> /tmp/eselect-gnat.rep |
651 |
- if [[ "none" != ${3} ]]; then |
652 |
- local envString |
653 |
- local specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar}) |
654 |
- if [[ -n ${specLine} ]]; then |
655 |
- envString="${specLine}" |
656 |
- fi |
657 |
- shift |
658 |
- # |
659 |
- while [[ -n $3 ]]; do |
660 |
- specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar}) |
661 |
- #echo "$3:${specLine}." >> /tmp/eselect-gnat.rep |
662 |
- if [[ -n ${specLine} ]] && [[ ! ${envString} =~ ${specLine} ]]; then |
663 |
- envString="${envString}:${specLine}" |
664 |
- fi |
665 |
- shift |
666 |
- done |
667 |
- echo "${envString}" |
668 |
- fi |
669 |
-} |
670 |
- |
671 |
- |
672 |
- |
673 |
-# The action! |
674 |
-# Part common for do_set and do_update of gnat.eselect, also used in gnat.eclass |
675 |
-# to set environment during lib build and installation |
676 |
-# |
677 |
-# params: |
678 |
-# $1 - profile to set (toset param inside) |
679 |
-# $2 - envfile |
680 |
- |
681 |
-generate_envFile() { |
682 |
- local toset=$1 |
683 |
- local envfile=$2 |
684 |
- |
685 |
- local binpath="$(get_var_from_spec ${SPECSDIR}/${toset} binpath)" |
686 |
- local libexecpath="$(get_var_from_spec ${SPECSDIR}/${toset} libexecpath)" |
687 |
- local libs=( $(find_libs4profile ${toset}) ) |
688 |
- #echo "generate_envFile: ${libs[@]}" >> /tmp/eselect-gnat.rep |
689 |
- if (( 0 == ${#libs[@]} )); then |
690 |
- libs="none" |
691 |
- fi |
692 |
- |
693 |
- local MyPath="${binpath}:${libexecpath}:$(get_lib_var_settings PATH ${toset} ${libs[@]})" |
694 |
- echo "PATH=${MyPath}" > "${envfile}" |
695 |
- echo "ROOTPATH=${MyPath}" >> "${envfile}" |
696 |
- echo "MANPATH=$(get_var_from_spec ${SPECSDIR}/${toset} manpath):$(get_lib_var_settings MANPATH ${toset} ${libs[@]})" >> "${envfile}" |
697 |
- echo "INFOPATH=$(get_var_from_spec ${SPECSDIR}/${toset} infopath):$(get_lib_var_settings INFOPATH ${toset} ${libs[@]})" >> "${envfile}" |
698 |
- # the next three use the common base |
699 |
- local libBase=$(get_var_from_spec ${SPECSDIR}/${toset} ldpath) |
700 |
- echo "LDPATH=${libBase}:${libBase}/adalib:$(get_lib_var_settings LDPATH ${toset} ${libs[@]})" >> "${envfile}" |
701 |
- echo "ADA_INCLUDE_PATH=${libBase}/adainclude:$(get_lib_var_settings ADA_INCLUDE_PATH ${toset} ${libs[@]})" >> "${envfile}" |
702 |
- echo "ADA_OBJECTS_PATH=${libBase}/adalib:$(get_lib_var_settings ADA_OBJECTS_PATH ${toset} ${libs[@]})" >> "${envfile}" |
703 |
- # ADA_PROJECT_PATH may not be set in any of the installed packages, |
704 |
- # we should only create this line if cumulative var is non-empty |
705 |
- My_ProjectPath=$(get_lib_var_settings ADA_PROJECT_PATH ${toset} ${libs[@]}) |
706 |
- if [[ -n ${My_ProjectPath} ]]; then |
707 |
- echo "ADA_PROJECT_PATH=${My_ProjectPath}" >> "${envfile}" |
708 |
- fi |
709 |
-} |
710 |
- |
711 |
|
712 |
diff --git a/app-eselect/eselect-gnat/files/gnat-common-1.5.bash b/app-eselect/eselect-gnat/files/gnat-common-1.5.bash |
713 |
deleted file mode 100644 |
714 |
index 05af905579a..00000000000 |
715 |
--- a/app-eselect/eselect-gnat/files/gnat-common-1.5.bash |
716 |
+++ /dev/null |
717 |
@@ -1,225 +0,0 @@ |
718 |
-# Copyright 1999-2016 Gentoo Foundation |
719 |
-# Distributed under the terms of the GNU General Public License v2 |
720 |
- |
721 |
-# |
722 |
-# Author: George Shapovalov <george@g.o> |
723 |
-# Purpose: Contains common vars/locations and functions for use by gnat.eclass, |
724 |
-# gnat.eselect and gnatbuild.eclass. |
725 |
-# |
726 |
-# NOTE!!! |
727 |
-# This code should just define vars (try to limit these!) and simple functions. |
728 |
-# No bash extensions!! |
729 |
-# That is, no portage or eclass constructs are allowed! |
730 |
-# |
731 |
- |
732 |
- |
733 |
- |
734 |
-# ---------------------------------- |
735 |
-# Globals |
736 |
- |
737 |
-# Environmantal stuff (for env update) |
738 |
-SPECSDIR="/usr/share/gnat/eselect" |
739 |
-ENVDIR="/etc/env.d" |
740 |
-MARKER="55gnat-" |
741 |
- |
742 |
-# User configurable settings |
743 |
-SETTINGSDIR="/etc/ada" |
744 |
-PRIMELIST="${SETTINGSDIR}/primary_compilers" |
745 |
- |
746 |
-## Lib install locations |
747 |
-## |
748 |
-## Gnat profile dependent files go under under ${LibTop}/${Gnat_Profile}/${PN} |
749 |
-## and common files go unde SpecsDir, DataDir |
750 |
-#PREFIX=/usr |
751 |
-## Replace %LIBDIR% below with $(get_libdir) in eclasses and ebuilds (top level Ok, inherit multilib) |
752 |
-## or $(profile2libdir ${profile}) in this code, eselect module or anywhere |
753 |
-## outside portage (as profile will be available only during actual execution, this only should |
754 |
-## be done inside corresponding functions). |
755 |
-#AdalibSpecsDir=${PREFIX}/include/ada |
756 |
-#AdalibDataDir=${PREFIX}/share/ada |
757 |
-#AdalibLibTop=${PREFIX}/%LIBDIR%/ada |
758 |
- |
759 |
- |
760 |
-# ------------------------------------ |
761 |
-# Helpers |
762 |
-# |
763 |
- |
764 |
-# get_all_profile_components splits gnat profile and returns pace separated list of its components: |
765 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu gcc 4.1 |
766 |
-# args: |
767 |
-# $1 - the string to split |
768 |
-get_all_profile_components() { |
769 |
- local GnatSLOT=${1##*-} |
770 |
- local remainder=${1%-*} |
771 |
- local GnatPkg=${remainder##*-} |
772 |
- remainder=${remainder%-gnat-*} |
773 |
- echo "${remainder} ${GnatPkg} ${GnatSLOT}" |
774 |
-} |
775 |
- |
776 |
-# similar to above, returns only SLOT component: |
777 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> 4.1 |
778 |
-# args: |
779 |
-# $1 - the string to extract the slot from |
780 |
-get_gnat_SLOT() { |
781 |
- echo "${1##*-}" |
782 |
-} |
783 |
- |
784 |
-# returns only Pkg component: |
785 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> gcc |
786 |
-# args: |
787 |
-# $1 - the string to extract the slot from |
788 |
-get_gnat_Pkg() { |
789 |
- local remainder=${1%-*} |
790 |
- echo "${remainder##*-}" |
791 |
-} |
792 |
- |
793 |
-# returns only Arch component: |
794 |
-# x86_64-pc-linux-gnu-gnat-gcc-4.1 -> x86_64-pc-linux-gnu |
795 |
-# args: |
796 |
-# $1 - the string to extract the slot from |
797 |
-get_gnat_Arch() { |
798 |
- echo ${1%-gnat-*} |
799 |
-} |
800 |
- |
801 |
- |
802 |
- |
803 |
-## ------------------------------------------- |
804 |
-# gnat profile and lib detection functions |
805 |
- |
806 |
- |
807 |
-# create a list of all gnat env.d files |
808 |
-# for now use trivial implementation - store name of active profile in the |
809 |
-# env file name, so it gets called 55gnat-${ARCH}-${PN}-${SLOT} |
810 |
-get_env_list() { |
811 |
- for fn in ${ENVDIR}/${MARKER}*; do |
812 |
- echo $(basename ${fn}) |
813 |
- done |
814 |
-} |
815 |
- |
816 |
- |
817 |
- |
818 |
-# find all installed compilers and return a list |
819 |
-find_all_compilers() { |
820 |
- [[ ! -d ${SPECSDIR} ]] && exit |
821 |
- for fn in ${SPECSDIR}/*; do |
822 |
- [[ ! -d ${fn} ]] && echo $(basename ${fn}); |
823 |
- done |
824 |
-} |
825 |
- |
826 |
-# find installed primary compilers and return a list |
827 |
-find_primary_compilers() { |
828 |
- [[ ! -f ${PRIMELIST} ]] && exit |
829 |
- for fn in $(cat ${PRIMELIST}); do |
830 |
- [[ -f ${SPECSDIR}/${fn} ]] && echo ${fn}; |
831 |
- done |
832 |
-} |
833 |
- |
834 |
-# find installed libs and return a list |
835 |
-find_all_libs() { |
836 |
- [[ ! -d ${SPECSDIR} ]] && exit |
837 |
- for fn in ${SPECSDIR}/*; do |
838 |
- [[ -d ${fn} ]] && echo $(basename ${fn}); |
839 |
- done |
840 |
-} |
841 |
- |
842 |
-# find libs that have been built for a given profile |
843 |
-# Arguments: |
844 |
-# $1 - gnat profile for which to detect active libs |
845 |
-find_libs4profile() { |
846 |
- libs=( $(find_all_libs) ) |
847 |
- |
848 |
- for (( i = 0 ; i < ${#libs[@]} ; i = i + 1 )) ; do |
849 |
- [[ -f ${SPECSDIR}/${libs[$i]}/$1 ]] && echo "${libs[$i]}" |
850 |
- done |
851 |
-} |
852 |
- |
853 |
- |
854 |
- |
855 |
- |
856 |
-## ----------------------- |
857 |
-# main action - central part of do_set and helpers |
858 |
- |
859 |
- |
860 |
-# extracts values of the passed var definition from given spec file |
861 |
-# params: |
862 |
-# $1: spec file (as generated by gnabuild.eclass) |
863 |
-# $2: variable name |
864 |
-get_var_from_spec() { |
865 |
- local var=$(grep -e "^ *$2=" $1|cut -d= -f2) |
866 |
- echo ${var} |
867 |
-} |
868 |
- |
869 |
- |
870 |
-# Cycle through given libs and form a ':' separated list of settings for the given |
871 |
-# var. Repeating settings are omitted, that is unique entry is added only first |
872 |
-# time it is encountered. |
873 |
-# |
874 |
-# params: |
875 |
-# $1 - name of env var to process |
876 |
-# $2 - name of gnat profile |
877 |
-# $3.. - list of libs to check (to avoid its composition every time) |
878 |
-# - the list is expanded to list of args at the point of call |
879 |
-get_lib_var_settings() { |
880 |
- local envVar=$1 |
881 |
- local toset=$2 |
882 |
- #echo "get_lib_var_settings params:$@" >> /tmp/eselect-gnat.rep |
883 |
- if [[ "none" != ${3} ]]; then |
884 |
- local envString |
885 |
- local specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar}) |
886 |
- if [[ -n ${specLine} ]]; then |
887 |
- envString="${specLine}" |
888 |
- fi |
889 |
- shift |
890 |
- # |
891 |
- while [[ -n $3 ]]; do |
892 |
- specLine=$(get_var_from_spec ${SPECSDIR}/$3/${toset} ${envVar}) |
893 |
- #echo "$3:${specLine}." >> /tmp/eselect-gnat.rep |
894 |
- if [[ -n ${specLine} ]] && [[ ! ${envString} =~ ${specLine} ]]; then |
895 |
- envString="${envString}:${specLine}" |
896 |
- fi |
897 |
- shift |
898 |
- done |
899 |
- echo "${envString}" |
900 |
- fi |
901 |
-} |
902 |
- |
903 |
- |
904 |
- |
905 |
-# The action! |
906 |
-# Part common for do_set and do_update of gnat.eselect, also used in gnat.eclass |
907 |
-# to set environment during lib build and installation |
908 |
-# |
909 |
-# params: |
910 |
-# $1 - profile to set (toset param inside) |
911 |
-# $2 - envfile |
912 |
- |
913 |
-generate_envFile() { |
914 |
- local toset=$1 |
915 |
- local envfile=$2 |
916 |
- |
917 |
- local binpath="$(get_var_from_spec ${SPECSDIR}/${toset} binpath)" |
918 |
- local libexecpath="$(get_var_from_spec ${SPECSDIR}/${toset} libexecpath)" |
919 |
- local libs=( $(find_libs4profile ${toset}) ) |
920 |
- #echo "generate_envFile: ${libs[@]}" >> /tmp/eselect-gnat.rep |
921 |
- if (( 0 == ${#libs[@]} )); then |
922 |
- libs="none" |
923 |
- fi |
924 |
- |
925 |
- local MyPath="${binpath}:${libexecpath}:$(get_lib_var_settings PATH ${toset} ${libs[@]})" |
926 |
- echo "PATH=${MyPath}" > "${envfile}" |
927 |
- echo "ROOTPATH=${MyPath}" >> "${envfile}" |
928 |
- echo "MANPATH=$(get_var_from_spec ${SPECSDIR}/${toset} manpath):$(get_lib_var_settings MANPATH ${toset} ${libs[@]})" >> "${envfile}" |
929 |
- echo "INFOPATH=$(get_var_from_spec ${SPECSDIR}/${toset} infopath):$(get_lib_var_settings INFOPATH ${toset} ${libs[@]})" >> "${envfile}" |
930 |
- # the next three use the common base |
931 |
- local libBase=$(get_var_from_spec ${SPECSDIR}/${toset} ldpath) |
932 |
- echo "LDPATH=${libBase}:${libBase}/adalib:$(get_lib_var_settings LDPATH ${toset} ${libs[@]})" >> "${envfile}" |
933 |
- echo "ADA_INCLUDE_PATH=${libBase}/adainclude:$(get_lib_var_settings ADA_INCLUDE_PATH ${toset} ${libs[@]})" >> "${envfile}" |
934 |
- echo "ADA_OBJECTS_PATH=${libBase}/adalib:$(get_lib_var_settings ADA_OBJECTS_PATH ${toset} ${libs[@]})" >> "${envfile}" |
935 |
- # ADA_PROJECT_PATH may not be set in any of the installed packages, |
936 |
- # we should only create this line if cumulative var is non-empty |
937 |
- My_ProjectPath=$(get_lib_var_settings ADA_PROJECT_PATH ${toset} ${libs[@]}) |
938 |
- if [[ -n ${My_ProjectPath} ]]; then |
939 |
- echo "ADA_PROJECT_PATH=${My_ProjectPath}" >> "${envfile}" |
940 |
- fi |
941 |
-} |
942 |
- |
943 |
|
944 |
diff --git a/app-eselect/eselect-gnat/files/gnat.eselect-1.3 b/app-eselect/eselect-gnat/files/gnat.eselect-1.3 |
945 |
deleted file mode 100644 |
946 |
index 54892652474..00000000000 |
947 |
--- a/app-eselect/eselect-gnat/files/gnat.eselect-1.3 |
948 |
+++ /dev/null |
949 |
@@ -1,206 +0,0 @@ |
950 |
-# Copyright 1999-2015 Gentoo Foundation |
951 |
-# Distributed under the terms of the GNU General Public License v2 |
952 |
- |
953 |
-DESCRIPTION="Manage the installed gnat compilers" |
954 |
-MAINTAINER="ada@g.o" |
955 |
-SVN_DATE='$Date: 2015/03/31 16:48:57 $' |
956 |
-VERSION=$(svn_date_to_version "${SVN_DATE}" ) |
957 |
- |
958 |
-# "inheriting" common stuff |
959 |
-# this crude sourcing has to stay the way it is, as common code |
960 |
-# cannot be part of some eclass (bug #192505) |
961 |
-. /usr/share/gnat/lib/gnat-common.bash |
962 |
- |
963 |
- |
964 |
-### Phylosophy |
965 |
-# Each gnat installs a "specs" file named ${ARCH}-${PN}-${SLOT} under ${SPECSDIR} |
966 |
-# Each lib creates a dir with its name under ${SPECSDIR} and populates it with |
967 |
-# similar specs files (same name scheme) |
968 |
-# Recognizing gnat specs from lib specs is then eazy - test entry for being a |
969 |
-# dir, then just check what gnat profiles are installed for each lib.. |
970 |
-# doset then creates env file that combines settings for gnat and for the |
971 |
-# corresponding profile of each installed lib.. |
972 |
- |
973 |
- |
974 |
-### Helpers |
975 |
- |
976 |
-# return *the* name of the active profile, checking that we do not have multiple |
977 |
-# env files. |
978 |
-# There can be only one! |
979 |
-get_current_gnat() { |
980 |
- local profiles=( $(get_env_list) ) |
981 |
- |
982 |
- if [ ${profiles[@]} == "${MARKER}*" ]; then exit; fi |
983 |
- |
984 |
- if (( 1 == ${#profiles[@]} )); then |
985 |
- local active=${profiles[0]#${MARKER}} |
986 |
- else |
987 |
- die -q "${ENVDIR} contains multiple gnat profiles, please cleanup!" |
988 |
- fi |
989 |
- |
990 |
- if [ -f ${SPECSDIR}/${active} ]; then |
991 |
- echo ${active} |
992 |
- else |
993 |
- die -q "the active env.d profile does not correspond to any installed gnat!" |
994 |
- fi |
995 |
-} |
996 |
- |
997 |
-# check if the passed arg represents the installed gnat and return it or |
998 |
-# not_found |
999 |
-# takes args: |
1000 |
-# $1 - list ID to check |
1001 |
-get_name_from_list() { |
1002 |
- compiler=$1 |
1003 |
- |
1004 |
- compilers=( $(find_all_compilers) ) |
1005 |
- for (( i = 0 ; i < ${#compilers[@]} ; i = i + 1 )) ; do |
1006 |
- if [[ ${compilers[$i]} == ${compiler} ]] ; then |
1007 |
- echo ${compiler} |
1008 |
- return |
1009 |
- fi |
1010 |
- done |
1011 |
- |
1012 |
- echo "(not-found)" |
1013 |
-} |
1014 |
- |
1015 |
- |
1016 |
-# removes env files (for compiler and libs) |
1017 |
-# params: |
1018 |
-# $1: the name of profile for which to remove env file |
1019 |
-unset_env() { |
1020 |
- rm -f ${ENVDIR}/${MARKER}$1 &> /dev/null |
1021 |
-} |
1022 |
- |
1023 |
- |
1024 |
-### show action ### |
1025 |
- |
1026 |
-describe_show() { |
1027 |
- echo "Show the active gnat compiler/profile and installed libs" |
1028 |
-} |
1029 |
- |
1030 |
-do_show() { |
1031 |
- write_list_start "Current gnat version:" |
1032 |
- active=$(get_current_gnat) |
1033 |
- if [ ! -z ${active} ] ; then # not sure why [ -n ] does not do the same |
1034 |
- write_kv_list_entry "$active" "" |
1035 |
- libs=( $(find_libs4profile ${active}) ) |
1036 |
- write_list_start "Active libs:" |
1037 |
- write_numbered_list "${libs[@]}" |
1038 |
- else |
1039 |
- write_kv_list_entry "(none set)" "" |
1040 |
- fi |
1041 |
-} |
1042 |
- |
1043 |
-### list action ### |
1044 |
- |
1045 |
-describe_list() { |
1046 |
- echo "List installed gnat compilers and libs" |
1047 |
-} |
1048 |
- |
1049 |
-do_list() { |
1050 |
- compilers=( $(find_all_compilers ) ) |
1051 |
- active=$(get_current_gnat) |
1052 |
- |
1053 |
- write_list_start "Available gnat compilers:" |
1054 |
- |
1055 |
- if [[ -n ${compilers[@]} ]] ; then |
1056 |
- local i |
1057 |
- for (( i = 0 ; i < ${#compilers[@]} ; i = i + 1 )) ; do |
1058 |
- linkversion=${compilers[${i}]} |
1059 |
- |
1060 |
- [[ $linkversion == $active ]] && \ |
1061 |
- compilers[${i}]="${compilers[${i}]} $(highlight '*' )" |
1062 |
- done |
1063 |
- write_numbered_list "${compilers[@]}" |
1064 |
- |
1065 |
- # now the libs |
1066 |
- libs=( $(find_all_libs) ) |
1067 |
- write_list_start "Installed libs:" |
1068 |
- for (( i = 0 ; i < ${#libs[@]} ; i = i + 1 )) ; do |
1069 |
- [ -f ${SPECSDIR}/${libs[$i]}/${active} ] && \ |
1070 |
- libs[${i}]="${libs[${i}]} $(highlight '*' )" |
1071 |
- done |
1072 |
- write_numbered_list "${libs[@]}" |
1073 |
- else |
1074 |
- write_kv_list_entry "(none found)" "" |
1075 |
- fi |
1076 |
-} |
1077 |
- |
1078 |
- |
1079 |
-### set action ### |
1080 |
- |
1081 |
-describe_set() { |
1082 |
- echo "Set active gnat compiler" |
1083 |
-} |
1084 |
- |
1085 |
-# The set action. Parameters: |
1086 |
-# $1 - name of profile to set, obligatory, passed by eselect |
1087 |
-# $2 - optional, name of env file to generate. Used from gnat.eclass. |
1088 |
-do_set() { |
1089 |
- if [[ -z ${1} ]] ; then |
1090 |
- # no parameter |
1091 |
- die -q "You didn't tell me which gnat to use" |
1092 |
- fi |
1093 |
- |
1094 |
- local toset=$(get_name_from_list $1) |
1095 |
- if [[ ${toset} == "(not-found)" ]] ; then |
1096 |
- die -q "I don't recognise the selection" |
1097 |
- fi |
1098 |
- |
1099 |
- # the action! |
1100 |
- # in this implementation simply create an appropriate env file |
1101 |
- local active=$(get_current_gnat) |
1102 |
- if [[ -z ${2} ]] ; then |
1103 |
- local envfile="${ENVDIR}/${MARKER}${toset}" |
1104 |
- |
1105 |
- # now we need to remove an old env file, which is guaranteed to |
1106 |
- # be unique by get_current_gnat above |
1107 |
- if [[ -n ${active} ]] ; then |
1108 |
- unset_env ${active} |
1109 |
- fi |
1110 |
- # just for a good measure remove the one we are going to write |
1111 |
- unset_env ${toset} |
1112 |
- else |
1113 |
- local envfile="$2" |
1114 |
- fi |
1115 |
- |
1116 |
- generate_envFile ${toset} ${envfile} |
1117 |
- |
1118 |
- # force update environment |
1119 |
- # should be replaced with "do_action env update" when #172472 gets resolved |
1120 |
- env-update &> /dev/null |
1121 |
-} |
1122 |
- |
1123 |
- |
1124 |
- |
1125 |
-### update action ### |
1126 |
-# |
1127 |
-# This action regenerates the /etc/env.d file for the current profile. Basically |
1128 |
-# the same as set, only it does not take any parameters. It should be called from ebuilds |
1129 |
-# installing Ada libs |
1130 |
- |
1131 |
-describe_update() { |
1132 |
- echo "Update active gnat profile picking up new libs." |
1133 |
-} |
1134 |
- |
1135 |
-do_update() { |
1136 |
- local toset=$(get_current_gnat) |
1137 |
- local envfile="${ENVDIR}/${MARKER}${toset}" |
1138 |
- generate_envFile ${toset} ${envfile} |
1139 |
- do_action env update &> /dev/null |
1140 |
-} |
1141 |
- |
1142 |
-### unset action ### |
1143 |
- |
1144 |
-describe_unset() { |
1145 |
- echo "Remove settings for currently active gnat" |
1146 |
-} |
1147 |
- |
1148 |
-do_unset() { |
1149 |
- local active=$(get_current_gnat) |
1150 |
- # check whether we have any profile set before removing anything.. |
1151 |
- if [[ -n ${active} ]] ; then |
1152 |
- unset_env ${active} |
1153 |
- do_action env update &> /dev/null |
1154 |
- fi |
1155 |
-} |
1156 |
|
1157 |
diff --git a/app-eselect/eselect-gnat/files/gnat.eselect-1.4 b/app-eselect/eselect-gnat/files/gnat.eselect-1.4 |
1158 |
deleted file mode 100644 |
1159 |
index f2a72092c53..00000000000 |
1160 |
--- a/app-eselect/eselect-gnat/files/gnat.eselect-1.4 |
1161 |
+++ /dev/null |
1162 |
@@ -1,229 +0,0 @@ |
1163 |
-# Copyright 1999-2015 Gentoo Foundation |
1164 |
-# Distributed under the terms of the GNU General Public License v2 |
1165 |
- |
1166 |
-DESCRIPTION="Manage the installed gnat compilers" |
1167 |
-MAINTAINER="ada@g.o" |
1168 |
-SVN_DATE='$Date: 2015/03/31 16:48:57 $' |
1169 |
-VERSION=$(svn_date_to_version "${SVN_DATE}" ) |
1170 |
- |
1171 |
-# "inheriting" common stuff |
1172 |
-# this crude sourcing has to stay the way it is, as common code |
1173 |
-# cannot be part of some eclass (bug #192505) |
1174 |
-. /usr/share/gnat/lib/gnat-common.bash |
1175 |
- |
1176 |
- |
1177 |
-### Phylosophy |
1178 |
-# Each gnat installs a "specs" file named ${ARCH}-${PN}-${SLOT} under ${SPECSDIR} |
1179 |
-# Each lib creates a dir with its name under ${SPECSDIR} and populates it with |
1180 |
-# similar specs files (same name scheme) |
1181 |
-# Recognizing gnat specs from lib specs is then eazy - test entry for being a |
1182 |
-# dir, then just check what gnat profiles are installed for each lib.. |
1183 |
-# doset then creates env file that combines settings for gnat and for the |
1184 |
-# corresponding profile of each installed lib.. |
1185 |
- |
1186 |
- |
1187 |
-### Helpers |
1188 |
- |
1189 |
-# return *the* name of the active profile, checking that we do not have multiple |
1190 |
-# env files. |
1191 |
-# There can be only one! |
1192 |
-get_current_gnat() { |
1193 |
- local profiles=( $(get_env_list) ) |
1194 |
- |
1195 |
- if [ ${profiles[@]} == "${MARKER}*" ]; then exit; fi |
1196 |
- |
1197 |
- if (( 1 == ${#profiles[@]} )); then |
1198 |
- local active=${profiles[0]#${MARKER}} |
1199 |
- else |
1200 |
- die -q "${ENVDIR} contains multiple gnat profiles, please cleanup!" |
1201 |
- fi |
1202 |
- |
1203 |
- echo ${active} |
1204 |
-# disabling this check, as we want to use get_current_gnat with empty profile |
1205 |
-# as an indication that last gnat in SLOT was removed |
1206 |
-# if [ -f ${SPECSDIR}/${active} ]; then |
1207 |
-# echo ${active} |
1208 |
-# else |
1209 |
-# die -q "the active env.d profile does not correspond to any installed gnat!" |
1210 |
-# fi |
1211 |
-} |
1212 |
- |
1213 |
-# validity check that was removed from get_current_gnat, in case we need it |
1214 |
-# somewhere.. |
1215 |
-# Arguments: |
1216 |
-# $1 - name of the gnat profiel to check |
1217 |
-profile_is_valid() { |
1218 |
- if [[ -n $1 ]] ; then |
1219 |
- [[ -f ${SPECSDIR}/$1 ]] || return 1 |
1220 |
- fi |
1221 |
-} |
1222 |
- |
1223 |
-# check if the passed arg represents the installed gnat and return it or |
1224 |
-# not_found |
1225 |
-# takes args: |
1226 |
-# $1 - list ID to check |
1227 |
-get_name_from_list() { |
1228 |
- compiler=$1 |
1229 |
- |
1230 |
- compilers=( $(find_all_compilers) ) |
1231 |
- for (( i = 0 ; i < ${#compilers[@]} ; i = i + 1 )) ; do |
1232 |
- if [[ ${compilers[$i]} == ${compiler} ]] ; then |
1233 |
- echo ${compiler} |
1234 |
- return |
1235 |
- fi |
1236 |
- done |
1237 |
- |
1238 |
- echo "(not-found)" |
1239 |
-} |
1240 |
- |
1241 |
- |
1242 |
-# removes env files (for compiler and libs) |
1243 |
-# params: |
1244 |
-# $1: the name of profile for which to remove env file |
1245 |
-unset_env() { |
1246 |
- rm -f ${ENVDIR}/${MARKER}$1 &> /dev/null |
1247 |
-} |
1248 |
- |
1249 |
- |
1250 |
-### show action ### |
1251 |
- |
1252 |
-describe_show() { |
1253 |
- echo "Show the active gnat compiler/profile and installed libs" |
1254 |
-} |
1255 |
- |
1256 |
-do_show() { |
1257 |
- active=$(get_current_gnat) |
1258 |
- if $(profile_is_valid ${active}); then |
1259 |
- write_list_start "Current gnat version:" |
1260 |
- if [[ -n ${active} ]] ; then |
1261 |
- write_kv_list_entry "$active" "" |
1262 |
- libs=( $(find_libs4profile ${active}) ) |
1263 |
- write_list_start "Active libs:" |
1264 |
- write_numbered_list "${libs[@]}" |
1265 |
- else |
1266 |
- write_kv_list_entry "(none set)" "" |
1267 |
- fi |
1268 |
- else |
1269 |
- write_error_msg "The active profile in ${ENVDIR} is not valid! Please set a valid profile!" |
1270 |
- fi |
1271 |
-} |
1272 |
- |
1273 |
-### list action ### |
1274 |
- |
1275 |
-describe_list() { |
1276 |
- echo "List installed gnat compilers and libs" |
1277 |
-} |
1278 |
- |
1279 |
-do_list() { |
1280 |
- compilers=( $(find_all_compilers ) ) |
1281 |
- active=$(get_current_gnat) |
1282 |
- |
1283 |
- write_list_start "Available gnat compilers:" |
1284 |
- |
1285 |
- if [[ -n ${compilers[@]} ]] ; then |
1286 |
- local i |
1287 |
- for (( i = 0 ; i < ${#compilers[@]} ; i = i + 1 )) ; do |
1288 |
- linkversion=${compilers[${i}]} |
1289 |
- |
1290 |
- [[ $linkversion == $active ]] && \ |
1291 |
- compilers[${i}]="${compilers[${i}]} $(highlight '*' )" |
1292 |
- done |
1293 |
- write_numbered_list "${compilers[@]}" |
1294 |
- |
1295 |
- # now the libs |
1296 |
- libs=( $(find_all_libs) ) |
1297 |
- write_list_start "Installed libs:" |
1298 |
- for (( i = 0 ; i < ${#libs[@]} ; i = i + 1 )) ; do |
1299 |
- [ -f ${SPECSDIR}/${libs[$i]}/${active} ] && \ |
1300 |
- libs[${i}]="${libs[${i}]} $(highlight '*' )" |
1301 |
- done |
1302 |
- write_numbered_list "${libs[@]}" |
1303 |
- else |
1304 |
- write_kv_list_entry "(none found)" "" |
1305 |
- fi |
1306 |
-} |
1307 |
- |
1308 |
- |
1309 |
-### set action ### |
1310 |
- |
1311 |
-describe_set() { |
1312 |
- echo "Set active gnat compiler" |
1313 |
-} |
1314 |
- |
1315 |
-# The set action. Parameters: |
1316 |
-# $1 - name of profile to set, obligatory, passed by eselect |
1317 |
-# $2 - optional, name of env file to generate. Used from gnat.eclass. |
1318 |
-do_set() { |
1319 |
- if [[ -z ${1} ]] ; then |
1320 |
- # no parameter |
1321 |
- die -q "You didn't tell me which gnat to use" |
1322 |
- fi |
1323 |
- |
1324 |
- local toset=$(get_name_from_list $1) |
1325 |
- if [[ ${toset} == "(not-found)" ]] ; then |
1326 |
- die -q "I don't recognise the selection" |
1327 |
- fi |
1328 |
- |
1329 |
- # the action! |
1330 |
- # in this implementation simply create an appropriate env file |
1331 |
- local active=$(get_current_gnat) |
1332 |
- if [[ -z ${2} ]] ; then |
1333 |
- local envfile="${ENVDIR}/${MARKER}${toset}" |
1334 |
- |
1335 |
- # now we need to remove an old env file, which is guaranteed to |
1336 |
- # be unique by get_current_gnat above |
1337 |
- if [[ -n ${active} ]] ; then |
1338 |
- unset_env ${active} |
1339 |
- fi |
1340 |
- # just for a good measure remove the one we are going to write |
1341 |
- unset_env ${toset} |
1342 |
- else |
1343 |
- local envfile="$2" |
1344 |
- fi |
1345 |
- |
1346 |
- generate_envFile ${toset} ${envfile} |
1347 |
- |
1348 |
- # force update environment |
1349 |
- # should be replaced with "do_action env update" when #172472 gets resolved |
1350 |
- env-update &> /dev/null |
1351 |
-} |
1352 |
- |
1353 |
- |
1354 |
- |
1355 |
-### update action ### |
1356 |
-# |
1357 |
-# This action regenerates the /etc/env.d file for the current profile. Basically |
1358 |
-# the same as set, only it does not take any parameters. It should be called from ebuilds |
1359 |
-# installing Ada libs or in the pkg_postrm in gnatbuild.eclass, to clean up the |
1360 |
-# profile if last gnat in SLOT was removed. |
1361 |
- |
1362 |
-describe_update() { |
1363 |
- echo "Update active gnat profile picking up new libs." |
1364 |
-} |
1365 |
- |
1366 |
-do_update() { |
1367 |
- local toset=$(get_current_gnat) |
1368 |
- local envfile="${ENVDIR}/${MARKER}${toset}" |
1369 |
- # now check whether to update or unset the profile |
1370 |
- if $(profile_is_valid ${toset}); then |
1371 |
- generate_envFile ${toset} ${envfile} |
1372 |
- else |
1373 |
- unset_env ${toset} |
1374 |
- fi |
1375 |
- do_action env update &> /dev/null |
1376 |
-} |
1377 |
- |
1378 |
-### unset action ### |
1379 |
- |
1380 |
-describe_unset() { |
1381 |
- echo "Remove settings for currently active gnat" |
1382 |
-} |
1383 |
- |
1384 |
-do_unset() { |
1385 |
- local active=$(get_current_gnat) |
1386 |
- # check whether we have any profile set before removing anything.. |
1387 |
- if [[ -n ${active} ]] ; then |
1388 |
- unset_env ${active} |
1389 |
- do_action env update &> /dev/null |
1390 |
- fi |
1391 |
-} |
1392 |
|
1393 |
diff --git a/app-eselect/eselect-gnat/files/gnat.eselect-1.5 b/app-eselect/eselect-gnat/files/gnat.eselect-1.5 |
1394 |
deleted file mode 100644 |
1395 |
index fa312feccbb..00000000000 |
1396 |
--- a/app-eselect/eselect-gnat/files/gnat.eselect-1.5 |
1397 |
+++ /dev/null |
1398 |
@@ -1,225 +0,0 @@ |
1399 |
-# Copyright 1999-2015 Gentoo Foundation |
1400 |
-# Distributed under the terms of the GNU General Public License v2 |
1401 |
- |
1402 |
-DESCRIPTION="Manage the installed gnat compilers" |
1403 |
-MAINTAINER="ada@g.o" |
1404 |
-SVN_DATE='$Date: 2015/03/31 16:48:57 $' |
1405 |
-VERSION=$(svn_date_to_version "${SVN_DATE}" ) |
1406 |
- |
1407 |
-# "inheriting" common stuff |
1408 |
-# this crude sourcing has to stay the way it is, as common code |
1409 |
-# cannot be part of some eclass (bug #192505) |
1410 |
-. /usr/share/gnat/lib/gnat-common.bash |
1411 |
- |
1412 |
- |
1413 |
-### Phylosophy |
1414 |
-# Each gnat installs a "specs" file named ${ARCH}-${PN}-${SLOT} under ${SPECSDIR} |
1415 |
-# Each lib creates a dir with its name under ${SPECSDIR} and populates it with |
1416 |
-# similar specs files (same name scheme) |
1417 |
-# Recognizing gnat specs from lib specs is then eazy - test entry for being a |
1418 |
-# dir, then just check what gnat profiles are installed for each lib.. |
1419 |
-# doset then creates env file that combines settings for gnat and for the |
1420 |
-# corresponding profile of each installed lib.. |
1421 |
- |
1422 |
- |
1423 |
-### Helpers |
1424 |
- |
1425 |
-# return *the* name of the active profile, checking that we do not have multiple |
1426 |
-# env files. |
1427 |
-# There can be only one! |
1428 |
-get_current_gnat() { |
1429 |
- local profiles=( $(get_env_list) ) |
1430 |
- |
1431 |
- if [ ${profiles[@]} == "${MARKER}*" ]; then exit; fi |
1432 |
- |
1433 |
- if (( 1 == ${#profiles[@]} )); then |
1434 |
- local active=${profiles[0]#${MARKER}} |
1435 |
- else |
1436 |
- die -q "${ENVDIR} contains multiple gnat profiles, please cleanup!" |
1437 |
- fi |
1438 |
- |
1439 |
- echo ${active} |
1440 |
-# disabling this check, as we want to use get_current_gnat with empty profile |
1441 |
-# as an indication that last gnat in SLOT was removed |
1442 |
-# if [ -f ${SPECSDIR}/${active} ]; then |
1443 |
-# echo ${active} |
1444 |
-# else |
1445 |
-# die -q "the active env.d profile does not correspond to any installed gnat!" |
1446 |
-# fi |
1447 |
-} |
1448 |
- |
1449 |
-# validity check that was removed from get_current_gnat, in case we need it |
1450 |
-# somewhere.. |
1451 |
-# Arguments: |
1452 |
-# $1 - name of the gnat profiel to check |
1453 |
-profile_is_valid() { |
1454 |
- if [[ -n $1 ]] ; then |
1455 |
- [[ -f ${SPECSDIR}/$1 ]] || return 1 |
1456 |
- fi |
1457 |
-} |
1458 |
- |
1459 |
-# check if the passed arg represents the installed gnat and return it or |
1460 |
-# not_found |
1461 |
-# takes args: |
1462 |
-# $1 - list ID to check |
1463 |
-get_name_from_list() { |
1464 |
- compiler=$1 |
1465 |
- |
1466 |
- compilers=( $(find_all_compilers) ) |
1467 |
- for (( i = 0 ; i < ${#compilers[@]} ; i = i + 1 )) ; do |
1468 |
- if [[ ${compilers[$i]} == ${compiler} ]] ; then |
1469 |
- echo ${compiler} |
1470 |
- return |
1471 |
- fi |
1472 |
- done |
1473 |
- |
1474 |
- echo "(not-found)" |
1475 |
-} |
1476 |
- |
1477 |
- |
1478 |
-# removes env files (for compiler and libs) |
1479 |
-# params: |
1480 |
-# $1: the name of profile for which to remove env file |
1481 |
-unset_env() { |
1482 |
- rm -f ${ENVDIR}/${MARKER}$1 &> /dev/null |
1483 |
-} |
1484 |
- |
1485 |
- |
1486 |
-### show action ### |
1487 |
- |
1488 |
-describe_show() { |
1489 |
- echo "Show the active gnat compiler/profile and installed libs" |
1490 |
-} |
1491 |
- |
1492 |
-do_show() { |
1493 |
- active=$(get_current_gnat) |
1494 |
- if $(profile_is_valid ${active}); then |
1495 |
- write_list_start "Current gnat version:" |
1496 |
- if [[ -n ${active} ]] ; then |
1497 |
- write_kv_list_entry "$active" "" |
1498 |
- libs=( $(find_libs4profile ${active}) ) |
1499 |
- write_list_start "Active libs:" |
1500 |
- write_numbered_list "${libs[@]}" |
1501 |
- else |
1502 |
- write_kv_list_entry "(none set)" "" |
1503 |
- fi |
1504 |
- else |
1505 |
- write_error_msg "The active profile in ${ENVDIR} is not valid! Please set a valid profile!" |
1506 |
- fi |
1507 |
-} |
1508 |
- |
1509 |
-### list action ### |
1510 |
- |
1511 |
-describe_list() { |
1512 |
- echo "List installed gnat compilers and libs" |
1513 |
-} |
1514 |
- |
1515 |
-do_list() { |
1516 |
- compilers=( $(find_all_compilers ) ) |
1517 |
- active=$(get_current_gnat) |
1518 |
- |
1519 |
- write_list_start "Available gnat compilers:" |
1520 |
- |
1521 |
- local i |
1522 |
- for (( i = 0 ; i < ${#compilers[@]} ; i = i + 1 )) ; do |
1523 |
- linkversion=${compilers[${i}]} |
1524 |
- |
1525 |
- [[ $linkversion == $active ]] && \ |
1526 |
- compilers[${i}]=$(highlight_marker "${compilers[${i}]}") |
1527 |
- done |
1528 |
- write_numbered_list -m "(none)" "${compilers[@]}" |
1529 |
- |
1530 |
- # now the libs |
1531 |
- libs=( $(find_all_libs) ) |
1532 |
- write_list_start "Installed libs:" |
1533 |
- for (( i = 0 ; i < ${#libs[@]} ; i = i + 1 )) ; do |
1534 |
- [ -f ${SPECSDIR}/${libs[$i]}/${active} ] && \ |
1535 |
- libs[${i}]=$(highlight_marker "${libs[${i}]}") |
1536 |
- done |
1537 |
- write_numbered_list -m "(no libs)" "${libs[@]}" |
1538 |
-} |
1539 |
- |
1540 |
- |
1541 |
-### set action ### |
1542 |
- |
1543 |
-describe_set() { |
1544 |
- echo "Set active gnat compiler" |
1545 |
-} |
1546 |
- |
1547 |
-# The set action. Parameters: |
1548 |
-# $1 - name of profile to set, obligatory, passed by eselect |
1549 |
-# $2 - optional, name of env file to generate. Used from gnat.eclass. |
1550 |
-do_set() { |
1551 |
- if [[ -z ${1} ]] ; then |
1552 |
- # no parameter |
1553 |
- die -q "You didn't tell me which gnat to use" |
1554 |
- fi |
1555 |
- |
1556 |
- local toset=$(get_name_from_list $1) |
1557 |
- if [[ ${toset} == "(not-found)" ]] ; then |
1558 |
- die -q "I don't recognise the selection" |
1559 |
- fi |
1560 |
- |
1561 |
- # the action! |
1562 |
- # in this implementation simply create an appropriate env file |
1563 |
- local active=$(get_current_gnat) |
1564 |
- if [[ -z ${2} ]] ; then |
1565 |
- local envfile="${ENVDIR}/${MARKER}${toset}" |
1566 |
- |
1567 |
- # now we need to remove an old env file, which is guaranteed to |
1568 |
- # be unique by get_current_gnat above |
1569 |
- if [[ -n ${active} ]] ; then |
1570 |
- unset_env ${active} |
1571 |
- fi |
1572 |
- # just for a good measure remove the one we are going to write |
1573 |
- unset_env ${toset} |
1574 |
- else |
1575 |
- local envfile="$2" |
1576 |
- fi |
1577 |
- |
1578 |
- generate_envFile ${toset} ${envfile} |
1579 |
- |
1580 |
- # force update environment |
1581 |
- # should be replaced with "do_action env update" when #172472 gets resolved |
1582 |
- env-update &> /dev/null |
1583 |
-} |
1584 |
- |
1585 |
- |
1586 |
- |
1587 |
-### update action ### |
1588 |
-# |
1589 |
-# This action regenerates the /etc/env.d file for the current profile. Basically |
1590 |
-# the same as set, only it does not take any parameters. It should be called from ebuilds |
1591 |
-# installing Ada libs or in the pkg_postrm in gnatbuild.eclass, to clean up the |
1592 |
-# profile if last gnat in SLOT was removed. |
1593 |
- |
1594 |
-describe_update() { |
1595 |
- echo "Update active gnat profile picking up new libs." |
1596 |
-} |
1597 |
- |
1598 |
-do_update() { |
1599 |
- local toset=$(get_current_gnat) |
1600 |
- local envfile="${ENVDIR}/${MARKER}${toset}" |
1601 |
- # now check whether to update or unset the profile |
1602 |
- if $(profile_is_valid ${toset}); then |
1603 |
- generate_envFile ${toset} ${envfile} |
1604 |
- else |
1605 |
- unset_env ${toset} |
1606 |
- fi |
1607 |
- do_action env update &> /dev/null |
1608 |
-} |
1609 |
- |
1610 |
-### unset action ### |
1611 |
- |
1612 |
-describe_unset() { |
1613 |
- echo "Remove settings for currently active gnat" |
1614 |
-} |
1615 |
- |
1616 |
-do_unset() { |
1617 |
- local active=$(get_current_gnat) |
1618 |
- # check whether we have any profile set before removing anything.. |
1619 |
- if [[ -n ${active} ]] ; then |
1620 |
- unset_env ${active} |
1621 |
- do_action env update &> /dev/null |
1622 |
- fi |
1623 |
-} |
1624 |
|
1625 |
diff --git a/app-eselect/eselect-gnat/metadata.xml b/app-eselect/eselect-gnat/metadata.xml |
1626 |
deleted file mode 100644 |
1627 |
index 70aa7cdf2d3..00000000000 |
1628 |
--- a/app-eselect/eselect-gnat/metadata.xml |
1629 |
+++ /dev/null |
1630 |
@@ -1,6 +0,0 @@ |
1631 |
-<?xml version="1.0" encoding="UTF-8"?> |
1632 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
1633 |
-<pkgmetadata> |
1634 |
-<!--maintainer-needed--> |
1635 |
-<longdescription>The eselect module for the supported gnat compilers.</longdescription> |
1636 |
-</pkgmetadata> |
1637 |
|
1638 |
diff --git a/profiles/package.mask b/profiles/package.mask |
1639 |
index e0d6a8bc6c5..9a02aeab6db 100644 |
1640 |
--- a/profiles/package.mask |
1641 |
+++ b/profiles/package.mask |
1642 |
@@ -736,13 +736,6 @@ sys-cluster/util-vserver |
1643 |
# Removal in 30 days. Bug #572882. |
1644 |
dev-php/php-openid |
1645 |
|
1646 |
-# Michał Górny <mgorny@g.o> (13 Mar 2019) |
1647 |
-# The eselect module is obsolete, now that dev-lang/gnat-gpl is the only |
1648 |
-# implementation in Gentoo. It is unmaintained and has unresolved QA |
1649 |
-# issues. |
1650 |
-# Removal in 30 days. Bug #362753. |
1651 |
-app-eselect/eselect-gnat |
1652 |
- |
1653 |
# Eray Aslan <eras@g.o> (01 Mar 2019) |
1654 |
# Mask experimental software |
1655 |
=mail-mta/postfix-3.5* |
1656 |
|
1657 |
diff --git a/profiles/updates/1Q-2015 b/profiles/updates/1Q-2015 |
1658 |
index 77ec8d1f3f2..9a0514d7681 100644 |
1659 |
--- a/profiles/updates/1Q-2015 |
1660 |
+++ b/profiles/updates/1Q-2015 |
1661 |
@@ -23,7 +23,6 @@ move app-admin/eselect-chuck app-eselect/eselect-chuck |
1662 |
move app-admin/eselect-ctags app-eselect/eselect-ctags |
1663 |
move app-admin/eselect-emacs app-eselect/eselect-emacs |
1664 |
move app-admin/eselect-fontconfig app-eselect/eselect-fontconfig |
1665 |
-move app-admin/eselect-gnat app-eselect/eselect-gnat |
1666 |
move app-admin/eselect-gnome-shell-extensions app-eselect/eselect-gnome-shell-extensions |
1667 |
move app-admin/eselect-infinality app-eselect/eselect-infinality |
1668 |
move app-admin/eselect-java app-eselect/eselect-java |