mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-22 03:44:19 +01:00
cross: bump dependency versions
This commit is contained in:
2
.github/workflows/backend.yml
vendored
2
.github/workflows/backend.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-16.04
|
runs-on: ubuntu-16.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
lws-version: [4.0.16, 3.2.3, 2.4.2]
|
lws-version: [4.0.19, 3.2.3, 2.4.2]
|
||||||
steps:
|
steps:
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ const clean = require('gulp-clean');
|
|||||||
const gzip = require('gulp-gzip');
|
const gzip = require('gulp-gzip');
|
||||||
const inlineSource = require('gulp-inline-source');
|
const inlineSource = require('gulp-inline-source');
|
||||||
const rename = require("gulp-rename");
|
const rename = require("gulp-rename");
|
||||||
const through = require('through2');
|
const through2 = require('through2');
|
||||||
|
|
||||||
const genHeader = (size, buf, len) => {
|
const genHeader = (size, buf, len) => {
|
||||||
let idx = 0;
|
let idx = 0;
|
||||||
@@ -40,12 +40,12 @@ task('clean', () => {
|
|||||||
task('default', () => {
|
task('default', () => {
|
||||||
return src('dist/index.html')
|
return src('dist/index.html')
|
||||||
.pipe(inlineSource())
|
.pipe(inlineSource())
|
||||||
.pipe(through.obj((file, enc, cb) => {
|
.pipe(through2.obj((file, enc, cb) => {
|
||||||
fileSize = file.contents.length;
|
fileSize = file.contents.length;
|
||||||
return cb(null, file);
|
return cb(null, file);
|
||||||
}))
|
}))
|
||||||
.pipe(gzip())
|
.pipe(gzip())
|
||||||
.pipe(through.obj((file, enc, cb) => {
|
.pipe(through2.obj((file, enc, cb) => {
|
||||||
const buf = file.contents;
|
const buf = file.contents;
|
||||||
file.contents = Buffer.from(genHeader(fileSize, buf, buf.length));
|
file.contents = Buffer.from(genHeader(fileSize, buf, buf.length));
|
||||||
return cb(null, file);
|
return cb(null, file);
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ STAGE_ROOT="${STAGE_ROOT:-/opt/stage}"
|
|||||||
BUILD_ROOT="${BUILD_ROOT:-/opt/build}"
|
BUILD_ROOT="${BUILD_ROOT:-/opt/build}"
|
||||||
|
|
||||||
ZLIB_VERSION="${ZLIB_VERSION:-1.2.11}"
|
ZLIB_VERSION="${ZLIB_VERSION:-1.2.11}"
|
||||||
JSON_C_VERSION="${JSON_C_VERSION:-0.13.1}"
|
JSON_C_VERSION="${JSON_C_VERSION:-0.14}"
|
||||||
OPENSSL_VERSION="${OPENSSL_VERSION:-1.0.2u}"
|
OPENSSL_VERSION="${OPENSSL_VERSION:-1.0.2u}"
|
||||||
LIBUV_VERSION="${LIBUV_VERSION:-1.34.2}"
|
LIBUV_VERSION="${LIBUV_VERSION:-1.38.0}"
|
||||||
LIBWEBSOCKETS_VERSION="${LIBWEBSOCKETS_VERSION:-3.2.2}"
|
LIBWEBSOCKETS_VERSION="${LIBWEBSOCKETS_VERSION:-4.0.19}"
|
||||||
|
|
||||||
build_zlib() {
|
build_zlib() {
|
||||||
echo "=== Building zlib-${ZLIB_VERSION} (${TARGET})..."
|
echo "=== Building zlib-${ZLIB_VERSION} (${TARGET})..."
|
||||||
curl -sLo- https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz | tar xz -C ${BUILD_DIR}
|
curl -sLo- https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz | tar xz -C ${BUILD_DIR}
|
||||||
pushd ${BUILD_DIR}/zlib-${ZLIB_VERSION}
|
pushd ${BUILD_DIR}/zlib-${ZLIB_VERSION}
|
||||||
env CHOST=${TARGET} ./configure --static --archs="-fPIC" --prefix=${STAGE_DIR}
|
env CHOST=${TARGET} ./configure --static --archs="-fPIC" --prefix=${STAGE_DIR}
|
||||||
make -j4 install
|
make -j$(nproc) install
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,8 +29,13 @@ build_json-c() {
|
|||||||
echo "=== Building json-c-${JSON_C_VERSION} (${TARGET})..."
|
echo "=== Building json-c-${JSON_C_VERSION} (${TARGET})..."
|
||||||
curl -sLo- https://s3.amazonaws.com/json-c_releases/releases/json-c-${JSON_C_VERSION}.tar.gz | tar xz -C ${BUILD_DIR}
|
curl -sLo- https://s3.amazonaws.com/json-c_releases/releases/json-c-${JSON_C_VERSION}.tar.gz | tar xz -C ${BUILD_DIR}
|
||||||
pushd ${BUILD_DIR}/json-c-${JSON_C_VERSION}
|
pushd ${BUILD_DIR}/json-c-${JSON_C_VERSION}
|
||||||
env CFLAGS=-fPIC ./configure --disable-shared --enable-static --prefix=${STAGE_DIR} --host=${TARGET}
|
mkdir build && cd build
|
||||||
make -j4 install
|
cmake -DCMAKE_TOOLCHAIN_FILE=${BUILD_DIR}/cross-${TARGET}.cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=RELEASE \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=${STAGE_DIR} \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
..
|
||||||
|
make -j$(nproc) install
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +45,7 @@ build_openssl() {
|
|||||||
pushd ${BUILD_DIR}/openssl-${OPENSSL_VERSION}
|
pushd ${BUILD_DIR}/openssl-${OPENSSL_VERSION}
|
||||||
env CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib C_INCLUDE_PATH=${STAGE_DIR}/include \
|
env CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib C_INCLUDE_PATH=${STAGE_DIR}/include \
|
||||||
./Configure dist -fPIC --prefix=/ --install_prefix=${STAGE_DIR}
|
./Configure dist -fPIC --prefix=/ --install_prefix=${STAGE_DIR}
|
||||||
make -j4 > /dev/null
|
make -j$(nproc) > /dev/null
|
||||||
make install_sw
|
make install_sw
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
@@ -51,7 +56,7 @@ build_libuv() {
|
|||||||
pushd ${BUILD_DIR}/libuv-v${LIBUV_VERSION}
|
pushd ${BUILD_DIR}/libuv-v${LIBUV_VERSION}
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
env CFLAGS=-fPIC ./configure --disable-shared --enable-static --prefix=${STAGE_DIR} --host=${TARGET}
|
env CFLAGS=-fPIC ./configure --disable-shared --enable-static --prefix=${STAGE_DIR} --host=${TARGET}
|
||||||
make -j4 install
|
make -j$(nproc) install
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +81,7 @@ build_libwebsockets() {
|
|||||||
sed -i 's/ websockets_shared//g' cmake/LibwebsocketsConfig.cmake.in
|
sed -i 's/ websockets_shared//g' cmake/LibwebsocketsConfig.cmake.in
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=${BUILD_DIR}/cross-${TARGET}.cmake \
|
cmake -DCMAKE_TOOLCHAIN_FILE=${BUILD_DIR}/cross-${TARGET}.cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=RELEASE \
|
||||||
-DCMAKE_INSTALL_PREFIX=${STAGE_DIR} \
|
-DCMAKE_INSTALL_PREFIX=${STAGE_DIR} \
|
||||||
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
|
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="-static" \
|
-DCMAKE_EXE_LINKER_FLAGS="-static" \
|
||||||
@@ -86,7 +92,8 @@ build_libwebsockets() {
|
|||||||
-DLWS_UNIX_SOCK=ON \
|
-DLWS_UNIX_SOCK=ON \
|
||||||
-DLWS_IPV6=ON \
|
-DLWS_IPV6=ON \
|
||||||
..
|
..
|
||||||
make install
|
make -j$(nproc) install
|
||||||
|
sed -i 's/ssl;crypto;//g' ${STAGE_DIR}/lib/cmake/libwebsockets/LibwebsocketsTargets-release.cmake
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +117,7 @@ build() {
|
|||||||
|
|
||||||
echo "=== Building target ${ALIAS} (${TARGET})..."
|
echo "=== Building target ${ALIAS} (${TARGET})..."
|
||||||
|
|
||||||
rm -rf ${STAGE_DIR} ${BUILD_DIR}
|
rm -rf ${STAGE_DIR} ${BUILD_DIR}
|
||||||
mkdir -p ${STAGE_DIR} ${BUILD_DIR}
|
mkdir -p ${STAGE_DIR} ${BUILD_DIR}
|
||||||
export PKG_CONFIG_PATH="${STAGE_DIR}/lib/pkgconfig"
|
export PKG_CONFIG_PATH="${STAGE_DIR}/lib/pkgconfig"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user