Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-alternatives/awk/
Date: Wed, 28 Dec 2022 00:33:04
Message-Id: 1672187532.0a76df521dd7b668607ba7f366b853cd01adfc20.sam@gentoo
1 commit: 0a76df521dd7b668607ba7f366b853cd01adfc20
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 27 23:51:17 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 28 00:32:12 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a76df52
7
8 app-alternatives/awk: drop 1, 3
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 app-alternatives/awk/awk-1.ebuild | 19 ----------
13 app-alternatives/awk/awk-3.ebuild | 77 ---------------------------------------
14 2 files changed, 96 deletions(-)
15
16 diff --git a/app-alternatives/awk/awk-1.ebuild b/app-alternatives/awk/awk-1.ebuild
17 deleted file mode 100644
18 index cef6aea276d2..000000000000
19 --- a/app-alternatives/awk/awk-1.ebuild
20 +++ /dev/null
21 @@ -1,19 +0,0 @@
22 -# Copyright 1999-2022 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=7
26 -
27 -DESCRIPTION="Virtual for awk implementation"
28 -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
29 -
30 -SLOT="0"
31 -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"
32 -LICENSE="metapackage"
33 -
34 -RDEPEND="
35 - || (
36 - >=sys-apps/gawk-4.0.1-r1
37 - sys-apps/mawk
38 - sys-apps/nawk
39 - sys-apps/busybox
40 - )"
41
42 diff --git a/app-alternatives/awk/awk-3.ebuild b/app-alternatives/awk/awk-3.ebuild
43 deleted file mode 100644
44 index 46ba60100171..000000000000
45 --- a/app-alternatives/awk/awk-3.ebuild
46 +++ /dev/null
47 @@ -1,77 +0,0 @@
48 -# Copyright 2022 Gentoo Authors
49 -# Distributed under the terms of the GNU General Public License v2
50 -
51 -EAPI=8
52 -
53 -ALTERNATIVES=(
54 - gawk:sys-apps/gawk
55 - busybox:sys-apps/busybox
56 - mawk:sys-apps/mawk
57 - nawk:sys-apps/nawk
58 -)
59 -
60 -inherit app-alternatives
61 -
62 -DESCRIPTION="/bin/awk and /usr/bin/awk symlinks"
63 -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"
64 -IUSE="split-usr"
65 -
66 -RDEPEND="
67 - !app-eselect/eselect-awk
68 -"
69 -
70 -src_install() {
71 - local alt=$(get_alternative)
72 - local root_prefix=
73 - use split-usr && root_prefix=../../bin/
74 -
75 - # We could consider setting AWK=... like we do for yacc & lex,
76 - # but it would need some testing with a fair amount of packages first,
77 - # as autoconf prefers gawk.
78 - case ${alt} in
79 - busybox)
80 - dosym "${root_prefix}busybox" /usr/bin/awk
81 - ;;
82 - *)
83 - dosym "${alt}" /usr/bin/awk
84 - ;;
85 - esac
86 -
87 - newman - awk.1 <<<".so ${alt}.1"
88 -
89 - if use split-usr; then
90 - dosym ../usr/bin/awk /bin/awk
91 - fi
92 -}
93 -
94 -pkg_preinst() {
95 - local v
96 - for v in ${REPLACING_VERSIONS}; do
97 - # if we are upgrading from a new enough version, leftover manpage
98 - # symlink cleanup was done already
99 - if ver_test "${v}" -ge 3; then
100 - return
101 - fi
102 - done
103 -
104 - # otherwise, remove leftover files/symlinks created by eselect-awk (sic!)
105 - shopt -s nullglob
106 - local files=( "${EROOT}"/usr/share/man/man1/awk.1* )
107 - shopt -u nullglob
108 -
109 - if [[ ${files[@]} ]]; then
110 - einfo "Cleaning up leftover manpage symlinks from eselect-awk ..."
111 - rm -v "${files[@]}" || die
112 - fi
113 -}
114 -
115 -pkg_postrm() {
116 - # make sure we don't leave the user without the symlinks, since
117 - # they've not been owned by any other package
118 - if [[ ! -h ${EROOT}/usr/bin/awk ]]; then
119 - ln -s gawk "${EROOT}/usr/bin/awk" || die
120 - fi
121 - if [[ ! -h ${EROOT}/bin/awk ]]; then
122 - ln -s ../usr/bin/awk "${EROOT}/bin/awk" || die
123 - fi
124 -}