Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 14 Sep 2019 17:08:48
Message-Id: 1568480841.c65fcde989f19d2695ca851331936e3c61f0ecf0.tupone@gentoo
1 commit: c65fcde989f19d2695ca851331936e3c61f0ecf0
2 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 14 17:07:21 2019 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 14 17:07:21 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c65fcde9
7
8 eclass/ada.eclass: Adding gnatchop wrapper
9
10 Took also in account comments from mgorny
11
12 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
13
14 eclass/ada.eclass | 29 +++++++++++++++++++----------
15 1 file changed, 19 insertions(+), 10 deletions(-)
16
17 diff --git a/eclass/ada.eclass b/eclass/ada.eclass
18 index e5463e15b30..86a67fc24fd 100644
19 --- a/eclass/ada.eclass
20 +++ b/eclass/ada.eclass
21 @@ -23,10 +23,10 @@
22 # Mostly copied from python-single-r1.eclass
23
24 case "${EAPI:-0}" in
25 - 0|1|2|3|4)
26 + 0|1|2|3|4|5)
27 die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
28 ;;
29 - 5|6|7)
30 + 6|7)
31 # EAPI=5 is required for sane USE_EXPAND dependencies
32 ;;
33 *)
34 @@ -237,6 +237,10 @@ ada_export() {
35 export GNATPREP=${EPREFIX}/usr/bin/gnatprep-${gcc_pv}
36 debug-print "${FUNCNAME}: GNATPREP = ${GNATPREP}"
37 ;;
38 + GNATCHOP)
39 + export GNATCHOP=${EPREFIX}/usr/bin/gnatchop-${gcc_pv}
40 + debug-print "${FUNCNAME}: GNATCHOP = ${GNATCHOP}"
41 + ;;
42 ADA_PKG_DEP)
43 ADA_PKG_DEP="dev-lang/gnat-gpl:${gcc_pv}"
44
45 @@ -345,35 +349,40 @@ ada_wrapper_setup() {
46 if [[ ! -x ${workdir}/bin/gnatmake ]]; then
47 mkdir -p "${workdir}"/bin || die
48
49 - local GCC GNATMAKE GNATLS GNATBIND GNATPREP
50 - ada_export "${impl}" GCC GNATMAKE GNATLS GNATBIND GNATPREP
51 + local GCC GNATMAKE GNATLS GNATBIND GNATCHOP GNATPREP
52 + ada_export "${impl}" GCC GNATMAKE GNATLS GNATCHOP GNATBIND GNATPREP
53
54 # Ada compiler
55 cat > "${workdir}/bin/gcc" <<-_EOF_ || die
56 #!/bin/sh
57 exec "${GCC}" "\${@}"
58 _EOF_
59 - chmod a+x "${workdir}/bin/gcc"
60 + chmod a+x "${workdir}/bin/gcc" || die
61 cat > "${workdir}/bin/gnatmake" <<-_EOF_ || die
62 #!/bin/sh
63 exec "${GNATMAKE}" "\${@}"
64 _EOF_
65 - chmod a+x "${workdir}/bin/gnatmake"
66 + chmod a+x "${workdir}/bin/gnatmake" || die
67 cat > "${workdir}/bin/gnatls" <<-_EOF_ || die
68 #!/bin/sh
69 exec "${GNATLS}" "\${@}"
70 _EOF_
71 - chmod a+x "${workdir}/bin/gnatls"
72 + chmod a+x "${workdir}/bin/gnatls" || die
73 cat > "${workdir}/bin/gnatbind" <<-_EOF_ || die
74 #!/bin/sh
75 exec "${GNATBIND}" "\${@}"
76 _EOF_
77 - chmod a+x "${workdir}/bin/gnatbind"
78 + chmod a+x "${workdir}/bin/gnatbind" || die
79 + cat > "${workdir}/bin/gnatchop" <<-_EOF_ || die
80 + #!/bin/sh
81 + exec "${GNATCHOP}" "\${@}"
82 + _EOF_
83 + chmod a+x "${workdir}/bin/gnatchop" || die
84 cat > "${workdir}/bin/gnatprep" <<-_EOF_ || die
85 #!/bin/sh
86 exec "${GNATPREP}" "\${@}"
87 _EOF_
88 - chmod a+x "${workdir}/bin/gnatprep"
89 + chmod a+x "${workdir}/bin/gnatprep" || die
90 fi
91
92 # Now, set the environment.
93 @@ -397,7 +406,7 @@ ada_setup() {
94 if [[ ${#_ADA_SUPPORTED_IMPLS[@]} -eq 1 ]]; then
95 if use "ada_targets_${_ADA_SUPPORTED_IMPLS[0]}"; then
96 # Only one supported implementation, enable it explicitly
97 - ada_export "${_ADA_SUPPORTED_IMPLS[0]}" EADA GCC GCC_PV GNATMAKE
98 + ada_export "${_ADA_SUPPORTED_IMPLS[0]}" EADA GCC_PV
99 ada_wrapper_setup
100 fi
101 else