diff --git a/scripts.d/25-libiconv.sh b/scripts.d/25-libiconv.sh new file mode 100755 index 0000000..8dfe80d --- /dev/null +++ b/scripts.d/25-libiconv.sh @@ -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 +} diff --git a/scripts.d/49-libogg.sh b/scripts.d/48-libogg.sh similarity index 100% rename from scripts.d/49-libogg.sh rename to scripts.d/48-libogg.sh diff --git a/scripts.d/50-libvorbis.sh b/scripts.d/50-libtheora.sh similarity index 52% rename from scripts.d/50-libvorbis.sh rename to scripts.d/50-libtheora.sh index fe89502..942a823 100755 --- a/scripts.d/50-libvorbis.sh +++ b/scripts.d/50-libtheora.sh @@ -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 }