Index: kitcreator ================================================================== --- kitcreator +++ kitcreator @@ -139,11 +139,12 @@ fi case "${pkg}" in tcl) TCLCONFIGDIR=$(find "$(pwd)/tcl/build" -name tclConfig.sh | head -1 | sed 's@/[^/]*$@@') - export TCLCONFIGDIR + TCLCONFIGDIRTAIL="$(basename "${TCLCONFIGDIR}")" + export TCLCONFIGDIR TCLCONFIGDIRTAIL ;; esac if [ "${failed}" = "1" ]; then buildfailed="1" Index: tcl/build.sh ================================================================== --- tcl/build.sh +++ tcl/build.sh @@ -147,11 +147,20 @@ . "${patchscript}" ) fi done - for dir in unix win macosx __fail__; do + tryfirstdir='' + if [ "$(uname -s)" = "Darwin" ]; then + tryfirstdir='macosx' + fi + + for dir in "${tryfirstdir}" unix win macosx __fail__; do + if [ -z "${dir}" ]; then + continue + fi + if [ "${dir}" = "__fail__" ]; then # If we haven't figured out how to build it, reject. exit 1 fi Index: tk/build.sh ================================================================== --- tk/build.sh +++ tk/build.sh @@ -125,11 +125,15 @@ . "${patchscript}" ) fi done - for dir in unix win macosx win64 __fail__; do + for dir in "${TCLCONFIGDIRTAIL}" unix win macosx win64 __fail__; do + if [ -z "${dir}" ]; then + continue + fi + if [ "${dir}" = "__fail__" ]; then exit 1 fi # Windows/amd64 workarounds