diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 40189 -> 40361 bytes | |||
-rw-r--r-- | eclass/eapi9-ver.eclass | 50 | ||||
-rw-r--r-- | eclass/postgres.eclass | 4 | ||||
-rw-r--r-- | eclass/toolchain.eclass | 2 |
4 files changed, 52 insertions, 4 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex a826f84aebe7..04bad1d3d192 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/eapi9-ver.eclass b/eclass/eapi9-ver.eclass new file mode 100644 index 000000000000..9908fec37de8 --- /dev/null +++ b/eclass/eapi9-ver.eclass @@ -0,0 +1,50 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: eapi9-ver.eclass +# @MAINTAINER: +# Ulrich Müller <ulm@gentoo.org> +# @AUTHOR: +# Ulrich Müller <ulm@gentoo.org> +# @SUPPORTED_EAPIS: 7 8 +# @BLURB: Testing implementation of EAPI 9 ver_replacing +# @DESCRIPTION: +# A stand-alone implementation of the ver_replacing function aimed +# for EAPI 9. Intended to be used for wider testing of the proposed +# function and to allow ebuilds to switch to the new model early, with +# minimal change needed for the actual EAPI 9. +# +# @CODE +# if ver_replacing -lt 1.2; then +# elog "The frobnicate command was dropped in version 1.2" +# fi +# @CODE + +case ${EAPI} in + 7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +# @FUNCTION: ver_replacing +# @USAGE: <op> <ver> +# @RETURN: 0 if any element of REPLACING_VERSIONS qualifies, 1 otherwise +# @DESCRIPTION: +# Compare each element <v> of REPLACING_VERSIONS with version <ver> +# using ver_test(). Return 0 (true) if any element <v> fulfills +# "ver_test <v> <op> <ver>", 1 (false) otherwise. +# +# Note: If REPLACING_VERSIONS is empty, 1 (false) is returned. +ver_replacing() { + case ${EBUILD_PHASE} in + pretend|setup|preinst|postinst) ;; + *) die "ver_replacing is meaningless in the ${EBUILD_PHASE} phase" ;; + esac + + [[ $# -eq 2 ]] || die "Usage: ver_replacing <op> <ver>" + + local v + for v in ${REPLACING_VERSIONS}; do + ver_test "${v}" "$@" && return 0 + done + return 1 +} diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass index 21490df1965e..d743c5d0d165 100644 --- a/eclass/postgres.eclass +++ b/eclass/postgres.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: postgres.eclass @@ -27,7 +27,7 @@ _POSTGRES_ECLASS=1 # @DESCRIPTION: # List of versions to reverse sort POSTGRES_COMPAT slots -_POSTGRES_ALL_VERSIONS=( 9999 17 16 15 14 13 12 ) +_POSTGRES_ALL_VERSIONS=( 9999 17 16 15 14 13 ) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index f0a6caf56748..458105d7a56c 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -424,7 +424,6 @@ if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then sys-devel/gcc:${SLOT}[ada] <sys-devel/gcc-${SLOT}[ada] <dev-lang/ada-bootstrap-$((${SLOT} + 1)) - dev-lang/gnat-gpl[ada] ) ) " @@ -435,7 +434,6 @@ if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then sys-devel/gcc:${SLOT}[ada] <sys-devel/gcc-${SLOT}[ada] <dev-lang/ada-bootstrap-${SLOT} - dev-lang/gnat-gpl[ada] ) ) " |