Add iconv and theora
This commit is contained in:
parent
8e005b17ff
commit
1afc43b4c8
3 changed files with 68 additions and 10 deletions
53
scripts.d/25-libiconv.sh
Executable file
53
scripts.d/25-libiconv.sh
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
|
||||
ICONV_SRC="https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz"
|
||||
|
||||
ffbuild_enabled() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerstage() {
|
||||
to_df "ADD $SELF /root/iconv.sh"
|
||||
to_df "RUN bash -c 'source /root/iconv.sh && ffbuild_dockerbuild && rm /root/iconv.sh'"
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
mkdir iconv
|
||||
cd iconv
|
||||
wget -O iconv.tar.gz "$ICONV_SRC" || return -1
|
||||
tar xaf iconv.tar.gz || return -1
|
||||
rm iconv.tar.gz
|
||||
cd libiconv*
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--enable-extra-encodings
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == win* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}" || return -1
|
||||
make -j$(nproc) || return -1
|
||||
make install || return -1
|
||||
|
||||
cd ../..
|
||||
rm -rf iconv
|
||||
}
|
||||
|
||||
ffbuild_configure() {
|
||||
echo --enable-iconv
|
||||
}
|
||||
|
||||
ffbuild_unconfigure() {
|
||||
echo --disable-iconv
|
||||
}
|
|
@ -1,21 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
VORBIS_REPO="https://github.com/xiph/vorbis.git"
|
||||
VORBIS_COMMIT="4a767c9ead99d36f7dee4d45cabb6636dd9e8a75"
|
||||
THEORA_REPO="https://github.com/xiph/theora.git"
|
||||
THEORA_COMMIT="f98989ad7c3745d6cc4d24666e64046ff4a3f745"
|
||||
|
||||
ffbuild_enabled() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerstage() {
|
||||
to_df "ADD $SELF /root/vorbis.sh"
|
||||
to_df "RUN bash -c 'source /root/vorbis.sh && ffbuild_dockerbuild && rm /root/vorbis.sh'"
|
||||
to_df "ADD $SELF /root/theora.sh"
|
||||
to_df "RUN bash -c 'source /root/theora.sh && ffbuild_dockerbuild && rm /root/theora.sh'"
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git clone "$VORBIS_REPO" vorbis || return -1
|
||||
cd vorbis
|
||||
git checkout "$VORBIS_COMMIT" || return -1
|
||||
git clone "$THEORA_REPO" theora || return -1
|
||||
cd theora
|
||||
git checkout "$THEORA_COMMIT" || return -1
|
||||
|
||||
./autogen.sh || return -1
|
||||
|
||||
|
@ -23,7 +23,12 @@ ffbuild_dockerbuild() {
|
|||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--disable-examples
|
||||
--disable-oggtest
|
||||
--disable-vorbistest
|
||||
--disable-spec
|
||||
--disable-doc
|
||||
)
|
||||
|
||||
if [[ $TARGET == win* ]]; then
|
||||
|
@ -40,13 +45,13 @@ ffbuild_dockerbuild() {
|
|||
make install || return -1
|
||||
|
||||
cd ..
|
||||
rm -rf vorbis
|
||||
rm -rf theora
|
||||
}
|
||||
|
||||
ffbuild_configure() {
|
||||
echo --enable-libvorbis
|
||||
echo --enable-libtheora
|
||||
}
|
||||
|
||||
ffbuild_unconfigure() {
|
||||
echo --disable-libvorbis
|
||||
echo --disable-libtheora
|
||||
}
|
Loading…
Reference in a new issue