logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 3fd451a909f942da8835f3ac144f3c3ccb1f6a84
parent e4f5342ee4c737927c1f038386bb7877d6ba8555
Author: Andrius Štikonas <andrius@stikonas.eu>
Date:   Sat, 14 May 2022 19:40:52 +0100

Swamp make and gzip.

Diffstat:

Mparts.rst14+++++++-------
Msysa.py6+++---
Msysa/after.kaem8++++----
Msysa/bash-2.05b/bash-2.05b.kaem2+-
Msysa/bzip2-1.0.8/bzip2-1.0.8.kaem2+-
Msysa/gzip-1.2.4/checksums2+-
Msysa/gzip-1.2.4/gzip-1.2.4.kaem28+++++-----------------------
Asysa/gzip-1.2.4/mk/main.mk23+++++++++++++++++++++++
Msysa/make-3.80/make-3.80.kaem2+-
Msysa/patch-2.5.9/patch-2.5.9.kaem2+-
Msysa/sed-4.0.9/sed-4.0.9.kaem2+-
Msysa/tar-1.12/tar-1.12.kaem4+++-
12 files changed, 51 insertions(+), 44 deletions(-)

diff --git a/parts.rst b/parts.rst @@ -90,13 +90,6 @@ using older versions compilable by tinycc. Prior to this point, all tools have been adapted significantly for the bootstrap; now, we will be using old tooling instead. -gzip 1.2.4 -========== - -``gzip`` is the most common compression format used for software source -code. It is luckily distributed as a barebones uncompressed ``.tar``, -which we extract and then build. - make 3.80 ========= @@ -104,6 +97,13 @@ GNU ``make`` is now built so we have a more robust building system. ``make`` allows us to do things like define rules for files rather than writing complex kaem scripts. +gzip 1.2.4 +========== + +``gzip`` is the most common compression format used for software source +code. It is more capble than ``ungz`` from ``stage0-posix`` and also supports +compression. + tar 1.12 ======== diff --git a/sysa.py b/sysa.py @@ -99,12 +99,12 @@ class SysA(SysGeneral): # tcc 0.9.26 patched by janneke self.get_file("https://lilypond.org/janneke/tcc/tcc-0.9.26-1136-g5bba73cc.tar.gz", output="tcc-0.9.26.tar.gz") - # gzip 1.2.4 - self.get_file("https://mirrors.kernel.org/gnu/gzip/gzip-1.2.4.tar.gz") - # make 3.80 self.get_file("https://mirrors.kernel.org/gnu/make/make-3.80.tar.gz") + # gzip 1.2.4 + self.get_file("https://mirrors.kernel.org/gnu/gzip/gzip-1.2.4.tar.gz") + # tar 1.12 self.get_file("https://mirrors.kernel.org/gnu/tar/tar-1.12.tar.gz") diff --git a/sysa/after.kaem b/sysa/after.kaem @@ -76,14 +76,14 @@ cd .. libdir=${libdir}/mes -# gzip -pkg="gzip-1.2.4" +# make +pkg="make-3.80" cd ${pkg} kaem --file ${pkg}.kaem cd .. -# make -pkg="make-3.80" +# gzip +pkg="gzip-1.2.4" cd ${pkg} kaem --file ${pkg}.kaem cd .. diff --git a/sysa/bash-2.05b/bash-2.05b.kaem b/sysa/bash-2.05b/bash-2.05b.kaem @@ -13,7 +13,7 @@ cd build # Extract cp ${distfiles}/${pkg}.tar.gz ../src/ -gunzip -f ../src/${pkg}.tar.gz +gzip -d -f ../src/${pkg}.tar.gz tar xf ../src/${pkg}.tar rm -r ../src/ cd ${pkg} diff --git a/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem b/sysa/bzip2-1.0.8/bzip2-1.0.8.kaem @@ -12,7 +12,7 @@ cd build # Extract cp ${distfiles}/${pkg}.tar.gz ../src/ -gunzip -f ../src/${pkg}.tar.gz +gzip -d -f ../src/${pkg}.tar.gz tar xf ../src/${pkg}.tar cd ${pkg} diff --git a/sysa/gzip-1.2.4/checksums b/sysa/gzip-1.2.4/checksums @@ -1 +1 @@ -3a0753ea8effb449d19d0fef091cabe27a937dc8545d1dd9fe28cd2991e846e8 /usr/bin/gzip +c310ba8e6df0b3e12934b5443079264656817a234b0417faa69a140447caf5a2 /usr/bin/gzip diff --git a/sysa/gzip-1.2.4/gzip-1.2.4.kaem b/sysa/gzip-1.2.4/gzip-1.2.4.kaem @@ -21,34 +21,16 @@ untar ../src/${pkg}.tar cd ${pkg} # Prepare +cp ../../mk/main.mk Makefile catm gzip.c.new ../../files/stat_override.c gzip.c cp gzip.c.new gzip.c -# Compile -tcc -c -DNO_UTIME gzip.c -tcc -c bits.c -tcc -c crypt.c -tcc -c deflate.c -tcc -c getopt.c -tcc -c inflate.c -tcc -c lzw.c -tcc -c trees.c -tcc -c unlzh.c -tcc -c unlzw.c -tcc -c unpack.c -tcc -c unzip.c -# strlwr is already defined in mes libc -tcc -c -Dstrlwr=unused util.c -tcc -c zip.c - -# Link -tcc -static -o ${bindir}/gzip gzip.o zip.o deflate.o trees.o bits.o unzip.o inflate.o util.o crypt.o lzw.o unlzw.o unpack.o unlzh.o getopt.o +# Build +make # Install -cp ${bindir}/gzip ${bindir}/gunzip -cp ${bindir}/gzip ${bindir}/zcat -chmod 755 ${bindir}/gunzip -chmod 755 ${bindir}/zcat +cp gzip ${bindir}/gzip +chmod 755 ${bindir}/gzip cd ../.. diff --git a/sysa/gzip-1.2.4/mk/main.mk b/sysa/gzip-1.2.4/mk/main.mk @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +CC = tcc +AR = tcc -ar + +# -DSIZEOF_UNSIGNED_LONG=4 forces use of simulated arithmetic +# This is to avoid running configure test to determine sizeof(long long) +CPPFLAGS = -DNO_UTIME \ + -Dstrlwr=unused + +CFLAGS = -I . -static + +.PHONY: all + +GZIP_SRC = gzip bits crypt deflate getopt inflate lzw trees unlzh unlzw unpack unzip util zip +GZIP_OBJ = $(addsuffix .o, $(GZIP_SRC)) + +all: gzip + +gzip: $(GZIP_OBJ) + $(CC) $^ -o $@ diff --git a/sysa/make-3.80/make-3.80.kaem b/sysa/make-3.80/make-3.80.kaem @@ -11,7 +11,7 @@ cd build # Extract cp ${distfiles}/${pkg}.tar.gz ../src/ -gunzip -f ../src/${pkg}.tar.gz +ungz ../src/${pkg}.tar.gz untar ../src/${pkg}.tar cd ${pkg} diff --git a/sysa/patch-2.5.9/patch-2.5.9.kaem b/sysa/patch-2.5.9/patch-2.5.9.kaem @@ -11,7 +11,7 @@ cd build # Extract cp ${distfiles}/${pkg}.tar.gz ../src/ -gunzip -f ../src/${pkg}.tar.gz +gzip -d -f ../src/${pkg}.tar.gz tar xf ../src/${pkg}.tar cd ${pkg} cp ../../mk/main.mk Makefile diff --git a/sysa/sed-4.0.9/sed-4.0.9.kaem b/sysa/sed-4.0.9/sed-4.0.9.kaem @@ -13,7 +13,7 @@ cd build # Extract cp ${distfiles}/${pkg}.tar.gz ../src/ -gunzip -f ../src/${pkg}.tar.gz +gzip -d -f ../src/${pkg}.tar.gz tar xf ../src/${pkg}.tar cd ${pkg} cp ../../mk/main.mk Makefile diff --git a/sysa/tar-1.12/tar-1.12.kaem b/sysa/tar-1.12/tar-1.12.kaem @@ -13,10 +13,12 @@ cd build # Extract cp ${distfiles}/${pkg}.tar.gz ../src/ -gunzip -f ../src/${pkg}.tar.gz +gzip -d -f ../src/${pkg}.tar.gz untar ../src/${pkg}.tar cd ${pkg} + +# Prepare cp ../../mk/main.mk Makefile cp ../../files/getdate_stub.c lib/getdate_stub.c catm src/create.c.new ../../files/stat_override.c src/create.c