Swamp make and gzip.
This commit is contained in:
parent
e4f5342ee4
commit
3fd451a909
14
parts.rst
14
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
|
have been adapted significantly for the bootstrap; now, we will be using
|
||||||
old tooling instead.
|
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
|
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
|
``make`` allows us to do things like define rules for files rather than
|
||||||
writing complex kaem scripts.
|
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
|
tar 1.12
|
||||||
========
|
========
|
||||||
|
|
||||||
|
|
6
sysa.py
6
sysa.py
|
@ -99,12 +99,12 @@ class SysA(SysGeneral):
|
||||||
# tcc 0.9.26 patched by janneke
|
# 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")
|
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
|
# make 3.80
|
||||||
self.get_file("https://mirrors.kernel.org/gnu/make/make-3.80.tar.gz")
|
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
|
# tar 1.12
|
||||||
self.get_file("https://mirrors.kernel.org/gnu/tar/tar-1.12.tar.gz")
|
self.get_file("https://mirrors.kernel.org/gnu/tar/tar-1.12.tar.gz")
|
||||||
|
|
||||||
|
|
|
@ -76,14 +76,14 @@ cd ..
|
||||||
|
|
||||||
libdir=${libdir}/mes
|
libdir=${libdir}/mes
|
||||||
|
|
||||||
# gzip
|
# make
|
||||||
pkg="gzip-1.2.4"
|
pkg="make-3.80"
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
kaem --file ${pkg}.kaem
|
kaem --file ${pkg}.kaem
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# make
|
# gzip
|
||||||
pkg="make-3.80"
|
pkg="gzip-1.2.4"
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
kaem --file ${pkg}.kaem
|
kaem --file ${pkg}.kaem
|
||||||
cd ..
|
cd ..
|
||||||
|
|
|
@ -13,7 +13,7 @@ cd build
|
||||||
|
|
||||||
# Extract
|
# Extract
|
||||||
cp ${distfiles}/${pkg}.tar.gz ../src/
|
cp ${distfiles}/${pkg}.tar.gz ../src/
|
||||||
gunzip -f ../src/${pkg}.tar.gz
|
gzip -d -f ../src/${pkg}.tar.gz
|
||||||
tar xf ../src/${pkg}.tar
|
tar xf ../src/${pkg}.tar
|
||||||
rm -r ../src/
|
rm -r ../src/
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
|
|
|
@ -12,7 +12,7 @@ cd build
|
||||||
|
|
||||||
# Extract
|
# Extract
|
||||||
cp ${distfiles}/${pkg}.tar.gz ../src/
|
cp ${distfiles}/${pkg}.tar.gz ../src/
|
||||||
gunzip -f ../src/${pkg}.tar.gz
|
gzip -d -f ../src/${pkg}.tar.gz
|
||||||
tar xf ../src/${pkg}.tar
|
tar xf ../src/${pkg}.tar
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
3a0753ea8effb449d19d0fef091cabe27a937dc8545d1dd9fe28cd2991e846e8 /usr/bin/gzip
|
c310ba8e6df0b3e12934b5443079264656817a234b0417faa69a140447caf5a2 /usr/bin/gzip
|
||||||
|
|
|
@ -21,34 +21,16 @@ untar ../src/${pkg}.tar
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
|
|
||||||
# Prepare
|
# Prepare
|
||||||
|
cp ../../mk/main.mk Makefile
|
||||||
catm gzip.c.new ../../files/stat_override.c gzip.c
|
catm gzip.c.new ../../files/stat_override.c gzip.c
|
||||||
cp gzip.c.new gzip.c
|
cp gzip.c.new gzip.c
|
||||||
|
|
||||||
# Compile
|
# Build
|
||||||
tcc -c -DNO_UTIME gzip.c
|
make
|
||||||
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
|
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
cp ${bindir}/gzip ${bindir}/gunzip
|
cp gzip ${bindir}/gzip
|
||||||
cp ${bindir}/gzip ${bindir}/zcat
|
chmod 755 ${bindir}/gzip
|
||||||
chmod 755 ${bindir}/gunzip
|
|
||||||
chmod 755 ${bindir}/zcat
|
|
||||||
|
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
|
|
|
@ -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 $@
|
|
@ -11,7 +11,7 @@ cd build
|
||||||
|
|
||||||
# Extract
|
# Extract
|
||||||
cp ${distfiles}/${pkg}.tar.gz ../src/
|
cp ${distfiles}/${pkg}.tar.gz ../src/
|
||||||
gunzip -f ../src/${pkg}.tar.gz
|
ungz ../src/${pkg}.tar.gz
|
||||||
untar ../src/${pkg}.tar
|
untar ../src/${pkg}.tar
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ cd build
|
||||||
|
|
||||||
# Extract
|
# Extract
|
||||||
cp ${distfiles}/${pkg}.tar.gz ../src/
|
cp ${distfiles}/${pkg}.tar.gz ../src/
|
||||||
gunzip -f ../src/${pkg}.tar.gz
|
gzip -d -f ../src/${pkg}.tar.gz
|
||||||
tar xf ../src/${pkg}.tar
|
tar xf ../src/${pkg}.tar
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
cp ../../mk/main.mk Makefile
|
cp ../../mk/main.mk Makefile
|
||||||
|
|
|
@ -13,7 +13,7 @@ cd build
|
||||||
|
|
||||||
# Extract
|
# Extract
|
||||||
cp ${distfiles}/${pkg}.tar.gz ../src/
|
cp ${distfiles}/${pkg}.tar.gz ../src/
|
||||||
gunzip -f ../src/${pkg}.tar.gz
|
gzip -d -f ../src/${pkg}.tar.gz
|
||||||
tar xf ../src/${pkg}.tar
|
tar xf ../src/${pkg}.tar
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
cp ../../mk/main.mk Makefile
|
cp ../../mk/main.mk Makefile
|
||||||
|
|
|
@ -13,10 +13,12 @@ cd build
|
||||||
|
|
||||||
# Extract
|
# Extract
|
||||||
cp ${distfiles}/${pkg}.tar.gz ../src/
|
cp ${distfiles}/${pkg}.tar.gz ../src/
|
||||||
gunzip -f ../src/${pkg}.tar.gz
|
gzip -d -f ../src/${pkg}.tar.gz
|
||||||
untar ../src/${pkg}.tar
|
untar ../src/${pkg}.tar
|
||||||
|
|
||||||
cd ${pkg}
|
cd ${pkg}
|
||||||
|
|
||||||
|
# Prepare
|
||||||
cp ../../mk/main.mk Makefile
|
cp ../../mk/main.mk Makefile
|
||||||
cp ../../files/getdate_stub.c lib/getdate_stub.c
|
cp ../../files/getdate_stub.c lib/getdate_stub.c
|
||||||
catm src/create.c.new ../../files/stat_override.c src/create.c
|
catm src/create.c.new ../../files/stat_override.c src/create.c
|
||||||
|
|
Loading…
Reference in New Issue