summaryrefslogtreecommitdiff
path: root/app-alternatives/awk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-05 21:07:33 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-05 21:07:33 +0000
commit7ac0e89e1c8027ed5be76f6005e8cb52b1e5d484 (patch)
tree6e8094136a65c722d055bff2797c5e26074dc77e /app-alternatives/awk
parentfbfe3f841f32cbf766cd6ba1d05c3930540be577 (diff)
gentoo auto-resync : 05:12:2022 - 21:07:33
Diffstat (limited to 'app-alternatives/awk')
-rw-r--r--app-alternatives/awk/Manifest2
-rw-r--r--app-alternatives/awk/awk-2.ebuild48
2 files changed, 22 insertions, 28 deletions
diff --git a/app-alternatives/awk/Manifest b/app-alternatives/awk/Manifest
index b31038130df7..5ecba01dea54 100644
--- a/app-alternatives/awk/Manifest
+++ b/app-alternatives/awk/Manifest
@@ -1,3 +1,3 @@
EBUILD awk-1.ebuild 554 BLAKE2B 29fc3ad3018b3ce17a24c250e22789105c8a564fdda0c2185401fe999ccb2d33eae2afacef01042e3b58e968b906452e9fb623f0a804c0a0954042297146abf9 SHA512 53db324987a3b7dc3c49f4d5d2060b8d065aa5798be2084d75c5eea89344205118ca301ca21ecc438d45e28ea1eb60357d44c2fe0b52ae1602636bf85535d1d0
-EBUILD awk-2.ebuild 1757 BLAKE2B 968c3e236089382449abe64e62ded3cba39646746fbbf0762f7006f2ef76c8de27741e66a262474b8a694b40c37e1114157a665d32edda04d667ae2626e24339 SHA512 e0ffed625431f2e2afd18ff39b3dc21bf6d6be7e7aa20573b0cf740f42b93e3f76057022b16fabb1179dca00bea63647108996e24baa48c41947ac20dee8764e
+EBUILD awk-2.ebuild 1373 BLAKE2B a65daeca559e47330535a17923c6b21e083d671292d99391365895c74e408aeb6d03e2135f3e5d9b6bf50dda171ee5535597b6724dd8699b126d58e79ce2e669 SHA512 1cc668225cb6bfee490ab8564d777a668899937726a892e86b484b38d46a10e2614cb1501128973640c41f04118ba48d09651efd43a9c66b11809abcc631621e
MISC metadata.xml 829 BLAKE2B bf4375b33e702c61a3f8553e1b63110acab32b68d4ac2d905b6dd12a2204484bc5c2f3a34b2ec127a6c60aac8c105949dbc6eb5ade3a1c8c959afdabdd3658a1 SHA512 32252970d3b12c7a5b9fc7c7ffae821908b9bd4101372e699c70e64572fd7563121427ed5971462417d8c2e6155e47f567ac3bb057d457d58648c5b4d2458974
diff --git a/app-alternatives/awk/awk-2.ebuild b/app-alternatives/awk/awk-2.ebuild
index c76362361bef..c20aa0953478 100644
--- a/app-alternatives/awk/awk-2.ebuild
+++ b/app-alternatives/awk/awk-2.ebuild
@@ -3,47 +3,41 @@
EAPI=8
-DESCRIPTION="/bin/awk and /usr/bin/awk symlinks"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base/Alternatives"
-SRC_URI=""
-S=${WORKDIR}
+ALTERNATIVES=(
+ gawk:sys-apps/gawk
+ busybox:sys-apps/busybox
+ mawk:sys-apps/mawk
+ nawk:sys-apps/nawk
+)
+
+inherit app-alternatives
-LICENSE="CC0-1.0"
-SLOT="0"
+DESCRIPTION="/bin/awk and /usr/bin/awk symlinks"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="busybox +gawk mawk nawk split-usr"
-REQUIRED_USE="^^ ( busybox gawk mawk nawk )"
+IUSE="split-usr"
RDEPEND="
- busybox? ( sys-apps/busybox )
- gawk? ( sys-apps/gawk )
- mawk? ( sys-apps/mawk )
- nawk? ( sys-apps/nawk )
!app-eselect/eselect-awk
"
src_install() {
+ local alt=$(get_alternative)
local root_prefix=
use split-usr && root_prefix=../../bin/
# We could consider setting AWK=... like we do for yacc & lex,
# but it would need some testing with a fair amount of packages first,
# as autoconf prefers gawk.
- if use busybox; then
- dosym "${root_prefix}busybox" /usr/bin/awk
- newman - awk.1 <<<".so busybox.1"
- elif use gawk; then
- dosym gawk /usr/bin/awk
- newman - awk.1 <<<".so gawk.1"
- elif use mawk; then
- dosym mawk /usr/bin/awk
- newman - awk.1 <<<".so mawk.1"
- elif use nawk; then
- dosym nawk /usr/bin/awk
- newman - awk.1 <<<".so nawk.1"
- else
- die "Invalid USE flag combination (broken REQUIRED_USE?)"
- fi
+ case ${alt} in
+ busybox)
+ dosym "${root_prefix}busybox" /usr/bin/awk
+ ;;
+ *)
+ dosym "${alt}" /usr/bin/awk
+ ;;
+ esac
+
+ newman - awk.1 <<<".so ${alt}.1"
if use split-usr; then
dosym ../usr/bin/awk /bin/awk