public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nawk/files/, sys-apps/nawk/
@ 2018-12-30 16:11 Christoph Junghans
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Junghans @ 2018-12-30 16:11 UTC (permalink / raw
  To: gentoo-commits

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 <ottxor@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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nawk/files/, sys-apps/nawk/
@ 2022-12-24 14:01 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2022-12-24 14:01 UTC (permalink / raw
  To: gentoo-commits

commit:     d43c93c01f84d78d92eeb2b205a968280c353511
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 19:41:28 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 14:00:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d43c93c0

sys-apps/nawk: drop 20180827-r1

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sys-apps/nawk/Manifest                             |  1 -
 .../nawk/files/nawk-20180827-parallel-build.patch  | 35 -------------
 sys-apps/nawk/nawk-20180827-r1.ebuild              | 59 ----------------------
 3 files changed, 95 deletions(-)

diff --git a/sys-apps/nawk/Manifest b/sys-apps/nawk/Manifest
index 604f743562d3..4473ee555171 100644
--- a/sys-apps/nawk/Manifest
+++ b/sys-apps/nawk/Manifest
@@ -1,2 +1 @@
-DIST nawk-20180827.tar.gz 1824076 BLAKE2B 4cfd000842d75d9a713fe73a85eefab33c17f9ecaca4f7f663d1157da411fd9fcf2badbf5180b4a90910445332095fe457e7acf0643621ac8a68da1a246b5e5f SHA512 cd6561149be71e6311aaa69c86b90ee4b29a057e5c2595470ccc8a41c40c653ec31b4bd46d7f58896d012f5fb5952103a76aa463a69e5128cba43d80eedf0b9b
 DIST nawk-20220122.tar.gz 1832761 BLAKE2B f704ff9cf5012545ec3adc1887c0d43625d7e38e19589cba91fe31f664e72ccce20dee3f2484067a31af793be16439c1389603fbdb33c119efeafb18559a0d97 SHA512 46ab7936705288c9cd22867ad9f5b080ade67c4b05d674304e0e5cae8ea329420a9a46e3578bf3a014b7066a1185b7506b0f74445bb52aafb1090e7a82a5bf28

diff --git a/sys-apps/nawk/files/nawk-20180827-parallel-build.patch b/sys-apps/nawk/files/nawk-20180827-parallel-build.patch
deleted file mode 100644
index c6e3838313a0..000000000000
--- a/sys-apps/nawk/files/nawk-20180827-parallel-build.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From fa4a9fd729a57a314f0aa10897216ce3b60ec653 Mon Sep 17 00:00:00 2001
-From: Christoph Junghans <ottxor@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-r1.ebuild b/sys-apps/nawk/nawk-20180827-r1.ebuild
deleted file mode 100644
index 6f8b40a63ab9..000000000000
--- a/sys-apps/nawk/nawk-20180827-r1.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2022 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"
-
-DEPEND="
-	app-alternatives/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() {
-	if has_version app-admin/eselect && has_version app-eselect/eselect-awk
-	then
-		eselect awk update ifunset
-	fi
-}
-
-pkg_postrm() {
-	if has_version app-admin/eselect && has_version app-eselect/eselect-awk
-	then
-		eselect awk update ifunset
-	fi
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/nawk/files/, sys-apps/nawk/
@ 2023-10-17  6:13 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-10-17  6:13 UTC (permalink / raw
  To: gentoo-commits

commit:     81dc042d1139899478c7941cff470f8d715add48
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 17 06:12:50 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 17 06:13:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81dc042d

sys-apps/nawk: fix big-endian

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/nawk/files/nawk-20230909-big-endian.patch | 51 ++++++++++++++++++
 sys-apps/nawk/nawk-20230909-r1.ebuild              | 61 ++++++++++++++++++++++
 2 files changed, 112 insertions(+)

diff --git a/sys-apps/nawk/files/nawk-20230909-big-endian.patch b/sys-apps/nawk/files/nawk-20230909-big-endian.patch
new file mode 100644
index 000000000000..b39e7b4bee62
--- /dev/null
+++ b/sys-apps/nawk/files/nawk-20230909-big-endian.patch
@@ -0,0 +1,51 @@
+https://github.com/onetrueawk/awk/pull/196
+
+From 75c017ca09a70e14a862f7285cf91bb87ec1f443 Mon Sep 17 00:00:00 2001
+From: "Todd C. Miller" <Todd.Miller@sudo.ws>
+Date: Mon, 18 Sep 2023 17:34:34 -0600
+Subject: [PATCH 1/2] Fix a bad cast to char * that causes incorrect results on
+ big endian.
+
+Now that awk stores chars as int we need to cast the Node * to int *.
+--- a/b.c
++++ b/b.c
+@@ -527,7 +527,7 @@ int first(Node *p)	/* collects initially active leaves of p into setvec */
+ 			setvec[lp] = 1;
+ 			setcnt++;
+ 		}
+-		if (type(p) == CCL && (*(char *) right(p)) == '\0')
++		if (type(p) == CCL && (*(int *) right(p)) == 0)
+ 			return(0);		/* empty CCL */
+ 		return(1);
+ 	case PLUS:
+
+From 0048c96e94c732c6fb2ebe50eeb3450c1672fe0f Mon Sep 17 00:00:00 2001
+From: "Todd C. Miller" <Todd.Miller@sudo.ws>
+Date: Thu, 21 Sep 2023 11:20:16 -0600
+Subject: [PATCH 2/2] Use cclenter("") to construct an empty CCL, not
+ tostring("").
+
+We need to store a UTF-32 string, not a UTF-8 string, for consistency
+with the other CCL code.  Fixes an out-of-bounds read of an empty
+CCL.
+--- a/b.c
++++ b/b.c
+@@ -945,7 +945,7 @@ Node *primary(void)
+ 		rtok = relex();
+ 		if (rtok == ')') {	/* special pleading for () */
+ 			rtok = relex();
+-			return unary(op2(CCL, NIL, (Node *) tostring("")));
++			return unary(op2(CCL, NIL, (Node *) cclenter("")));
+ 		}
+ 		np = regexp();
+ 		if (rtok == ')') {
+@@ -968,7 +968,7 @@ Node *concat(Node *np)
+ 		return (concat(op2(CAT, np, primary())));
+ 	case EMPTYRE:
+ 		rtok = relex();
+-		return (concat(op2(CAT, op2(CCL, NIL, (Node *) tostring("")),
++		return (concat(op2(CAT, op2(CCL, NIL, (Node *) cclenter("")),
+ 				primary())));
+ 	}
+ 	return (np);
+

diff --git a/sys-apps/nawk/nawk-20230909-r1.ebuild b/sys-apps/nawk/nawk-20230909-r1.ebuild
new file mode 100644
index 000000000000..aa037df95f05
--- /dev/null
+++ b/sys-apps/nawk/nawk-20230909-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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"
+S="${WORKDIR}/awk-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux"
+
+BDEPEND="
+	app-alternatives/yacc
+"
+
+DOCS=( README.md FIXES )
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-20230909-big-endian.patch
+)
+
+src_compile() {
+	emake \
+		CC="$(tc-getCC)" \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		CFLAGS="${CFLAGS}" \
+		CPPFLAGS="${CPPFLAGS} -DHAS_ISBLANK" \
+		ALLOC="${LDFLAGS}" \
+		YACC=$(type -p yacc) \
+		YFLAGS="-d -b awkgram"
+}
+
+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() {
+	if has_version app-admin/eselect && has_version app-eselect/eselect-awk
+	then
+		eselect awk update ifunset
+	fi
+}
+
+pkg_postrm() {
+	if has_version app-admin/eselect && has_version app-eselect/eselect-awk
+	then
+		eselect awk update ifunset
+	fi
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-17  6:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-24 14:01 [gentoo-commits] repo/gentoo:master commit in: sys-apps/nawk/files/, sys-apps/nawk/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2023-10-17  6:13 Sam James
2018-12-30 16:11 Christoph Junghans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox