Index: server/buildpkgs/tclreadline/build.sh ================================================================== --- server/buildpkgs/tclreadline/build.sh +++ server/buildpkgs/tclreadline/build.sh @@ -31,11 +31,44 @@ 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}" --with-tcl-includes="${TCLINSTDIR}/include" --prefix="${PLATDIR}" --libdir="${PLATDIR}" --bindir="${PLATDIR}" ${CONFIGUREEXTRA} + need_gnu_readline='0' + case "${PLATFORM}" in + solaris2*) + need_gnu_readline='1' + ;; + esac + + if [ "${need_gnu_readline}" = '1' ]; then + wget 'http://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz' + gzip -dc readline-6.2.tar.gz | tar -xf - + + ( + cd readline-6.2 + mkdir INST INST/lib INST/include + + ./configure --prefix=$(pwd)/INST --disable-shared --enable-static ${CONFIGUREEXTRA} + + ${MAKE:-make} || exit 1 + ${MAKE:-make} install || exit 1 + ) + + if [ -d "$(pwd)/readline-6.2/INST/include" ]; then + ln -s . "$(pwd)/readline-6.2/INST/include/readline/readline" + + CONFIGUREEXTRA="${CONFIGUREEXTRA} --with-readline-includes=\"$(pwd)/readline-6.2/INST/include/readline\" --with-readline-library=\"-L$(pwd)/readline-6.2/INST/lib -lreadline\"" + fi + fi + + sed 's|@TCLRL_LIBDIR@|[file dirname [info script]]|g' tclreadlineInit.tcl.in > tclreadlineInit.tcl.in.new + cat tclreadlineInit.tcl.in.new > tclreadlineInit.tcl.in + rm -f tclreadlineInit.tcl.in.new + + echo " * Running ./configure --enable-shared --with-tcl=\"${TCLCONFIGDIR}\" --with-tcl-includes=\"${TCLINSTDIR}/include\" --prefix=\"${PLATDIR}\" --libdir=\"${PLATDIR}\" --bindir=\"${PLATDIR}\" ${CONFIGUREEXTRA}" + eval "bash ./configure --enable-shared --with-tcl=\"${TCLCONFIGDIR}\" --with-tcl-includes=\"${TCLINSTDIR}/include\" --prefix=\"${PLATDIR}\" --libdir=\"${PLATDIR}\" --bindir=\"${PLATDIR}\"" "${CONFIGUREEXTRA}" ${MAKE:-make} || exit 1 ${MAKE:-make} install || exit 1