# HG changeset patch # User Pascal Bellard # Date 1539161021 -7200 # Node ID 77cbb661144f9a8c723ac02ecea4928141a9c126 # Parent c344508ff4ebdcdba1bcda9bf6b10dd771de901f Up amule (2.3.2) diff -r c344508ff4eb -r 77cbb661144f amule/receipt --- a/amule/receipt Tue Oct 09 18:50:30 2018 +0200 +++ b/amule/receipt Wed Oct 10 10:43:41 2018 +0200 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="amule" -VERSION="2.3.1" +VERSION="2.3.2" CATEGORY="network" SHORT_DESC="An eMule-like client for the eD2k and Kademlia networks." MAINTAINER="pankso@slitaz.org" @@ -23,6 +23,15 @@ $CONFIGURE_ARGS && make $MAKEFLAGS && make DESTDIR=$DESTDIR install + ./configure \ + --prefix=/usr \ + --disable-monolithic \ + --enable-amule-daemon \ + --enable-amulecmd \ + --enable-webserver \ + $CONFIGURE_ARGS && + make $MAKEFLAGS && + make DESTDIR=$DESTDIR install } # Rules to gen a SliTaz package suitable for Tazpkg. diff -r c344508ff4eb -r 77cbb661144f linld/receipt --- a/linld/receipt Tue Oct 09 18:50:30 2018 +0200 +++ b/linld/receipt Wed Oct 10 10:43:41 2018 +0200 @@ -11,14 +11,20 @@ BASE_SITE="http://busybox.net/~vda/$PACKAGE" WEB_SITE="$BASE_SITE/README.txt" WGET_URL="$BASE_SITE/$TARBALL" +EXTRA_TOOL_URL="ftp://ftp.ibiblio.org/pub/micro/pc-stuff/freedos/gnuish/mawk122x.zip" +EXTRA_TOOL="$(basename $EXTRA_TOOL_URL)" +EXTRA_SOURCE_FILES="$EXTRA_TOOL" BUILD_DEPENDS="dosbox upx" # Rules to configure and make the package. compile_rules() { + [ -s $SRC/$EXTRA_TOOL ] || + busybox wget -O $SRC/$EXTRA_TOOL $EXTRA_TOOL_URL mv DIST $src 2> /dev/null cd $src + unzip $SRC/$EXTRA_TOOL rm LINLD$SUFFIX/CRTL.CPP LINLD$SUFFIX/INT15_88.ASM cp $stuff/src/* LINLD$SUFFIX/ cp -a LINLD$SUFFIX TAZBOOT diff -r c344508ff4eb -r 77cbb661144f linld/stuff/src/!COMPILE.BAT --- a/linld/stuff/src/!COMPILE.BAT Tue Oct 09 18:50:30 2018 +0200 +++ b/linld/stuff/src/!COMPILE.BAT Wed Oct 10 10:43:41 2018 +0200 @@ -1,8 +1,14 @@ -path ..\BC31;%PATH% +path ..\BC31;..;%PATH% call !clean.bat tasm /h > helptasm.log bcc > helpbcc.log tlink > helptlink.log bcc @bccopt.opt -S -mt -DLARGE_IMAGES *.cpp > cpp.log +ren LINLD.ASM LINLD.ASO +ren LOAD.ASM LOAD.ASO +ren HIMEM.ASM HIMEM.ASO +mawk -f pipehole.awk < LINLD.ASO > LINLD.ASM +mawk -f pipehole.awk < LOAD.ASO > LOAD.ASM +mawk -f pipehole.awk < HIMEM.ASO > HIMEM.ASM tasm /la /m /dLARGE_IMAGES *.asm > asm.log tlink /m /s /t @link.cmd > lnk.log diff -r c344508ff4eb -r 77cbb661144f linld/stuff/src/!COMPILEX.BAT --- a/linld/stuff/src/!COMPILEX.BAT Tue Oct 09 18:50:30 2018 +0200 +++ b/linld/stuff/src/!COMPILEX.BAT Wed Oct 10 10:43:41 2018 +0200 @@ -1,5 +1,13 @@ -path ..\BC31;%PATH% +path ..\BC31;..;%PATH% call !clean.bat bcc @bccopt.opt -S -mt -DLARGE_IMAGES *.cpp > cpp.log +ren TAZBOOT.ASM TAZBOOT.ASO +ren LOAD.ASM LOAD.ASO +ren HIMEM.ASM HIMEM.ASO +ren ISO9660.ASM ISO9660.ASO +mawk -f pipehole.awk < TAZBOOT.ASO > TAZBOOT.ASM +mawk -f pipehole.awk < LOAD.ASO > LOAD.ASM +mawk -f pipehole.awk < HIMEM.ASO > HIMEM.ASM +mawk -f pipehole.awk < ISO9660.ASO > ISO9660.ASM tasm /la /m /dEXTRA /dNO386 /dLARGE_IMAGES *.asm > asm.log tlink /m /s /t @linkx.cmd > lnk.log diff -r c344508ff4eb -r 77cbb661144f linld/stuff/src/ISO9660.CPP --- a/linld/stuff/src/ISO9660.CPP Tue Oct 09 18:50:30 2018 +0200 +++ b/linld/stuff/src/ISO9660.CPP Wed Oct 10 10:43:41 2018 +0200 @@ -51,7 +51,7 @@ //x->curdirofs += SECTORSZ; *(int *)((char *) &x->curdirofs+1) += SECTORSZ/256; x->curdirsize -= DIRSECTORSZ; - x->curpos &= 0; + x->curpos = 0; } p = buffer + x->curpos; if ((size = * (short *) p) == 0) diff -r c344508ff4eb -r 77cbb661144f linld/stuff/src/LOAD.CPP --- a/linld/stuff/src/LOAD.CPP Tue Oct 09 18:50:30 2018 +0200 +++ b/linld/stuff/src/LOAD.CPP Wed Oct 10 10:43:41 2018 +0200 @@ -44,7 +44,7 @@ */ struct kernelparams_t { - u8 setup_sects; // 01F1 The size of the setup in sectors + s8 setup_sects; // 01F1 The size of the setup in sectors // boot sector is NOT included here u16 ro_flag; // 01F2 If set, the root is mounted readonly u16 syssize; // 01F4 DO NOT USE - for bootsect.S use only: diff -r c344508ff4eb -r 77cbb661144f linld/stuff/src/TAZBOOT.CPP --- a/linld/stuff/src/TAZBOOT.CPP Tue Oct 09 18:50:30 2018 +0200 +++ b/linld/stuff/src/TAZBOOT.CPP Wed Oct 10 10:43:41 2018 +0200 @@ -20,7 +20,7 @@ static void next_chunk(struct image_himem *m) { struct initrd_info *i = &initrd_state.info[m->state]; - m->chunk_size &= 0; + m->chunk_size = 0; if (m->state >= initrd_state.cnt) return; lseekset(m->fd,i->ofs); m->chunk_size = i->size; @@ -49,7 +49,7 @@ if (!m->size) return; m->next_chunk = next_chunk; m->fd = isofd; - m->state &= 0; + m->state = 0; next_chunk(m); load_initrd(); } @@ -133,9 +133,9 @@ read(x->fd, &x->filemod, 10); // + x->fileofs & x->filesize magic = x->filemod; //x->fileofs &= 0xFFFFL; - * ((short *) &x->fileofs + 1) &= 0; + * ((short *) &x->fileofs + 1) = 0; //x->fileofs -= 0xC0L + (x->filesize &= 0xFFFF); - * ((short *) &x->filesize + 1) &= 0; + * ((short *) &x->filesize + 1) = 0; x->fileofs -= 0xC0L + x->filesize; if (((short *) &x->fileofs)[1] == 0) addinitrd(); else init=""; diff -r c344508ff4eb -r 77cbb661144f linld/stuff/src/pipehole.awk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linld/stuff/src/pipehole.awk Wed Oct 10 10:43:41 2018 +0200 @@ -0,0 +1,155 @@ +BEGIN { hold=0 } +function isnum(n) { return match(n,/^[0-9+-]/) } +{ + if (hold == 0) { + s=$0 + if (/^ mov .x,bx$/ || /^ mov .x,.i$/) { + hold=1; split($2,regs,","); next + } + if (/^ inc e?.[ix]/ || /^ dec e?.[ix]/) { + hold=2; r=$2; next + } + if (/^ mov [abcds][ix],/ && ! /,.s/) { + hold=3; split($2,regs,","); next + } + if (/^ movzx eax,ax$/) { hold=4; next } +if (0) { + if (/^ cmp dx,-1$/) { hold=10; next } +} + } + else if (hold == 1) { + hold=0; split($2,args,","); op="" + if ($1 == "add") op="+" + if ($1 == "sub") op="-" + if (op != "" && regs[1] == args[1] && isnum(args[2])) { + print "\tlea\t" regs[1] ",[" regs[2] op args[2] "]" + next + } + print "\tmov\t" regs[1] "," regs[2] + } + else if (hold == 2) { + hold=0; split($2,args,","); print s + if ($1 == "or" && r == args[1] && r == args[2]) next # don't clear C ... + } + else if (hold == 3) { + hold=0 + if (/^ add [abcds][ix],/ || /^ sub [abcds][ix],/) { + split($2,regs2,",") + if (regs[1] == regs2[1] && (regs2[2] == "offset" || isnum(regs2[2]))) { + t=$0; sub(/mov/,$1,s) + if ($1 == "add") sub(/add/,"mov",t); else sub(/sub/,"mov",t) + print t; print s; next + } + } + print s + } + else if (hold == 4) { + hold=0 + if (/^ push eax$/) { + print " push 0"; print " push ax"; next + } else { print s } + } + else if (hold == 10) { + if ($1 == "je" || $1 == "jne") { s2=$0; cmp=$1; hold++; next } + hold=0; print s + } + else if (hold == 11) { + if (/^ cmp ax,-1$/) { s3=$0; hold++; next } + hold=0; print s; print s2 + } + else if (hold == 12) { + if (($1 == "je" || $1 == "jne") && $1 != cmp) { + print " and ax,dx"; print " inc ax" + } else { print s; print s2; print s3 } + hold=0 + } + s=$0 + # These optimisation may break ZF or CF + if (/^ add sp,4/) { print " pop cx"; print " pop cx"; next } + if (/^ mov d*word ptr .*,0$/ || /^ mov dword ptr .*,large 0$/) { + sub(/mov/,"and",s); print s; next # slower + } + if (/^ mov d*word ptr .*,-1$/ || /^ mov dword ptr .*,large -1$/) { + sub(/mov/,"or",s); print s; next # slower + } + if (/^ or .*,0$/ || /^ and .*,-1$/) next + if (/^ or [abcd]x,/) { + split($2,args,",") + if (isnum(args[2]) && args[2] >= 0 && args[2] < 256) { + print " or " substr(args[1],1,1) "l," args[2]; next + } + } + if (/^ and [abcd]x,/) { + split($2,args,",") + if (isnum(args[2]) && args[2] >= -255 && args[2] < 0) { + print " and " substr(args[1],1,1) "l," args[2]; next + } + } + if (/^ or e[abcd]x,/) { + split($2,args,",") + if (args[2] == "large") { args[2] = $3 } + if (isnum(args[2]) && args[2] >= 0 && args[2] < 256) { + print " or " substr(args[1],2,1) "l," args[2]; next + } + } + if (/^ and e[abcd]x,/) { + split($2,args,",") + if (args[2] == "large") { args[2] = $3 } + if (isnum(args[2]) && args[2] >= -255 && args[2] < 0) { + print " and " substr(args[1],2,1) "l," args[2]; next + } + } + if (/^ or e[abcds][ix],/) { + split($2,args,",") + if (args[2] == "large") { args[2] = $3 } + if (isnum(args[2]) && args[2] >= 0 && args[2] < 65536) { + print " or " substr(args[1],2) "," args[2]; next + } + } + if (/^ and e[abcds][ix],/) { + split($2,args,",") + if (args[2] == "large") { args[2] = $3 } + if (isnum(args[2]) && args[2] >= -65535 && args[2] < 0) { + print " and " substr(args[1],2) "," args[2]; next + } + } + if (/^ add word ptr/ || /^ sub word ptr/) { + split($0,args,",") + if (isnum(args[2]) && (args[2] % 256 == 0)) { + sub(/word/,"byte",s); sub(/\]/,"+1]",s) + print s "/256"; next + } + } + if (/^ add dword ptr/ || /^ sub dword ptr/) { + split($0,args,",") + if (args[2] == "large") { split(args[2],args," ") } + if (isnum(args[2])) { + if (args[2] % 16777216 == 0) { + sub(/dword/,"byte",s); sub(/\]/,"+3]",s) + print s "/16777216"; next + } + if (args[2] % 65536 == 0) { + sub(/dword/,"word",s); sub(/\]/,"+2]",s) + print s "/65536"; next + } + } + } + if (/^ mov e.x,/) { + split($2,args,",") + r=args[1] + if (args[2] == "large") { args[2] = $3 } + if (isnum(args[2]) && args[2] % 65536 == args[2]) { + if (args[2] % 256 == args[2] || args[2] % 256 == 0) { + print " xor " r "," r + if (args[2] == 0) next + x=" mov " substr(r,2,1) + if (args[2] % 256 == 0) { + print x "h," args[2] "/256" + } + else { print x "l," args[2] } + next + } + } + } + print +}