wok rev 20458
Up amule (2.3.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Oct 10 10:43:41 2018 +0200 (2018-10-10) |
parents | c344508ff4eb |
children | c2946aeb8b57 |
files | amule/receipt linld/receipt linld/stuff/src/!COMPILE.BAT linld/stuff/src/!COMPILEX.BAT linld/stuff/src/ISO9660.CPP linld/stuff/src/LOAD.CPP linld/stuff/src/TAZBOOT.CPP linld/stuff/src/pipehole.awk |
line diff
1.1 --- a/amule/receipt Tue Oct 09 18:50:30 2018 +0200 1.2 +++ b/amule/receipt Wed Oct 10 10:43:41 2018 +0200 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="amule" 1.7 -VERSION="2.3.1" 1.8 +VERSION="2.3.2" 1.9 CATEGORY="network" 1.10 SHORT_DESC="An eMule-like client for the eD2k and Kademlia networks." 1.11 MAINTAINER="pankso@slitaz.org" 1.12 @@ -23,6 +23,15 @@ 1.13 $CONFIGURE_ARGS && 1.14 make $MAKEFLAGS && 1.15 make DESTDIR=$DESTDIR install 1.16 + ./configure \ 1.17 + --prefix=/usr \ 1.18 + --disable-monolithic \ 1.19 + --enable-amule-daemon \ 1.20 + --enable-amulecmd \ 1.21 + --enable-webserver \ 1.22 + $CONFIGURE_ARGS && 1.23 + make $MAKEFLAGS && 1.24 + make DESTDIR=$DESTDIR install 1.25 } 1.26 1.27 # Rules to gen a SliTaz package suitable for Tazpkg.
2.1 --- a/linld/receipt Tue Oct 09 18:50:30 2018 +0200 2.2 +++ b/linld/receipt Wed Oct 10 10:43:41 2018 +0200 2.3 @@ -11,14 +11,20 @@ 2.4 BASE_SITE="http://busybox.net/~vda/$PACKAGE" 2.5 WEB_SITE="$BASE_SITE/README.txt" 2.6 WGET_URL="$BASE_SITE/$TARBALL" 2.7 +EXTRA_TOOL_URL="ftp://ftp.ibiblio.org/pub/micro/pc-stuff/freedos/gnuish/mawk122x.zip" 2.8 +EXTRA_TOOL="$(basename $EXTRA_TOOL_URL)" 2.9 +EXTRA_SOURCE_FILES="$EXTRA_TOOL" 2.10 2.11 BUILD_DEPENDS="dosbox upx" 2.12 2.13 # Rules to configure and make the package. 2.14 compile_rules() 2.15 { 2.16 + [ -s $SRC/$EXTRA_TOOL ] || 2.17 + busybox wget -O $SRC/$EXTRA_TOOL $EXTRA_TOOL_URL 2.18 mv DIST $src 2> /dev/null 2.19 cd $src 2.20 + unzip $SRC/$EXTRA_TOOL 2.21 rm LINLD$SUFFIX/CRTL.CPP LINLD$SUFFIX/INT15_88.ASM 2.22 cp $stuff/src/* LINLD$SUFFIX/ 2.23 cp -a LINLD$SUFFIX TAZBOOT
3.1 --- a/linld/stuff/src/!COMPILE.BAT Tue Oct 09 18:50:30 2018 +0200 3.2 +++ b/linld/stuff/src/!COMPILE.BAT Wed Oct 10 10:43:41 2018 +0200 3.3 @@ -1,8 +1,14 @@ 3.4 -path ..\BC31;%PATH% 3.5 +path ..\BC31;..;%PATH% 3.6 call !clean.bat 3.7 tasm /h > helptasm.log 3.8 bcc > helpbcc.log 3.9 tlink > helptlink.log 3.10 bcc @bccopt.opt -S -mt -DLARGE_IMAGES *.cpp > cpp.log 3.11 +ren LINLD.ASM LINLD.ASO 3.12 +ren LOAD.ASM LOAD.ASO 3.13 +ren HIMEM.ASM HIMEM.ASO 3.14 +mawk -f pipehole.awk < LINLD.ASO > LINLD.ASM 3.15 +mawk -f pipehole.awk < LOAD.ASO > LOAD.ASM 3.16 +mawk -f pipehole.awk < HIMEM.ASO > HIMEM.ASM 3.17 tasm /la /m /dLARGE_IMAGES *.asm > asm.log 3.18 tlink /m /s /t @link.cmd > lnk.log
4.1 --- a/linld/stuff/src/!COMPILEX.BAT Tue Oct 09 18:50:30 2018 +0200 4.2 +++ b/linld/stuff/src/!COMPILEX.BAT Wed Oct 10 10:43:41 2018 +0200 4.3 @@ -1,5 +1,13 @@ 4.4 -path ..\BC31;%PATH% 4.5 +path ..\BC31;..;%PATH% 4.6 call !clean.bat 4.7 bcc @bccopt.opt -S -mt -DLARGE_IMAGES *.cpp > cpp.log 4.8 +ren TAZBOOT.ASM TAZBOOT.ASO 4.9 +ren LOAD.ASM LOAD.ASO 4.10 +ren HIMEM.ASM HIMEM.ASO 4.11 +ren ISO9660.ASM ISO9660.ASO 4.12 +mawk -f pipehole.awk < TAZBOOT.ASO > TAZBOOT.ASM 4.13 +mawk -f pipehole.awk < LOAD.ASO > LOAD.ASM 4.14 +mawk -f pipehole.awk < HIMEM.ASO > HIMEM.ASM 4.15 +mawk -f pipehole.awk < ISO9660.ASO > ISO9660.ASM 4.16 tasm /la /m /dEXTRA /dNO386 /dLARGE_IMAGES *.asm > asm.log 4.17 tlink /m /s /t @linkx.cmd > lnk.log
5.1 --- a/linld/stuff/src/ISO9660.CPP Tue Oct 09 18:50:30 2018 +0200 5.2 +++ b/linld/stuff/src/ISO9660.CPP Wed Oct 10 10:43:41 2018 +0200 5.3 @@ -51,7 +51,7 @@ 5.4 //x->curdirofs += SECTORSZ; 5.5 *(int *)((char *) &x->curdirofs+1) += SECTORSZ/256; 5.6 x->curdirsize -= DIRSECTORSZ; 5.7 - x->curpos &= 0; 5.8 + x->curpos = 0; 5.9 } 5.10 p = buffer + x->curpos; 5.11 if ((size = * (short *) p) == 0)
6.1 --- a/linld/stuff/src/LOAD.CPP Tue Oct 09 18:50:30 2018 +0200 6.2 +++ b/linld/stuff/src/LOAD.CPP Wed Oct 10 10:43:41 2018 +0200 6.3 @@ -44,7 +44,7 @@ 6.4 */ 6.5 6.6 struct kernelparams_t { 6.7 - u8 setup_sects; // 01F1 The size of the setup in sectors 6.8 + s8 setup_sects; // 01F1 The size of the setup in sectors 6.9 // boot sector is NOT included here 6.10 u16 ro_flag; // 01F2 If set, the root is mounted readonly 6.11 u16 syssize; // 01F4 DO NOT USE - for bootsect.S use only:
7.1 --- a/linld/stuff/src/TAZBOOT.CPP Tue Oct 09 18:50:30 2018 +0200 7.2 +++ b/linld/stuff/src/TAZBOOT.CPP Wed Oct 10 10:43:41 2018 +0200 7.3 @@ -20,7 +20,7 @@ 7.4 static void next_chunk(struct image_himem *m) 7.5 { 7.6 struct initrd_info *i = &initrd_state.info[m->state]; 7.7 - m->chunk_size &= 0; 7.8 + m->chunk_size = 0; 7.9 if (m->state >= initrd_state.cnt) return; 7.10 lseekset(m->fd,i->ofs); 7.11 m->chunk_size = i->size; 7.12 @@ -49,7 +49,7 @@ 7.13 if (!m->size) return; 7.14 m->next_chunk = next_chunk; 7.15 m->fd = isofd; 7.16 - m->state &= 0; 7.17 + m->state = 0; 7.18 next_chunk(m); 7.19 load_initrd(); 7.20 } 7.21 @@ -133,9 +133,9 @@ 7.22 read(x->fd, &x->filemod, 10); // + x->fileofs & x->filesize 7.23 magic = x->filemod; 7.24 //x->fileofs &= 0xFFFFL; 7.25 - * ((short *) &x->fileofs + 1) &= 0; 7.26 + * ((short *) &x->fileofs + 1) = 0; 7.27 //x->fileofs -= 0xC0L + (x->filesize &= 0xFFFF); 7.28 - * ((short *) &x->filesize + 1) &= 0; 7.29 + * ((short *) &x->filesize + 1) = 0; 7.30 x->fileofs -= 0xC0L + x->filesize; 7.31 if (((short *) &x->fileofs)[1] == 0) addinitrd(); 7.32 else init="";
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/linld/stuff/src/pipehole.awk Wed Oct 10 10:43:41 2018 +0200 8.3 @@ -0,0 +1,155 @@ 8.4 +BEGIN { hold=0 } 8.5 +function isnum(n) { return match(n,/^[0-9+-]/) } 8.6 +{ 8.7 + if (hold == 0) { 8.8 + s=$0 8.9 + if (/^ mov .x,bx$/ || /^ mov .x,.i$/) { 8.10 + hold=1; split($2,regs,","); next 8.11 + } 8.12 + if (/^ inc e?.[ix]/ || /^ dec e?.[ix]/) { 8.13 + hold=2; r=$2; next 8.14 + } 8.15 + if (/^ mov [abcds][ix],/ && ! /,.s/) { 8.16 + hold=3; split($2,regs,","); next 8.17 + } 8.18 + if (/^ movzx eax,ax$/) { hold=4; next } 8.19 +if (0) { 8.20 + if (/^ cmp dx,-1$/) { hold=10; next } 8.21 +} 8.22 + } 8.23 + else if (hold == 1) { 8.24 + hold=0; split($2,args,","); op="" 8.25 + if ($1 == "add") op="+" 8.26 + if ($1 == "sub") op="-" 8.27 + if (op != "" && regs[1] == args[1] && isnum(args[2])) { 8.28 + print "\tlea\t" regs[1] ",[" regs[2] op args[2] "]" 8.29 + next 8.30 + } 8.31 + print "\tmov\t" regs[1] "," regs[2] 8.32 + } 8.33 + else if (hold == 2) { 8.34 + hold=0; split($2,args,","); print s 8.35 + if ($1 == "or" && r == args[1] && r == args[2]) next # don't clear C ... 8.36 + } 8.37 + else if (hold == 3) { 8.38 + hold=0 8.39 + if (/^ add [abcds][ix],/ || /^ sub [abcds][ix],/) { 8.40 + split($2,regs2,",") 8.41 + if (regs[1] == regs2[1] && (regs2[2] == "offset" || isnum(regs2[2]))) { 8.42 + t=$0; sub(/mov/,$1,s) 8.43 + if ($1 == "add") sub(/add/,"mov",t); else sub(/sub/,"mov",t) 8.44 + print t; print s; next 8.45 + } 8.46 + } 8.47 + print s 8.48 + } 8.49 + else if (hold == 4) { 8.50 + hold=0 8.51 + if (/^ push eax$/) { 8.52 + print " push 0"; print " push ax"; next 8.53 + } else { print s } 8.54 + } 8.55 + else if (hold == 10) { 8.56 + if ($1 == "je" || $1 == "jne") { s2=$0; cmp=$1; hold++; next } 8.57 + hold=0; print s 8.58 + } 8.59 + else if (hold == 11) { 8.60 + if (/^ cmp ax,-1$/) { s3=$0; hold++; next } 8.61 + hold=0; print s; print s2 8.62 + } 8.63 + else if (hold == 12) { 8.64 + if (($1 == "je" || $1 == "jne") && $1 != cmp) { 8.65 + print " and ax,dx"; print " inc ax" 8.66 + } else { print s; print s2; print s3 } 8.67 + hold=0 8.68 + } 8.69 + s=$0 8.70 + # These optimisation may break ZF or CF 8.71 + if (/^ add sp,4/) { print " pop cx"; print " pop cx"; next } 8.72 + if (/^ mov d*word ptr .*,0$/ || /^ mov dword ptr .*,large 0$/) { 8.73 + sub(/mov/,"and",s); print s; next # slower 8.74 + } 8.75 + if (/^ mov d*word ptr .*,-1$/ || /^ mov dword ptr .*,large -1$/) { 8.76 + sub(/mov/,"or",s); print s; next # slower 8.77 + } 8.78 + if (/^ or .*,0$/ || /^ and .*,-1$/) next 8.79 + if (/^ or [abcd]x,/) { 8.80 + split($2,args,",") 8.81 + if (isnum(args[2]) && args[2] >= 0 && args[2] < 256) { 8.82 + print " or " substr(args[1],1,1) "l," args[2]; next 8.83 + } 8.84 + } 8.85 + if (/^ and [abcd]x,/) { 8.86 + split($2,args,",") 8.87 + if (isnum(args[2]) && args[2] >= -255 && args[2] < 0) { 8.88 + print " and " substr(args[1],1,1) "l," args[2]; next 8.89 + } 8.90 + } 8.91 + if (/^ or e[abcd]x,/) { 8.92 + split($2,args,",") 8.93 + if (args[2] == "large") { args[2] = $3 } 8.94 + if (isnum(args[2]) && args[2] >= 0 && args[2] < 256) { 8.95 + print " or " substr(args[1],2,1) "l," args[2]; next 8.96 + } 8.97 + } 8.98 + if (/^ and e[abcd]x,/) { 8.99 + split($2,args,",") 8.100 + if (args[2] == "large") { args[2] = $3 } 8.101 + if (isnum(args[2]) && args[2] >= -255 && args[2] < 0) { 8.102 + print " and " substr(args[1],2,1) "l," args[2]; next 8.103 + } 8.104 + } 8.105 + if (/^ or e[abcds][ix],/) { 8.106 + split($2,args,",") 8.107 + if (args[2] == "large") { args[2] = $3 } 8.108 + if (isnum(args[2]) && args[2] >= 0 && args[2] < 65536) { 8.109 + print " or " substr(args[1],2) "," args[2]; next 8.110 + } 8.111 + } 8.112 + if (/^ and e[abcds][ix],/) { 8.113 + split($2,args,",") 8.114 + if (args[2] == "large") { args[2] = $3 } 8.115 + if (isnum(args[2]) && args[2] >= -65535 && args[2] < 0) { 8.116 + print " and " substr(args[1],2) "," args[2]; next 8.117 + } 8.118 + } 8.119 + if (/^ add word ptr/ || /^ sub word ptr/) { 8.120 + split($0,args,",") 8.121 + if (isnum(args[2]) && (args[2] % 256 == 0)) { 8.122 + sub(/word/,"byte",s); sub(/\]/,"+1]",s) 8.123 + print s "/256"; next 8.124 + } 8.125 + } 8.126 + if (/^ add dword ptr/ || /^ sub dword ptr/) { 8.127 + split($0,args,",") 8.128 + if (args[2] == "large") { split(args[2],args," ") } 8.129 + if (isnum(args[2])) { 8.130 + if (args[2] % 16777216 == 0) { 8.131 + sub(/dword/,"byte",s); sub(/\]/,"+3]",s) 8.132 + print s "/16777216"; next 8.133 + } 8.134 + if (args[2] % 65536 == 0) { 8.135 + sub(/dword/,"word",s); sub(/\]/,"+2]",s) 8.136 + print s "/65536"; next 8.137 + } 8.138 + } 8.139 + } 8.140 + if (/^ mov e.x,/) { 8.141 + split($2,args,",") 8.142 + r=args[1] 8.143 + if (args[2] == "large") { args[2] = $3 } 8.144 + if (isnum(args[2]) && args[2] % 65536 == args[2]) { 8.145 + if (args[2] % 256 == args[2] || args[2] % 256 == 0) { 8.146 + print " xor " r "," r 8.147 + if (args[2] == 0) next 8.148 + x=" mov " substr(r,2,1) 8.149 + if (args[2] % 256 == 0) { 8.150 + print x "h," args[2] "/256" 8.151 + } 8.152 + else { print x "l," args[2] } 8.153 + next 8.154 + } 8.155 + } 8.156 + } 8.157 + print 8.158 +}