Skip to content

Commit ef3c272

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

File tree

4 files changed

+51
-69
lines changed

4 files changed

+51
-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: 42 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
@@ -305,6 +305,44 @@ sed -i'.bak' "/^Libs:/s/$/ -lfreetype/" ${TARGET}/lib/pkgconfig/harfbuzz.pc
305305

306306
build_freetype -Dharfbuzz=enabled
307307

308+
mkdir ${DEPS}/brotli
309+
$CURL https://github.com/google/brotli/archive/refs/tags/v${VERSION_BROTLI}.tar.gz | tar xzC ${DEPS}/brotli --strip-components=1
310+
cd ${DEPS}/brotli
311+
CFLAGS="${CFLAGS} -O3" cmake -G"Unix Makefiles" \
312+
-DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib \
313+
-DBUILD_SHARED_LIBS=FALSE \
314+
-DCMAKE_BUILD_TYPE=Release
315+
make install
316+
317+
mkdir ${DEPS}/lcms2
318+
$CURL https://github.com/mm2/Little-CMS/archive/refs/tags/lcms${VERSION_LCMS2}.tar.gz | tar xzC ${DEPS}/lcms2 --strip-components=1
319+
cd ${DEPS}/lcms2
320+
# Disable utils
321+
sed -i'.bak' "/subdir('util')/d" meson.build
322+
meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON}
323+
meson install -C _build --tag devel
324+
325+
mkdir ${DEPS}/libjxl
326+
$CURL https://github.com/libjxl/libjxl/archive/refs/tags/v${VERSION_LIBJXL}.tar.gz | tar xzC ${DEPS}/libjxl --strip-components=1
327+
cd ${DEPS}/libjxl
328+
./deps.sh
329+
mkdir -p build
330+
cd build
331+
CFLAGS="${CFLAGS} -O3" cmake -G"Unix Makefiles" \
332+
-DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib \
333+
-DBUILD_SHARED_LIBS=FALSE \
334+
-DCMAKE_BUILD_TYPE=Release \
335+
-DJPEGXL_ENABLE_FUZZERS=FALSE \
336+
-DJPEGXL_ENABLE_MANPAGES=FALSE \
337+
-DJPEGXL_ENABLE_BENCHMARK=FALSE \
338+
-DJPEGXL_ENABLE_EXAMPLES=FALSE \
339+
-DJPEGXL_ENABLE_SKCMS=FALSE \
340+
-DBUILD_TESTING=OFF \
341+
..
342+
#CFLAGS="${CFLAGS} -O3" cmake --build . -- -j$(nproc)
343+
#make -j$(nproc)
344+
make install/strip
345+
308346
mkdir ${DEPS}/pixman
309347
$CURL https://cairographics.org/releases/pixman-${VERSION_PIXMAN}.tar.gz | tar xzC ${DEPS}/pixman --strip-components=1
310348
cd ${DEPS}/pixman
@@ -387,7 +425,7 @@ fi
387425
# Disable building man pages, gettext po files, tools, and (fuzz-)tests
388426
sed -i'.bak' "/subdir('man')/{N;N;N;N;d;}" meson.build
389427
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 \
428+
-Ddeprecated=false -Dexamples=false -Dintrospection=disabled -Dmodules=disabled -Dcfitsio=disabled -Dfftw=disabled \
391429
${WITHOUT_HIGHWAY:+-Dhighway=disabled} -Dorc=disabled -Dmagick=disabled -Dmatio=disabled -Dnifti=disabled -Dopenexr=disabled \
392430
-Dopenjpeg=disabled -Dopenslide=disabled -Dpdfium=disabled -Dpoppler=disabled -Dquantizr=disabled \
393431
-Dppm=false -Danalyze=false -Dradiance=false \
@@ -473,6 +511,8 @@ printf "{\n\
473511
\"webp\": \"${VERSION_WEBP}\",\n\
474512
\"xml2\": \"${VERSION_XML2}\",\n\
475513
\"zlib-ng\": \"${VERSION_ZLIB_NG}\"\n\
514+
\"libjx\": \"${VERSION_LIBJXL}\"\n\
515+
476516
}" >versions.json
477517

478518
# 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)