Index: server/buildpkgs/tls/build.sh ================================================================== --- server/buildpkgs/tls/build.sh +++ server/buildpkgs/tls/build.sh @@ -23,18 +23,57 @@ # Apply appropriate patches apply_patches ( cd "build/${BUILDDIR}" || exit 1 + + if [ -z "${SSLDIR}" ]; then + ( + case "${PLATFORM}" in + solaris*-ix86) + opensslplatform='solaris-x86-gcc' + ;; + solaris*-x86_64) + opensslplatform='solaris64-x86_64-gcc' + ;; + solaris*-sparc) + opensslplatform='solaris-sparcv9-gcc' + ;; + solaris*-sparc64) + opensslplatform='solaris64-sparcv9-gcc' + ;; + esac + + if [ -z "${opensslplatform}" ]; then + exit 0 + fi + + wget 'http://www.openssl.org/source/openssl-1.0.0e.tar.gz' + gzip -dc openssl-1.0.0e.tar.gz | tar -xf - + cd openssl-1.0.0e + + ./Configure no-shared --prefix=$(pwd)/INST "${opensslplatform}" + + ${MAKE:-make} || exit 1 + ${MAKE:-make} install || exit 1 + ) + + for chkssldir in "$(pwd)/openssl-1.0.0e/INST"; do + if [ -d "${chkssldir}/lib" ]; then + SSLDIR="${chkssldir}" + fi + done + fi if [ -z "${SSLDIR}" ]; then 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 fi + if [ -z "${SSLDIR}" ]; then SSLDIR="/usr" fi bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --with-ssl-dir="${SSLDIR}" ${CONFIGUREEXTRA}