Check-in [3e4cf5d7be]
Overview
Comment:Updated TCC to build only on ix86/x86_64 platforms Fixed bugs in TCC 0.4 with patches and build.sh updates
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3e4cf5d7be020a182e71efab5bb99e4054602e89
User & Date: rkeene on 2011-07-25 13:52:44
Other Links: manifest | tags
Context
2011-07-25
14:47
Removed x86_64 from TCC platforms check-in: 959c3bf228 user: rkeene tags: trunk
13:52
Updated TCC to build only on ix86/x86_64 platforms Fixed bugs in TCC 0.4 with patches and build.sh updates check-in: 3e4cf5d7be user: rkeene tags: trunk
12:27
Added "tcc" package check-in: 5f6fa113cf user: rkeene tags: trunk
Changes

Modified server/buildpkgs/common.sh from [ad199373ac] to [d35eb59bb1].

    24     24   	local platform
    25     25   
    26     26   	for platform in "$@"; do
    27     27   		if [ "${PLATFORM}" = "${platform}" ]; then
    28     28   			return 0
    29     29   		fi
    30     30   	done
           31  +
           32  +	rm -rf out
           33  +
           34  +	exit 0
           35  +}
           36  +
           37  +function only_platforms_regexp () {
           38  +	local platform_re
           39  +
           40  +	for platform_re in "$@"; do
           41  +		if echo "${PLATFORM}" | grep -- "${platform_re}" >/dev/null; then
           42  +			return 0
           43  +		fi
           44  +	done
    31     45   
    32     46   	rm -rf out
    33     47   
    34     48   	exit 0
    35     49   }
    36     50   
    37     51   function download () {

Modified server/buildpkgs/tcc/build.sh from [11bc7d10bb] to [49725eb0a2].

     9      9   
    10     10   # Load common functions
    11     11   source ../common.sh
    12     12   
    13     13   # Do not build if the "tcl" platform has been requested
    14     14   not_platforms 'tcl'
    15     15   
           16  +# Only build for the following platforms
           17  +only_platforms_regexp '-ix86$' '-x86_64$'
           18  +
    16     19   # Download source
    17     20   download_src
    18     21   
    19         -# Build package
           22  +# Extract package
    20     23   (
    21     24   	rm -rf build
    22         -	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    23     25   	mkdir build
    24     26   
    25     27   	cd build/ || exit 1
    26     28   	mkdir "${BUILDDIR}"
    27     29   	cd "${BUILDDIR}" || exit 1
    28     30   
    29     31   	unzip -q "../../${SRC}"
           32  +)
           33  +
           34  +# Apply patches
           35  +apply_patches
           36  +
           37  +# Build package
           38  +(
           39  +	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
           40  +
           41  +	cd "build" || exit 1
           42  +	cd "${BUILDDIR}" || exit 1
    30     43   
    31     44   	# TCC ships with object files in the way
    32     45   	${MAKE:-make} distclean >/dev/null 2>/dev/null
           46  +
           47  +	# This file needs to be executable, but it is not by default in 0.4
           48  +	chmod +x tclconfig/install-sh
    33     49   
    34     50   	bash ./configure --enable-shared --enable-threads --with-tcl="${TCLCONFIGDIR}" --prefix="${PLATDIR}" --libdir="${PLATDIR}" --bindir="${PLATDIR}" ${CONFIGUREEXTRA}
    35     51   
    36     52   	${MAKE:-make} || exit 1
    37     53   
    38     54   	${MAKE:-make} install-binaries PKG_DIR='' || exit 1
    39     55   

Added server/buildpkgs/tcc/patches/0.4/tcltcc-0.4-fixinstall.diff version [ae3d7455ab].

            1  +diff -uNr tcltcc-0.4.orig/configure tcltcc-0.4-fixinstall/configure
            2  +--- tcltcc-0.4.orig/configure	2007-11-07 10:12:28.000000000 -0600
            3  ++++ tcltcc-0.4-fixinstall/configure	2011-07-25 13:36:53.000000000 -0500
            4  +@@ -6649,7 +6649,7 @@
            5  + 
            6  + 
            7  + 
            8  +-    vars=""
            9  ++    vars="tcc.tcl"
           10  +     for i in $vars; do
           11  + 	# check for existence, be strict because it is installed
           12  + 	if test ! -f "${srcdir}/$i" ; then
           13  +diff -uNr tcltcc-0.4.orig/configure.in tcltcc-0.4-fixinstall/configure.in
           14  +--- tcltcc-0.4.orig/configure.in	2007-11-07 10:05:48.000000000 -0600
           15  ++++ tcltcc-0.4-fixinstall/configure.in	2011-07-25 13:36:05.000000000 -0500
           16  +@@ -76,7 +76,7 @@
           17  + TEA_ADD_LIBS([])
           18  + TEA_ADD_CFLAGS([-DLIBTCC -DDLL_EXPORT=""])
           19  + TEA_ADD_STUB_SOURCES([])
           20  +-TEA_ADD_TCL_SOURCES([])
           21  ++TEA_ADD_TCL_SOURCES([tcc.tcl])
           22  + 
           23  + #--------------------------------------------------------------------
           24  + # __CHANGE__

Added server/buildpkgs/tcc/patches/0.4/tcltcc-0.4-fixvers.diff version [7362076e82].

            1  +diff -uNr tcltcc-0.4.orig/demo/pingpong.test tcltcc-0.4-fixvers/demo/pingpong.test
            2  +--- tcltcc-0.4.orig/demo/pingpong.test	2007-11-07 10:04:20.000000000 -0600
            3  ++++ tcltcc-0.4-fixvers/demo/pingpong.test	2011-07-25 13:38:06.000000000 -0500
            4  +@@ -5,7 +5,7 @@
            5  + 
            6  + set dir [file dirname [info script]]/..
            7  + source $dir/pkgIndex.tcl
            8  +-package require tcc 0.2
            9  ++package require tcc 0.4
           10  + 
           11  + #-- this code shall in the future be generated by:
           12  + #-- cfunc tcl_mul {int a int b} int {expr {$a*$b}}}
           13  +diff -uNr tcltcc-0.4.orig/demo/tcc-compile.tcl tcltcc-0.4-fixvers/demo/tcc-compile.tcl
           14  +--- tcltcc-0.4.orig/demo/tcc-compile.tcl	2007-11-07 10:04:20.000000000 -0600
           15  ++++ tcltcc-0.4-fixvers/demo/tcc-compile.tcl	2011-07-25 13:38:17.000000000 -0500
           16  +@@ -1,6 +1,6 @@
           17  + switch -exact -- $::tcl_platform(platform) {
           18  +-	windows {load ../tcc02.dll}
           19  +-	unix {load ../libtcc0.2.so}
           20  ++	windows {load ../tcc04.dll}
           21  ++	unix {load ../libtcc0.4.so}
           22  + }
           23  + tcc .. dll tcc_1
           24  + set t tcc_1
           25  +@@ -8,7 +8,7 @@
           26  + $t add_include_path ../generic/i386
           27  + $t add_include_path ../generic
           28  + $t define PACKAGE_NAME \"tcc\"
           29  +-$t define PACKAGE_VERSION \"0.2\"
           30  ++$t define PACKAGE_VERSION \"0.4\"
           31  + $t define DLL_EXPORT {__declspec(dllexport)}
           32  + $t define LIBTCC 1
           33  + $t define WIN32 1
           34  +diff -uNr tcltcc-0.4.orig/demo/tdom-compile-dll.tcl tcltcc-0.4-fixvers/demo/tdom-compile-dll.tcl
           35  +--- tcltcc-0.4.orig/demo/tdom-compile-dll.tcl	2007-11-07 10:04:20.000000000 -0600
           36  ++++ tcltcc-0.4-fixvers/demo/tdom-compile-dll.tcl	2011-07-25 13:38:26.000000000 -0500
           37  +@@ -1,6 +1,6 @@
           38  + switch -exact -- $::tcl_platform(platform) {
           39  +-	windows {load ../tcc02.dll}
           40  +-	unix {load ../libtcc0.2.so}
           41  ++	windows {load ../tcc04.dll}
           42  ++	unix {load ../libtcc0.4.so}
           43  + }
           44  + tcc ../pkg dll tcc_1
           45  + set t tcc_1
           46  +diff -uNr tcltcc-0.4.orig/demo/tdom-compile.tcl tcltcc-0.4-fixvers/demo/tdom-compile.tcl
           47  +--- tcltcc-0.4.orig/demo/tdom-compile.tcl	2007-11-07 10:04:20.000000000 -0600
           48  ++++ tcltcc-0.4-fixvers/demo/tdom-compile.tcl	2011-07-25 13:38:32.000000000 -0500
           49  +@@ -1,6 +1,6 @@
           50  + switch -exact -- $::tcl_platform(platform) {
           51  +-	windows {load ../tcc02.dll}
           52  +-	unix {load ../libtcc0.2.so}
           53  ++	windows {load ../tcc04.dll}
           54  ++	unix {load ../libtcc0.4.so}
           55  + }
           56  + tcc ../pkg tcc_1
           57  + set t tcc_1
           58  +diff -uNr tcltcc-0.4.orig/demo/testtcc.tcl tcltcc-0.4-fixvers/demo/testtcc.tcl
           59  +--- tcltcc-0.4.orig/demo/testtcc.tcl	2007-11-07 10:04:20.000000000 -0600
           60  ++++ tcltcc-0.4-fixvers/demo/testtcc.tcl	2011-07-25 13:38:38.000000000 -0500
           61  +@@ -1,4 +1,4 @@
           62  +-load ../libtcc0.2.so
           63  ++load ../libtcc0.4.so
           64  + # second parameter is the path to the tcc libraries
           65  + tcc ../pkg tcc1
           66  + 
           67  +diff -uNr tcltcc-0.4.orig/tcc.tcl tcltcc-0.4-fixvers/tcc.tcl
           68  +--- tcltcc-0.4.orig/tcc.tcl	2007-11-07 10:04:42.000000000 -0600
           69  ++++ tcltcc-0.4-fixvers/tcc.tcl	2011-07-25 13:38:54.000000000 -0500
           70  +@@ -10,8 +10,8 @@
           71  + 
           72  +    set dir [file dirname [info script]]
           73  +    switch -exact -- $::tcl_platform(platform) {
           74  +-	   windows { load $dir/tcc02.dll tcc }
           75  +-	   unix { load $dir/libtcc0.2.so tcc }
           76  ++	   windows { load $dir/tcc04.dll tcc }
           77  ++	   unix { load $dir/libtcc0.4.so tcc }
           78  + 	   default {error "unsupport platform"}
           79  +    }
           80  +    set libs $dir/lib
           81  +diff -uNr tcltcc-0.4.orig/tests/tcc.test tcltcc-0.4-fixvers/tests/tcc.test
           82  +--- tcltcc-0.4.orig/tests/tcc.test	2007-11-07 10:04:20.000000000 -0600
           83  ++++ tcltcc-0.4-fixvers/tests/tcc.test	2011-07-25 13:38:45.000000000 -0500
           84  +@@ -6,8 +6,8 @@
           85  + test tcc-1 "load library" {
           86  + 	set dir [file dirname [info script]]/..
           87  + 	source $dir/pkgIndex.tcl
           88  +-	package require tcc 0.2
           89  +-} 0.2
           90  ++	package require tcc 0.4
           91  ++} 0.4
           92  + test tcc-2 "very simple command" {
           93  +     tcc $::tcc::dir tcc1
           94  +     tcc1 add_library tcl8.5