Check-in [a063fafd1f]
Overview
Comment:Allow building a TclKit on Win32 using MinGW against Tcl/Tk 8.6.1.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a063fafd1f01e5002c6c2bad9ef613a504be8825
User & Date: mistachkin on 2013-09-25 03:12:38
Other Links: manifest | tags
Context
2013-09-25
04:30
Removed dead code check-in: 4816a85fc1 user: rkeene tags: trunk
03:12
Allow building a TclKit on Win32 using MinGW against Tcl/Tk 8.6.1. check-in: a063fafd1f user: mistachkin tags: trunk
2013-09-24
22:18
Fix Win32 portability issue in the VFS installation script regarding the 'null' device name. Closed-Leaf check-in: ad6d2d103e user: mistachkin tags: tcl-8.6.1-MinGW-Win32
2013-09-22
14:43
Corrected issue with performing checks using wrong compiler check-in: 6874e769d6 user: rkeene tags: trunk
Changes

Modified README from [43ef200174] to [2bc0f41d6f].

     6      6   ---------------
     7      7   Usage:
     8      8   	kitcreator [{build | retry | clean | distclean}]
     9      9   	           [{<version> | cvs_<tag> | fossil_<tag>}]
    10     10   	           [<configure_option> ...]
    11     11   
    12     12   	Where:
    13         -		version            is a Tcl version number (e.g., 8.5.14)
           13  +		version            is a Tcl version number (e.g., 8.6.1)
    14     14   		tag                is a CVS or fossil release tag (e.g., HEAD)
    15     15   		configure_option   option to pass to subordinate configure
    16     16   		                   scripts (e.g., --enable-64bit)
    17     17   
    18         -	Default is to create a Tclkit from Tcl version 8.5.14
           18  +	Default is to create a Tclkit from Tcl version 8.6.1
    19     19   
    20     20   Examples:
    21     21   	1. Create a Tclkit:
    22     22   		a. $ ./kitcreator
    23     23   
    24         -	2. Create a Tclkit for Tcl 8.5.8:
    25         -		a. $ ./kitcreator 8.5.8
           24  +	2. Create a Tclkit for Tcl 8.5.15:
           25  +		a. $ ./kitcreator 8.5.15
    26     26   
    27     27   	3. Create a Tclkit for Tcl from CVS HEAD:
    28     28   		a. $ ./kitcreator cvs_HEAD
    29     29   
    30     30   	4. Compile a 64-bit Tclkit:
    31     31   		a. $ ./kitcreator --enable-64bit
    32     32   
................................................................................
    44     44   			v.   $ export CC CXX AR RANLIB
    45     45   			vi.  $ ./kitcreator --host=mipsel-linux-uclibc
    46     46   	   Note: When cross-compiling, the Tcl configure script may be unable
    47     47   	   to determine which serial support method to use. If you want serial
    48     48   	   support in a cross-compiled tclkit, specify it manually, e.g.:
    49     49   		$ ./kitcreator CFLAGS=-DUSE_TERMIOS=1 -host=mipsel-linux-uclibc
    50     50   
    51         -	6. Compile a 64-bit Tclkit 8.5.8 using SunStudio 12.1 on Solaris/x86:
           51  +	6. Compile a 64-bit Tclkit 8.5.15 using SunStudio 12.1 on Solaris/x86:
    52     52   		a. $ CC='/opt/sunstudio12.1/bin/cc -m64'
    53     53   		b. $ CXX='/opt/sunstudio12.1/bin/CC -m64'
    54     54   		c. $ PATCH='gpatch'
    55     55   		c. $ export CC CXX PATCH
    56         -		d. $ ./kitcreator 8.5.8 --enable-64bit
           56  +		d. $ ./kitcreator 8.5.15 --enable-64bit
    57     57   
    58     58   	7. To clean up post-build:
    59     59   		a. $ ./kitcreator clean
    60     60   
    61     61   	8. Create a Tclkit without Metakit4 support (falls back to Zip for storage):
    62     62   		a. KITCREATOR_PKGS='tk itcl'
    63     63   		b. export KITCREATOR_PKGS

Modified build/test/test from [7efabc4a20] to [b14ccbc368].

     1      1   #! /bin/bash
     2      2   
     3         -VERSIONS="8.5.14 8.6.0 cvs_HEAD"
            3  +VERSIONS="8.5.15 8.6.1 cvs_HEAD"
     4      4   
     5      5   # Find the base directory
     6      6   for x in 1 2 3 4 __fail__; do
     7      7   	if [ "${x}" = "__fail__" ]; then
     8      8   		echo 'Unable to find KitCreator, aborting.' >&2
     9      9   
    10     10   		exit 1

Modified kitcreator from [f33d7d8aef] to [e99d7e9821].

     6      6   	clean|distclean|build|retry)
     7      7   		mode="$1"
     8      8   		shift
     9      9   		;;
    10     10   esac
    11     11   
    12     12   # Determine which Tcl version to build
    13         -TCLVERS="8.5.14"
           13  +TCLVERS="8.6.1"
    14     14   if echo "$1" | grep '^[0-9][0-9]*\.' >/dev/null || echo "$1" | egrep '^(cvs|fossil)_' >/dev/null; then
    15     15   	TCLVERS="$1"
    16     16   
    17     17   	shift
    18     18   fi
    19     19   export TCLVERS
    20     20   

Modified kitsh/buildsrc/kitsh-0.0/installvfs.tcl from [b17724e7c3] to [5bb6ad9ccb].

    94     94   		vfs::unmount /kit
    95     95   	}
    96     96   	"zip" {
    97     97   		set kitfd [open $kitfile a+]
    98     98   		fconfigure $kitfd -translation binary
    99     99   
   100    100   		cd $vfsdir
   101         -		set zipfd [open "|zip -r - [glob *] 2> /dev/null"]
          101  +		if {$tcl_platform(platform) eq "windows"} {
          102  +			set null NUL
          103  +		} else {
          104  +			set null /dev/null
          105  +		}
          106  +		set zipfd [open "|zip -r - [glob *] 2> $null"]
   102    107   		fconfigure $zipfd -translation binary
   103    108   
   104    109   		fcopy $zipfd $kitfd
   105    110   
   106    111   		close $kitfd
   107    112   		if {[catch {
   108    113   			close $zipfd

Added tcl/patches/all/tcl-all-fix-stat64-bug2233954-mingw.diff version [7ba98178f8].

            1  +diff -uNr Tcl_Source_Code-e7b4aca82756056a/generic/tcl.h Tcl_Source_Code-e7b4aca82756056a-bug2233954/generic/tcl.h
            2  +--- Tcl_Source_Code-e7b4aca82756056a/generic/tcl.h	2012-02-11 07:44:35.000000000 -0800
            3  ++++ Tcl_Source_Code-e7b4aca82756056a-bug2233954/generic/tcl.h	2012-02-14 07:29:01.000000000 -0800
            4  +@@ -454,6 +454,8 @@
            5  + 	typedef struct __stat64 Tcl_StatBuf;
            6  + #   elif (defined(_MSC_VER) && (_MSC_VER < 1400)) || defined(_USE_32BIT_TIME_T)
            7  + 	typedef struct _stati64	Tcl_StatBuf;
            8  ++#   elif defined(__MINGW32_VERSION)
            9  ++	typedef struct _stati64	Tcl_StatBuf;
           10  + #   else
           11  + 	typedef struct _stat32i64 Tcl_StatBuf;
           12  + #   endif /* _MSC_VER < 1400 */

Modified tcl/patches/all/tcl-all-fix-stat64-bug2233954-newer.diff from [9340be2758] to [1be8821eac].

     1      1   diff -uNr tclfossil_trunk.orig//generic/tcl.h tclfossil_trunk-1rsk//generic/tcl.h
     2      2   --- tclfossil_trunk.orig//generic/tcl.h	2012-05-04 16:11:58.000000000 -0500
     3      3   +++ tclfossil_trunk-1rsk//generic/tcl.h	2012-05-06 17:33:17.487466336 -0500
     4      4   @@ -475,6 +475,9 @@
     5      5    	/* Here is a 4-byte gap */
     6      6        } Tcl_StatBuf;
     7         - #elif defined(HAVE_STRUCT_STAT64)
            7  + #elif defined(HAVE_STRUCT_STAT64) && !defined(__APPLE__)
     8      8   +#     ifdef HAVE_SYS_STAT_H
     9      9   +#       include <sys/stat.h>
    10     10   +#     endif
    11     11        typedef struct stat64 Tcl_StatBuf;
    12     12    #else
    13     13        typedef struct stat Tcl_StatBuf;