Skip to content

Commit

Permalink
Replace mozjpeg with jpegli in Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Apr 11, 2024
1 parent 5e546d1 commit a1e2e3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
26 changes: 8 additions & 18 deletions Telegram/build/docker/centos_env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,6 @@ RUN git clone -b 1.0.7 --depth=1 {{ GIT }}/google/highway.git \
&& cd .. \
&& rm -rf highway

FROM builder AS mozjpeg
RUN git clone -b v4.1.4 --depth=1 {{ GIT }}/mozilla/mozjpeg.git \
&& cd mozjpeg \
&& cmake -GNinja -B build . \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DWITH_JPEG8=ON \
-DPNG_SUPPORTED=OFF \
&& cmake --build build --parallel \
&& DESTDIR="{{ LibrariesPath }}/mozjpeg-cache" cmake --install build \
&& cd .. \
&& rm -rf mozjpeg

FROM builder AS opus
RUN git clone -b v1.4 --depth=1 {{ GIT }}/xiph/opus.git \
&& cd opus \
Expand Down Expand Up @@ -265,13 +252,14 @@ COPY --link --from=highway {{ LibrariesPath }}/highway-cache /

RUN git clone -b v0.10.2 --depth=1 {{ GIT }}/libjxl/libjxl.git \
&& cd libjxl \
&& git submodule update --init --recursive --depth=1 third_party/libjpeg-turbo \
&& cmake -GNinja -B build . \
-DCMAKE_BUILD_TYPE=None \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DJPEGXL_ENABLE_DEVTOOLS=OFF \
-DJPEGXL_ENABLE_TOOLS=OFF \
-DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF \
-DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON \
-DJPEGXL_ENABLE_DOXYGEN=OFF \
-DJPEGXL_ENABLE_MANPAGES=OFF \
-DJPEGXL_ENABLE_BENCHMARK=OFF \
Expand All @@ -281,7 +269,10 @@ RUN git clone -b v0.10.2 --depth=1 {{ GIT }}/libjxl/libjxl.git \
-DJPEGXL_ENABLE_OPENEXR=OFF \
-DJPEGXL_ENABLE_SKCMS=OFF \
&& cmake --build build --parallel \
&& DESTDIR="{{ LibrariesPath }}/libjxl-cache" cmake --install build \
&& export DESTDIR="{{ LibrariesPath }}/libjxl-cache" \
&& cmake --install build \
&& cp build/lib/libjpegli-static.a $DESTDIR/usr/local/lib64/libjpeg.a \
&& ar rcs $DESTDIR/usr/local/lib64/libjpeg.a build/lib/CMakeFiles/jpegli-libjpeg-obj.dir/jpegli/libjpeg_wrapper.cc.o \
&& cd .. \
&& rm -rf libjxl

Expand Down Expand Up @@ -704,7 +695,7 @@ RUN git clone -b 1.78.1 --depth=1 {{ GIT }}/GNOME/gobject-introspection.git \
FROM patches AS qt
COPY --link --from=zlib {{ LibrariesPath }}/zlib-cache /
COPY --link --from=lcms2 {{ LibrariesPath }}/lcms2-cache /
COPY --link --from=mozjpeg {{ LibrariesPath }}/mozjpeg-cache /
COPY --link --from=libjxl {{ LibrariesPath }}/libjxl-cache /
COPY --link --from=xcb {{ LibrariesPath }}/xcb-cache /
COPY --link --from=xcb-wm {{ LibrariesPath }}/xcb-wm-cache /
COPY --link --from=xcb-util {{ LibrariesPath }}/xcb-util-cache /
Expand Down Expand Up @@ -757,9 +748,9 @@ RUN git clone -b v2023.06.01 --depth=1 https://chromium.googlesource.com/breakpa
&& rm -rf breakpad

FROM builder AS webrtc
COPY --link --from=mozjpeg {{ LibrariesPath }}/mozjpeg-cache /
COPY --link --from=opus {{ LibrariesPath }}/opus-cache /
COPY --link --from=libvpx {{ LibrariesPath }}/libvpx-cache /
COPY --link --from=libjxl {{ LibrariesPath }}/libjxl-cache /
COPY --link --from=ffmpeg {{ LibrariesPath }}/ffmpeg-cache /
COPY --link --from=openssl {{ LibrariesPath }}/openssl-cache /
COPY --link --from=libXtst {{ LibrariesPath }}/libXtst-cache /
Expand Down Expand Up @@ -805,7 +796,6 @@ COPY --link --from=protobuf {{ LibrariesPath }}/protobuf-cache /
COPY --link --from=lcms2 {{ LibrariesPath }}/lcms2-cache /
COPY --link --from=brotli {{ LibrariesPath }}/brotli-cache /
COPY --link --from=highway {{ LibrariesPath }}/highway-cache /
COPY --link --from=mozjpeg {{ LibrariesPath }}/mozjpeg-cache /
COPY --link --from=opus {{ LibrariesPath }}/opus-cache /
COPY --link --from=dav1d {{ LibrariesPath }}/dav1d-cache /
COPY --link --from=libde265 {{ LibrariesPath }}/libde265-cache /
Expand Down
2 changes: 1 addition & 1 deletion cmake

0 comments on commit a1e2e3d

Please sign in to comment.