nawk: Update to 20230913

This commit is contained in:
metab0t 2023-09-29 16:55:18 +08:00
parent 1e463990a3
commit 3af896a37b
2 changed files with 23 additions and 28 deletions

View File

@ -1,40 +1,41 @@
# Maintainer: Andrew Sun <adsun701@gmail.com>
pkgname=nawk
pkgver=20180827
pkgver=20230913
_commit=c8b4698d57d7b1dc6275fd514fcdf163955e8f67 # master
pkgrel=1
pkgdesc="The one, true implementation of AWK"
url="https://www.cs.princeton.edu/~bwk/btl.mirror/"
url="https://github.com/onetrueawk/awk"
license=('MIT')
arch=('i686' 'x86_64')
makedepends=('make' 'gcc')
makedepends=('make' 'gcc' 'git')
options=('!makeflags')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/onetrueawk/awk/archive/${pkgver}.tar.gz"
source=("git+https://github.com/onetrueawk/awk.git#commit=${_commit}"
'manpage-naming.patch')
md5sums=('043b9b9e8d197929ca9f4f35943c0c67'
'c708123a6dfeda611be6f63a45f50e4f')
sha256sums=('SKIP'
'fa1bade363896033a50fbdadc8fa2f490f85a044d11afcd537f317067c70d3b5')
prepare() {
cd awk-${pkgver}
cd awk
# awk -> nawk
patch -Np1 <"${srcdir}"/manpage-naming.patch
# create license
sed -n '/Copyright/,/THIS SOFTWARE\./p' README > LICENSE
sed -n '/Copyright/,/THIS SOFTWARE\./p' README.md > LICENSE
# fix build
sed -i '/YACC = yacc -d -S/ s|^|#|' makefile
}
build() {
cd awk-${pkgver}
cd awk
make "CPPFLAGS=-DHAS_ISBLANK ${CPPFLAGS}" \
"LDFLAGS=${LDFLAGS}" \
"CFLAGS=${CFLAGS}"
}
package() {
cd awk-${pkgver}
cd awk
install -Dm755 a.exe "${pkgdir}/usr/bin/nawk.exe"
install -Dm644 awk.1 "${pkgdir}/usr/share/man/man1/nawk.1"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/nawk/LICENSE"

View File

@ -1,12 +1,14 @@
--- awk-20180827/awk.1.orig 2018-08-28 23:05:48.000000000 +0300
+++ awk-20180827/awk.1 2019-11-12 10:26:19.668441900 +0300
@@ -7,12 +7,11 @@
diff --git a/awk.1 b/awk.1
index 5830143..339271e 100644
--- a/awk.1
+++ b/awk.1
@@ -7,12 +7,12 @@
.fi
.ft 1
..
-.TH AWK 1
-.CT 1 files prog_other
+.TH NAWK 1
.CT 1 files prog_other
.SH NAME
-awk \- pattern-directed scanning and processing language
+nawk \- pattern-directed scanning and processing language
@ -16,7 +18,7 @@
[
.BI \-F
.I fs
@@ -31,7 +30,7 @@
@@ -31,7 +31,7 @@ awk \- pattern-directed scanning and processing language
.I file ...
]
.SH DESCRIPTION
@ -25,15 +27,7 @@
scans each input
.I file
for lines that match any of a set of patterns specified literally in
@@ -198,7 +197,6 @@
.B sqrt
are built in.
Other built-in functions:
-.TF length
.TP
.B length
the length of its argument
@@ -426,10 +424,9 @@
@@ -426,7 +426,7 @@ and
do not combine with other patterns.
They may appear multiple times in a program and execute
in the order they are read by
@ -41,7 +35,7 @@
+.IR nawk .
.PP
Variable names with special meanings:
-.TF FILENAME
.TP
.B ARGC
argument count, assignable.
.TF FILENAME
--
2.18.0