From b9079045db46e7ca596613981f6bd1feacc7fe5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 13 May 2022 22:46:56 +0100 Subject: [PATCH 1/3] Swap sed and make. This allows to use makefile rather than kaem script for building sed. Makefiles for musl and mes are unified into one makefile with some conditional code. --- parts.rst | 10 ++++----- sysa.py | 8 +++---- sysa/after.kaem | 8 +++---- sysa/patch-2.5.9/patch-2.5.9.kaem | 2 -- sysa/sed-4.0.9/checksums | 2 +- sysa/sed-4.0.9/mk/main.mk | 21 +++++++++++++++---- sysa/sed-4.0.9/sed-4.0.9.kaem | 35 ++++++------------------------- sysa/sed-4.0.9/sed-4.0.9.sh | 1 - 8 files changed, 37 insertions(+), 50 deletions(-) diff --git a/parts.rst b/parts.rst index d314e1e4..9ef1f566 100644 --- a/parts.rst +++ b/parts.rst @@ -104,11 +104,6 @@ tar 1.12 We build GNU Tar 1.12, the last version compilable with mes libc. -sed 4.0.9 -========= - -You are most likely aware of GNU ``sed``, a line editor. - make 3.80 ========= @@ -116,6 +111,11 @@ 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. +sed 4.0.9 +========= + +You are most likely aware of GNU ``sed``, a line editor. + patch 2.5.9 =========== diff --git a/sysa.py b/sysa.py index d2ab0683..21c2033f 100755 --- a/sysa.py +++ b/sysa.py @@ -92,7 +92,7 @@ class SysA(SysGeneral): def get_packages(self): """Prepare remaining sources""" - # mes-0.22 snapshot with m2 fixes + # mes-0.24 self.get_file(["https://mirrors.kernel.org/gnu/mes/mes-0.24.tar.gz", "https://download.savannah.gnu.org/releases/nyacc/nyacc-1.00.2.tar.gz"]) @@ -105,15 +105,15 @@ class SysA(SysGeneral): # tar 1.12 self.get_file("https://mirrors.kernel.org/gnu/tar/tar-1.12.tar.gz") + # make 3.80 + self.get_file("https://mirrors.kernel.org/gnu/make/make-3.80.tar.gz") + # sed 4.0.9 self.get_file("https://mirrors.kernel.org/gnu/sed/sed-4.0.9.tar.gz") # patch 2.5.9 self.get_file("https://mirrors.kernel.org/gnu/patch/patch-2.5.9.tar.gz") - # make 3.80 - self.get_file("https://mirrors.kernel.org/gnu/make/make-3.80.tar.gz") - # bzip2 1.0.8 self.get_file("https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz") diff --git a/sysa/after.kaem b/sysa/after.kaem index 2441eb86..e192655c 100755 --- a/sysa/after.kaem +++ b/sysa/after.kaem @@ -88,14 +88,14 @@ cd ${pkg} kaem --file ${pkg}.kaem cd .. -# sed -pkg="sed-4.0.9" +# make +pkg="make-3.80" cd ${pkg} kaem --file ${pkg}.kaem cd .. -# make -pkg="make-3.80" +# sed +pkg="sed-4.0.9" cd ${pkg} kaem --file ${pkg}.kaem cd .. diff --git a/sysa/patch-2.5.9/patch-2.5.9.kaem b/sysa/patch-2.5.9/patch-2.5.9.kaem index 3ee3e664..87d10df2 100755 --- a/sysa/patch-2.5.9/patch-2.5.9.kaem +++ b/sysa/patch-2.5.9/patch-2.5.9.kaem @@ -24,8 +24,6 @@ catm patchlevel.h cp pch.c pch_patched.c sed -i 841,848d pch_patched.c -# Compile - # Build make -f Makefile PREFIX=${prefix} diff --git a/sysa/sed-4.0.9/checksums b/sysa/sed-4.0.9/checksums index f0853958..a7847ef5 100644 --- a/sysa/sed-4.0.9/checksums +++ b/sysa/sed-4.0.9/checksums @@ -1 +1 @@ -19140fdea18e2d8f3ed1597f7d0d72baa7b2c3b69bf87edc35271df2da24bbfb /usr/bin/sed +092b2972a16ffe6919f52678c675ac29708f507ee800172ac139fb9c44ccb153 /usr/bin/sed diff --git a/sysa/sed-4.0.9/mk/main.mk b/sysa/sed-4.0.9/mk/main.mk index e7ec1236..554ee13b 100644 --- a/sysa/sed-4.0.9/mk/main.mk +++ b/sysa/sed-4.0.9/mk/main.mk @@ -12,11 +12,19 @@ CPPFLAGS = -DENABLE_NLS=0 \ -DSED_FEATURE_VERSION=\"4.0\" \ -DVERSION=\"4.0.9\" \ -DPACKAGE=\"sed\" -CFLAGS = -I . -I lib +CFLAGS = -I . -I lib -static +LDFLAGS = -L. -lsed .PHONY: all -LIB_SRC = alloca getopt1 getopt utils regex obstack strverscmp mkstemp +ifeq ($(LIBC),mes) + LIB_SRC = getline +else + LIB_SRC = alloca +endif + +LIB_SRC += getopt1 getopt utils regex obstack strverscmp mkstemp + LIB_OBJ = $(addprefix lib/, $(addsuffix .o, $(LIB_SRC))) SED_SRC = compile execute regexp fmt sed @@ -24,11 +32,16 @@ SED_OBJ = $(addprefix sed/, $(addsuffix .o, $(SED_SRC))) all: sed/sed +lib/regex.h: lib/regex_.h + cp $< $@ + +lib/regex.o: lib/regex.h + libsed.a: $(LIB_OBJ) $(AR) cr $@ $^ -sed/sed: $(SED_OBJ) libsed.a - $(CC) -o $@ $^ +sed/sed: libsed.a $(SED_OBJ) + $(CC) $^ $(LDFLAGS) -o $@ install: install -D sed/sed $(DESTDIR)$(PREFIX)/bin/sed diff --git a/sysa/sed-4.0.9/sed-4.0.9.kaem b/sysa/sed-4.0.9/sed-4.0.9.kaem index 0120359d..e181e494 100755 --- a/sysa/sed-4.0.9/sed-4.0.9.kaem +++ b/sysa/sed-4.0.9/sed-4.0.9.kaem @@ -16,40 +16,17 @@ cp ${distfiles}/${pkg}.tar.gz ../src/ gunzip -f ../src/${pkg}.tar.gz tar xf ../src/${pkg}.tar cd ${pkg} +cp ../../mk/main.mk Makefile # Create config.h catm config.h -# Compile +# Build +make -f Makefile LIBC=mes -## libsed.a -cd lib - -tcc -c getopt1.c -tcc -c -I .. getopt.c -tcc -c -I .. -DENABLE_NLS=0 utils.c -cp regex_.h regex.h -tcc -c -DHAVE_ALLOCA_H -I . regex.c -tcc -c obstack.c -tcc -c strverscmp.c -tcc -c getline.c -tcc -c -DHAVE_FCNTL_H mkstemp.c - -tcc -ar cr libsed.a getopt1.o getopt.o utils.o regex.o obstack.o strverscmp.o getline.o mkstemp.o -cd .. - -## sed -tcc -c -I . -I lib -DSED_FEATURE_VERSION=\"4.0\" sed/compile.c -tcc -c -I . -I lib sed/execute.c -tcc -c -I . -I lib sed/regexp.c -tcc -c -I . -I lib sed/fmt.c -tcc -c -I . -I lib -DPACKAGE=\"sed\" -DVERSION=\"4.0.9\" sed/sed.c - -# Link -tcc -static -o ${bindir}/sed -L lib lib/libsed.a compile.o execute.o regexp.o fmt.o sed.o -lsed - -# Test -sed --version +# Install +cp sed/sed ${prefix}/bin/sed +chmod 755 ${prefix}/bin/sed cd ../.. diff --git a/sysa/sed-4.0.9/sed-4.0.9.sh b/sysa/sed-4.0.9/sed-4.0.9.sh index b919317b..1b8b85d6 100755 --- a/sysa/sed-4.0.9/sed-4.0.9.sh +++ b/sysa/sed-4.0.9/sed-4.0.9.sh @@ -5,7 +5,6 @@ src_prepare() { default - cp lib/regex_.h lib/regex.h touch config.h } From e4f5342ee4c737927c1f038386bb7877d6ba8555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 14 May 2022 12:42:03 +0100 Subject: [PATCH 2/3] Swap make and tar. --- parts.rst | 12 ++++----- sysa.py | 6 ++--- sysa/after.kaem | 8 +++--- sysa/make-3.80/make-3.80.kaem | 2 +- sysa/tar-1.12/mk/main.mk | 36 +++++++++++++++++++++++++ sysa/tar-1.12/tar-1.12.kaem | 50 +++++------------------------------ 6 files changed, 55 insertions(+), 59 deletions(-) create mode 100644 sysa/tar-1.12/mk/main.mk diff --git a/parts.rst b/parts.rst index 9ef1f566..5c93ef15 100644 --- a/parts.rst +++ b/parts.rst @@ -97,13 +97,6 @@ gzip 1.2.4 code. It is luckily distributed as a barebones uncompressed ``.tar``, which we extract and then build. -Going forward, we can now use ``.tar.gz`` for source code. - -tar 1.12 -======== - -We build GNU Tar 1.12, the last version compilable with mes libc. - make 3.80 ========= @@ -111,6 +104,11 @@ 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. +tar 1.12 +======== + +We build GNU Tar 1.12, the last version compilable with mes libc. + sed 4.0.9 ========= diff --git a/sysa.py b/sysa.py index 21c2033f..cd20b1e4 100755 --- a/sysa.py +++ b/sysa.py @@ -102,12 +102,12 @@ class SysA(SysGeneral): # 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") - # make 3.80 self.get_file("https://mirrors.kernel.org/gnu/make/make-3.80.tar.gz") + # tar 1.12 + self.get_file("https://mirrors.kernel.org/gnu/tar/tar-1.12.tar.gz") + # sed 4.0.9 self.get_file("https://mirrors.kernel.org/gnu/sed/sed-4.0.9.tar.gz") diff --git a/sysa/after.kaem b/sysa/after.kaem index e192655c..2b24ea20 100755 --- a/sysa/after.kaem +++ b/sysa/after.kaem @@ -82,14 +82,14 @@ cd ${pkg} kaem --file ${pkg}.kaem cd .. -# tar -pkg="tar-1.12" +# make +pkg="make-3.80" cd ${pkg} kaem --file ${pkg}.kaem cd .. -# make -pkg="make-3.80" +# tar +pkg="tar-1.12" cd ${pkg} kaem --file ${pkg}.kaem cd .. diff --git a/sysa/make-3.80/make-3.80.kaem b/sysa/make-3.80/make-3.80.kaem index 569fd5ba..d4683ba5 100755 --- a/sysa/make-3.80/make-3.80.kaem +++ b/sysa/make-3.80/make-3.80.kaem @@ -12,7 +12,7 @@ cd build # Extract cp ${distfiles}/${pkg}.tar.gz ../src/ gunzip -f ../src/${pkg}.tar.gz -tar xf ../src/${pkg}.tar +untar ../src/${pkg}.tar cd ${pkg} # Create .h files diff --git a/sysa/tar-1.12/mk/main.mk b/sysa/tar-1.12/mk/main.mk new file mode 100644 index 00000000..5a796bf8 --- /dev/null +++ b/sysa/tar-1.12/mk/main.mk @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: 2022 Andrius Štikonas +# +# 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 = -DHAVE_FCNTL_H \ + -DHAVE_DIRENT_H \ + -DHAVE_GETCWD_H \ + -DHAVE_GETCWD \ + -DSIZEOF_UNSIGNED_LONG=4 \ + -DVERSION=\"1.12\" \ + -DPACKAGE=\"tar\" + +CFLAGS = -I . -I lib -static +LDFLAGS = -L. -ltar + +.PHONY: all + +LIB_SRC = argmatch backupfile error fnmatch ftruncate getdate_stub getopt getopt1 getversion modechange msleep xgetcwd xmalloc xstrdup + +LIB_OBJ = $(addprefix lib/, $(addsuffix .o, $(LIB_SRC))) + +TAR_SRC = arith buffer compare create delete extract incremen list mangle misc names open3 rtapelib tar update +TAR_OBJ = $(addprefix src/, $(addsuffix .o, $(TAR_SRC))) + +all: tar + +libtar.a: $(LIB_OBJ) + $(AR) cr $@ $^ + +tar: libtar.a $(TAR_OBJ) + $(CC) $^ $(LDFLAGS) -o $@ diff --git a/sysa/tar-1.12/tar-1.12.kaem b/sysa/tar-1.12/tar-1.12.kaem index 26fdce5b..6e38794a 100755 --- a/sysa/tar-1.12/tar-1.12.kaem +++ b/sysa/tar-1.12/tar-1.12.kaem @@ -17,55 +17,17 @@ gunzip -f ../src/${pkg}.tar.gz untar ../src/${pkg}.tar cd ${pkg} - +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 cp src/create.c.new src/create.c -# Compile +# Build +make -f Makefile -## libtar.a -cd lib - -tcc -c argmatch.c -tcc -c -DHAVE_DIRENT_H backupfile.c -tcc -c -I . error.c -tcc -c -I . fnmatch.c -tcc -c ftruncate.c -tcc -c getdate_stub.c -tcc -c getopt.c -tcc -c getopt1.c -tcc -c getversion.c -tcc -c modechange.c -tcc -c msleep.c -tcc -c -DHAVE_GETCWD xgetcwd.c -tcc -c xmalloc.c -tcc -c xstrdup.c - -tcc -ar cr libtar.a argmatch.o backupfile.o error.o fnmatch.o ftruncate.o getdate_stub.o getopt.o getopt1.o getversion.o modechange.o msleep.o xgetcwd.o xmalloc.o xstrdup.o -cd .. - -## tar -# -DSIZEOF_UNSIGNED_LONG=4 forces use of simulated arithmetic -# This is to avoid running configure test to determine sizeof(long long) -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/arith.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/buffer.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/compare.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DHAVE_DIRENT_H src/create.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/delete.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/extract.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DHAVE_GETCWD -DHAVE_DIRENT_H src/incremen.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/list.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/mangle.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DHAVE_DIRENT_H src/misc.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DHAVE_GETCWD src/names.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/open3.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/rtapelib.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H -DPACKAGE=\"tar\" -DVERSION=\"1.12\" src/tar.c -tcc -c -I lib -DSIZEOF_UNSIGNED_LONG=4 -DHAVE_FCNTL_H src/update.c - -# Link -tcc -static -o ${bindir}/tar -L lib lib/libtar.a arith.o buffer.o compare.o create.o delete.o extract.o incremen.o list.o mangle.o misc.o names.o open3.o rtapelib.o tar.o update.o -ltar +# Install +cp tar ${prefix}/bin/tar +chmod 755 ${prefix}/bin/tar cd ../.. From 3fd451a909f942da8835f3ac144f3c3ccb1f6a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 14 May 2022 19:40:52 +0100 Subject: [PATCH 3/3] Swamp make and gzip. --- parts.rst | 14 +++++++------- sysa.py | 6 +++--- sysa/after.kaem | 8 ++++---- sysa/bash-2.05b/bash-2.05b.kaem | 2 +- sysa/bzip2-1.0.8/bzip2-1.0.8.kaem | 2 +- sysa/gzip-1.2.4/checksums | 2 +- sysa/gzip-1.2.4/gzip-1.2.4.kaem | 28 +++++----------------------- sysa/gzip-1.2.4/mk/main.mk | 23 +++++++++++++++++++++++ sysa/make-3.80/make-3.80.kaem | 2 +- sysa/patch-2.5.9/patch-2.5.9.kaem | 2 +- sysa/sed-4.0.9/sed-4.0.9.kaem | 2 +- sysa/tar-1.12/tar-1.12.kaem | 4 +++- 12 files changed, 51 insertions(+), 44 deletions(-) create mode 100644 sysa/gzip-1.2.4/mk/main.mk diff --git a/parts.rst b/parts.rst index 5c93ef15..15e6a63e 100644 --- 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 index cd20b1e4..06e628a9 100755 --- 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 index 2b24ea20..3a689342 100755 --- 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 index 15cf80c1..b6ac4ebb 100755 --- 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 index a8e3816c..d2cfd704 100755 --- 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 index ed26195c..e0353677 100644 --- 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 index a31346a5..f83dbbdc 100755 --- 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 new file mode 100644 index 00000000..76ee3fdc --- /dev/null +++ b/sysa/gzip-1.2.4/mk/main.mk @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: 2022 Andrius Štikonas +# +# 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 index d4683ba5..5f5dc1d5 100755 --- 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 index 87d10df2..1094ff00 100755 --- 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 index e181e494..a5ead71b 100755 --- 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 index 6e38794a..18535f35 100755 --- 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