From: Pat Thoyts Date: Thu, 19 Nov 2009 01:18:53 +0000 (+0000) Subject: Fix build using msys-gcc for 8.5 and only validate pkgconfig X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=a34ca929ce39cf98140ac6b8284cf576d4365dc8;p=kitgen Fix build using msys-gcc for 8.5 and only validate pkgconfig for non 8.4 builds. Include Japanese encoding by default. Support higher upx compression via a build flag. git-svn-id: svn://svn.equi4.com/kitgen/trunk@4721 9e558909-932a-0410-a563-af77432da1eb --- diff --git a/Makefile.vc b/Makefile.vc index 1cec71f..9e2db3b 100644 --- a/Makefile.vc +++ b/Makefile.vc @@ -53,6 +53,10 @@ UPX=0 !endif !endif +!ifndef UPXLEVEL +UPXLEVEL=1 +!endif + MAKE = $(MAKE) -nologo CPY = xcopy /i /y >NUL COPY = copy /y >NUL @@ -104,9 +108,14 @@ UPXCOMP = CFLAGS = -MD -Zi -O2 -DNDEBUG $(CFLAGS) LDFLAGS = -debug !if $(UPX) +!if $(UPXLEVEL) > 1 +# can add --ultra-brute --compress-resources=0 for release +UPXCOMP = upx -q --ultra-brute --compress-resources=0 $@ +!else UPXCOMP = upx -q9 $@ >NUL !endif !endif +!endif #------------------------------------------------------------------------- # MSVC > 8 (Visual Studio 2005+) generates a manifest diff --git a/config.sh b/config.sh index b8854c3..e665e15 100755 --- a/config.sh +++ b/config.sh @@ -90,6 +90,9 @@ case $cli-$dyn-$gui in 0-0-0) cli=1 dyn=1 gui=1 ;; esac MINGW*) echo 'LDFLAGS = build/lib/dde1*/tcldde1*.a build/lib/reg1*/tclreg1*.a' + if [ $root != "8.4" ]; then + echo 'LDFLAGS += -lws2_32' + fi echo 'GUI_OPTS = -lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32' echo 'GUI_OPTS += -lole32 -loleaut32 -luuid' echo 'GUI_OPTS += build/tk/wish.res.o -mwindows' @@ -145,6 +148,7 @@ case $cli-$dyn-$gui in 0-0-0) cli=1 dyn=1 gui=1 ;; esac 0) echo "KIT_OPTS =$kitopts" ;; esac + case $plat in win) echo "TCL_OPTS += --with-encoding=utf-8" ;; esac case $tzdata in 1) echo "TCL_OPTS += --with-tzdata" ;; esac case $gprof in 1) diff --git a/setupvfs.tcl b/setupvfs.tcl index 905a6b6..372d474 100644 --- a/setupvfs.tcl +++ b/setupvfs.tcl @@ -160,6 +160,41 @@ foreach f { lib/tk8@/prolog.ps lib/tk8@/icons.tcl } { if {$encOpt} { lappend clifiles lib/tcl8@/encoding } else { + # Microsoft Windows & DOS code pages: + # Win DOS + # cp1250 cp852 - Central Europe + # cp1251 cp855 - Cyrillic + # cp866 - Cyrillic II + # cp1252 cp850 - Latin I + # cp437 - English (US) + # cp1253 cp737 - Greek + # cp1254 cp857 - Turkish + # cp1255 cp862 - Hebrew + # cp1255 cp720 - Arabic + # cp1257 cp775 - Baltic + # cp1258 - VietNam + # cp874 - Thai + # cp932 - Japanese + # cp936 - Chinese Simplified + # cp950 - Chinese Traditional + + # IBM Code pages: + # cp437 - USA + # cp850 - Europe + # cp851 - Greek + # cp852 - Latin2 + # cp855 - Cyrillic + # cp856 - Hebrew + # cp857 - Turkey + # cp860 - Portugal + # cp861 - Iceland + # cp862 - Hebrew + # cp863 - fr_CA + # cp864 - Arabic + # cp865 - Nordic + # cp866 - Cyrillic2 + # cp874 - Thai + # Minimal set #foreach e {ascii cp1251 cp1252 iso8859-1 iso8859-2 iso8859-3 # iso8859-4 iso8859-5 iso8859-6 iso8859-7 iso8859-8 iso8859-9 @@ -173,7 +208,7 @@ if {$encOpt} { # gb2312-raw jis0208 jis0212 ksc601 shiftjis foreach e {ascii cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp437 cp737 cp775 cp850 cp852 cp855 cp857 cp860 cp861 cp862 - cp863 cp864 cp865 cp866 cp869 cp874 dingbats ebcdic gb1988 + cp863 cp864 cp865 cp866 cp869 cp874 cp932 dingbats ebcdic gb1988 iso2022 iso2022-jp iso2022-kr iso8859-1 iso8859-10 iso8859-13 iso8859-14 iso8859-15 iso8859-16 iso8859-2 iso8859-3 iso8859-4 iso8859-5 iso8859-6 iso8859-7 iso8859-8 iso8859-9 jis0201 koi8-r diff --git a/validate.tcl b/validate.tcl index 0bcf1bc..ab8a54e 100644 --- a/validate.tcl +++ b/validate.tcl @@ -43,7 +43,9 @@ if {![catch {package require Thread}]} { puts "thread: $r" } -# check pkgconfig -tcl::pkgconfig list -set wd [expr {[tcl::pkgconfig get 64bit] ? "64bit" : "32bit"}] -puts "pkgconfig: $wd [tcl::pkgconfig get {bindir,runtime}]" +# check pkgconfig in 8.5+ +if {[package vsatisfies [package provide Tcl] 8.5]} { + tcl::pkgconfig list + set wd [expr {[tcl::pkgconfig get 64bit] ? "64bit" : "32bit"}] + puts "pkgconfig: $wd [tcl::pkgconfig get {bindir,runtime}]" +}