Diff

Differences From Artifact [f85e1724d4]:

To Artifact [f8ef582bfc]:


    47     47   
    48     48   			workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}"
    49     49   			rm -rf "${workdir}"
    50     50   
    51     51   			mkdir "${workdir}" || exit 1
    52     52   			cd "${workdir}" || exit 1
    53     53   
           54  +			# Handle Tcl first, since it will be used to base other packages on
    54     55   			wget -O "tmp-tcl.tar.gz" "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-tcl.tar.gz'
    55         -			wget -O "tmp-itcl.tar.gz" "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-itcl.tar.gz'
    56         -			wget -O "tmp-thread.tar.gz" "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f "tmp-thread.tar.gz"
    57         -			wget -O "tmp-tclconfig.tar.gz" "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f "tmp-tclconfig.tar.gz"
    58         -
    59     56   			gzip -dc 'tmp-tcl.tar.gz' | tar -xf -
           57  +			mv "tcl-fossil" "tcl${TCLVERS}"
           58  +
           59  +			# Determine date of this Tcl release and use that date for all other dependent packages
           60  +			## Unless the release we are talking about is "trunk", in which case we use that everywhere
           61  +			if [ "${FOSSILTAG}" = "trunk" ]; then
           62  +				FOSSILDATE="${FOSSILTAG}"
           63  +			else
           64  +				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}")"
           65  +			fi
           66  +
           67  +			## If we are unable to determine the modification date, fall-back to the tag and hope for the best
           68  +			if [ -z "${FOSSILDATE}" ]; then
           69  +				FOSSILDATE="${FOSSILTAG}"
           70  +			fi
           71  +
           72  +			# Handle other packages
           73  +			wget -O "tmp-itcl.tar.gz" "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-itcl.tar.gz'
           74  +			wget -O "tmp-thread.tar.gz" "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-thread.tar.gz"
           75  +			wget -O "tmp-tclconfig.tar.gz" "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tclconfig.tar.gz"
           76  +
    60     77   			gzip -dc "tmp-itcl.tar.gz" | tar -xf -
    61     78   			gzip -dc "tmp-thread.tar.gz" | tar -xf -
    62     79   			gzip -dc "tmp-tclconfig.tar.gz" | tar -xf -
    63     80   
    64         -			mv "tcl-fossil" "tcl${TCLVERS}"
           81  +			mkdir -p "tcl${TCLVERS}/pkgs/" >/dev/null 2>/dev/null
    65     82   			mv "itcl-fossil" "tcl${TCLVERS}/pkgs/itcl"
    66     83   			mv "thread-fossil" "tcl${TCLVERS}/pkgs/thread"
    67     84   			cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/itcl/tclconfig"
    68     85   			cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/thread/tclconfig"
    69     86   			mv "tclconfig-fossil" "tcl${TCLVERS}/tclconfig"
    70     87   
    71     88   			tar -cf - "tcl${TCLVERS}" | gzip -c > "../../${SRC}"
           89  +			echo "${FOSSILDATE}" > "../../${SRC}.date"
    72     90   
    73     91   			cd ..
    74     92   
    75     93   			rm -rf "${workdir}"
    76     94   		) || exit 1
    77     95   	else
    78     96   		rm -f "${SRC}.tmp"
................................................................................
   133    151   		${MAKE:-make} || continue
   134    152   
   135    153   		echo "Running: ${MAKE:-make} install"
   136    154   		${MAKE:-make} install || (
   137    155   			# Work with Tcl 8.6.x's TCLSH_NATIVE solution for
   138    156   			# cross-compile installs
   139    157   
   140         -			echo "Running: ${MAKE:-make} install TCLSH_NATIVE=\"${TCLKIT:-tclkit}\""
   141         -			${MAKE:-make} install TCLSH_NATIVE="${TCLKIT:-tclkit}"
          158  +			echo "Running: ${MAKE:-make} install TCLSH_NATIVE=\"${TCLSH_NATIVE}\""
          159  +			${MAKE:-make} install TCLSH_NATIVE="${TCLSH_NATIVE}"
   142    160   		) || (
   143    161   			# Make install can fail if cross-compiling using Tcl 8.5.x
   144    162   			# because the Makefile calls "$(TCLSH)".  We can't simply
   145    163   			# redefine TCLSH because it also uses TCLSH as a build target
   146    164   			sed 's@^$(TCLSH)@blah@' Makefile > Makefile.new
   147    165   			cat Makefile.new > Makefile
   148    166   			rm -f Makefile.new
   149    167   
   150         -			echo "Running: ${MAKE:-make} install TCLSH=\"../../../../../../../../../../../../../../../../../$(which "${TCLKIT:-tclkit}")\""
   151         -			${MAKE:-make} install TCLSH="../../../../../../../../../../../../../../../../../$(which "${TCLKIT:-tclkit}")"
          168  +			echo "Running: ${MAKE:-make} install TCLSH=\"../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE}")\""
          169  +			${MAKE:-make} install TCLSH="../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE}")"
   152    170   		) || (
   153    171   			# Make install can fail if cross-compiling using Tcl 8.5.9
   154    172   			# because the Makefile calls "${TCL_EXE}".  We can't simply
   155    173   			# redefine TCL_EXE because it also uses TCL_EXE as a build target
   156    174   			sed 's@^${TCL_EXE}@blah@' Makefile > Makefile.new
   157    175   			cat Makefile.new > Makefile
   158    176   			rm -f Makefile.new
   159    177   
   160         -			echo "Running: ${MAKE:-make} install TCL_EXE=\"../../../../../../../../../../../../../../../../../$(which "${TCLKIT:-tclkit}")\""
   161         -			${MAKE:-make} install TCL_EXE="../../../../../../../../../../../../../../../../../$(which "${TCLKIT:-tclkit}")"
          178  +			echo "Running: ${MAKE:-make} install TCL_EXE=\"../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE}")\""
          179  +			${MAKE:-make} install TCL_EXE="../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE}")"
   162    180   		) || exit 1
   163    181   
   164    182   		mkdir "${OUTDIR}/lib" || exit 1
   165    183   		cp -r "${INSTDIR}/lib"/* "${OUTDIR}/lib/"
   166    184   		rm -rf "${OUTDIR}/lib/pkgconfig"
   167    185   		rm -f "${OUTDIR}"/lib/* >/dev/null 2>/dev/null
   168    186   		find "${OUTDIR}" -name '*.a' | xargs rm -f >/dev/null 2>/dev/null