From efc336e60cf1331bf5f3213d296981b87b8b2a6c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 4 Jun 2023 19:24:05 +0300 Subject: =?UTF-8?q?fixes=20#3537=20(Telegram:=2032-=D1=80=D0=B0=D0=B7?= =?UTF-8?q?=D1=80=D1=8F=D0=B4=D0=BD=D0=B0=D1=8F=20=D0=B2=D0=B5=D1=80=D1=81?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BF=D0=B0=D0=B4=D0=B0=D0=B5=D1=82=20=D0=B2=20?= =?UTF-8?q?64-=D1=80=D0=B0=D0=B7=D1=80=D1=8F=D0=B4=D0=BD=D0=BE=D0=B9=20Win?= =?UTF-8?q?dows)=20+=20update=20to=20the=20fresh=20TDLIB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Telegram/tdlib/td/example/web/build-openssl.sh | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 protocols/Telegram/tdlib/td/example/web/build-openssl.sh (limited to 'protocols/Telegram/tdlib/td/example/web/build-openssl.sh') diff --git a/protocols/Telegram/tdlib/td/example/web/build-openssl.sh b/protocols/Telegram/tdlib/td/example/web/build-openssl.sh new file mode 100644 index 0000000000..73e11c8bf3 --- /dev/null +++ b/protocols/Telegram/tdlib/td/example/web/build-openssl.sh @@ -0,0 +1,28 @@ +#!/bin/sh +cd $(dirname $0) + +emconfigure true 2> /dev/null || { echo 'emconfigure not found. Install emsdk and add emconfigure and emmake to PATH environment variable. See instruction at https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html. Do not forget to add `emconfigure` and `emmake` to the PATH environment variable via `emsdk/emsdk_env.sh` script.'; exit 1; } + +OPENSSL=OpenSSL_1_1_0l +if [ ! -f $OPENSSL.tar.gz ]; then + echo "Downloading OpenSSL sources..." + wget https://github.com/openssl/openssl/archive/$OPENSSL.tar.gz +fi +rm -rf ./openssl-$OPENSSL +echo "Unpacking OpenSSL sources..." +tar xzf $OPENSSL.tar.gz || exit 1 +cd openssl-$OPENSSL + +emconfigure ./Configure linux-generic32 no-shared no-threads no-dso no-engine no-unit-test no-ui || exit 1 +sed -i.bak 's/CROSS_COMPILE=.*/CROSS_COMPILE=/g' Makefile || exit 1 +sed -i.bak 's/-ldl //g' Makefile || exit 1 +sed -i.bak 's/-O3/-Os/g' Makefile || exit 1 +echo "Building OpenSSL..." +emmake make depend || exit 1 +emmake make -j 4 || exit 1 + +rm -rf ../build/crypto || exit 1 +mkdir -p ../build/crypto/lib || exit 1 +cp libcrypto.a libssl.a ../build/crypto/lib/ || exit 1 +cp -r include ../build/crypto/ || exit 1 +cd .. -- cgit v1.2.3