lots of stuff

This commit is contained in:
Ella Stanforth 2021-12-26 12:40:14 +00:00
parent 32d66a7f56
commit b859e777d0
91 changed files with 2156 additions and 532 deletions

View file

@ -1,11 +1,12 @@
pkgver=0.8.5
pkgver=0.8.6
pkgname=toybox
pkgrel=1
deps="musl:pci-ids"
deps="musl"
fetch() {
curl "http://www.landley.net/toybox/downloads/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz
tar -xf $pkgname-$pkgver.tar.gz
curl "https://pci-ids.ucw.cz/v2.2/pci.ids" -o pci.ids
cd $pkgname-$pkgver
patch -p1 < ../../ls-colour.patch
patch -p1 < ../../mksh-make.patch
@ -18,7 +19,14 @@ build() {
CPUS=1 bad --gmake gmake
}
backup() {
return
}
package() {
install -d $pkgdir/usr/share/misc
install -Dm 644 pci.ids $pkgdir/usr/share/misc
cd $pkgname-$pkgver
# install -d $pkgdir/bin
# install -Dm755 ./toybox $pkgdir/bin/

View file

@ -1,5 +1,3 @@
diff --git a/scripts/make.sh b/scripts/make.sh
index 5b2d5d81..2c5e4b93 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -106,8 +106,7 @@ genbuildsh()
@ -12,3 +10,25 @@ index 5b2d5d81..2c5e4b93 100755
then
echo -n "Library probe"
--- a/scripts/genconfig.sh
+++ b/scripts/genconfig.sh
@@ -16,7 +16,7 @@ probecc()
# Symbol name is first argument, flags second, feed C file to stdin
probesymbol()
{
- probecc "${@:2}" 2>/dev/null && DEFAULT=y || DEFAULT=n
+ probecc $2 2>/dev/null && DEFAULT=y || DEFAULT=n
rm a.out 2>/dev/null
echo -e "config $1\n\tbool" || exit 1
echo -e "\tdefault $DEFAULT\n" || exit 1
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -15,7 +15,7 @@ if [ ! -z "$ASAN" ]; then
fi
# Centos 7 bug workaround, EOL June 30 2024.
-DASHN=-n; wait -n 2>/dev/null; [ $? -eq 2 ] && unset DASHN
+unset DASHN
export LANG=c
export LC_ALL=C

View file

@ -1,5 +1,21 @@
--- a/toys/other/xxd.c
+++ b/toys/other/xxd.c
@@ -77,11 +77,13 @@ static void do_xxd(int fd, char *name)
static void do_xxd_include(int fd, char *name)
{
+ long long total = 0;
int c = 1, i, len;
// The original xxd outputs a header/footer if given a filename (not stdin).
// We don't, which means that unlike the original we can implement -ri.
while ((len = read(fd, toybuf, sizeof(toybuf))) > 0) {
+ total += len;
for (i = 0; i < len; ++i) {
printf("%s%#.02x", c > 1 ? ", " : " ", toybuf[i]);
if (c++ == TT.c) {
--- a/toys/other/xxd.c
+++ b/toys/other/xxd.c
@@ -80,7 +80,12 @@
int c = 1, i, len;