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_dockerbuild() {
|
2022-07-12 23:46:13 +00:00
|
|
|
retry-tool sh -c "rm -rf xvid && svn checkout --username 'anonymous' --password '' '${SCRIPT_REPO}@${SCRIPT_REV}' xvid"
|
2020-09-06 20:59:35 +00:00
|
|
|
cd xvid
|
|
|
|
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
|
2021-05-14 02:52:29 +00:00
|
|
|
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
2020-09-06 20:59:35 +00:00
|
|
|
myconf+=(
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
|
|
|
)
|
2021-05-14 02:52:29 +00:00
|
|
|
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
|
|
|
|
2021-05-13 00:17:17 +00:00
|
|
|
if [[ $TARGET == win* ]]; then
|
2022-07-13 10:51:27 +00:00
|
|
|
rm "$FFBUILD_PREFIX"/{bin/libxvidcore.dll,lib/libxvidcore.dll.a}
|
2021-05-13 00:17:17 +00:00
|
|
|
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
|
|
|
|
}
|