Skip to content

Commit

Permalink
fix: add patch for building libjxl
Browse files Browse the repository at this point in the history
  • Loading branch information
martabal committed Oct 15, 2024
1 parent 6be10c4 commit c9fff6c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build-libjxl.sh.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- build-libjxl.sh
+++ build-libjxl.sh
@@ -27,6 +27,8 @@ cmake \
-DJPEGXL_ENABLE_AVX512=ON \
-DJPEGXL_ENABLE_AVX512_ZEN4=ON \
-DJPEGXL_ENABLE_PLUGINS=ON \
+ -DJPEGLI_LIBJPEG_LIBRARY_SOVERSION=8 \
+ -DJPEGLI_LIBJPEG_LIBRARY_VERSION=8.2.2 \
..
cmake --build . -- -j$(nproc)
cmake --install .
7 changes: 7 additions & 0 deletions templates/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ ARG LATEST_UBUNTU_VERSION="oracular"
LABEL build_version="Build-date:- ${BUILD_DATE}"
LABEL maintainer="martabal"

# hadolint ignore=DL3045
COPY ./build-libjxl.sh.patch ./tmp

# environment settings
ENV \
IMMICH_ENV="production" \
Expand Down Expand Up @@ -206,6 +209,9 @@ RUN \
/tmp/immich-dependencies.tar.gz -C \
/tmp/immich-dependencies --strip-components=1 && \
echo "**** build immich dependencies ****" && \
mv \
/tmp/build-libjxl.sh.patch \
/tmp/immich-dependencies/server/bin && \
cd /tmp/immich-dependencies/server/bin && \
FFMPEG_VERSION=$(jq -cr '.packages[] | select(.name == "ffmpeg").version' /tmp/immich-dependencies/server/bin/build-lock.json) && \
TARGETARCH=${TARGETARCH:=$(dpkg --print-architecture)} && \
Expand All @@ -217,6 +223,7 @@ RUN \
ldconfig /usr/lib/jellyfin-ffmpeg/lib && \
ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin && \
ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin && \
patch < build-libjxl.sh.patch && \
./build-libjxl.sh && \
./build-libheif.sh && \
./build-libraw.sh && \
Expand Down

0 comments on commit c9fff6c

Please sign in to comment.