diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-21 09:24:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-10-21 09:24:59 +0000 |
commit | 2bbf7ca3ab74b2e3a9b2e361fe56aeac1e2f4867 (patch) | |
tree | 6d0ad563f29e8b130a876da955b3174e40defed3 /scripts | |
parent | Releasing debian version 1.7.1-1. (diff) | |
download | ttyd-2bbf7ca3ab74b2e3a9b2e361fe56aeac1e2f4867.tar.xz ttyd-2bbf7ca3ab74b2e3a9b2e361fe56aeac1e2f4867.zip |
Merging upstream version 1.7.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/cross-build.sh | 8 | ||||
-rw-r--r-- | scripts/mingw-build.sh | 37 |
2 files changed, 16 insertions, 29 deletions
diff --git a/scripts/cross-build.sh b/scripts/cross-build.sh index 22c9849..75aaf94 100755 --- a/scripts/cross-build.sh +++ b/scripts/cross-build.sh @@ -10,10 +10,10 @@ STAGE_ROOT="${STAGE_ROOT:-/opt/stage}" BUILD_ROOT="${BUILD_ROOT:-/opt/build}" BUILD_TARGET="${BUILD_TARGET:-x86_64}" -ZLIB_VERSION="${ZLIB_VERSION:-1.2.12}" -JSON_C_VERSION="${JSON_C_VERSION:-0.15}" -MBEDTLS_VERSION="${MBEDTLS_VERSION:-3.1.0}" -LIBUV_VERSION="${LIBUV_VERSION:-1.40.0}" +ZLIB_VERSION="${ZLIB_VERSION:-1.2.13}" +JSON_C_VERSION="${JSON_C_VERSION:-0.16}" +MBEDTLS_VERSION="${MBEDTLS_VERSION:-2.28.1}" +LIBUV_VERSION="${LIBUV_VERSION:-1.44.2}" LIBWEBSOCKETS_VERSION="${LIBWEBSOCKETS_VERSION:-4.3.2}" build_zlib() { diff --git a/scripts/mingw-build.sh b/scripts/mingw-build.sh index 48f5dd8..6366dcb 100644 --- a/scripts/mingw-build.sh +++ b/scripts/mingw-build.sh @@ -2,39 +2,26 @@ set -eo pipefail -TMPDIR="${TMPDIR:-/tmp}" -JSON_C_VERSION="${JSON_C_VERSION:-0.15}" -LIBWEBSOCKETS_VERSION="${LIBWEBSOCKETS_VERSION:-4.3.2}" - build_libwebsockets() { - curl -sLo- "https://github.com/warmcat/libwebsockets/archive/v${LIBWEBSOCKETS_VERSION}.tar.gz" | tar xz -f - -C "${TMPDIR}" - pushd "${TMPDIR}/libwebsockets-${LIBWEBSOCKETS_VERSION}" - sed -i 's/ websockets_shared//g' cmake/libwebsockets-config.cmake.in - sed -i '/PC_OPENSSL/d' lib/tls/CMakeLists.txt - rm -rf build && mkdir -p build && cd build - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - cmake -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DCMAKE_BUILD_TYPE=RELEASE \ - -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \ - -DCMAKE_EXE_LINKER_FLAGS="-static" \ - -DLWS_WITH_MBEDTLS=ON \ - -DLWS_WITH_DIR=OFF \ - -DLWS_WITHOUT_DAEMONIZE=ON \ - -DLWS_WITHOUT_TESTAPPS=ON \ - -DLWS_WITH_LIBUV=ON \ - .. - make -j"$(nproc)" install + svn co https://github.com/msys2/MINGW-packages/trunk/mingw-w64-libwebsockets + sed -i 's/openssl/mbedtls/' mingw-w64-libwebsockets/PKGBUILD + sed -i '/-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}/a \ -DLWS_WITH_MBEDTLS=ON \\' mingw-w64-libwebsockets/PKGBUILD + sed -i '/-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}/a \ -DLWS_WITH_LIBUV=ON \\' mingw-w64-libwebsockets/PKGBUILD + pushd mingw-w64-libwebsockets + makepkg-mingw --cleanbuild --syncdeps --force --noconfirm + pacman -U *.pkg.tar.zst --noconfirm popd } build_libwebsockets +# workaround for the lib name change +cp /mingw64/lib/libuv_a.a /mingw64/lib/libuv.a + rm -rf build && mkdir -p build && cd build -cmake -G"MSYS Makefiles" \ +cmake -DCMAKE_BUILD_TYPE=RELEASE \ -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \ -DCMAKE_C_FLAGS="-Os -ffunction-sections -fdata-sections -fno-unwind-tables -fno-asynchronous-unwind-tables -flto" \ -DCMAKE_EXE_LINKER_FLAGS="-static -no-pie -Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" \ - -DCMAKE_BUILD_TYPE=RELEASE \ .. -make install +cmake --build . |