Files
jellyfin-ffmpeg/builder/scripts.d/20-libiconv.sh
T

58 lines
1.2 KiB
Bash
Raw Normal View History

2022-11-11 18:15:45 +08:00
#!/bin/bash
2026-04-25 21:48:08 +08:00
#SCRIPT_ORIG="https://git.savannah.gnu.org/git/libiconv.git"
2024-06-29 07:06:51 +08:00
SCRIPT_REPO="https://skia.googlesource.com/third_party/libiconv"
2026-05-28 10:55:08 +08:00
SCRIPT_COMMIT="v1.19"
2023-04-04 15:19:42 +08:00
SCRIPT_TAGFILTER="v?.*"
2022-11-11 18:15:45 +08:00
2026-04-25 21:48:08 +08:00
SCRIPT_ORIG2="git://git.savannah.gnu.org/gnulib.git"
SCRIPT_REPO2="https://github.com/coreutils/gnulib.git"
2026-05-28 10:55:08 +08:00
SCRIPT_COMMIT2="5926e89900ffe4c850dd026fb634c15bf3cee526"
2026-04-25 21:48:08 +08:00
2022-11-11 18:15:45 +08:00
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
# iconv is macOS built-in
[[ $TARGET == mac* ]] && return 0
2022-11-11 18:15:45 +08:00
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" iconv
cd iconv
2026-04-25 21:48:08 +08:00
sed -i "s|${SCRIPT_ORIG2}|${SCRIPT_REPO2}|g" ./.gitmodules
2022-11-11 18:15:45 +08:00
./gitsub.sh pull
2026-04-25 21:48:08 +08:00
./gitsub.sh checkout gnulib "$SCRIPT_COMMIT2"
2025-01-20 03:05:24 +08:00
(unset CC CFLAGS GMAKE && ./autogen.sh)
2022-11-11 18:15:45 +08:00
local myconf=(
--prefix="$FFBUILD_PREFIX"
--enable-extra-encodings
--disable-shared
--enable-static
--with-pic
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
./configure "${myconf[@]}"
make -j$(nproc)
make install
}
ffbuild_configure() {
echo --enable-iconv
}
ffbuild_unconfigure() {
echo --disable-iconv
2022-11-11 18:15:45 +08:00
}