2022-11-11 18:15:45 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
SCRIPT_REPO="https://github.com/libass/libass.git"
|
2026-05-28 10:55:08 +08:00
|
|
|
SCRIPT_COMMIT="bbb3c7f1570a4a021e52683f3fbdf74fe492ae84"
|
2022-11-11 18:15:45 +08:00
|
|
|
|
|
|
|
|
ffbuild_enabled() {
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
|
|
|
|
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" ass
|
|
|
|
|
cd ass
|
|
|
|
|
|
|
|
|
|
./autogen.sh
|
|
|
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
|
--prefix="$FFBUILD_PREFIX"
|
|
|
|
|
--disable-shared
|
|
|
|
|
--enable-static
|
2025-05-24 02:53:36 +08:00
|
|
|
--enable-libunibreak
|
2022-11-11 18:15:45 +08:00
|
|
|
--with-pic
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
|
|
|
|
myconf+=(
|
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
|
|
|
|
)
|
2024-02-24 00:07:11 +08:00
|
|
|
elif [[ $TARGET == mac* ]]; then
|
2025-07-20 17:32:17 +08:00
|
|
|
if [ "$MACOS_BUILDER_CPU_ARCH" = "arm64" ] && [ "$TARGET" = "mac64" ]; then
|
|
|
|
|
myconf+=(
|
|
|
|
|
--host="x86_64-apple-darwin" # Override libass's autodetect
|
|
|
|
|
)
|
|
|
|
|
fi
|
2022-11-11 18:15:45 +08:00
|
|
|
else
|
|
|
|
|
echo "Unknown target"
|
|
|
|
|
return -1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
export CFLAGS="$CFLAGS -Dread_file=libass_internal_read_file"
|
|
|
|
|
|
|
|
|
|
./configure "${myconf[@]}"
|
|
|
|
|
make -j$(nproc)
|
|
|
|
|
make install
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
|
echo --enable-libass
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ffbuild_unconfigure() {
|
|
|
|
|
echo --disable-libass
|
|
|
|
|
}
|