Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build libjxl v0.11.0 #125

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ RUN ./configure-apt.sh && \
build-essential \
cmake \
jq \
libbrotli-dev \
libde265-dev \
libexif-dev \
libexpat1-dev \
libglib2.0-dev \
libgsf-1-dev \
# libjpeg62-turbo-dev is just for building libvips; the final image uses jpegli (/usr/local/lib/libjpeg.so.62) built alongside libjxl
libjpeg62-turbo-dev \
liblcms2-2 \
liborc-0.4-dev \
librsvg2-dev \
libspng-dev \
meson \
Expand All @@ -33,12 +34,13 @@ RUN ./configure-apt.sh && \
cpanminus && \
apt-get install -t testing --no-install-recommends -yqq \
libdav1d-dev \
libjxl-dev \
libhwy-dev \
libwebp-dev \
libio-compress-brotli-perl

COPY bin/* ./

RUN ./build-libjxl.sh
RUN ./build-libheif.sh
RUN ./build-libraw.sh
RUN ./build-imagemagick.sh
Expand Down Expand Up @@ -71,14 +73,12 @@ RUN ./configure-apt.sh && \
libglib2.0-0 \
libgomp1 \
libgsf-1-114 \
libjpeg62-turbo \
liblcms2-2 \
liblqr-1-0 \
libltdl7 \
libmimalloc2.0 \
libopenexr-3-1-30 \
libopenjp2-7 \
liborc-0.4-0 \
librsvg2-2 \
libspng0 \
mesa-utils \
Expand All @@ -92,9 +92,8 @@ RUN ./configure-apt.sh && \
apt-get install -t testing --no-install-recommends -yqq \
libio-compress-brotli-perl \
libwebp7 \
libwebpdemux2 \
libwebpmux3 \
libjxl0.9 && \
libwebpmux3 \
libhwy1t64 && \
if [ $(arch) = "x86_64" ]; then \
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-core_1.0.17193.4_amd64.deb && \
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-opencl_1.0.17193.4_amd64.deb && \
Expand All @@ -106,6 +105,7 @@ RUN ./configure-apt.sh && \
apt-get remove -yqq jq wget ca-certificates && \
apt-get autoremove -yqq && \
apt-get clean && \
dpkg -r --force-depends libjpeg62-turbo && \
rm -rf \
configure-apt.sh \
install-ffmpeg.sh \
Expand Down
34 changes: 34 additions & 0 deletions server/bin/build-libjxl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

set -e

: "${LIBJXL_REVISION:=$(jq -cr '.sources[] | select(.name == "libjxl").revision' build-lock.json)}"

git clone https://github.com/libjxl/libjxl.git
cd libjxl
git reset --hard $LIBJXL_REVISION
git submodule update --init --recursive --depth 1 --recommend-shallow

mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DJPEGXL_ENABLE_DOXYGEN=OFF \
-DJPEGXL_ENABLE_MANPAGES=OFF \
-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF \
-DJPEGXL_ENABLE_BENCHMARK=OFF \
-DJPEGXL_ENABLE_EXAMPLES=OFF \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_FORCE_SYSTEM_HWY=ON \
-DJPEGXL_ENABLE_JPEGLI=ON \
-DJPEGXL_ENABLE_JPEGLI_LIBJPEG=ON \
-DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON \
-DJPEGXL_ENABLE_AVX512=ON \
-DJPEGXL_ENABLE_AVX512_ZEN4=ON \
-DJPEGXL_ENABLE_PLUGINS=ON \
..
cmake --build . -- -j$(nproc)
cmake --install .
cd ../.. && rm -rf libjxl
ldconfig /usr/local/lib
5 changes: 5 additions & 0 deletions server/bin/build-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"version": "1.18.2",
"revision": "bf35e9eb25af8f2b7917996ad9ba849d922f8d15"
},
{
"name": "libjxl",
"version": "0.11.0",
"revision": "4df1e9eccdf86b8df4c0c7c08f529263906f9c4f"
},
{
"name": "libraw",
"version": "0.22.0-SNAPSHOT",
Expand Down
Loading