Index: server/buildpkgs/build_all.sh ================================================================== --- server/buildpkgs/build_all.sh +++ server/buildpkgs/build_all.sh @@ -34,11 +34,11 @@ if [ "${CLEANONLY}" = "0" ]; then PROJROOTDIR="$(pwd)" export PROJROOTDIR - for TCLVERS in 8.5.9 8.4.19; do + for TCLVERS in 8.5.10 8.4.19; do TCLSHORTVERS="$(echo "${TCLVERS}" | cut -f 1-2 -d '.')" TCLPRIVATE="$(pwd)/tcl/build/tcl${TCLVERS}" TCLINSTDIR="$(pwd)/tcl/inst-${TCLSHORTVERS}" export TCLVERS TCLPRIVATE TCLINSTDIR @@ -47,10 +47,13 @@ continue fi mkdir tcl tcl/build >/dev/null 2>/dev/null + + # Clean this up so that other platforms don't use it + rm -f "${PROJROOTDIR}/platform.magic.dir" if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then mkdir tcl/src >/dev/null 2>/dev/null wget -o /dev/null -O "tcl/src/tcl${TCLVERS}.tar.gz" "http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz" fi @@ -59,25 +62,41 @@ ( mkdir tcl/build >/dev/null 2>/dev/null cd tcl/build || exit 1 gzip -dc "../src/tcl${TCLVERS}.tar.gz" | tar -xf - - # DDE and Reg can fail to compile, but we don't care + # Source fix-ups + ## DDE and Reg can fail to compile, but we don't care echo '' > "${TCLPRIVATE}/win/tclWinDde.c" echo '' > "${TCLPRIVATE}/win/tclWinReg.c" + ## Long-standing bug in Tcl + echo '#undef strtod' > "${TCLPRIVATE}/compat/strtod.c.new" + cat "${TCLPRIVATE}/compat/strtod.c" >> "${TCLPRIVATE}/compat/strtod.c.new" + cat "${TCLPRIVATE}/compat/strtod.c.new" > "${TCLPRIVATE}/compat/strtod.c" + rm -f "${TCLPRIVATE}/compat/strtod.c.new" + for dir in unix win macosx; do cd "${TCLPRIVATE}/${dir}" || exit 1 echo " Executing: ./configure --enable-threads ${CONFIGUREEXTRA} --prefix=\"${TCLINSTDIR}\"" ./configure --enable-threads ${CONFIGUREEXTRA} --prefix="${TCLINSTDIR}" echo " Executing: ${MAKE:-make}" - ${MAKE:-make} || continue + ${MAKE:-make} || ( + rm -f tclConfig.sh + + exit 1 + ) || continue + + ## Kludge to make Tcl install when cross-compiling. + sed 's@^${TCL_EXE}@blah@' Makefile > Makefile.new + cat Makefile.new > Makefile + rm -f Makefile.new echo " Executing: ${MAKE:-make} install" - ${MAKE:-make} install || break + ${MAKE:-make} install TCL_EXE="../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE:-tclsh}")" || break LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" LD_RUN_PATH=".:${LD_RUN_PATH}" export LD_LIBRARY_PATH LD_RUN_PATH @@ -100,12 +119,18 @@ exit 1 ) || exit 1 ( + rm -f "${PROJROOTDIR}/platform.magic.env-${TCLSHORTVERS}" + TCLBUILDDIR="$(cat "${PROJROOTDIR}/platform.magic.dir")" export TCLBUILDDIR + + if [ -z "${TCLBUILDDIR}" ]; then + TCLBUILDDIR="/dev/null" + fi if [ -d "${TCLINSTDIR}" -a -f "${TCLINSTDIR}/lib/tclConfig.sh" ]; then TCLCONFIGDIR="${TCLINSTDIR}/lib" elif [ -d "${TCLBUILDDIR}" -a -f "${TCLBUILDDIR}/tclConfig.sh" ]; then TCLCONFIGDIR="${TCLBUILDDIR}"