commit: 8b4bc691b2a39d2b5cfa4045e3130e3a66911574 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org> AuthorDate: Fri Sep 16 17:19:48 2022 +0000 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> CommitDate: Fri Sep 16 17:22:15 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b4bc691
ada.eclass: add gcc_12_2_0 handling Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> eclass/ada.eclass | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/eclass/ada.eclass b/eclass/ada.eclass index 0bf3dcfe41cc..346cbc112e8e 100644 --- a/eclass/ada.eclass +++ b/eclass/ada.eclass @@ -1,4 +1,4 @@ -# Copyright 2019 Gentoo Authors +# Copyright 2019-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ada.eclass @@ -58,7 +58,7 @@ EXPORT_FUNCTIONS pkg_setup # @DESCRIPTION: # All supported Ada implementations, most preferred last. _ADA_ALL_IMPLS=( - gnat_2020 gnat_2021 + gnat_2020 gnat_2021 gcc_12_2_0 ) readonly _ADA_ALL_IMPLS @@ -86,6 +86,9 @@ _ada_impl_supported() { gnat_202[01]) return 0 ;; + gcc_12_2_0) + return 0 + ;; *) [[ ${ADA_COMPAT_NO_STRICT} ]] && return 1 die "Invalid implementation in ADA_COMPAT: ${impl}" @@ -181,6 +184,10 @@ ada_export() { impl=${1} shift ;; + gcc_12_2_0) + impl=${1} + shift + ;; *) impl=${EADA} if [[ -z ${impl} ]]; then @@ -201,6 +208,10 @@ ada_export() { gcc_pv=10.3.1 slot=10 ;; + gcc_12_2_0) + gcc_pv=12.2.0 + slot=12 + ;; *) gcc_pv="9.9.9" slot=9.9.9 @@ -246,7 +257,14 @@ ada_export() { debug-print "${FUNCNAME}: GNATCHOP = ${GNATCHOP}" ;; ADA_PKG_DEP) - ADA_PKG_DEP="dev-lang/gnat-gpl:${slot}[ada]" + case "${impl}" in + gnat_202[01]) + ADA_PKG_DEP="dev-lang/gnat-gpl:${slot}[ada]" + ;; + *) + ADA_PKG_DEP="=sys-devel/gcc-${gcc_pv}*[ada]" + ;; + esac # use-dep if [[ ${ADA_REQ_USE} ]]; then