mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Add support for AVIF, HEIF and JPEG XL (only on Linux yet)
This commit is contained in:
parent
39294a7fe1
commit
278ab5ebaf
5 changed files with 183 additions and 1 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -91,3 +91,6 @@
|
|||
[submodule "Telegram/ThirdParty/wayland-protocols"]
|
||||
path = Telegram/ThirdParty/wayland-protocols
|
||||
url = https://github.com/gitlab-freedesktop-mirrors/wayland-protocols.git
|
||||
[submodule "Telegram/ThirdParty/kimageformats"]
|
||||
path = Telegram/ThirdParty/kimageformats
|
||||
url = https://github.com/KDE/kimageformats.git
|
||||
|
|
1
Telegram/ThirdParty/kimageformats
vendored
Submodule
1
Telegram/ThirdParty/kimageformats
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit dfbc6e0f8c08370e54d4700a98316f1ae161e772
|
|
@ -51,6 +51,17 @@ RUN git clone {{ GIT }}/desktop-app/patches.git \
|
|||
&& git checkout 355c563138 \
|
||||
&& rm -rf .git
|
||||
|
||||
FROM builder AS nasm
|
||||
RUN git clone -b nasm-2.15.05 --depth=1 {{ GIT }}/netwide-assembler/nasm.git \
|
||||
&& cd nasm \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure \
|
||||
&& make -j$(nproc) \
|
||||
&& mkdir -p "{{ LibrariesPath }}/nasm-cache/usr/local/bin" \
|
||||
&& install -c nasm "{{ LibrariesPath }}/nasm-cache/usr/local/bin/nasm" \
|
||||
&& cd .. \
|
||||
&& rm -rf nasm
|
||||
|
||||
FROM builder AS extra-cmake-modules
|
||||
RUN git clone -b v5.98.0 --depth=1 {{ GIT }}/KDE/extra-cmake-modules.git \
|
||||
&& cd extra-cmake-modules \
|
||||
|
@ -102,6 +113,41 @@ RUN git clone -b 0.4.17 --depth=1 {{ GIT }}/libproxy/libproxy.git \
|
|||
&& cd .. \
|
||||
&& rm -rf libproxy
|
||||
|
||||
FROM builder AS lcms2
|
||||
RUN git clone -b lcms2.13.1 --depth=1 {{ GIT }}/mm2/Little-CMS.git \
|
||||
&& cd Little-CMS \
|
||||
&& meson build \
|
||||
--buildtype=release \
|
||||
--default-library=both \
|
||||
&& meson compile -C build \
|
||||
&& DESTDIR="{{ LibrariesPath }}/lcms2-cache" meson install -C build \
|
||||
&& cd .. \
|
||||
&& rm -rf Little-CMS
|
||||
|
||||
FROM builder AS brotli
|
||||
RUN git clone -b v1.0.9 --depth=1 {{ GIT }}/google/brotli.git \
|
||||
&& cd brotli \
|
||||
&& cmake -GNinja -B build . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBROTLI_DISABLE_TESTS=ON \
|
||||
&& cmake --build build --parallel \
|
||||
&& DESTDIR="{{ LibrariesPath }}/brotli-cache" cmake --install build \
|
||||
&& cd .. \
|
||||
&& rm -rf brotli
|
||||
|
||||
FROM builder AS highway
|
||||
RUN git clone -b 1.0.1 --depth=1 {{ GIT }}/google/highway.git \
|
||||
&& cd highway \
|
||||
&& cmake -GNinja -B build . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DHWY_ENABLE_CONTRIB=OFF \
|
||||
-DHWY_ENABLE_EXAMPLES=OFF \
|
||||
&& cmake --build build --parallel \
|
||||
&& DESTDIR="{{ LibrariesPath }}/highway-cache" cmake --install build \
|
||||
&& cd .. \
|
||||
&& rm -rf highway
|
||||
|
||||
FROM builder AS mozjpeg
|
||||
RUN git clone -b v4.0.3 --depth=1 {{ GIT }}/mozilla/mozjpeg.git \
|
||||
&& cd mozjpeg \
|
||||
|
@ -125,6 +171,33 @@ RUN git clone -b v1.3.1 --depth=1 {{ GIT }}/xiph/opus.git \
|
|||
&& cd .. \
|
||||
&& rm -rf opus
|
||||
|
||||
FROM builder AS dav1d
|
||||
COPY --link --from=nasm {{ LibrariesPath }}/nasm-cache /
|
||||
|
||||
RUN git clone -b 1.0.0 --depth=1 {{ GIT }}/videolan/dav1d.git \
|
||||
&& cd dav1d \
|
||||
&& meson build \
|
||||
--buildtype=release \
|
||||
--default-library=both \
|
||||
-Denable_tools=false \
|
||||
-Denable_tests=false \
|
||||
&& meson compile -C build \
|
||||
&& DESTDIR="{{ LibrariesPath }}/dav1d-cache" meson install -C build \
|
||||
&& cd .. \
|
||||
&& rm -rf dav1d
|
||||
|
||||
FROM builder AS libde265
|
||||
RUN git clone -b v1.0.8 --depth=1 {{ GIT }}/strukturag/libde265.git \
|
||||
&& cd libde265 \
|
||||
&& cmake -GNinja . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DENABLE_SDL=OFF \
|
||||
&& cmake --build . --parallel \
|
||||
&& DESTDIR="{{ LibrariesPath }}/libde265-cache" cmake --install . \
|
||||
&& cd .. \
|
||||
&& rm -rf libde265
|
||||
|
||||
FROM builder AS libvpx
|
||||
RUN git clone -b v1.11.0 --depth=1 {{ GIT }}/webmproject/libvpx.git \
|
||||
&& cd libvpx \
|
||||
|
@ -141,6 +214,64 @@ RUN git clone -b v1.11.0 --depth=1 {{ GIT }}/webmproject/libvpx.git \
|
|||
&& cd .. \
|
||||
&& rm -rf libvpx
|
||||
|
||||
FROM builder AS libavif
|
||||
COPY --link --from=dav1d {{ LibrariesPath }}/dav1d-cache /
|
||||
|
||||
RUN git clone -b v0.10.1 --depth=1 {{ GIT }}/AOMediaCodec/libavif.git \
|
||||
&& cd libavif \
|
||||
&& cmake -GNinja -B build . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DAVIF_CODEC_DAV1D=ON \
|
||||
&& cmake --build build --parallel \
|
||||
&& DESTDIR="{{ LibrariesPath }}/libavif-cache" cmake --install build \
|
||||
&& cd .. \
|
||||
&& rm -rf libavif
|
||||
|
||||
FROM builder AS libheif
|
||||
COPY --link --from=libde265 {{ LibrariesPath }}/libde265-cache /
|
||||
|
||||
RUN git clone -b v1.13.0 --depth=1 {{ GIT }}/strukturag/libheif.git \
|
||||
&& cd libheif \
|
||||
&& cmake -GNinja -B build . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DWITH_X265=OFF \
|
||||
-DWITH_AOM=OFF \
|
||||
-DWITH_RAV1E=OFF \
|
||||
-DWITH_DAV1D=OFF \
|
||||
-DWITH_EXAMPLES=OFF \
|
||||
&& cmake --build build --parallel \
|
||||
&& DESTDIR="{{ LibrariesPath }}/libheif-cache" cmake --install build \
|
||||
&& cd .. \
|
||||
&& rm -rf libheif
|
||||
|
||||
FROM builder AS libjxl
|
||||
COPY --link --from=lcms2 {{ LibrariesPath }}/lcms2-cache /
|
||||
COPY --link --from=brotli {{ LibrariesPath }}/brotli-cache /
|
||||
COPY --link --from=highway {{ LibrariesPath }}/highway-cache /
|
||||
|
||||
RUN git clone -b v0.7rc --depth=1 {{ GIT }}/libjxl/libjxl.git \
|
||||
&& cd libjxl \
|
||||
&& cmake -GNinja -B build . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DJPEGXL_ENABLE_DEVTOOLS=OFF \
|
||||
-DJPEGXL_ENABLE_TOOLS=OFF \
|
||||
-DJPEGXL_ENABLE_DOXYGEN=OFF \
|
||||
-DJPEGXL_ENABLE_MANPAGES=OFF \
|
||||
-DJPEGXL_ENABLE_BENCHMARK=OFF \
|
||||
-DJPEGXL_ENABLE_EXAMPLES=OFF \
|
||||
-DJPEGXL_ENABLE_JNI=OFF \
|
||||
-DJPEGXL_ENABLE_SJPEG=OFF \
|
||||
-DJPEGXL_ENABLE_OPENEXR=OFF \
|
||||
-DJPEGXL_ENABLE_SKCMS=OFF \
|
||||
&& cmake --build build --parallel \
|
||||
&& DESTDIR="{{ LibrariesPath }}/libjxl-cache" cmake --install build \
|
||||
&& cd .. \
|
||||
&& rm -rf libjxl
|
||||
|
||||
FROM builder AS rnnoise
|
||||
RUN git clone -b master --depth=1 {{ GIT }}/desktop-app/rnnoise \
|
||||
&& cd rnnoise \
|
||||
|
@ -682,9 +813,17 @@ COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
|
|||
COPY --link --from=zlib {{ LibrariesPath }}/zlib-cache /
|
||||
COPY --link --from=xz {{ LibrariesPath }}/xz-cache /
|
||||
COPY --link --from=libproxy {{ LibrariesPath }}/libproxy-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 /
|
||||
COPY --link --from=libvpx {{ LibrariesPath }}/libvpx-cache /
|
||||
COPY --link --from=libavif {{ LibrariesPath }}/libavif-cache /
|
||||
COPY --link --from=libheif {{ LibrariesPath }}/libheif-cache /
|
||||
COPY --link --from=libjxl {{ LibrariesPath }}/libjxl-cache /
|
||||
COPY --link --from=rnnoise {{ LibrariesPath }}/rnnoise-cache /
|
||||
COPY --link --from=xcb {{ LibrariesPath }}/xcb-cache /
|
||||
COPY --link --from=xcb-wm {{ LibrariesPath }}/xcb-wm-cache /
|
||||
|
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
|||
Subproject commit b9f1b6036329e44ec61f51f0b363fe2319158b84
|
||||
Subproject commit c79563ea343075d97d30fe3a6598775538676515
|
|
@ -93,8 +93,10 @@ parts:
|
|||
- clang
|
||||
- python3
|
||||
- libasound2-dev
|
||||
- libavif-dev
|
||||
- libglib2.0-dev
|
||||
- libglibmm-2.4-dev
|
||||
- libheif-dev
|
||||
- libopus-dev
|
||||
- libpulse-dev
|
||||
- libwayland-dev
|
||||
|
@ -105,8 +107,10 @@ parts:
|
|||
- zlib1g-dev
|
||||
stage-packages:
|
||||
- libasound2
|
||||
- libavif13
|
||||
- libglib2.0-0
|
||||
- libglibmm-2.4-1v5
|
||||
- libheif1
|
||||
- libopus0
|
||||
- libpulse0
|
||||
- libwayland-client0
|
||||
|
@ -155,6 +159,7 @@ parts:
|
|||
- desktop-qt
|
||||
- ffmpeg
|
||||
- kcoreaddons
|
||||
- libjxl
|
||||
- mozjpeg
|
||||
- openal
|
||||
- openssl
|
||||
|
@ -252,6 +257,40 @@ parts:
|
|||
- extra-cmake-modules
|
||||
- desktop-qt
|
||||
|
||||
libjxl:
|
||||
source: https://github.com/libjxl/libjxl.git
|
||||
source-depth: 1
|
||||
source-tag: v0.7rc
|
||||
plugin: cmake
|
||||
build-packages:
|
||||
- libbrotli-dev
|
||||
- libhwy-dev
|
||||
- liblcms2-dev
|
||||
stage-packages:
|
||||
- libbrotli1
|
||||
- libhwy0
|
||||
- liblcms2-2
|
||||
cmake-parameters:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||
- -DBUILD_TESTING=OFF
|
||||
- -DJPEGXL_ENABLE_DEVTOOLS=OFF
|
||||
- -DJPEGXL_ENABLE_TOOLS=OFF
|
||||
- -DJPEGXL_ENABLE_DOXYGEN=OFF
|
||||
- -DJPEGXL_ENABLE_MANPAGES=OFF
|
||||
- -DJPEGXL_ENABLE_BENCHMARK=OFF
|
||||
- -DJPEGXL_ENABLE_EXAMPLES=OFF
|
||||
- -DJPEGXL_ENABLE_JNI=OFF
|
||||
- -DJPEGXL_ENABLE_SJPEG=OFF
|
||||
- -DJPEGXL_ENABLE_OPENEXR=OFF
|
||||
- -DJPEGXL_ENABLE_SKCMS=OFF
|
||||
prime:
|
||||
- -./usr/bin
|
||||
- -./usr/include
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgocnfig
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/*.so
|
||||
- -./usr/share
|
||||
|
||||
mozjpeg:
|
||||
source: https://github.com/mozilla/mozjpeg.git
|
||||
source-depth: 1
|
||||
|
|
Loading…
Add table
Reference in a new issue