2020-10-11 12:43:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-12 15:54:12 +00:00
|
|
|
SCRIPT_REPO="https://github.com/pkuvcl/davs2.git"
|
2022-10-05 22:40:44 +00:00
|
|
|
SCRIPT_COMMIT="b41cf117452e2d73d827f02d3e30aa20f1c721ac"
|
2020-10-11 12:43:25 +00:00
|
|
|
|
|
|
|
ffbuild_enabled() {
|
2021-06-20 19:59:48 +00:00
|
|
|
[[ $VARIANT == lgpl* ]] && return -1
|
2020-10-19 22:56:50 +00:00
|
|
|
[[ $TARGET == win32 ]] && return -1
|
2022-05-09 22:15:31 +00:00
|
|
|
# davs2 aarch64 support is broken
|
|
|
|
[[ $TARGET == linuxarm64 ]] && return -1
|
2020-10-11 12:43:25 +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 git clone \"$SCRIPT_REPO\" \"$SELF\""
|
|
|
|
to_df "RUN git -C \"$SELF\" checkout \"$SCRIPT_COMMIT\""
|
2023-06-18 14:44:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_dockerbuild() {
|
2023-06-18 19:25:50 +00:00
|
|
|
cd "$FFBUILD_DLDIR/$SELF"
|
2020-10-11 12:43:25 +00:00
|
|
|
cd build/linux
|
|
|
|
|
|
|
|
local myconf=(
|
|
|
|
--disable-cli
|
|
|
|
--enable-pic
|
|
|
|
--prefix="$FFBUILD_PREFIX"
|
|
|
|
)
|
|
|
|
|
2021-05-14 02:52:29 +00:00
|
|
|
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
2020-10-11 12:43:25 +00:00
|
|
|
myconf+=(
|
|
|
|
--host="$FFBUILD_TOOLCHAIN"
|
|
|
|
--cross-prefix="$FFBUILD_CROSS_PREFIX"
|
|
|
|
)
|
2021-05-14 02:52:29 +00:00
|
|
|
else
|
2020-10-11 12:43:25 +00:00
|
|
|
echo "Unknown target"
|
|
|
|
return -1
|
|
|
|
fi
|
|
|
|
|
2022-10-30 20:42:44 +00:00
|
|
|
# Work around configure endian check failing on modern gcc/binutils.
|
|
|
|
# Assumes all supported archs are little endian.
|
|
|
|
sed -i -e 's/EGIB/bss/g' -e 's/naidnePF/bss/g' configure
|
|
|
|
|
2021-04-04 21:20:31 +00:00
|
|
|
./configure "${myconf[@]}"
|
|
|
|
make -j$(nproc)
|
|
|
|
make install
|
2020-10-11 12:43:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_configure() {
|
|
|
|
echo --enable-libdavs2
|
|
|
|
}
|
|
|
|
|
|
|
|
ffbuild_unconfigure() {
|
|
|
|
echo --disable-libdavs2
|
|
|
|
}
|