diff --git a/sysa/SHA256SUMS.pkgs b/sysa/SHA256SUMS.pkgs index 586bce4..0e65b36 100644 --- a/sysa/SHA256SUMS.pkgs +++ b/sysa/SHA256SUMS.pkgs @@ -33,7 +33,7 @@ becc8ea1f24c531c35b520ce8bac9e8bf6e30e362fe77bf7833aed9d28af0ae6 bison-3.4.1_2. a3266333620a13f4a4c8f4f9819dc6f1fcded7f74bcb9fbf46518f3b160cf930 bison-3.4.2_0.tar.bz2 09bef4ec506ccafc42ad925f9c038af9885cd8ebca294cf042e63a7d39e91bb5 bzip2-1.0.8_0.tar.bz2 c484b98e580d7ef5619dc2da2318d9f1e69360a882f64aa15e0fdde0184c45fb ca-certificates-3.78_0.tar.bz2 -2d85ff411c62c2ee9db08e20d33991ef6d28a6067e211e9641a8eaefed6aee04 coreutils-5.0_0.tar.bz2 +c4d59e759f7349b96f74e62d867e419f3d85fbb81eaf5f79f996abf48f0d3170 coreutils-5.0_0.tar.bz2 776ef3e13870fba6fc9cec64eaf40fb658abecc99c65724968013f8f8a177802 coreutils-6.10_0.tar.bz2 b8992f675350658b106c3066cac0ee31440020bc9d6128bfc2fdf1fde60efd74 coreutils-8.32_0.tar.bz2 28a1e93ed14f7fa4d3c8ca41e9b78e29ba685fbc8b6bf7ba3b6933770d68eedb curl-7.83.0_0.tar.bz2 diff --git a/sysa/coreutils-5.0/coreutils-5.0.checksums b/sysa/coreutils-5.0/coreutils-5.0.checksums index 769ef92..5494a1e 100644 --- a/sysa/coreutils-5.0/coreutils-5.0.checksums +++ b/sysa/coreutils-5.0/coreutils-5.0.checksums @@ -42,6 +42,7 @@ c4dfcec63607cf44a4f64a2673892a38c6b5a7aa9821d12c9abe9cf63126ee39 /usr/bin/tr 6bd0cd1171675044c288434a553e86dd686ce781e0a3d8ce9dc360fd794e5bfa /usr/bin/unlink 0c7288eb7dfc707723ef9653be06f49b3b458e22b53f8172733870f612fb0135 /usr/bin/wc a92eb5a6e8413bf580718c0fddaac7821a68a8e7918a930c4cb36a2c666d3720 /usr/bin/whoami +3c74373f922d515df3ee632c1919c244f201e598de517c20aeeb3a9194af4528 /usr/bin/tac 90efe5bf9f90320a8ed311ffa723632c018ce29c090d0f54b88dcda08767390a /usr/bin/test 042efa219eb798c0308259566fe12b161c8349b9d50fe9e02bb74993a07bf91a /usr/bin/touch 19dc29f6b439546fc113286d09bf5ba6c83663e03037225a6884f66790f5820f /usr/bin/true diff --git a/sysa/coreutils-5.0/coreutils-5.0.kaem b/sysa/coreutils-5.0/coreutils-5.0.kaem index 28af9bd..7091729 100755 --- a/sysa/coreutils-5.0/coreutils-5.0.kaem +++ b/sysa/coreutils-5.0/coreutils-5.0.kaem @@ -34,6 +34,7 @@ patch -Np0 -i ../../patches/mbstate.patch patch -Np0 -i ../../patches/ls-strcmp.patch patch -Np0 -i ../../patches/touch-getdate.patch patch -Np0 -i ../../patches/touch-dereference.patch +patch -Np0 -i ../../patches/tac-uint64.patch # Build and install make -f Makefile PREFIX=${prefix} @@ -89,6 +90,7 @@ if match x${UPDATE_CHECKSUMS} xTrue; then /usr/bin/unlink \ /usr/bin/wc \ /usr/bin/whoami \ + /usr/bin/tac \ /usr/bin/test \ /usr/bin/touch \ /usr/bin/true \ diff --git a/sysa/coreutils-5.0/mk/main.mk b/sysa/coreutils-5.0/mk/main.mk index b2c31a0..9448f63 100644 --- a/sysa/coreutils-5.0/mk/main.mk +++ b/sysa/coreutils-5.0/mk/main.mk @@ -65,6 +65,7 @@ CFLAGS = -I . -I lib \ -DLC_COLLATE=\"C\" \ -DHAVE_GETCWD=1 \ -Dmy_strftime=nstrftime \ + -Dmkstemp=rpl_mkstemp \ -DDIR_TO_FD\(Dir_p\)=-1 \ -DUTILS_OPEN_MAX=1000 \ -Dmajor_t=unsigned \ @@ -74,7 +75,7 @@ CFLAGS = -I . -I lib \ SRC_DIR=src -COREUTILS = basename cat chmod cksum csplit cut echo expand false fmt fold head id join kill link ln logname mkfifo mkdir mknod nl od paste pathchk printf ptx pwd readlink rmdir seq sleep split sum tail tee tr tsort unexpand unlink wc whoami test touch true yes +COREUTILS = basename cat chmod cksum csplit cut echo expand false fmt fold head id join kill link ln logname mkfifo mkdir mknod nl od paste pathchk printf ptx pwd readlink rmdir seq sleep split sum tail tee tr tsort unexpand unlink wc whoami tac test touch true yes BINARIES = $(addprefix $(SRC_DIR)/, $(COREUTILS)) @@ -82,7 +83,7 @@ ALL=$(BINARIES) $(SRC_DIR)/cp $(SRC_DIR)/ls $(SRC_DIR)/install $(SRC_DIR)/md5sum all: $(BINARIES) $(SRC_DIR)/cp $(SRC_DIR)/ls $(SRC_DIR)/install $(SRC_DIR)/md5sum $(SRC_DIR)/mv $(SRC_DIR)/rm $(SRC_DIR)/sha1sum LIB_DIR = lib -LIB_SRC = acl posixtm posixver strftime getopt getopt1 hash hash-pjw addext argmatch backupfile basename canon-host closeout cycle-check diacrit dirname dup-safer error exclude exitfail filemode __fpending file-type fnmatch fopen-safer full-read full-write getline getstr gettime hard-locale human idcache isdir imaxtostr linebuffer localcharset long-options makepath mbswidth md5 memcasecmp memcoll modechange offtostr path-concat physmem quote quotearg readtokens rpmatch safe-read safe-write same save-cwd savedir settime sha stpcpy stripslash strtoimax strtoumax umaxtostr unicodeio userspec version-etc xgetcwd xgethostname xmalloc xmemcoll xnanosleep xreadlink xstrdup xstrtod xstrtol xstrtoul xstrtoimax xstrtoumax yesno strnlen getcwd sig2str mountlist regex canonicalize mkstemp memrchr euidaccess ftw dirfd obstack strverscmp strftime tsearch +LIB_SRC = acl posixtm posixver strftime getopt getopt1 hash hash-pjw addext argmatch backupfile basename canon-host closeout cycle-check diacrit dirname dup-safer error exclude exitfail filemode __fpending file-type fnmatch fopen-safer full-read full-write getline getstr gettime hard-locale human idcache isdir imaxtostr linebuffer localcharset long-options makepath mbswidth md5 memcasecmp memcoll modechange offtostr path-concat physmem quote quotearg readtokens rpmatch safe-read safe-write same save-cwd savedir settime sha stpcpy stripslash strtoimax strtoumax umaxtostr unicodeio userspec version-etc xgetcwd xgethostname xmalloc xmemcoll xnanosleep xreadlink xstrdup xstrtod xstrtol xstrtoul xstrtoimax xstrtoumax yesno strnlen getcwd sig2str mountlist regex canonicalize mkstemp memrchr euidaccess ftw dirfd obstack strverscmp strftime tempname tsearch LIB_OBJECTS = $(addprefix $(LIB_DIR)/, $(addsuffix .o, $(LIB_SRC))) diff --git a/sysa/coreutils-5.0/mk/pass2.mk b/sysa/coreutils-5.0/mk/pass2.mk index 128aace..8f08eaa 100644 --- a/sysa/coreutils-5.0/mk/pass2.mk +++ b/sysa/coreutils-5.0/mk/pass2.mk @@ -84,7 +84,7 @@ CFLAGS = -I . -I lib \ SRC_DIR=src -COREUTILS = basename cat chmod chroot cksum comm csplit cut dd dirname echo env expand expr false fmt fold head id join kill link ln logname mkfifo mkdir mknod nl od paste pathchk printf ptx pwd readlink rmdir seq sleep sort split sum sync tail tee touch tr tsort uname unexpand uniq unlink wc whoami test true yes +COREUTILS = basename cat chmod chroot cksum comm csplit cut dd dirname echo env expand expr false fmt fold head id join kill link ln logname mkfifo mkdir mknod nl od paste pathchk printf ptx pwd readlink rmdir seq sleep sort split sum sync tail tee touch tr tsort uname unexpand uniq unlink wc whoami tac test true yes BINARIES = $(addprefix $(SRC_DIR)/, $(COREUTILS)) diff --git a/sysa/coreutils-5.0/patches/tac-uint64.patch b/sysa/coreutils-5.0/patches/tac-uint64.patch new file mode 100644 index 0000000..9973e51 --- /dev/null +++ b/sysa/coreutils-5.0/patches/tac-uint64.patch @@ -0,0 +1,27 @@ +SPDX-FileCopyrightText: 2022 Andrius Štikonas + +SPDX-License-Identifier: GPL-2.0-or-later + +uint64_t is not supported in tcc 0.9.27 +--- lib/tempname.c 2002-12-01 10:40:32.000000000 +0000 ++++ lib/tempname.c 2022-06-22 20:57:37.449423973 +0100 +@@ -231,8 +231,8 @@ + { + int len; + char *XXXXXX; +- static uint64_t value; +- uint64_t random_time_bits; ++ static unsigned long long value; ++ unsigned long long random_time_bits; + unsigned int count; + int fd = -1; + int save_errno = errno; +@@ -278,7 +278,7 @@ + + for (count = 0; count < attempts; value += 7777, ++count) + { +- uint64_t v = value; ++ unsigned long long v = value; + + /* Fill in the random bits. */ + XXXXXX[0] = letters[v % 62]; diff --git a/sysa/mes-0.24/files/mescc.scm b/sysa/mes-0.24/files/mescc.scm deleted file mode 100755 index 8134094..0000000 --- a/sysa/mes-0.24/files/mescc.scm +++ /dev/null @@ -1,56 +0,0 @@ -; SPDX-FileCopyrightText: Jan (janneke) Nieuwenhuizen -; SPDX-FileCopyrightText: 2021 fosslinux -; -; SPDX-License-Identifier: GPL-3.0-or-later - -(cond-expand - (mes) - (guile - (define %arch (car (string-split %host-type #\-))) - (define %kernel (car (filter - (compose not - (lambda (x) (member x '("pc" "portbld" "unknown")))) - (cdr (string-split %host-type #\-))))))) - -(define %prefix (or (getenv "MES_PREFIX") - (if (string-prefix? "@prefix" "/usr") - "" - "/usr"))) - -(define %includedir (or (getenv "includedir") - (string-append %prefix "/include"))) - -(define %libdir (or (getenv "libdir") - (string-append %prefix "/lib"))) - -(define %version (if (string-prefix? "@VERSION" "0.24") "git" - "0.22")) - -(define %arch (if (string-prefix? "@mes_cpu" "x86") %arch - "x86")) - -(define %kernel (if (string-prefix? "@mes_kernel" "linux") %kernel - "linux")) - -(define %numbered-arch? (if (getenv "numbered_arch") (and=> (getenv "numbered_arch") - (lambda (x) (equal? x "true"))) - (if (string-prefix? "@numbered_arch" "false") #f - (equal? "false" "true")))) - -(setenv "%prefix" %prefix) -(setenv "%includedir" %includedir) -(setenv "%libdir" %libdir) -(setenv "%version" %version) -(setenv "%arch" %arch) -(setenv "%kernel" %kernel) -(setenv "%numbered_arch" (if %numbered-arch? "true" "false")) - -(cond-expand - (mes - (mes-use-module (mescc)) - (mescc:main (command-line))) - (guile - (use-modules (mescc)))) - -(define (main args) - (mescc:main args)) diff --git a/sysa/mes-0.24/mes-0.24.checksums b/sysa/mes-0.24/mes-0.24.checksums index 3f0857b..8630d9d 100644 --- a/sysa/mes-0.24/mes-0.24.checksums +++ b/sysa/mes-0.24/mes-0.24.checksums @@ -1,6 +1,6 @@ 91d889ddfe7c5ae2ade03fdcfc7ddb1dce234db8628228e67906a66bf78c1f56 /usr/bin/mes f1541ae5e2e008deeaf636869556debb5fa9e9608c787c7203761d83f23c9c05 /usr/bin/mes-m2 -0c7738c6640e7f3f2256c271a0eefa438fee6ffa043e756edc007e166bed48f5 /usr/bin/mescc.scm +479dfbba269954ec120d9bf0976fe168eaef017a92e3c1ca9ecc197b76ad1825 /usr/bin/mescc.scm 4feafab424611c976dc4628aa862e37b4e92b5869aebbcf7655e684c3f589041 /usr/lib/x86-mes/crt1.s 69e9ec2ee2ebf065575cdaf878629178b85330257dde0da790a428c0280d1ecb /usr/lib/x86-mes/crt1.o c9944a799d584abfa76f385c14ac0caf6f46d03b34bf2712493602b12826c6b2 /usr/lib/x86-mes/x86.M1 diff --git a/sysa/mes-0.24/mes-0.24.kaem b/sysa/mes-0.24/mes-0.24.kaem index f85043f..ac9f643 100755 --- a/sysa/mes-0.24/mes-0.24.kaem +++ b/sysa/mes-0.24/mes-0.24.kaem @@ -1,6 +1,6 @@ #!/bin/sh -# SPDX-FileCopyrightText: 2020-2021 Andrius Štikonas +# SPDX-FileCopyrightText: 2020-2022 Andrius Štikonas # SPDX-FileCopyrightText: 2020-2022 fosslinux # # SPDX-License-Identifier: GPL-3.0-or-later @@ -14,9 +14,6 @@ MES_STACK=6000000 MES=${bindir}/mes-m2 libdir=${MES_PREFIX}/lib -cp files/mescc.scm ${bindir}/ -chmod 755 ${bindir}/mescc.scm - # Unpack mkdir src build cd src @@ -48,6 +45,18 @@ kaem --verbose --strict --file kaem.run cp bin/mes-m2 ${bindir}/mes-m2 chmod 755 ${bindir}/mes-m2 +# Create mescc.scm +mescc_in=scripts/mescc.scm.in +replace --file ${mescc_in} --output ${mescc_in} --match-on @prefix@ --replace-with ${prefix} +replace --file ${mescc_in} --output ${mescc_in} --match-on @VERSION@ --replace-with ${MES_VERSION} +replace --file ${mescc_in} --output ${mescc_in} --match-on @mes_cpu@ --replace-with ${ARCH} +replace --file ${mescc_in} --output ${mescc_in} --match-on @mes_kernel@ --replace-with linux + +mescc_scm=${bindir}/mescc.scm +cp ${mescc_in} ${mescc_scm} +chmod 755 ${mescc_scm} + + # Recompile Mes and Mes C library using mes-m2 bootstrapped Mes alias mescc="${MES} -e main ${bindir}/mescc.scm -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -c" @@ -231,7 +240,7 @@ mescc src/symbol.c mescc src/vector.c # Link everything into new mes executable -${MES} -e main ${bindir}/mescc.scm -- -L ${libdir} -nostdlib -o ${bindir}/mes -L . crt1.o builtins.o cc.o core.o display.o eval-apply.o gc.o globals.o hash.o lib.o math.o mes.o module.o posix.o reader.o stack.o string.o struct.o symbol.o vector.o -lc -lmescc +${MES} -e main ${mescc_scm} -- -L ${libdir} -nostdlib -o ${bindir}/mes -L . crt1.o builtins.o cc.o core.o display.o eval-apply.o gc.o globals.o hash.o lib.o math.o mes.o module.o posix.o reader.o stack.o string.o struct.o symbol.o vector.o -lc -lmescc # Make directories mkdir ${prefix}/lib/linux ${incdir}/mes ${incdir}/sys ${incdir}/linux diff --git a/sysa/run.kaem b/sysa/run.kaem index abee85f..e4ba312 100755 --- a/sysa/run.kaem +++ b/sysa/run.kaem @@ -11,7 +11,8 @@ set -ex # Environmental variables needed for mes NYACC_PKG=nyacc-1.00.2 -MES_PKG=mes-0.24 +MES_VERSION=0.24 +MES_PKG=mes-${MES_VERSION} MES_PKG_DIR=mes-aa5f1533e1736a89e60d2c34c2a0ab3b01f8d037 MES_PREFIX=${sysa}/${MES_PKG}/build/${MES_PKG_DIR} GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sysa}/${MES_PKG}/build/${NYACC_PKG}/module