commit: b7400923b6ede1589acd285e344b034d61c414bc
parent becc35843b87705633a977f4d7796af9f005e84d
Author: fosslinux <fosslinux@aussies.space>
Date: Fri, 12 Feb 2021 17:42:13 +1100
Merge pull request #37 from stikonas/gawk
Add gawk-3.0.4.
Diffstat:
6 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -325,3 +325,8 @@ be useful later for autotools.
`diffutils` is useful for comparing two files. It is not immediately needed but
is required later for autotools.
+
+#### Part 27: gawk 3.0.4
+
+`gawk` is the GNU implementation of `awk`, yet another pattern matching and data
+extraction utility. It is also required for autotools.
diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources
@@ -5,6 +5,7 @@ c25b36b8af6e0ad2a875daf4d6196bd0df28a62be7dd252e5f99a4d5d7288d95 coreutils-5.0.
d5f2489c4056a31528e3ada4adacc23d498532b0af1a980f2f76158162b139d6 diffutils-2.7.tar.gz
bc79b890f35ca38d66ff89a6e3758226131e51ccbd10ef78d5ff150b7bd73689 flex-2.5.11.tar.gz
e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995 flex-2.6.4.tar.gz
+5cc35def1ff4375a8b9a98c2ff79e95e80987d24f0d42fdbb7b7039b3ddb3fb0 gawk-3.0.4.tar.gz
a32032bab36208509466654df12f507600dfe0313feebbcd218c32a70bf72a16 grep-2.4.tar.gz
4d2ce9f314f39c9575f913503b0178d6fb2c92920db8e7b7b176b7bab7980fe6 gzip-1.2.4.tar
9f233d8b78e4351fe9dd2d50d83958a0e5af36f54e9818521458a08e058691ba heirloom-devtools-070527.tar.bz2
diff --git a/rootfs.sh b/rootfs.sh
@@ -187,6 +187,9 @@ get_file https://ftp.gnu.org/gnu/grep/grep-2.4.tar.gz
# diffutils 2.7
get_file https://ftp.gnu.org/gnu/diffutils/diffutils-2.7.tar.gz
+# gawk 3.0.4
+get_file https://ftp.gnu.org/gnu/gawk/gawk-3.0.4.tar.gz
+
# General cleanup
find tmp -name .git -exec rm -rf \;
diff --git a/sysa/gawk-3.0.4/gawk-3.0.4.sh b/sysa/gawk-3.0.4/gawk-3.0.4.sh
@@ -0,0 +1,18 @@
+# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+src_prepare() {
+ default_src_prepare
+ rm awktab.c
+}
+
+src_install() {
+ default_src_install
+
+ # Install data files
+ install -d "${PREFIX}/share/awk/"
+ for file in awklib/eg/lib/*.awk; do
+ install -m 644 "$file" "${PREFIX}/share/awk/"
+ done
+}
diff --git a/sysa/gawk-3.0.4/mk/main.mk b/sysa/gawk-3.0.4/mk/main.mk
@@ -0,0 +1,37 @@
+# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
+
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+CC = tcc
+
+CFLAGS = -I vms \
+ -D__GNUC__ \
+ -DRETSIGTYPE=void \
+ -DSPRINTF_RET=int \
+ -DHAVE_VPRINTF=1 \
+ -DHAVE_STDARG_H=1 \
+ -DDEFPATH=\"$(PREFIX)/share/awk\" \
+ -DHAVE_ALLOCA=1 \
+ -D__builtin_alloca=alloca \
+ -DHAVE_SYSTEM=1 \
+ -DHAVE_MEMCPY=1 \
+ -DHAVE_STRERROR=1 \
+ -DHAVE_STRFTIME=1 \
+ -DHAVE_TZSET=1
+
+.PHONY: all
+
+GAWK_SRC = alloca array awktab builtin dfa eval field getopt getopt1 gawkmisc io main missing msg node random re regex version
+GAWK_OBJ = $(addsuffix .o, $(GAWK_SRC))
+
+all: gawk
+
+gawk: $(GAWK_OBJ)
+ $(CC) -o $@ $^
+
+awktab.c: awk.y
+ bison $^ -o $@
+
+install: all
+ install gawk "$(PREFIX)/bin"
+ ln -s "$(PREFIX)/bin/gawk" "$(PREFIX)/bin/awk"
diff --git a/sysa/run.sh b/sysa/run.sh
@@ -35,4 +35,7 @@ build grep-2.4
# Part 26
build diffutils-2.7
+# Part 27
+build gawk-3.0.4
+
echo "Bootstrapping completed."