Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/gawk/
Date: Sat, 13 Apr 2019 08:56:21
Message-Id: 1555145755.6923adf5db76559838b65dfa6b3c7a073d192cd3.polynomial-c@gentoo
1 commit: 6923adf5db76559838b65dfa6b3c7a073d192cd3
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 13 08:24:22 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 13 08:55:55 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6923adf5
7
8 sys-apps/gawk: Bump to version 5.0.0
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-apps/gawk/Manifest | 1 +
14 sys-apps/gawk/gawk-5.0.0.ebuild | 93 +++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 94 insertions(+)
16
17 diff --git a/sys-apps/gawk/Manifest b/sys-apps/gawk/Manifest
18 index bd74f33aff2..5da999102e9 100644
19 --- a/sys-apps/gawk/Manifest
20 +++ b/sys-apps/gawk/Manifest
21 @@ -1,2 +1,3 @@
22 DIST gawk-4.1.4.tar.xz 2367832 BLAKE2B 67004e2867e4c4f43aac7142a52c83642d8bb3b0a5451293418bc15e575a8ed1d97c0a975e084bf46ffd1c27dc70e48de492cd2e007773622ef14886b9269ee1 SHA512 6a0e9cf086544212f54b54261dcd517b611aaf495ef99c4b7740d07e363bb00c5632f3d7fd5e12a954d5aa9793764162a57453e0e18884b29c6c54b5f444c097
23 DIST gawk-4.2.1.tar.xz 2985412 BLAKE2B ea0635904ae8af8943d545b21affbfad64de5a688a615e22e1af2634583d0002094c0668c3260837184f965452ccf84141fff705bbf42d55b6d55c7516c24d8b SHA512 0e3006a795dc3ac91359a7d2590c0cccbfd39b18a1d491617d68505c55a2800355b1439050681b4fcacf65fb0d533151a046babe0fd774503037bab363ef2ae4
24 +DIST gawk-5.0.0.tar.xz 3000432 BLAKE2B d7885442c615e2b7986d6cb617db3ac376a5e572ab2aca3c6b2bd0f43feca4374f310bbf2e2a875b617df97cfebf98cb983d169468d51db39058b83eb9771afa SHA512 9eb663bbcad53165b7ddb7d72cfb8377252b68004733a9eb8c191b2ddddaff857e48ba811280311384243eb67574fbe7ac9edf4e507f9a82d67b4b2adff8ef6e
25
26 diff --git a/sys-apps/gawk/gawk-5.0.0.ebuild b/sys-apps/gawk/gawk-5.0.0.ebuild
27 new file mode 100644
28 index 00000000000..f1caee35c34
29 --- /dev/null
30 +++ b/sys-apps/gawk/gawk-5.0.0.ebuild
31 @@ -0,0 +1,93 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="6"
36 +
37 +inherit toolchain-funcs multilib
38 +
39 +DESCRIPTION="GNU awk pattern-matching language"
40 +HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html"
41 +SRC_URI="mirror://gnu/gawk/${P}.tar.xz"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
46 +IUSE="forced-sandbox mpfr nls readline"
47 +
48 +RDEPEND="
49 + dev-libs/gmp:0=
50 + mpfr? ( dev-libs/mpfr:0= )
51 + readline? ( sys-libs/readline:0= )
52 +"
53 +DEPEND="${RDEPEND}
54 + nls? ( sys-devel/gettext )"
55 +
56 +src_prepare() {
57 + default
58 +
59 + # use symlinks rather than hardlinks, and disable version links
60 + sed -i \
61 + -e '/^LN =/s:=.*:= $(LN_S):' \
62 + -e '/install-exec-hook:/s|$|\nfoo:|' \
63 + Makefile.in doc/Makefile.in || die
64 + sed -i '/^pty1:$/s|$|\n_pty1:|' test/Makefile.in #413327
65 + # fix standards conflict on Solaris
66 + if [[ ${CHOST} == *-solaris* ]] ; then
67 + sed -i \
68 + -e '/\<_XOPEN_SOURCE\>/s/1$/600/' \
69 + -e '/\<_XOPEN_SOURCE_EXTENDED\>/s/1//' \
70 + extension/inplace.c || die
71 + fi
72 +
73 + if use forced-sandbox ; then
74 + # Upstream doesn't want to add a configure flag for this.
75 + # https://lists.gnu.org/archive/html/bug-sed/2018-03/msg00001.html
76 + sed -i \
77 + -e '/^int do_flags = false;/s:false:DO_SANDBOX:' \
78 + main.c || die
79 + # Make sure the sed took.
80 + grep -q '^int do_flags = DO_SANDBOX;' main.c || die "forcing sandbox failed"
81 + fi
82 +}
83 +
84 +src_configure() {
85 + export ac_cv_libsigsegv=no
86 + local myeconfargs=(
87 + --libexec='$(libdir)/misc'
88 + $(use_with mpfr)
89 + $(use_enable nls)
90 + $(use_with readline)
91 + )
92 + econf "${myeconfargs[@]}"
93 +}
94 +
95 +src_install() {
96 + rm -rf README_d # automatic dodocs barfs
97 + default
98 +
99 + # Install headers
100 + insinto /usr/include/awk
101 + doins *.h
102 + rm "${ED%/}"/usr/include/awk/config.h || die
103 +}
104 +
105 +pkg_postinst() {
106 + # symlink creation here as the links do not belong to gawk, but to any awk
107 + if has_version app-admin/eselect \
108 + && has_version app-eselect/eselect-awk ; then
109 + eselect awk update ifunset
110 + else
111 + local l
112 + for l in "${EROOT}"/usr/share/man/man1/gawk.1* "${EROOT}"/usr/bin/gawk; do
113 + [[ -e ${l} && ! -e ${l/gawk/awk} ]] && ln -s "${l##*/}" "${l/gawk/awk}"
114 + done
115 + [[ ! -e ${EROOT}/bin/awk ]] && ln -s "../usr/bin/gawk" "${EROOT}/bin/awk"
116 + fi
117 +}
118 +
119 +pkg_postrm() {
120 + if has_version app-admin/eselect \
121 + && has_version app-eselect/eselect-awk ; then
122 + eselect awk update ifunset
123 + fi
124 +}