summaryrefslogtreecommitdiff
path: root/app-alternatives/awk/awk-4.ebuild
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2025-02-14 15:10:44 +0100
committerUlrich Müller <ulm@gentoo.org>2025-02-22 10:38:03 +0100
commitb755c5b977f6801b3083d3eb022746ec87e6002e (patch)
tree186844cbba80e07942fd8ff3c9192ca599302c1f /app-alternatives/awk/awk-4.ebuild
parentdc4a10c4456c03d9a7975397a5e50dcee2d862f2 (diff)
downloadgentoo-b755c5b977f6801b3083d3eb022746ec87e6002e.tar.gz
gentoo-b755c5b977f6801b3083d3eb022746ec87e6002e.tar.bz2
gentoo-b755c5b977f6801b3083d3eb022746ec87e6002e.zip
app-alternatives/awk: Port to ver_replacing
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'app-alternatives/awk/awk-4.ebuild')
-rw-r--r--app-alternatives/awk/awk-4.ebuild21
1 files changed, 7 insertions, 14 deletions
diff --git a/app-alternatives/awk/awk-4.ebuild b/app-alternatives/awk/awk-4.ebuild
index bc74e2572cb5..2c26d9a417fe 100644
--- a/app-alternatives/awk/awk-4.ebuild
+++ b/app-alternatives/awk/awk-4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -10,7 +10,7 @@ ALTERNATIVES=(
nawk:sys-apps/nawk
)
-inherit app-alternatives
+inherit app-alternatives eapi9-ver
DESCRIPTION="/bin/awk and /usr/bin/awk symlinks"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
@@ -49,18 +49,11 @@ pkg_preinst() {
has_version "app-alternatives/awk[mawk]" && HAD_MAWK=1
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ver_test "${v}" -lt 4; then
- SHOW_MAWK_WARNING=1
- fi
-
- # if we are upgrading from a new enough version, leftover manpage
- # symlink cleanup was done already
- if ver_test "${v}" -ge 3; then
- return
- fi
- done
+ ver_replacing -lt 4 && SHOW_MAWK_WARNING=1
+
+ # if we are upgrading from a new enough version, leftover manpage
+ # symlink cleanup was done already
+ ver_replacing -ge 3 && return
# otherwise, remove leftover files/symlinks created by eselect-awk (sic!)
shopt -s nullglob