FFmpeg-Builds/scripts.d/50-xvid.sh

59 lines
1.2 KiB
Bash
Raw Permalink Normal View History

2020-09-06 20:59:35 +00:00
#!/bin/bash
2022-07-12 18:28:45 +00:00
SCRIPT_REPO="http://svn.xvid.org/trunk/xvidcore"
2022-07-13 15:08:17 +00:00
SCRIPT_REV="2198"
2020-09-06 20:59:35 +00:00
ffbuild_enabled() {
2021-06-20 19:59:48 +00:00
[[ $VARIANT == lgpl* ]] && return -1
2020-09-06 20:59:35 +00:00
return 0
}
ffbuild_dockerdl() {
to_df "RUN retry-tool sh -c \"rm -rf xvid && svn checkout --username 'anonymous' --password '' '${SCRIPT_REPO}@${SCRIPT_REV}' xvid\""
}
ffbuild_dockerbuild() {
cd "$FFBUILD_DLDIR"/xvid
2020-09-06 20:59:35 +00:00
cd build/generic
2021-04-25 20:40:57 +00:00
# The original code fails on a two-digit major...
sed -i\
-e 's/GCC_MAJOR=.*/GCC_MAJOR=10/' \
-e 's/GCC_MINOR=.*/GCC_MINOR=0/' \
configure.in
./bootstrap.sh
2020-09-06 20:59:35 +00:00
local myconf=(
--prefix="$FFBUILD_PREFIX"
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
2020-09-06 20:59:35 +00:00
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
2020-09-06 20:59:35 +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-06 20:59:35 +00:00
if [[ $TARGET == win* ]]; then
rm "$FFBUILD_PREFIX"/{bin/libxvidcore.dll,lib/libxvidcore.dll.a}
elif [[ $TARGET == linux* ]]; then
rm "$FFBUILD_PREFIX"/lib/libxvidcore.so*
fi
2020-09-06 20:59:35 +00:00
}
ffbuild_configure() {
echo --enable-libxvid
}
ffbuild_unconfigure() {
echo --disable-libxvid
}