Overview
Comment: | Updated TLS package to use new simplified build system, requiring further refinement as well |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
79bd6dfe5157169bf5e1cb95aaaa50aa |
User & Date: | rkeene on 2016-09-06 05:18:25 |
Other Links: | manifest | tags |
Context
2016-09-06
| ||
05:28 | Added support for applying patches to new build system check-in: b949baf854 user: rkeene tags: trunk | |
05:18 | Updated TLS package to use new simplified build system, requiring further refinement as well check-in: 79bd6dfe51 user: rkeene tags: trunk | |
04:43 | Upgraded to latest version of tcllib check-in: 5ccf6eac7a user: rkeene tags: trunk | |
Changes
Modified common/common.sh from [7543705ff9] to [dbcc3cc417].
︙ | ︙ | |||
211 212 213 214 215 216 217 | } function preinstall() { : } function install() { | > > > | > > > | > > > > | | | | | | | | > > | | | | < < < < < < < < < < | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | } function preinstall() { : } function install() { mkdir -p "${installdir}/lib" || return 1 ${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1 } function postinstall() { : } function createruntime() { local runtimelibdir local runtimepkgdir local pkglibfile local file # Install files needed by installation cp -r "${installdir}/lib" "${runtimedir}" || return 1 # Create pkgIndex files if needed if [ -z "${tclpkg}" ]; then tclpkg="${pkg}" fi if [ -z "${tclpkgversion}" ]; then tclpkgversion="${version}" fi runtimelibdir="${runtimedir}/lib" if [ "${pkg_configure_shared_build}" = '0' ]; then find "${runtimelibdir}" -name '*.a' | sed 's@/[^/]*\.a$@@' | head -n 1 | while IFS='' read -r runtimepkgdir; do if [ ! -e "${runtimepkgdir}/pkgIndex.tcl" ]; then cat << _EOF_ > "${runtimepkgdir}/pkgIndex.tcl" package ifneeded ${tclpkg} ${tclpkgversion} [list load {} ${tclpkg}] _EOF_ fi done elif [ "${pkg_configure_shared_build}" = '1' ]; then find "${runtimelibdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | head -n 1 | while IFS='' read -r pkglibfile; do runtimepkgdir="$(echo "${pkglibfile}" | sed 's@/[^/]*$@@')" pkglibfile="$(echo "${pkglibfile}" | sed 's@^.*/@@')" if [ ! -e "${runtimepkgdir}/pkgIndex.tcl" ]; then cat << _EOF_ > "${runtimepkgdir}/pkgIndex.tcl" package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]] _EOF_ fi done fi # Remove link-only files from the runtime directory find "${runtimedir}" '(' -name '*.a' -o -name '*.a.linkadd' ')' -type f | while IFS='' read -r file; do rm -f "${file}" done # Ensure that some files were installed if ! find "${runtimedir}" -type f 2>/dev/null | grep '^' >/dev/null; then return 1 |
︙ | ︙ |
Modified kitcreator from [6465223bf6] to [9196d0a46c].
︙ | ︙ | |||
266 267 268 269 270 271 272 | preinstall || die 'preinstall failed' install || die 'install failed' postinstall || die 'postinstall failed' createruntime || die 'createruntime failed' set +x | < < | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | preinstall || die 'preinstall failed' install || die 'install failed' postinstall || die 'postinstall failed' createruntime || die 'createruntime failed' set +x ) 3>&1 4>&2 >> build.log 2>&1 || exit 1 else "${build_script}" 3>&1 4>&2 >> build.log 2>&1 || exit 1 fi call_pkg_init='0' done |
︙ | ︙ |
Modified tls/build.sh from [82518c6710] to [5e536572e7].
1 2 | #! /usr/bin/env bash | < < | < < < < < < < | < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < | < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #! /usr/bin/env bash # BuildCompatible: KitCreator version="1.6.7" url="http://sourceforge.net/projects/tls/files/tls/${TLSVERS}/tls${TLSVERS}-src.tar.gz" sha256='5119de3e5470359b97a8a00d861c9c48433571ee0167af0a952de66c99d3a3b8' function buildSSLLibrary() { local version url hash local archive version='2.4.1' url="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${version}.tar.gz" hash='121922b13169cd47a85e3e77f0bc129f8d04247193b42491cb1fab9074e80477' archive="src/libressl-${version}.tar.gz" echo " *** Building LibreSSL v${version}" >&2 if [ ! -e "../${archive}" ]; then "${_download}" "${url}" "../${archive}" "${hash}" || return 1 fi ( rm -rf libressl-* gzip -dc "../${archive}" | tar -xf - || exit 1 cd "libressl-${version}" || exit 1 echo "Running: ./configure ${CONFIGUREEXTRA} --disable-shared --enable-static --prefix=\"$(pwd)/INST\"" ./configure ${CONFIGUREEXTRA} --disable-shared --enable-static --prefix="$(pwd)/INST" || exit 1 echo "Running: ${MAKE:-make} V=1" ${MAKE:-make} V=1 || exit 1 echo "Running: ${MAKE:-make} V=1 install" ${MAKE:-make} V=1 install || exit 1 ) || return 1 SSLDIR="$(pwd)/libressl-${version}/INST" addlibs_LOCALSSL="$(PKG_CONFIG_PATH="${SSLDIR}/lib/pkgconfig" "${PKG_CONFIG:-pkg-config}" libssl libcrypto --libs --static)" } function preconfigure() { # Determine SSL directory if [ -z "${CPP}" ]; then CPP="${CC:-cc} -E" fi if [ -n "${KC_TLS_SSLDIR}" ]; then SSLDIR="${KC_TLS_SSLDIR}" |
︙ | ︙ | |||
108 109 110 111 112 113 114 | if [ -z "${SSLDIR}" ]; then buildSSLLibrary || SSLDIR='' fi if [ -z "${SSLDIR}" ]; then echo "Unable to find OpenSSL, aborting." >&2 | < < < | < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < | < < < < < < | | | | < < > | | | | | | > > > | | | < < < < < < < < | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | if [ -z "${SSLDIR}" ]; then buildSSLLibrary || SSLDIR='' fi if [ -z "${SSLDIR}" ]; then echo "Unable to find OpenSSL, aborting." >&2 return 1 fi fi # Disable SSLv2, newer SSL libraries drop support for it entirely CFLAGS="${CFLAGS} -DNO_SSL2=1" # Disable SSLv3, newer SSL libraries drop support for it entirely CFLAGS="${CFLAGS} -DNO_SSL3=1" } function postconfigure() { local linkaddfile local addlibs # Determine SSL library directory SSL_LIB_DIR="$(${MAKE:-make} --print-data-base | awk '/^SSL_LIB_DIR = /{ print }' | sed 's@^SSL_LIB_DIR = *@@')" echo "SSL_LIB_DIR = ${SSL_LIB_DIR}" } function postinstall() { # Create pkgIndex if needed if [ ! -e "${installdir}/lib/tls${version}/pkgIndex.tcl" ]; then cat << _EOF_ > "${installdir}/lib/tls${version}/pkgIndex.tcl" package ifneeded tls ${version} \ "[list source [file join \$dir tls.tcl]] ; \ [list load {} tls]" _EOF_ fi # Determine name of static object linkaddfile="$(find "${installdir}" -name '*.a' | head -n 1)" if [ -n "${linkaddfile}" ]; then linkaddfile="${linkaddfile}.linkadd" if [ -n "${addlibs_LOCALSSL}" ]; then addlibs="${addlibs_LOCALSSL}" fi if [ -z "${addlibs}" ]; then if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then addlibs="$("${PKG_CONFIG:-pkg-config}" libssl libcrypto --libs --static)" else addlibs="$("${PKG_CONFIG:-pkg-config}" libssl libcrypto --libs)" fi fi if [ -z "${addlibs}" ]; then addlibs="-L${SSL_LIB_DIR:-/lib} -lssl -lcrypto" addlibs_staticOnly="" fi addlibs="${addlibs} ${KC_TLS_LINKADD}" if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then echo "-Wl,-Bstatic ${addlibs} ${addlibs_staticOnly} -Wl,-Bdynamic" else echo "${addlibs}" fi > "${linkaddfile}" fi } |