commit: cd40340a6316e01c3cdcc7868012b3922aa002a7 Author: Christoph Junghans <junghans <AT> gentoo <DOT> org> AuthorDate: Sun Dec 30 16:07:27 2018 +0000 Commit: Christoph Junghans <junghans <AT> gentoo <DOT> org> CommitDate: Sun Dec 30 16:11:30 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd40340a
sys-apps/nawk: version bump Closes: https://bugs.gentoo.org/674082 Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Christoph Junghans <junghans <AT> gentoo.org> sys-apps/nawk/Manifest | 1 + .../nawk/files/nawk-20180827-parallel-build.patch | 35 +++++++++++++ sys-apps/nawk/nawk-20180827.ebuild | 57 ++++++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/sys-apps/nawk/Manifest b/sys-apps/nawk/Manifest index ce34283faca..935d6bbecde 100644 --- a/sys-apps/nawk/Manifest +++ b/sys-apps/nawk/Manifest @@ -1 +1,2 @@ DIST nawk-20121220.tar.gz 88970 BLAKE2B e00b9e55bb3b9139c00b8cc0be3f6cea2acc1162ee4326103c054c7270ef4a29b97cdddc9a692cad0773a72a17c399d2da5453939681a5d2456f0b740b6bc2ee SHA512 1dd62e1aa4c8cfad7ce599b10d88e9b450ecae3217cf8327cc0f3ce77d0d0dcb731101b8f211066462d46dc4ef23e20ccd7f70d799d7d48940026abe8fa79d4f +DIST nawk-20180827.tar.gz 1824076 BLAKE2B 4cfd000842d75d9a713fe73a85eefab33c17f9ecaca4f7f663d1157da411fd9fcf2badbf5180b4a90910445332095fe457e7acf0643621ac8a68da1a246b5e5f SHA512 cd6561149be71e6311aaa69c86b90ee4b29a057e5c2595470ccc8a41c40c653ec31b4bd46d7f58896d012f5fb5952103a76aa463a69e5128cba43d80eedf0b9b diff --git a/sys-apps/nawk/files/nawk-20180827-parallel-build.patch b/sys-apps/nawk/files/nawk-20180827-parallel-build.patch new file mode 100644 index 00000000000..c6e3838313a --- /dev/null +++ b/sys-apps/nawk/files/nawk-20180827-parallel-build.patch @@ -0,0 +1,35 @@ +From fa4a9fd729a57a314f0aa10897216ce3b60ec653 Mon Sep 17 00:00:00 2001 +From: Christoph Junghans <ott...@gentoo.org> +Date: Mon, 10 Feb 2014 22:38:22 -0700 +Subject: [PATCH] fixed parallel build + +--- + makefile | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/makefile b/makefile +index ae80e4d..b3c8f9d 100644 +--- a/makefile ++++ b/makefile +@@ -54,10 +54,15 @@ a.out: ytab.o $(OFILES) + + $(OFILES): awk.h ytab.h proto.h + +-ytab.c: awk.h proto.h awkgram.y ++#Clear dependency for parallel build: (make -j) ++#YACC generated y.tab.c and y.tab.h at the same time ++#this needs to be a static pattern rules otherwise multiple target ++#are mapped onto multiple executions of yacc, which overwrite ++#each others outputs. ++y%.c y%.h: awk.h proto.h awkgram.y + $(YACC) $(YFLAGS) awkgram.y +- mv y.tab.c ytab.c +- mv y.tab.h ytab.h ++ mv y.$*.c y$*.c ++ mv y.$*.h y$*.h + + ytab.h: ytab.c + +-- +2.19.2 + diff --git a/sys-apps/nawk/nawk-20180827.ebuild b/sys-apps/nawk/nawk-20180827.ebuild new file mode 100644 index 00000000000..0a5c7119b75 --- /dev/null +++ b/sys-apps/nawk/nawk-20180827.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2018 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-fbsd ~x86-fbsd ~amd64-linux ~x86-macos" + +RDEPEND=" + app-eselect/eselect-awk + !sys-freebsd/freebsd-ubin" + +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 +}