dev-erlang/epam: Fix metadata
[gentoo.git] / sys-apps / mawk / mawk-1.3.4_p20190203.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs
7
8 MY_P="${P/_p/-}"
9 DESCRIPTION="an (often faster than gawk) awk-interpreter"
10 HOMEPAGE="https://invisible-island.net/mawk/mawk.html"
11 SRC_URI="ftp://ftp.invisible-island.net/mawk/${MY_P}.tgz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
16 IUSE="forced-sandbox"
17
18 RDEPEND="app-eselect/eselect-awk"
19 DEPEND="${RDEPEND}"
20
21 S="${WORKDIR}/${MY_P}"
22
23 DOCS=( ACKNOWLEDGMENT CHANGES README )
24
25 PATCHES=(
26         "${FILESDIR}"/${PN}-1.3.4-sandbox.patch
27         "${FILESDIR}"/${PN}-1.3.4-sandbox-default.patch
28 )
29
30 src_configure() {
31         tc-export BUILD_CC
32         econf $(use_enable forced-sandbox)
33 }
34
35 src_install() {
36         default
37
38         exeinto /usr/share/doc/${PF}/examples
39         doexe examples/*
40         docompress -x /usr/share/doc/${PF}/examples
41 }
42
43 pkg_postinst() {
44         eselect awk update ifunset
45 }
46
47 pkg_postrm() {
48         eselect awk update ifunset
49 }