You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.0 KiB
57 lines
1.0 KiB
# Copyright 1999-2021 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=6
|
|
|
|
inherit toolchain-funcs
|
|
|
|
DESCRIPTION="Brian Kernighan's pattern scanning and processing language"
|
|
HOMEPAGE="https://www.cs.princeton.edu/~bwk/btl.mirror/"
|
|
SRC_URI="https://github.com/onetrueawk/awk/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86 ~amd64-linux"
|
|
|
|
RDEPEND="
|
|
app-eselect/eselect-awk"
|
|
|
|
DEPEND="
|
|
${RDEPEND}
|
|
virtual/yacc"
|
|
|
|
S="${WORKDIR}/awk-${PV}"
|
|
|
|
PATCHES=( "${FILESDIR}/${P}"-parallel-build.patch )
|
|
|
|
DOCS=( README FIXES )
|
|
|
|
src_compile() {
|
|
emake \
|
|
CC="$(tc-getCC)" \
|
|
CFLAGS="${CFLAGS}" \
|
|
CPPFLAGS=-DHAS_ISBLANK \
|
|
ALLOC="${LDFLAGS}" \
|
|
YACC=$(type -p yacc) \
|
|
YFLAGS="-d"
|
|
}
|
|
|
|
src_install() {
|
|
newbin a.out "${PN}"
|
|
sed \
|
|
-e 's/awk/nawk/g' \
|
|
-e 's/AWK/NAWK/g' \
|
|
-e 's/Awk/Nawk/g' \
|
|
awk.1 > "${PN}".1 || die "manpage patch failed"
|
|
doman "${PN}.1"
|
|
einstalldocs
|
|
}
|
|
|
|
pkg_postinst() {
|
|
eselect awk update ifunset
|
|
}
|
|
|
|
pkg_postrm() {
|
|
eselect awk update ifunset
|
|
}
|