mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-07-17 16:36:49 +00:00
37 lines
800 B
Bash
Executable file
37 lines
800 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
LIBYUV_REPO="https://chromium.googlesource.com/libyuv/libyuv"
|
|
LIBYUV_SRC_DIR="/tmp/libyuv"
|
|
|
|
prepare_source() {
|
|
[ -d "$LIBYUV_SRC_DIR" ] && rm -rf "$LIBYUV_SRC_DIR"
|
|
|
|
git clone \
|
|
--branch stable \
|
|
--depth 1 \
|
|
"$LIBYUV_REPO" \
|
|
"$LIBYUV_SRC_DIR"
|
|
|
|
cd "$LIBYUV_SRC_DIR"
|
|
}
|
|
|
|
build_and_install() {
|
|
export MAKEFLAGS=-j$(nproc)
|
|
|
|
# Disable problematic NEON64 assembly for ARM64
|
|
if [ "$(uname -m)" = "aarch64" ]; then
|
|
EXTRA_CXXFLAGS="-DLIBYUV_DISABLE_NEON"
|
|
else
|
|
EXTRA_CXXFLAGS=""
|
|
fi
|
|
|
|
cp -r include/ "$HOME/.local/"
|
|
make V=1 -f linux.mk CFLAGS="-O2 -fomit-frame-pointer -fPIC" CXXFLAGS="-O2 -fomit-frame-pointer -fPIC $EXTRA_CXXFLAGS"
|
|
|
|
install -D -m 0644 libyuv.a "$HOME/.local/lib/libyuv.a"
|
|
}
|
|
|
|
prepare_source
|
|
build_and_install
|