Differences From
Artifact [c5ef63a316]:
9 9 echo 'ERROR: The TCLVERS environment variable is not set' >&2
10 10
11 11 exit 1
12 12 fi
13 13
14 14 SRC="src/tcl${TCLVERS}.tar.gz"
15 15 SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
16 +SRCHASH='-'
16 17 BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
17 18 OUTDIR="$(pwd)/out"
18 19 INSTDIR="$(pwd)/inst"
19 20 PATCHSCRIPTDIR="$(pwd)/patchscripts"
20 21 PATCHDIR="$(pwd)/patches"
21 22 export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR
23 +
24 +case "${TCLVERS}" in
25 + 8.6.4)
26 + SRCHASH='9e6ed94c981c1d0c5f5fefb8112d06c6bf4d050a7327e95e71d417c416519c8d'
27 + ;;
28 +esac
22 29
23 30 # Set configure options for this sub-project
24 31 LDFLAGS="${LDFLAGS} ${KC_TCL_LDFLAGS}"
25 32 CFLAGS="${CFLAGS} ${KC_TCL_CFLAGS}"
26 33 CPPFLAGS="${CPPFLAGS} ${KC_TCL_CPPFLAGS}"
27 34 LIBS="${LIBS} ${KC_TCL_LIBS}"
28 35 export LDFLAGS CFLAGS CPPFLAGS LIBS
................................................................................
61 68 workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}"
62 69 rm -rf "${workdir}"
63 70
64 71 mkdir "${workdir}" || exit 1
65 72 cd "${workdir}" || exit 1
66 73
67 74 # Handle Tcl first, since it will be used to base other packages on
68 - wget -O "tmp-tcl.tar.gz" "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-tcl.tar.gz'
75 + download "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" "tmp-tcl.tar.gz" - || rm -f 'tmp-tcl.tar.gz'
69 76 gzip -dc 'tmp-tcl.tar.gz' | tar -xf -
70 77 mv "tcl-fossil" "tcl${TCLVERS}"
71 78
72 79 # Determine date of this Tcl release and use that date for all other dependent packages
73 80 ## Unless the release we are talking about is "trunk", in which case we use that everywhere
74 81 if [ "${FOSSILTAG}" = "trunk" ]; then
75 82 FOSSILDATE="${FOSSILTAG}"
................................................................................
79 86
80 87 ## If we are unable to determine the modification date, fall-back to the tag and hope for the best
81 88 if [ -z "${FOSSILDATE}" ]; then
82 89 FOSSILDATE="${FOSSILTAG}"
83 90 fi
84 91
85 92 # Handle other packages
86 - wget -O "tmp-itcl.tar.gz" "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-itcl.tar.gz'
87 - wget -O "tmp-thread.tar.gz" "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-thread.tar.gz"
88 - wget -O "tmp-tclconfig.tar.gz" "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tclconfig.tar.gz"
93 + download "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-itcl.tar.gz" - || rm -f 'tmp-itcl.tar.gz'
94 + download "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-thread.tar.gz" - || rm -f "tmp-thread.tar.gz"
95 + download "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tclconfig.tar.gz" - || rm -f "tmp-tclconfig.tar.gz"
89 96 if [ "${FOSSILDATE}" = "trunk" ] || [ "$(echo "${FOSSILDATE}" | cut -f 1 -d '-')" -ge '2012' ]; then
90 97 _USE_TDBC='1'
91 98 _USE_SQLITE='1'
92 99 SQLITEVERS='3071401'
93 100 fi
94 101
95 102 if [ "${_USE_TDBC}" = '1' ]; then
96 - wget -O "tmp-tdbc.tar.gz" "http://core.tcl.tk/tdbc/tarball/tdbc-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tdbc.tar.gz"
103 + download "http://core.tcl.tk/tdbc/tarball/tdbc-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tdbc.tar.gz" - || rm -f "tmp-tdbc.tar.gz"
97 104 fi
98 105
99 106 if [ "${_USE_SQLITE}" = '1' ]; then
100 - wget -O "tmp-sqlite3.tar.gz" "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" || rm -f "tmp-sqlite3.tar.gz"
107 + download "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" "tmp-sqlite3.tar.gz" - || rm -f "tmp-sqlite3.tar.gz"
101 108 fi
102 109
103 110 gzip -dc "tmp-itcl.tar.gz" | tar -xf -
104 111 gzip -dc "tmp-thread.tar.gz" | tar -xf -
105 112 gzip -dc "tmp-tclconfig.tar.gz" | tar -xf -
106 113
107 114 mkdir -p "tcl${TCLVERS}/pkgs/" >/dev/null 2>/dev/null
................................................................................
147 154
148 155 cd ..
149 156
150 157 rm -rf "${workdir}"
151 158 ) || exit 1
152 159 else
153 160 if [ ! -d 'buildsrc' ]; then
154 - rm -f "${SRC}.tmp"
155 - wget -O "${SRC}.tmp" "${SRCURL}" || (
161 + download "${SRCURL}" "${SRC}" "${SRCHASH}" || (
156 162 echo ' Unable to download source code for Tcl.' >&4
157 - echo " Attempted to run: wget -O \"${SRC}.tmp\" \"${SRCURL}\"" >&4
158 - echo " Got:"
159 - wget -O "${SRC}.tmp" "${SRCURL}" 2>&1 | sed 's@^@ @' >&4
160 -
161 163 echo ' Aborting Tcl -- further packages will likely also fail.' >&4
162 164
163 165 exit 1
164 166 ) || exit 1
165 - mv "${SRC}.tmp" "${SRC}"
166 167 fi
167 168 fi
168 169 fi
169 170
170 171 (
171 172 cd 'build' || exit 1
172 173