Gentoo Archives: gentoo-commits

From: Christoph Junghans <junghans@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/nawk/files/, sys-apps/nawk/
Date: Sun, 30 Dec 2018 16:11:44
Message-Id: 1546186290.cd40340a6316e01c3cdcc7868012b3922aa002a7.junghans@gentoo
1 commit: cd40340a6316e01c3cdcc7868012b3922aa002a7
2 Author: Christoph Junghans <junghans <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 30 16:07:27 2018 +0000
4 Commit: Christoph Junghans <junghans <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 30 16:11:30 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd40340a
7
8 sys-apps/nawk: version bump
9
10 Closes: https://bugs.gentoo.org/674082
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12 Signed-off-by: Christoph Junghans <junghans <AT> gentoo.org>
13
14 sys-apps/nawk/Manifest | 1 +
15 .../nawk/files/nawk-20180827-parallel-build.patch | 35 +++++++++++++
16 sys-apps/nawk/nawk-20180827.ebuild | 57 ++++++++++++++++++++++
17 3 files changed, 93 insertions(+)
18
19 diff --git a/sys-apps/nawk/Manifest b/sys-apps/nawk/Manifest
20 index ce34283faca..935d6bbecde 100644
21 --- a/sys-apps/nawk/Manifest
22 +++ b/sys-apps/nawk/Manifest
23 @@ -1 +1,2 @@
24 DIST nawk-20121220.tar.gz 88970 BLAKE2B e00b9e55bb3b9139c00b8cc0be3f6cea2acc1162ee4326103c054c7270ef4a29b97cdddc9a692cad0773a72a17c399d2da5453939681a5d2456f0b740b6bc2ee SHA512 1dd62e1aa4c8cfad7ce599b10d88e9b450ecae3217cf8327cc0f3ce77d0d0dcb731101b8f211066462d46dc4ef23e20ccd7f70d799d7d48940026abe8fa79d4f
25 +DIST nawk-20180827.tar.gz 1824076 BLAKE2B 4cfd000842d75d9a713fe73a85eefab33c17f9ecaca4f7f663d1157da411fd9fcf2badbf5180b4a90910445332095fe457e7acf0643621ac8a68da1a246b5e5f SHA512 cd6561149be71e6311aaa69c86b90ee4b29a057e5c2595470ccc8a41c40c653ec31b4bd46d7f58896d012f5fb5952103a76aa463a69e5128cba43d80eedf0b9b
26
27 diff --git a/sys-apps/nawk/files/nawk-20180827-parallel-build.patch b/sys-apps/nawk/files/nawk-20180827-parallel-build.patch
28 new file mode 100644
29 index 00000000000..c6e3838313a
30 --- /dev/null
31 +++ b/sys-apps/nawk/files/nawk-20180827-parallel-build.patch
32 @@ -0,0 +1,35 @@
33 +From fa4a9fd729a57a314f0aa10897216ce3b60ec653 Mon Sep 17 00:00:00 2001
34 +From: Christoph Junghans <ottxor@g.o>
35 +Date: Mon, 10 Feb 2014 22:38:22 -0700
36 +Subject: [PATCH] fixed parallel build
37 +
38 +---
39 + makefile | 11 ++++++++---
40 + 1 file changed, 8 insertions(+), 3 deletions(-)
41 +
42 +diff --git a/makefile b/makefile
43 +index ae80e4d..b3c8f9d 100644
44 +--- a/makefile
45 ++++ b/makefile
46 +@@ -54,10 +54,15 @@ a.out: ytab.o $(OFILES)
47 +
48 + $(OFILES): awk.h ytab.h proto.h
49 +
50 +-ytab.c: awk.h proto.h awkgram.y
51 ++#Clear dependency for parallel build: (make -j)
52 ++#YACC generated y.tab.c and y.tab.h at the same time
53 ++#this needs to be a static pattern rules otherwise multiple target
54 ++#are mapped onto multiple executions of yacc, which overwrite
55 ++#each others outputs.
56 ++y%.c y%.h: awk.h proto.h awkgram.y
57 + $(YACC) $(YFLAGS) awkgram.y
58 +- mv y.tab.c ytab.c
59 +- mv y.tab.h ytab.h
60 ++ mv y.$*.c y$*.c
61 ++ mv y.$*.h y$*.h
62 +
63 + ytab.h: ytab.c
64 +
65 +--
66 +2.19.2
67 +
68
69 diff --git a/sys-apps/nawk/nawk-20180827.ebuild b/sys-apps/nawk/nawk-20180827.ebuild
70 new file mode 100644
71 index 00000000000..0a5c7119b75
72 --- /dev/null
73 +++ b/sys-apps/nawk/nawk-20180827.ebuild
74 @@ -0,0 +1,57 @@
75 +# Copyright 1999-2018 Gentoo Authors
76 +# Distributed under the terms of the GNU General Public License v2
77 +
78 +EAPI=6
79 +
80 +inherit toolchain-funcs
81 +
82 +DESCRIPTION="Brian Kernighan's pattern scanning and processing language"
83 +HOMEPAGE="https://www.cs.princeton.edu/~bwk/btl.mirror/"
84 +SRC_URI="https://github.com/onetrueawk/awk/archive/${PV}.tar.gz -> ${P}.tar.gz"
85 +
86 +LICENSE="MIT"
87 +SLOT="0"
88 +KEYWORDS="~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-macos"
89 +
90 +RDEPEND="
91 + app-eselect/eselect-awk
92 + !sys-freebsd/freebsd-ubin"
93 +
94 +DEPEND="
95 + ${RDEPEND}
96 + virtual/yacc"
97 +
98 +S="${WORKDIR}/awk-${PV}"
99 +
100 +PATCHES=( "${FILESDIR}/${P}"-parallel-build.patch )
101 +
102 +DOCS=( README FIXES )
103 +
104 +src_compile() {
105 + emake \
106 + CC="$(tc-getCC)" \
107 + CFLAGS="${CFLAGS}" \
108 + CPPFLAGS=-DHAS_ISBLANK \
109 + ALLOC="${LDFLAGS}" \
110 + YACC=$(type -p yacc) \
111 + YFLAGS="-d"
112 +}
113 +
114 +src_install() {
115 + newbin a.out "${PN}"
116 + sed \
117 + -e 's/awk/nawk/g' \
118 + -e 's/AWK/NAWK/g' \
119 + -e 's/Awk/Nawk/g' \
120 + awk.1 > "${PN}".1 || die "manpage patch failed"
121 + doman "${PN}.1"
122 + einstalldocs
123 +}
124 +
125 +pkg_postinst() {
126 + eselect awk update ifunset
127 +}
128 +
129 +pkg_postrm() {
130 + eselect awk update ifunset
131 +}