Skip to content

Commit 0114ea4

Browse files
add jxl support to libvips
1 parent 20b5e89 commit 0114ea4

4 files changed

Lines changed: 51 additions & 67 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,6 @@ jobs:
2525
include:
2626
- os: 'ubuntu-24.04'
2727
platform: 'linux-x64'
28-
- os: 'ubuntu-24.04'
29-
platform: 'linux-armv6'
30-
- os: 'ubuntu-24.04'
31-
platform: 'linuxmusl-x64'
32-
- os: 'ubuntu-24.04'
33-
platform: 'linux-ppc64le'
34-
- os: 'ubuntu-24.04'
35-
platform: 'linux-riscv64'
36-
- os: 'ubuntu-24.04'
37-
platform: 'linux-s390x'
38-
- os: 'ubuntu-24.04'
39-
platform: 'dev-wasm32'
40-
- os: 'ubuntu-24.04'
41-
platform: 'win32-ia32'
42-
- os: 'ubuntu-24.04'
43-
platform: 'win32-x64'
44-
- os: 'ubuntu-24.04'
45-
platform: 'win32-arm64v8'
46-
- os: 'macos-15-intel'
47-
platform: 'darwin-x64'
48-
- os: 'macos-15'
49-
platform: 'darwin-arm64v8'
50-
- os: 'ubuntu-24.04-arm'
51-
platform: 'linux-arm64v8'
52-
- os: 'ubuntu-24.04-arm'
53-
platform: 'linuxmusl-arm64v8'
5428
steps:
5529
- name: Checkout
5630
uses: actions/checkout@v4
@@ -69,38 +43,3 @@ jobs:
6943
compression-level: 0
7044
retention-days: 1
7145
if-no-files-found: error
72-
populate-and-publish-npm-workspace:
73-
permissions:
74-
contents: write
75-
id-token: write
76-
needs: build
77-
runs-on: ubuntu-24.04
78-
steps:
79-
- name: Install Node.js
80-
uses: actions/setup-node@v5
81-
with:
82-
node-version: '24'
83-
- name: Checkout
84-
uses: actions/checkout@v4
85-
- name: Download build artifacts
86-
uses: actions/download-artifact@v4
87-
with:
88-
merge-multiple: true
89-
- name: Populate npm workspace
90-
run: ./populate-npm-workspace.sh
91-
- name: Create npm workspace tarball
92-
run: tar -vcaf npm-workspace.tar.xz -C npm .
93-
- name: Generate release notes
94-
run: ./generate-release-notes.sh
95-
- name: Create GitHub release for tag
96-
if: startsWith(github.ref, 'refs/tags/v')
97-
uses: ncipollo/release-action@v1
98-
with:
99-
artifacts: npm-workspace.tar.xz
100-
artifactContentType: application/x-xz
101-
bodyFile: release-notes.md
102-
prerelease: ${{ contains(github.ref, '-rc') }}
103-
makeLatest: ${{ !contains(github.ref, '-rc') }}
104-
- name: Publish npm packages
105-
if: startsWith(github.ref, 'refs/tags/v')
106-
run: cd npm && npm publish --workspaces --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }}

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ done
9292
for flavour in linux-x64 linuxmusl-x64 linux-armv6 linux-arm64v8 linuxmusl-arm64v8 linux-ppc64le linux-riscv64 linux-s390x; do
9393
if [ $PLATFORM = "all" ] || [ $PLATFORM = $flavour ]; then
9494
echo "Building $flavour..."
95-
docker build --pull -t vips-dev-$flavour platforms/$flavour
95+
docker build --pull --progress=plain -t vips-dev-$flavour platforms/$flavour
9696
docker run --rm -v $PWD:/packaging vips-dev-$flavour sh -c "/packaging/build/posix.sh"
9797
fi
9898
done

build/posix.sh

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ mkdir ${DEPS}/lcms
168168
$CURL https://github.com/mm2/Little-CMS/releases/download/lcms${VERSION_LCMS}/lcms2-${VERSION_LCMS}.tar.gz | tar xzC ${DEPS}/lcms --strip-components=1
169169
cd ${DEPS}/lcms
170170
CFLAGS="${CFLAGS} -O3" meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \
171-
-Dtests=disabled
171+
-Dtests=disabled
172172
meson install -C _build --tag devel
173173

174174
mkdir ${DEPS}/aom
@@ -367,6 +367,46 @@ CFLAGS="${CFLAGS} -O3" meson setup _build --default-library=static --buildtype=r
367367
-Dexamples=false -Dtests=false
368368
meson install -C _build --tag devel
369369

370+
mkdir ${DEPS}/brotli
371+
$CURL https://github.com/google/brotli/archive/refs/tags/v${VERSION_BROTLI}.tar.gz | tar xzC ${DEPS}/brotli --strip-components=1
372+
cd ${DEPS}/brotli
373+
CFLAGS="${CFLAGS} -O3" cmake -G"Unix Makefiles" \
374+
-DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib \
375+
-DBUILD_SHARED_LIBS=FALSE \
376+
-DCMAKE_BUILD_TYPE=Release
377+
make install
378+
379+
mkdir ${DEPS}/lcms2
380+
$CURL https://github.com/mm2/Little-CMS/archive/refs/tags/lcms${VERSION_LCMS2}.tar.gz | tar xzC ${DEPS}/lcms2 --strip-components=1
381+
cd ${DEPS}/lcms2
382+
# Disable utils
383+
sed -i'.bak' "/subdir('util')/d" meson.build
384+
meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON}
385+
meson install -C _build --tag devel
386+
387+
mkdir ${DEPS}/libjxl
388+
$CURL https://github.com/libjxl/libjxl/archive/refs/tags/v${VERSION_LIBJXL}.tar.gz | tar xzC ${DEPS}/libjxl --strip-components=1
389+
cd ${DEPS}/libjxl
390+
mkdir -p build
391+
cd build
392+
CFLAGS="${CFLAGS} -O3" cmake -G"Unix Makefiles" \
393+
-DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib \
394+
-DBUILD_SHARED_LIBS=OFF \
395+
-DCMAKE_BUILD_TYPE=Release \
396+
-DJPEGXL_ENABLE_FUZZERS=OFF \
397+
-DJPEGXL_ENABLE_TOOLS=OFF \
398+
-DJPEGXL_ENABLE_DOXYGEN=OFF \
399+
-DJPEGXL_ENABLE_MANPAGES=OFF \
400+
-DJPEGXL_ENABLE_BENCHMARK=OFF \
401+
-DJPEGXL_ENABLE_EXAMPLES=OFF \
402+
-DJPEGXL_ENABLE_SJPEG=OFF \
403+
-DJPEGXL_ENABLE_OPENEXR=OFF \
404+
-DJPEGXL_ENABLE_SKCMS=OFF \
405+
-DJPEGXL_ENABLE_TRANSCODE_JPEG=OFF \
406+
-DBUILD_TESTING=OFF \
407+
..
408+
make install
409+
370410
mkdir ${DEPS}/vips
371411
$CURL https://github.com/libvips/libvips/releases/download/v${VERSION_VIPS}/vips-${VERSION_VIPS}.tar.xz | tar xJC ${DEPS}/vips --strip-components=1
372412
cd ${DEPS}/vips
@@ -390,7 +430,7 @@ fi
390430
# Disable building man pages, gettext po files, tools, and (fuzz-)tests
391431
sed -i'.bak' "/subdir('man')/{N;N;N;N;d;}" meson.build
392432
CFLAGS="${CFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3" meson setup _build --default-library=shared --buildtype=release --strip --prefix=${TARGET} ${MESON} \
393-
-Ddeprecated=false -Dexamples=false -Dintrospection=disabled -Dmodules=disabled -Dcfitsio=disabled -Dfftw=disabled -Djpeg-xl=disabled \
433+
-Ddeprecated=false -Dexamples=false -Dintrospection=disabled -Dmodules=disabled -Dcfitsio=disabled -Dfftw=disabled \
394434
${WITHOUT_HIGHWAY:+-Dhighway=disabled} -Dorc=disabled -Dmagick=disabled -Dmatio=disabled -Dnifti=disabled -Dopenexr=disabled \
395435
-Dopenjpeg=disabled -Dopenslide=disabled -Dpdfium=disabled -Dpoppler=disabled -Dquantizr=disabled \
396436
-Dppm=false -Danalyze=false -Dradiance=false \
@@ -476,6 +516,8 @@ printf "{\n\
476516
\"webp\": \"${VERSION_WEBP}\",\n\
477517
\"xml2\": \"${VERSION_XML2}\",\n\
478518
\"zlib-ng\": \"${VERSION_ZLIB_NG}\"\n\
519+
\"libjxl\": \"${VERSION_LIBJXL}\"\n\
520+
479521
}" >versions.json
480522

481523
# Add third-party notices

versions.properties

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ VERSION_FFI=3.5.2
88
VERSION_FONTCONFIG=2.17.1
99
VERSION_FREETYPE=2.14.1
1010
VERSION_FRIBIDI=1.0.16
11-
VERSION_GLIB=2.86.1
12-
VERSION_HARFBUZZ=12.1.0
11+
VERSION_GLIB=2.87.0
12+
VERSION_HARFBUZZ=12.2.0
1313
VERSION_HEIF=1.20.2
1414
VERSION_HWY=1.3.0
1515
VERSION_IMAGEQUANT=2.4.1
@@ -19,10 +19,13 @@ VERSION_PANGO=1.57.0
1919
VERSION_PIXMAN=0.46.4
2020
VERSION_PNG=1.6.50
2121
VERSION_PROXY_LIBINTL=0.5
22-
VERSION_RSVG=2.61.2
22+
VERSION_RSVG=2.61.3
2323
VERSION_SPNG=0.7.4
2424
VERSION_TIFF=4.7.1
2525
VERSION_VIPS=8.17.3
2626
VERSION_WEBP=1.6.0
2727
VERSION_XML2=2.15.1
2828
VERSION_ZLIB_NG=2.2.5
29+
VERSION_BROTLI=1.1.0
30+
VERSION_LCMS2=2.17
31+
VERSION_LIBJXL=0.11.1

0 commit comments

Comments
 (0)