Swamp make and gzip.

This commit is contained in:
Andrius Štikonas 2022-05-14 19:40:52 +01:00
parent e4f5342ee4
commit 3fd451a909
12 changed files with 51 additions and 44 deletions

View file

@ -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 ..

View file

@ -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}

View file

@ -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}

View file

@ -1 +1 @@
3a0753ea8effb449d19d0fef091cabe27a937dc8545d1dd9fe28cd2991e846e8 /usr/bin/gzip
c310ba8e6df0b3e12934b5443079264656817a234b0417faa69a140447caf5a2 /usr/bin/gzip

View file

@ -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 ../..

View file

@ -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 $@

View file

@ -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}

View file

@ -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

View file

@ -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

View file

@ -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