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
|
|
|
|
}
|
|
|
|
|
2023-06-18 14:44:57 +00:00
|
|
|
ffbuild_dockerdl() {
|
2023-06-18 19:25:50 +00:00
|
|
|
to_df "RUN retry-tool sh -c \"rm -rf xvid && svn checkout --username 'anonymous' --password '' '${SCRIPT_REPO}@${SCRIPT_REV}' xvid\""
|
2023-06-18 14:44:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
|
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
|
|
|
|
}
|