2020-09-01 22:07:54 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-12 15:54:12 +00:00
|
|
|
SCRIPT_REPO="https://github.com/mirror/x264.git"
|
2023-02-12 13:40:12 +00:00
|
|
|
SCRIPT_COMMIT="eaa68fad9e5d201d42fde51665f2d137ae96baf0"
|
2020-09-01 22:07:54 +00:00
|
|
|
|
2020-09-02 16:07:59 +00:00
|
|
|
ffbuild_enabled() {
|
2021-06-20 19:59:48 +00:00
|
|
|
[[ $VARIANT == lgpl* ]] && return -1
|
2020-09-01 22:07:54 +00:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2023-06-18 14:44:57 +00:00
|
|
|
ffbuild_dockerbuild() {
|
2023-06-18 19:25:50 +00:00
|
|
|
cd "$FFBUILD_DLDIR/$SELF"
|
2020-09-03 14:56:24 +00:00
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--disable-cli
|
|
|
|
--enable-static
|
|
|
|
--enable-pic
|
|
|
|
--disable-lavf
|
|
|
|
--disable-swscale
|
|
|
|
--prefix="$FFBUILD_PREFIX"
|
|
|
|
)
|
|
|
|
|
2021-05-14 02:52:29 +00:00
|
|
|
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
2020-09-03 14:56:24 +00:00
|
|
|
myconf+=(
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
|
|
|
--cross-prefix="$FFBUILD_CROSS_PREFIX"
|
|
|
|
)
|
2021-05-14 02:52:29 +00:00
|
|
|
else
|
2020-09-01 22:07:54 +00:00
|
|
|
echo "Unknown target"
|
|
|
|
return -1
|
|
|
|
fi
|
|
|
|
|
2021-04-04 21:20:31 +00:00
|
|
|
./configure "${myconf[@]}"
|
|
|
|
make -j$(nproc)
|
|
|
|
make install
|
2020-09-01 22:07:54 +00:00
|
|
|
}
|
2020-09-02 16:07:59 +00:00
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --enable-libx264
|
|
|
|
}
|
|
|
|
|
2020-09-03 19:03:34 +00:00
|
|
|
ffbuild_unconfigure() {
|
2020-09-03 17:32:54 +00:00
|
|
|
echo --disable-libx264
|
|
|
|
}
|
|
|
|
|
2020-09-02 16:07:59 +00:00
|
|
|
ffbuild_cflags() {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_ldflags() {
|
|
|
|
return 0
|
|
|
|
}
|