Add libass and all its dependencies

This commit is contained in:
BtbN 2020-09-04 23:30:11 +02:00
parent 1afc43b4c8
commit b9a9ddd37e
9 changed files with 314 additions and 1 deletions

View file

@ -5,5 +5,5 @@ ENV DEBIAN_FRONTEND noninteractive
RUN \
apt-get -y update && \
apt-get -y dist-upgrade && \
apt-get -y install build-essential yasm nasm pkg-config git curl wget cmake unzip subversion autoconf automake libtool cmake clang texinfo texi2html && \
apt-get -y install build-essential yasm nasm pkg-config git curl wget cmake unzip subversion autoconf automake libtool cmake clang texinfo texi2html gperf libc6-dev && \
apt-get -y clean

53
scripts.d/21-libxml2.sh Executable file
View file

@ -0,0 +1,53 @@
#!/bin/bash
LIBXML2_SRC="ftp://xmlsoft.org/libxml2/libxml2-2.9.10.tar.gz"
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /root/libxml2.sh"
to_df "RUN bash -c 'source /root/libxml2.sh && ffbuild_dockerbuild && rm /root/libxml2.sh'"
}
ffbuild_dockerbuild() {
mkdir fc
cd fc
wget "$LIBXML2_SRC" -O libxml2.tar.gz || return -1
tar xaf libxml2.tar.gz || return -1
rm libxml2.tar.gz
cd libxml2* || return -1
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-maintainer-mode
--disable-shared
--enable-static
)
if [[ $TARGET == win* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
./autogen.sh "${myconf[@]}" || return -1
make -j$(nproc) || return -1
make install || return -1
cd ../..
rm -rf fc
}
ffbuild_configure() {
echo --enable-libxml2
}
ffbuild_unconfigure() {
echo --disable-libxml2
}

51
scripts.d/25-freetype.sh Executable file
View file

@ -0,0 +1,51 @@
#!/bin/bash
FREETYPE_SRC="https://sourceforge.net/projects/freetype/files/freetype2/2.10.2/freetype-2.10.2.tar.xz/download"
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /root/ft.sh"
to_df "RUN bash -c 'source /root/ft.sh && ffbuild_dockerbuild && rm /root/ft.sh'"
}
ffbuild_dockerbuild() {
mkdir ft
cd ft
wget -O ft.tar.gz "$FREETYPE_SRC" || return -1
tar xaf ft.tar.gz || return -1
rm ft.tar.gz
cd freetype*
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-shared
--enable-static
)
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 ft
}
ffbuild_configure() {
echo --enable-libfreetype
}
ffbuild_unconfigure() {
echo --disable-libfreetype
}

52
scripts.d/25-fribidi.sh Executable file
View file

@ -0,0 +1,52 @@
#!/bin/bash
FRIBIDI_REPO="https://github.com/fribidi/fribidi.git"
FRIBIDI_COMMIT="c75a94c84ad1c7d3a3df89b42370933976f4ba59"
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /root/fribidi.sh"
to_df "RUN bash -c 'source /root/fribidi.sh && ffbuild_dockerbuild && rm /root/fribidi.sh'"
}
ffbuild_dockerbuild() {
git clone "$FRIBIDI_REPO" fribidi || return -1
cd fribidi
git checkout "$FRIBIDI_COMMIT" || return -1
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-shared
--enable-static
--with-pic
)
if [[ $TARGET == win* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
./autogen.sh "${myconf[@]}" || return -1
make || return -1
make install || return -1
sed -i 's/Cflags:/Cflags: -DFRIBIDI_LIB_STATIC/' "$FFBUILD_PREFIX"/lib/pkgconfig/fribidi.pc || return -1
cd ..
rm -rf fribidi
}
ffbuild_configure() {
echo --enable-libfribidi
}
ffbuild_unconfigure() {
echo --disable-libfribidi
}

53
scripts.d/35-fontconfig.sh Executable file
View file

@ -0,0 +1,53 @@
#!/bin/bash
FONTCONFIG_SRC="https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.92.tar.xz"
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /root/fc.sh"
to_df "RUN bash -c 'source /root/fc.sh && ffbuild_dockerbuild && rm /root/fc.sh'"
}
ffbuild_dockerbuild() {
mkdir fc
cd fc
wget "$FONTCONFIG_SRC" -O fc.tar.gz || return -1
tar xaf fc.tar.gz || return -1
rm fc.tar.gz
cd fontconfig* || return -1
local myconf=(
--prefix="$FFBUILD_PREFIX"
--enable-libxml2
--disable-shared
--enable-static
)
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 fc
}
ffbuild_configure() {
echo --enable-fontconfig
}
ffbuild_unconfigure() {
echo --disable-fontconfig
}

52
scripts.d/49-libvorbis.sh Executable file
View file

@ -0,0 +1,52 @@
#!/bin/bash
VORBIS_REPO="https://github.com/xiph/vorbis.git"
VORBIS_COMMIT="4a767c9ead99d36f7dee4d45cabb6636dd9e8a75"
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'"
}
ffbuild_dockerbuild() {
git clone "$VORBIS_REPO" vorbis || return -1
cd vorbis
git checkout "$VORBIS_COMMIT" || return -1
./autogen.sh || return -1
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-shared
--enable-static
--disable-oggtest
)
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 vorbis
}
ffbuild_configure() {
echo --enable-libvorbis
}
ffbuild_unconfigure() {
echo --disable-libvorbis
}

52
scripts.d/50-libass.sh Executable file
View file

@ -0,0 +1,52 @@
#!/bin/bash
ASS_REPO="https://github.com/libass/libass.git"
ASS_COMMIT="e52ae4d1d326804574c90de1072873e848261508"
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /root/ass.sh"
to_df "RUN bash -c 'source /root/ass.sh && ffbuild_dockerbuild && rm /root/ass.sh'"
}
ffbuild_dockerbuild() {
git clone "$ASS_REPO" ass || return -1
cd ass
git checkout "$ASS_COMMIT" || return -1
./autogen.sh || return -1
local myconf=(
--prefix="$FFBUILD_PREFIX"
--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 ass
}
ffbuild_configure() {
echo --enable-libass
}
ffbuild_unconfigure() {
echo --disable-libass
}