Index: .fossil-settings/ignore-glob ================================================================== --- .fossil-settings/ignore-glob +++ .fossil-settings/ignore-glob @@ -40,13 +40,19 @@ server/buildpkgs/tclpkcs11/out/* server/buildpkgs/tclpkcs11/src server/buildpkgs/tclpkcs11/src/* server/buildpkgs/tclpkgs-*.tar.* server/buildpkgs/tclpkgs-*.tar.*/* +server/buildpkgs/tclreadline/build +server/buildpkgs/tclreadline/build/* +server/buildpkgs/tclreadline/out +server/buildpkgs/tclreadline/out/* +server/buildpkgs/tclreadline/src +server/buildpkgs/tclreadline/src/* server/buildpkgs/tls/build server/buildpkgs/tls/build/* server/buildpkgs/tls/out server/buildpkgs/tls/out/* server/buildpkgs/tls/src server/buildpkgs/tls/src/* server/pkgs server/pkgs/* Index: server/buildpkgs/build_all.sh ================================================================== --- server/buildpkgs/build_all.sh +++ server/buildpkgs/build_all.sh @@ -21,13 +21,15 @@ CONFIGUREEXTRA="$@" export CONFIGUREEXTRA # Determine path to "tclConfig.sh" -rm -rf tcl/build tcl/inst-* -rm -f platform.magic.* rm -rf */out +if [ "${CLEANONLY}" = "1" ]; then + rm -rf tcl/build tcl/inst-* + rm -f platform.magic.* +fi if [ "${DISTCLEAN}" = "1" ]; then rm -rf tcl fi if [ "${CLEANONLY}" = "0" ]; then @@ -37,10 +39,16 @@ for TCLVERS in 8.5.9 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 + + if [ -f "${TCLINSTDIR}/lib/tclConfig.sh" ]; then + echo "Skipping build of Tcl ${TCLVERS} (already found)" + + continue + fi mkdir tcl tcl/build >/dev/null 2>/dev/null if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then mkdir tcl/src >/dev/null 2>/dev/null @@ -182,13 +190,10 @@ faileddirs="${faileddirs} ${dir}" echo "Failed to build ${dir}" fi done -# Clean magic-related files -rm -f platform.magic.* - # Cleanup is done at this point if [ "${CLEANONLY}" = "1" ]; then exit 0 fi ADDED server/buildpkgs/tclreadline/build.sh Index: server/buildpkgs/tclreadline/build.sh ================================================================== --- server/buildpkgs/tclreadline/build.sh +++ server/buildpkgs/tclreadline/build.sh @@ -0,0 +1,75 @@ +#! /bin/bash + +# Define parameters +VERS=2.1.0 +SRC="src/tclreadline-${VERS}.tar.gz" +SRCURL="http://downloads.sourceforge.net/project/tclreadline/tclreadline/tclreadline-${VERS}/tclreadline-${VERS}.tar.gz" +BUILDDIR="tclreadline-${VERS}" +export VERS SRC SRCURL BUILDDIR + +# Load common functions +source ../common.sh + +# Do not build if the "tcl" platform has been requested +not_platforms 'tcl' + +# Download source +download_src + +# Build package +( + rm -rf build + mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null + mkdir build + + cd build/ || exit 1 + + gzip -dc "../${SRC}" | tar -xf - + cd "${BUILDDIR}" || exit 1 + + # The configure script that comes with TclReadLine is out-of-date + autoreconf -fvi + + # TclReadLine doesn't know it should use stubs, force it. + CFLAGS="${CFLAGS} -DUSE_TCL_STUBS=1" + CPPFLAGS="${CPPFLAGS} -DUSE_TCL_STUBS=1" + LDFLAGS="${LDFLAGS} $(source "${TCLCONFIGDIR}/tclConfig.sh" 2>/dev/null; eval echo "${TCL_STUB_LIB_SPEC}")" + export CFLAGS CPPFLAGS LDFLAGS + + bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --prefix="${PLATDIR}" --libdir="${PLATDIR}" --bindir="${PLATDIR}" ${CONFIGUREEXTRA} + + ${MAKE:-make} || exit 1 + + ${MAKE:-make} install || exit 1 + +) || exit 1 + +# Re-write installation to match expectations +( + cd "${PLATDIR}" || exit 1 + + mv lib/tclreadline*/* . + rm *.a *.la + + rm -rf lib/ + rm -rf include/ + rm -rf share/ + + # Delete symlink + rm -f libtclreadline.so + + # Rename actual file to symlink + mv libtclreadline-*.so libtclreadline.so + + # Correct Tcl script + sed 's@ /.*/tclreadline/out/[^/]*/lib@ [file dirname [info script]]@' tclreadlineInit.tcl > tclreadlineInit.tcl.new + mv tclreadlineInit.tcl.new tclreadlineInit.tcl + + exit 0 +) || exit 1 + + +# Create metadata +../create_teapot "${PLATDIR}/teapot.txt" "tclreadline" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Readline package for Tcl" + +exit 0