Skip to content

Commit b824fa7

Browse files
add jxl support to libvips
1 parent c408eb6 commit b824fa7

File tree

4 files changed

+53
-69
lines changed

4 files changed

+53
-69
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 62 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-13'
47-
platform: 'darwin-x64'
48-
- os: 'macos-14'
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
@@ -68,39 +42,4 @@ jobs:
6842
path: '*.tar.gz'
6943
compression-level: 0
7044
retention-days: 1
71-
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@v4
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' }}
45+
if-no-files-found: error

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
@@ -165,7 +165,7 @@ mkdir ${DEPS}/lcms
165165
$CURL https://github.com/mm2/Little-CMS/releases/download/lcms${VERSION_LCMS}/lcms2-${VERSION_LCMS}.tar.gz | tar xzC ${DEPS}/lcms --strip-components=1
166166
cd ${DEPS}/lcms
167167
CFLAGS="${CFLAGS} -O3" meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \
168-
-Dtests=disabled
168+
-Dtests=disabled
169169
meson install -C _build --tag devel
170170

171171
mkdir ${DEPS}/aom
@@ -364,6 +364,46 @@ CFLAGS="${CFLAGS} -O3" meson setup _build --default-library=static --buildtype=r
364364
-Dexamples=false -Dtests=false
365365
meson install -C _build --tag devel
366366

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

478520
# Add third-party notices

versions.properties

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ VERSION_EXIF=0.6.25
66
VERSION_EXPAT=2.7.1
77
VERSION_FFI=3.5.2
88
VERSION_FONTCONFIG=2.17.1
9-
VERSION_FREETYPE=2.14.0
9+
VERSION_FREETYPE=2.14.1
1010
VERSION_FRIBIDI=1.0.16
1111
VERSION_GLIB=2.86.0
12-
VERSION_HARFBUZZ=11.4.5
12+
VERSION_HARFBUZZ=11.5.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.0
22+
VERSION_RSVG=2.61.1
2323
VERSION_SPNG=0.7.4
2424
VERSION_TIFF=4.7.0
2525
VERSION_VIPS=8.17.1
2626
VERSION_WEBP=1.6.0
27-
VERSION_XML2=2.14.5
27+
VERSION_XML2=2.14.6
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)