Index: mk4tcl/build.sh ================================================================== --- mk4tcl/build.sh +++ mk4tcl/build.sh @@ -15,14 +15,21 @@ SRC="src/metakit-${MK4VERS}.tar.gz" SRCURL="http://www.equi4.com/pub/mk/metakit-${MK4VERS}.tar.gz" BUILDDIR="$(pwd)/build/metakit-${MK4VERS}" OUTDIR="$(pwd)/out" INSTDIR="$(pwd)/inst" -export MK4VERS SRC SRCURL BUILDDIR OUTDIR INSTDIR +PATCHDIR="$(pwd)/patches" +export MK4VERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 + +TCL_VERSION="unknown" +if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then + source "${TCLCONFIGDIR}/tclConfig.sh" +fi +export TCL_VERSION if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null wget -O "${SRC}" "${SRCURL}" || exit 1 @@ -31,10 +38,20 @@ ( cd 'build' || exit 1 gzip -dc "../${SRC}" | tar -xf - + # Apply required patches + cd "${BUILDDIR}" || exit 1 + for patch in "${PATCHDIR}/all"/metakit-${MK4VERS}-*.diff "${PATCHDIR}/${TCL_VERSION}"/metakit-${MK4VERS}-*.diff; do + if [ ! -f "${patch}" ]; then + continue + fi + + echo "Applying: ${patch}" + patch -p1 < "${patch}" + done cd "${BUILDDIR}/unix" || exit 1 # Build static libraries for linking against Tclkit ./configure --disable-shared --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}/../generic" ${CONFIGUREEXTRA} ADDED mk4tcl/patches/all/metakit-2.4.9.7-compilewithcvs.diff Index: mk4tcl/patches/all/metakit-2.4.9.7-compilewithcvs.diff ================================================================== --- mk4tcl/patches/all/metakit-2.4.9.7-compilewithcvs.diff +++ mk4tcl/patches/all/metakit-2.4.9.7-compilewithcvs.diff @@ -0,0 +1,42 @@ +diff -uNr metakit-2.4.9.7-orig/tcl/mk4tcl.cpp metakit-2.4.9.7-rsk/tcl/mk4tcl.cpp +--- metakit-2.4.9.7-orig/tcl/mk4tcl.cpp 2007-06-18 16:05:24.000000000 -0500 ++++ metakit-2.4.9.7-rsk/tcl/mk4tcl.cpp 2010-02-21 18:30:34.000000000 -0600 +@@ -979,7 +979,7 @@ + void *tag = (&view_[0])._seq; // horrific hack to get at c4_Sequence pointer + if (objPtr->typePtr != &mkPropertyType || objPtr + ->internalRep.twoPtrValue.ptr1 != tag) { +- Tcl_ObjType *oldTypePtr = objPtr->typePtr; ++ Tcl_ObjType *oldTypePtr = (Tcl_ObjType *) objPtr->typePtr; + + char type = 'S'; + +@@ -1083,7 +1083,7 @@ + } + + if (objPtr->typePtr != &mkCursorType) { +- Tcl_ObjType *oldTypePtr = objPtr->typePtr; ++ Tcl_ObjType *oldTypePtr = (Tcl_ObjType *) objPtr->typePtr; + + const char *string = Tcl_GetStringFromObj(objPtr, 0); + +@@ -2156,7 +2156,7 @@ + _error = TCL_OK; + else if (_error == TCL_ERROR) { + char msg[100]; +- sprintf(msg, "\n (\"mk::loop\" body line %d)", interp->errorLine); ++ sprintf(msg, "\n (\"mk::loop\")"); + Tcl_AddObjErrorInfo(interp, msg, - 1); + } + break; +diff -uNr metakit-2.4.9.7-orig/tcl/mk4too.cpp metakit-2.4.9.7-rsk/tcl/mk4too.cpp +--- metakit-2.4.9.7-orig/tcl/mk4too.cpp 2007-03-09 09:58:53.000000000 -0600 ++++ metakit-2.4.9.7-rsk/tcl/mk4too.cpp 2010-02-21 18:30:38.000000000 -0600 +@@ -612,7 +612,7 @@ + _error = TCL_OK; + else if (_error == TCL_ERROR) { + char msg[100]; +- sprintf(msg, "\n (\"mk::loop\" body line %d)", interp->errorLine); ++ sprintf(msg, "\n (\"mk::loop\")"); + Tcl_AddObjErrorInfo(interp, msg, - 1); + } + break;