logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: ae680b79e5ad6cea81a48d2e5ad27dd586b206ba
parent d5a9f4c9eae01a9881915fe8abaca58907e34d64
Author: fosslinux <fosslinux@aussies.space>
Date:   Fri, 12 Feb 2021 17:47:43 +1100

Merge branch 'master' into coreutils2

Diffstat:

MREADME.md6++++++
MSHA256SUMS.sources1+
Mrootfs.sh3+++
Asysa/gawk-3.0.4/gawk-3.0.4.sh18++++++++++++++++++
Asysa/gawk-3.0.4/mk/main.mk37+++++++++++++++++++++++++++++++++++++
Asysa/musl-1.1.24/patches/stdout_force_line_buffering.patch21+++++++++++++++++++++
Msysa/run.sh3+++
7 files changed, 89 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -330,3 +330,8 @@ is required later for autotools. `coreutils` is rebuilt against musl. Additional utilities are built including `comm`, `expr`, `date`, `dd`, `sort`, `uname`, and `uniq`. + +#### Part 28: 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. +\ No newline at end of file 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/musl-1.1.24/patches/stdout_force_line_buffering.patch b/sysa/musl-1.1.24/patches/stdout_force_line_buffering.patch @@ -0,0 +1,21 @@ +SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> + +SPDX-License-Identifier: MIT + +Force writing to stdout to use line buffering. Works around problem +with pipes and redirecting stdout. + +--- src/stdio/__stdout_write.c ++++ src/stdio/__stdout_write.c +@@ -5,7 +5,6 @@ size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len) + { + struct winsize wsz; + f->write = __stdio_write; +- if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TIOCGWINSZ, &wsz)) +- f->lbf = -1; ++ f->lbf = '\n'; + return __stdio_write(f, buf, len); + } +-- +2.30.0 + diff --git a/sysa/run.sh b/sysa/run.sh @@ -38,4 +38,7 @@ build diffutils-2.7 # Part 27 build coreutils-5.0 +# Part 28 +build gawk-3.0.4 + echo "Bootstrapping completed."