Merge pull request #66 from linuxserver/harfbuzz

Compile ffmpeg with `libfribidi`, `libharfbuzz` and `libfontconfig`, compile libharfbuzz
This commit is contained in:
aptalca 2024-04-11 11:40:51 -04:00 committed by GitHub
commit bcf329aac1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 107 additions and 25 deletions

View File

@ -20,6 +20,7 @@ ENV \
FREETYPE=2.13.2 \
FRIBIDI=1.0.13 \
GMMLIB=22.3.15 \
HARFBUZZ=8.4.0 \
IHD=23.4.3 \
KVAZAAR=2.2.0 \
LAME=3.100 \
@ -69,10 +70,11 @@ RUN \
gperf \
i965-va-driver-shaders \
libasound2-dev \
libcairo2-dev \
libexpat1-dev \
libgcc-10-dev \
libglib2.0-dev \
libgomp1 \
libharfbuzz-dev \
libpciaccess-dev \
libssl-dev \
libtool \
@ -149,7 +151,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libfdk-aac.so
RUN \
echo "**** grabbing ffnvcodec ****" && \
mkdir -p /tmp/ffnvcodec && \
@ -174,7 +177,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libfreetype.so
RUN \
echo "**** grabbing fontconfig ****" && \
mkdir -p /tmp/fontconfig && \
@ -188,7 +192,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libfontconfig.so
RUN \
echo "**** grabbing fribidi ****" && \
mkdir -p /tmp/fribidi && \
@ -203,7 +208,20 @@ RUN \
--disable-static \
--enable-shared && \
make -j 1 && \
make install
make install && \
strip -d /usr/local/lib/libfribidi.so
RUN \
echo "**** grabbing harfbuzz ****" && \
mkdir -p /tmp/harfbuzz && \
curl -Lf \
https://github.com/harfbuzz/harfbuzz/archive/${HARFBUZZ}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/harfbuzz
RUN \
echo "**** compiling harfbuzz ****" && \
cd /tmp/harfbuzz && \
meson build && \
ninja -C build install && \
strip -d /usr/local/lib/x86_64-linux-gnu/libharfbuzz*.so
RUN \
echo "**** grabbing kvazaar ****" && \
mkdir -p /tmp/kvazaar && \
@ -218,7 +236,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libkvazaar.so
RUN \
echo "**** grabbing lame ****" && \
mkdir -p /tmp/lame && \
@ -255,7 +274,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libass.so
RUN \
echo "**** grabbing libdrm ****" && \
mkdir -p /tmp/libdrm && \
@ -453,7 +473,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libopencore-amr*.so
RUN \
echo "**** grabbing openjpeg ****" && \
mkdir -p /tmp/openjpeg && \
@ -487,7 +508,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libopus.so
RUN \
echo "**** grabbing rav1e ****" && \
mkdir -p /tmp/rav1e && \
@ -670,7 +692,8 @@ RUN \
cd /tmp/webp && \
./configure && \
make && \
make install
make install && \
strip -d /usr/local/lib/libweb*.so
RUN \
echo "**** grabbing x264 ****" && \
mkdir -p /tmp/x264 && \
@ -755,7 +778,10 @@ RUN \
--enable-libaom \
--enable-libass \
--enable-libfdk_aac \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libharfbuzz \
--enable-libkvazaar \
--enable-libmp3lame \
--enable-libopencore-amrnb \
@ -798,12 +824,14 @@ RUN \
ldconfig && \
mkdir -p \
/buildout/usr/local/bin \
/buildout/usr/local/etc/fonts \
/buildout/usr/local/lib/libmfx-gen \
/buildout/usr/local/lib/mfx \
/buildout/usr/local/lib/vpl \
/buildout/usr/local/lib/x86_64-linux-gnu/dri \
/buildout/usr/local/lib/x86_64-linux-gnu/vdpau \
/buildout/usr/local/share/vulkan \
/buildout/usr/share/fonts \
/buildout/usr/share/libdrm \
/buildout/etc/OpenCL/vendors && \
cp \
@ -812,6 +840,9 @@ RUN \
cp \
/tmp/ffmpeg/ffprobe \
/buildout/usr/local/bin && \
cp -a \
/usr/local/etc/fonts/* \
/buildout/usr/local/etc/fonts/ && \
cp -a \
/usr/local/lib/lib*so* \
/buildout/usr/local/lib/ && \
@ -839,6 +870,9 @@ RUN \
cp -a \
/usr/share/libdrm/amdgpu.ids \
/buildout/usr/share/libdrm/ && \
cp -a \
/usr/share/fonts/* \
/buildout/usr/share/fonts/ && \
cp -a \
/usr/local/share/vulkan/* \
/buildout/usr/local/share/vulkan/ && \
@ -877,7 +911,6 @@ RUN \
libexpat1 \
libglib2.0-0 \
libgomp1 \
libharfbuzz0b \
libllvm15 \
libmpdec3 \
libpciaccess0 \

View File

@ -16,8 +16,10 @@ ENV \
AOM=v3.8.2 \
FDKAAC=2.0.3 \
FFMPEG_HARD=7.0 \
FONTCONFIG=2.15.0 \
FREETYPE=2.13.2 \
FRIBIDI=1.0.13 \
HARFBUZZ=8.4.0 \
KVAZAAR=2.2.0 \
LAME=3.100 \
LIBASS=0.17.1 \
@ -55,9 +57,10 @@ RUN \
git \
gperf \
libasound2-dev \
libcairo2-dev \
libexpat1-dev \
libfontconfig1-dev \
libgcc-10-dev \
libglib2.0-dev \
libgomp1 \
libharfbuzz-dev \
libpciaccess-dev \
@ -69,6 +72,7 @@ RUN \
libxml2-dev \
make \
nasm \
ninja-build \
perl \
pkg-config \
python3-venv \
@ -89,7 +93,7 @@ RUN \
pip \
setuptools \
wheel && \
pip install --no-cache-dir cmake
pip install --no-cache-dir cmake meson
# compile 3rd party libs
RUN \
@ -126,7 +130,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libfdk-aac.so
RUN \
echo "**** grabbing freetype ****" && \
mkdir -p /tmp/freetype && \
@ -140,7 +145,23 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libfreetype.so
RUN \
echo "**** grabbing fontconfig ****" && \
mkdir -p /tmp/fontconfig && \
curl -Lf \
https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/fontconfig
RUN \
echo "**** compiling fontconfig ****" && \
cd /tmp/fontconfig && \
./configure \
--disable-static \
--enable-shared && \
make && \
make install && \
strip -d /usr/local/lib/libfontconfig.so
RUN \
echo "**** grabbing fribidi ****" && \
mkdir -p /tmp/fribidi && \
@ -155,7 +176,20 @@ RUN \
--disable-static \
--enable-shared && \
make -j 1 && \
make install
make install && \
strip -d /usr/local/lib/libfribidi.so
RUN \
echo "**** grabbing harfbuzz ****" && \
mkdir -p /tmp/harfbuzz && \
curl -Lf \
https://github.com/harfbuzz/harfbuzz/archive/${HARFBUZZ}.tar.gz | \
tar -zx --strip-components=1 -C /tmp/harfbuzz
RUN \
echo "**** compiling harfbuzz ****" && \
cd /tmp/harfbuzz && \
meson build && \
ninja -C build install && \
strip -d /usr/local/lib/libharfbuzz*.so
RUN \
echo "**** grabbing kvazaar ****" && \
mkdir -p /tmp/kvazaar && \
@ -170,7 +204,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libkvazaar.so
RUN \
echo "**** grabbing lame ****" && \
mkdir -p /tmp/lame && \
@ -207,7 +242,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libass.so
RUN \
echo "**** grabbing ogg ****" && \
mkdir -p /tmp/ogg && \
@ -235,7 +271,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libopencore-amr*.so
RUN \
echo "**** grabbing openjpeg ****" && \
mkdir -p /tmp/openjpeg && \
@ -269,7 +306,8 @@ RUN \
--disable-static \
--enable-shared && \
make && \
make install
make install && \
strip -d /usr/local/lib/libopus.so
RUN \
echo "**** grabbing rav1e ****" && \
mkdir -p /tmp/rav1e && \
@ -380,7 +418,8 @@ RUN \
cd /tmp/webp && \
./configure && \
make && \
make install
make install && \
strip -d /usr/local/lib/libweb*.so
RUN \
echo "**** grabbing x264 ****" && \
mkdir -p /tmp/x264 && \
@ -466,7 +505,10 @@ RUN \
--enable-libaom \
--enable-libass \
--enable-libfdk_aac \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libharfbuzz \
--enable-libkvazaar \
--enable-libmp3lame \
--enable-libopencore-amrnb \
@ -498,16 +540,24 @@ RUN \
ldconfig && \
mkdir -p \
/buildout/usr/local/bin \
/buildout/usr/local/lib && \
/buildout/usr/local/etc/fonts \
/buildout/usr/local/lib \
/buildout/usr/share/fonts && \
cp \
/tmp/ffmpeg/ffmpeg \
/buildout/usr/local/bin && \
cp \
/tmp/ffmpeg/ffprobe \
/buildout/usr/local/bin && \
cp -a \
/usr/local/etc/fonts/* \
/buildout/usr/local/etc/fonts/ && \
cp -a \
/usr/local/lib/lib*so* \
/buildout/usr/local/lib/
/buildout/usr/local/lib/ && \
cp -a \
/usr/share/fonts/* \
/buildout/usr/share/fonts/
# runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
@ -529,10 +579,8 @@ RUN \
apt-get install -y \
libasound2 \
libexpat1 \
libfontconfig1 \
libglib2.0-0 \
libgomp1 \
libharfbuzz0b \
libv4l-0 \
libx11-6 \
libxcb1 \

View File

@ -177,6 +177,7 @@ full_custom_readme: |
## Versions
* **10.04.24:** - Compile ffmpeg with `libfribidi`, `libharfbuzz` and `libfontconfig`, compile libharfbuzz.
* **05.04.24:** - Bump ffmpeg to 7.0, bump libdovi, libva, mesa and vulkan-sdk.
* **16.03.24:** - Bump libaom, mesa, openjpeg, opus, shaderc and svtav1.
* **11.02.24:** - Add Zimg support.