Diff

Differences From Artifact [e3041e7b51]:

To Artifact [1f7d939eb1]:


     6      6   	exit 1
     7      7   fi
     8      8   if [ -z "${TCLVERS}" ]; then
     9      9   	echo 'ERROR: The TCLVERS environment variable is not set' >&2
    10     10   
    11     11   	exit 1
    12     12   fi
           13  +
           14  +case "${TCLVERS}" in
           15  +	*:*)
           16  +		TCLVERS_CLEAN="$(echo "${TCLVERS}" | sed 's@:@_@g')"
           17  +		;;
           18  +	*)
           19  +		TCLVERS_CLEAN="${TCLVERS}"
           20  +		;;
           21  +esac
    13     22   
    14     23   SRC="src/tcl${TCLVERS}.tar.gz"
    15     24   SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
    16     25   SRCHASH='-'
    17         -BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
           26  +BUILDDIR="$(pwd)/build/tcl${TCLVERS_CLEAN}"
    18     27   OUTDIR="$(pwd)/out"
    19     28   INSTDIR="$(pwd)/inst"
    20     29   PATCHSCRIPTDIR="$(pwd)/patchscripts"
    21     30   PATCHDIR="$(pwd)/patches"
    22     31   export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR
    23     32   
    24     33   case "${TCLVERS}" in
................................................................................
    76     85   
    77     86   			mkdir "${workdir}" || exit 1
    78     87   			cd "${workdir}" || exit 1
    79     88   
    80     89   			# Handle Tcl first, since it will be used to base other packages on
    81     90   			download "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" "tmp-tcl.tar.gz" - || rm -f 'tmp-tcl.tar.gz'
    82     91   			gzip -dc 'tmp-tcl.tar.gz' | tar -xf -
    83         -			mv "tcl-fossil" "tcl${TCLVERS}"
           92  +			mv "tcl-fossil" "tcl${TCLVERS_CLEAN}"
    84     93   
    85     94   			# Determine date of this Tcl release and use that date for all other dependent packages
    86     95   			## Unless the release we are talking about is "trunk", in which case we use that everywhere
    87     96   			if [ "${FOSSILTAG}" = "trunk" ]; then
    88     97   				FOSSILDATE="${FOSSILTAG}"
    89     98   			else
    90         -				FOSSILDATE="$(echo 'cd "tcl'"${TCLVERS}"'"; set file [lindex [glob *] 0]; file stat $file finfo; set date $finfo(mtime); set date [expr {$date + 1}]; puts [clock format $date -format {%Y-%m-%dT%H:%M:%S}]' | TZ='UTC' "${TCLSH_NATIVE}")"
           99  +				FOSSILDATE="$(echo 'cd "tcl'"${TCLVERS_CLEAN}"'"; set file [lindex [glob *] 0]; file stat $file finfo; set date $finfo(mtime); set date [expr {$date + 1}]; puts [clock format $date -format {%Y-%m-%dT%H:%M:%S}]' | TZ='UTC' "${TCLSH_NATIVE}")"
    91    100   			fi
    92    101   
    93    102   			## If we are unable to determine the modification date, fall-back to the tag and hope for the best
    94    103   			if [ -z "${FOSSILDATE}" ]; then
    95    104   				FOSSILDATE="${FOSSILTAG}"
    96    105   			fi
    97    106   
................................................................................
   113    122   				download "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" "tmp-sqlite3.tar.gz" - || rm -f "tmp-sqlite3.tar.gz"
   114    123   			fi
   115    124   
   116    125   			gzip -dc "tmp-itcl.tar.gz" | tar -xf -
   117    126   			gzip -dc "tmp-thread.tar.gz" | tar -xf -
   118    127   			gzip -dc "tmp-tclconfig.tar.gz" | tar -xf -
   119    128   
   120         -			mkdir -p "tcl${TCLVERS}/pkgs/" >/dev/null 2>/dev/null
   121         -			mv "itcl-fossil" "tcl${TCLVERS}/pkgs/itcl"
   122         -			mv "thread-fossil" "tcl${TCLVERS}/pkgs/thread"
   123         -			cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/itcl/tclconfig"
   124         -			cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/thread/tclconfig"
   125         -			mv "tclconfig-fossil" "tcl${TCLVERS}/tclconfig"
          129  +			mkdir -p "tcl${TCLVERS_CLEAN}/pkgs/" >/dev/null 2>/dev/null
          130  +			mv "itcl-fossil" "tcl${TCLVERS_CLEAN}/pkgs/itcl"
          131  +			mv "thread-fossil" "tcl${TCLVERS_CLEAN}/pkgs/thread"
          132  +			cp -r "tclconfig-fossil" "tcl${TCLVERS_CLEAN}/pkgs/itcl/tclconfig"
          133  +			cp -r "tclconfig-fossil" "tcl${TCLVERS_CLEAN}/pkgs/thread/tclconfig"
          134  +			mv "tclconfig-fossil" "tcl${TCLVERS_CLEAN}/tclconfig"
   126    135   
   127    136   			if [ "${_USE_TDBC}" = '1' ]; then
   128    137   				gzip -dc "tmp-tdbc.tar.gz" | tar -xf -
   129         -				mv "tdbc-fossil/tdbc" "tcl${TCLVERS}/pkgs/tdbc"
   130         -				mv "tdbc-fossil/tdbcsqlite3" "tcl${TCLVERS}/pkgs/tdbcsqlite3"
          138  +				mv "tdbc-fossil/tdbc" "tcl${TCLVERS_CLEAN}/pkgs/tdbc"
          139  +				mv "tdbc-fossil/tdbcsqlite3" "tcl${TCLVERS_CLEAN}/pkgs/tdbcsqlite3"
   131    140   			fi
   132    141   
   133    142   			if [ "${_USE_SQLITE}" = '1' ]; then
   134    143   				gzip -dc "tmp-sqlite3.tar.gz" | tar -xf -
   135    144   
   136    145   				mv "sqlite-autoconf-${SQLITEVERS}" sqlite-fossil
   137    146   				(
................................................................................
   148    157   					mv tea/* .
   149    158   					rmdir tea
   150    159   
   151    160   					sed 's@\.\./\.\./sqlite3\.c@./sqlite3.c@' generic/tclsqlite3.c > generic/tclsqlite3.c.new
   152    161   					cat generic/tclsqlite3.c.new > generic/tclsqlite3.c
   153    162   					rm -f generic/tclsqlite3.c.new
   154    163   				)
   155         -				mv sqlite-fossil "tcl${TCLVERS}/pkgs/sqlite3" >/dev/null 2>/dev/null
          164  +				mv sqlite-fossil "tcl${TCLVERS_CLEAN}/pkgs/sqlite3" >/dev/null 2>/dev/null
   156    165   			fi
   157    166   
   158         -			tar -cf - "tcl${TCLVERS}" | gzip -c > "../../${SRC}"
          167  +			tar -cf - "tcl${TCLVERS_CLEAN}" | gzip -c > "../../${SRC}"
   159    168   			echo "${FOSSILDATE}" > "../../${SRC}.date"
   160    169   
   161    170   			cd ..
   162    171   
   163    172   			rm -rf "${workdir}"
   164    173   		) || exit 1
   165    174   	else