Index: server/work/Makefile ================================================================== --- server/work/Makefile +++ server/work/Makefile @@ -15,7 +15,8 @@ done clean: rm -f tclpkgs-*.tar.* rm -rf tclpkgs-src-current + ./build_all.sh clean .PHONY: all clean Index: server/work/build_all.sh ================================================================== --- server/work/build_all.sh +++ server/work/build_all.sh @@ -14,10 +14,28 @@ if [ "$1" = "distclean" ]; then CLEANONLY=1 DISTCLEAN=1 fi export CLEANONLY DISTCLEAN + +# Determine path to "tclConfig.sh" +TCLCONFIGDIR=$( + ( + echo "${LD_LIBRARY_PATH}" | tr ':' "\n" + cat /etc/ld.so.conf 2>/dev/null + crle 2>/dev/null | grep '^ *Default Library Path' | sed 's@^ *Default Library Path[^:]*:[^:]*/@/@' | tr ':' "\n" + ) | grep '^/' | while read chklibdir; do + if [ -f "${chklibdir}/tclConfig.sh" ]; then + echo "${chklibdir}" + break + fi + done +) +if [ -z "${TCLCONFIGDIR}" ]; then + TCLCONFIGDIR="/usr/lib" +fi +export TCLCONFIGDIR # Build all appropriate directories faileddirs="" for dir in */; do export dir @@ -45,10 +63,15 @@ if [ "${failed}" = "1" ]; then rm -rf "${dir}/out" faileddirs="${faileddirs} ${dir}" fi done + +# Cleanup is done at this point +if [ "${CLEANONLY}" = "1" ]; then + exit 0 +fi # Let the user know what failed to build if [ -n "${faileddirs}" ]; then echo "The following failed to build:${failddirs}" fi Index: server/work/tls/build.sh ================================================================== --- server/work/tls/build.sh +++ server/work/tls/build.sh @@ -25,19 +25,24 @@ ( rm -rf build mkdir build cd build/ || exit 1 - tar -zxf "../${SRC}" + gzip -dc "../${SRC}" | tar -xf - cd "${BUILDDIR}" || exit 1 - mkdir "${WORKDIR}" - - ./configure --enable-shared --prefix="${WORKDIR}" - gmake || exit 1 + for chkssldir in $(pkg-config openssl --cflags | sed 's@ *-I *@|@g' | tr '|' "\n" | grep '^/'); do + if [ -f "${chkssldir}/openssl/opensslv.h" -o -f "${chkssldir}/opensslv.h" ]; then + SSLDIR=$(echo "${chkssldir}" | sed 's@/[^/]*/*$@@') + fi + done + if [ -z "${SSLDIR}" ]; then + SSLDIR="/usr" + fi - rm -rf "${WORKDIR}" + ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --with-ssl-dir="${SSLDIR}" + gmake || exit 1 ) || exit 1 ( rm -rf "${PLATDIR}" mkdir -p "${PLATDIR}"