Index: server/buildpkgs/Tclx/build.sh ================================================================== --- server/buildpkgs/Tclx/build.sh +++ server/buildpkgs/Tclx/build.sh @@ -14,19 +14,41 @@ PLATFORM="$(../platform)" PLATDIR="$(pwd)/out/${PLATFORM}" export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR +( + rm -rf build + mkdir build +) || exit 1 + if [ ! -f "${SRC}" ]; then mkdir src >/dev/null 2>/dev/null wget -O "${SRC}" "${SRCURL}" || exit 1 fi + +TCLPRIVATE="${TCLCONFIGDIR}/../include/tcl-private" +if [ ! -d "${TCLPRIVATE}" ]; then + if [ ! -f src/tcl8.4.19.tar.gz ]; then + wget -O src/tcl8.4.19.tar.gz http://prdownloads.sourceforge.net/tcl/tcl8.4.19-src.tar.gz + fi + + ( + mkdir build >/dev/null 2>/dev/null + cd build || exit 1 + gzip -dc ../src/tcl8.4.19.tar.gz | tar -xf - + ) + + TCLPRIVATE="$(pwd)/build/tcl8.4.19" +fi +echo "TCLPRIVATE = \"${TCLPRIVATE}\"" +CFLAGS="${CFLAGS} -I${TCLPRIVATE} -I${TCLPRIVATE}/generic -I${TCLPRIVATE}/unix" +export CFLAGS + ( - rm -rf build - mkdir build cd build/ || exit 1 bzip2 -dc "../${SRC}" | tar -xf - cd "${BUILDDIR}" || exit 1 @@ -75,18 +97,10 @@ if ((objc < 2) || (objc > 3)) { return TclX_WrongArgs (interp, objv [0], __EOF__ - - TCLPRIVATE="${TCLCONFIGDIR}/../include/tcl-private" - echo "TCLPRIVATE = \"${TCLPRIVATE}\"" - if [ -d "${TCLPRIVATE}" ]; then - CFLAGS="${CFLAGS} -I${TCLPRIVATE} -I${TCLPRIVATE}/generic -I${TCLPRIVATE}/unix" - export CFLAGS - fi - bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --libdir="${PLATDIR}" ${MAKE:-make} || exit 1 mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null