From 5f044c34f4ac3c9e85f251aa31e41f4c37b38839 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sun, 17 Mar 2024 21:01:49 +0000 Subject: [PATCH 01/34] Release v1.0.2 (libvips v8.15.2) --- npm/darwin-arm64/package.json | 2 +- npm/darwin-x64/package.json | 2 +- npm/dev-wasm32/package.json | 2 +- npm/dev/package.json | 2 +- npm/linux-arm/package.json | 2 +- npm/linux-arm64/package.json | 2 +- npm/linux-s390x/package.json | 2 +- npm/linux-x64/package.json | 2 +- npm/linuxmusl-arm64/package.json | 2 +- npm/linuxmusl-x64/package.json | 2 +- npm/package.json | 2 +- npm/win32-ia32/package.json | 2 +- npm/win32-x64/package.json | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index f64dae8d..cae6a826 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-darwin-arm64", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on macOS 64-bit ARM", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index a26fd817..d72fe07a 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-darwin-x64", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on macOS x64", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/dev-wasm32/package.json b/npm/dev-wasm32/package.json index be68c190..48f106ee 100644 --- a/npm/dev-wasm32/package.json +++ b/npm/dev-wasm32/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-dev-wasm32", - "version": "1.0.1", + "version": "1.0.2", "description": "Header files and static wasm32 libraries for libvips and dependencies to build sharp as wasm32", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/dev/package.json b/npm/dev/package.json index a493295d..1551339c 100644 --- a/npm/dev/package.json +++ b/npm/dev/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-dev", - "version": "1.0.1", + "version": "1.0.2", "description": "Header files and C++ sources for libvips and dependencies required when compiling sharp from source", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index 6bb39c5d..b2ba2a5a 100644 --- a/npm/linux-arm/package.json +++ b/npm/linux-arm/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-linux-arm", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) 32-bit ARM", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index 06ad6ff7..4c5a982a 100644 --- a/npm/linux-arm64/package.json +++ b/npm/linux-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-linux-arm64", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) 64-bit ARM", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index cbb8ec1c..5d8d71f7 100644 --- a/npm/linux-s390x/package.json +++ b/npm/linux-s390x/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-linux-s390x", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) s390x", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index 0d317c81..ff499eef 100644 --- a/npm/linux-x64/package.json +++ b/npm/linux-x64/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-linux-x64", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index 4c743b10..df6cea90 100644 --- a/npm/linuxmusl-arm64/package.json +++ b/npm/linuxmusl-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-linuxmusl-arm64", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on Linux (musl) 64-bit ARM", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index 62a5cead..274672a3 100644 --- a/npm/linuxmusl-x64/package.json +++ b/npm/linuxmusl-x64/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-linuxmusl-x64", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/package.json b/npm/package.json index 68e97dc8..787d8538 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips", - "version": "1.0.1", + "version": "1.0.2", "private": "true", "workspaces": [ "dev", diff --git a/npm/win32-ia32/package.json b/npm/win32-ia32/package.json index 835b70c4..6dc321c8 100644 --- a/npm/win32-ia32/package.json +++ b/npm/win32-ia32/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-win32-ia32", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on Windows x86", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", diff --git a/npm/win32-x64/package.json b/npm/win32-x64/package.json index 6a75b113..93cafc94 100644 --- a/npm/win32-x64/package.json +++ b/npm/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-win32-x64", - "version": "1.0.1", + "version": "1.0.2", "description": "Prebuilt libvips and dependencies for use with sharp on Windows x64", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", From 7d5110cc05b03c2c62517f2b3a8ff04565361568 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 18 Mar 2024 15:39:30 +0000 Subject: [PATCH 02/34] Re-build of dev-wasm32 as 1.0.3 Update build script to ensure the WASM Docker image is rebuilt every time (relies on Docker's cache) and therefore the version of emscripten is up-to-date. (Version 1.0.2 of dev-wasm32 package used an old emscripten.) --- build/wasm.sh | 10 +++++----- npm/dev-wasm32/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/wasm.sh b/build/wasm.sh index 5cb4f201..5eb70d89 100755 --- a/build/wasm.sh +++ b/build/wasm.sh @@ -34,15 +34,15 @@ if [ "$VERSION_VIPS" != "$VERSION_VIPS_UPSTREAM" ]; then fi # Create container with emscripten -if [ -z "$(docker images -q ${TAG})" ]; then - pushd "${DIR}" - docker build -t "${TAG}" . - popd -fi +pushd "${DIR}" +docker build -t "${TAG}" . +popd # Build libvips and dependencies as static Wasm libraries via emscripten if [ ! -d "$DIR/build/target/lib" ]; then docker run --rm -v "$PWD/${DIR}":/src "${TAG}" -c "./build.sh --disable-bindings --disable-modules --disable-jxl --enable-libvips-cpp" +else + echo "Skipping build: found existing files in $DIR/build/target" fi # Copy only the files we need diff --git a/npm/dev-wasm32/package.json b/npm/dev-wasm32/package.json index 48f106ee..40cb7cfb 100644 --- a/npm/dev-wasm32/package.json +++ b/npm/dev-wasm32/package.json @@ -1,6 +1,6 @@ { "name": "@img/sharp-libvips-dev-wasm32", - "version": "1.0.2", + "version": "1.0.3", "description": "Header files and static wasm32 libraries for libvips and dependencies to build sharp as wasm32", "author": "Lovell Fuller ", "homepage": "https://sharp.pixelplumbing.com", From 8c27a005c6ec56cf4a13b12aeff6c35adae57b1d Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 18 Mar 2024 16:03:50 +0000 Subject: [PATCH 03/34] Bump dep: harfbuzz --- build/lin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lin.sh b/build/lin.sh index 998e8e89..b8a5d1b7 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -111,7 +111,7 @@ VERSION_FREETYPE=2.13.2 VERSION_EXPAT=2.6.2 VERSION_ARCHIVE=3.7.2 VERSION_FONTCONFIG=2.15.0 -VERSION_HARFBUZZ=8.3.0 +VERSION_HARFBUZZ=8.3.1 VERSION_PIXMAN=0.43.4 VERSION_CAIRO=1.18.0 VERSION_FRIBIDI=1.0.13 From aaff2e7b37c3570127e09219aa1c92a29cae3c3a Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 24 Mar 2024 16:14:26 +0100 Subject: [PATCH 04/34] Build FreeType with libpng support (#228) Allows use of OpenType fonts with CBDT raster glyphs --- build/lin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lin.sh b/build/lin.sh index b8a5d1b7..2f9fb8e9 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -353,7 +353,7 @@ build_freetype() { $CURL https://github.com/freetype/freetype/archive/VER-${VERSION_FREETYPE//./-}.tar.gz | tar xzC ${DEPS}/freetype --strip-components=1 cd ${DEPS}/freetype meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ - -Dzlib=enabled -Dpng=disabled -Dbrotli=disabled -Dbzip2=disabled "$@" + -Dzlib=enabled -Dpng=enabled -Dbrotli=disabled -Dbzip2=disabled "$@" meson install -C _build --tag devel } build_freetype -Dharfbuzz=disabled From 6e8348267b4ec7581dabe2b048329898308d26ea Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 24 Mar 2024 17:37:26 +0100 Subject: [PATCH 05/34] Meson: specify default system directories in machine files (#227) --- build/lin.sh | 3 +-- platforms/darwin-arm64v8/meson.ini | 4 ++++ platforms/darwin-x64/meson.ini | 4 ++++ platforms/linux-arm64v8/meson.ini | 4 ++++ platforms/linux-armv6/meson.ini | 4 ++++ platforms/linux-armv7/meson.ini | 4 ++++ platforms/linux-s390x/meson.ini | 4 ++++ platforms/linux-x64/meson.ini | 4 ++++ platforms/linuxmusl-arm64v8/meson.ini | 4 ++++ platforms/linuxmusl-x64/meson.ini | 4 ++++ 10 files changed, 37 insertions(+), 2 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 2f9fb8e9..18058362 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -379,8 +379,7 @@ mkdir ${DEPS}/fontconfig $CURL https://www.freedesktop.org/software/fontconfig/release/fontconfig-${VERSION_FONTCONFIG}.tar.xz | tar xJC ${DEPS}/fontconfig --strip-components=1 cd ${DEPS}/fontconfig meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ - -Dcache-build=disabled -Ddoc=disabled -Dnls=disabled -Dtests=disabled -Dtools=disabled \ - ${LINUX:+--sysconfdir=/etc} ${DARWIN:+--sysconfdir=/usr/local/etc} + -Dcache-build=disabled -Ddoc=disabled -Dnls=disabled -Dtests=disabled -Dtools=disabled meson install -C _build --tag devel mkdir ${DEPS}/harfbuzz diff --git a/platforms/darwin-arm64v8/meson.ini b/platforms/darwin-arm64v8/meson.ini index de108582..d58ed9ee 100644 --- a/platforms/darwin-arm64v8/meson.ini +++ b/platforms/darwin-arm64v8/meson.ini @@ -12,4 +12,8 @@ objcpp = 'clang++' strip = ['strip', '-x'] [built-in options] +datadir = '/usr/local/share' +localedir = '/usr/local/share/locale' +sysconfdir = '/usr/local/etc' +localstatedir = '/usr/local/var' wrap_mode = 'nofallback' diff --git a/platforms/darwin-x64/meson.ini b/platforms/darwin-x64/meson.ini index e7e7f1cb..527b0705 100644 --- a/platforms/darwin-x64/meson.ini +++ b/platforms/darwin-x64/meson.ini @@ -2,4 +2,8 @@ strip = ['strip', '-x'] [built-in options] +datadir = '/usr/local/share' +localedir = '/usr/local/share/locale' +sysconfdir = '/usr/local/etc' +localstatedir = '/usr/local/var' wrap_mode = 'nofallback' diff --git a/platforms/linux-arm64v8/meson.ini b/platforms/linux-arm64v8/meson.ini index 981d25d0..2548a4c1 100644 --- a/platforms/linux-arm64v8/meson.ini +++ b/platforms/linux-arm64v8/meson.ini @@ -4,4 +4,8 @@ pkg-config = ['pkg-config', '--static'] [built-in options] libdir = 'lib' +datadir = '/usr/share' +localedir = '/usr/share/locale' +sysconfdir = '/etc' +localstatedir = '/var' wrap_mode = 'nofallback' diff --git a/platforms/linux-armv6/meson.ini b/platforms/linux-armv6/meson.ini index d8583a7b..0ea12eb2 100644 --- a/platforms/linux-armv6/meson.ini +++ b/platforms/linux-armv6/meson.ini @@ -16,4 +16,8 @@ pkg-config = ['arm-linux-gnueabihf-pkg-config', '--static'] [built-in options] libdir = 'lib' +datadir = '/usr/share' +localedir = '/usr/share/locale' +sysconfdir = '/etc' +localstatedir = '/var' wrap_mode = 'nofallback' diff --git a/platforms/linux-armv7/meson.ini b/platforms/linux-armv7/meson.ini index ab9c086a..85c79a5d 100644 --- a/platforms/linux-armv7/meson.ini +++ b/platforms/linux-armv7/meson.ini @@ -16,4 +16,8 @@ pkg-config = ['arm-linux-gnueabihf-pkg-config', '--static'] [built-in options] libdir = 'lib' +datadir = '/usr/share' +localedir = '/usr/share/locale' +sysconfdir = '/etc' +localstatedir = '/var' wrap_mode = 'nofallback' diff --git a/platforms/linux-s390x/meson.ini b/platforms/linux-s390x/meson.ini index b02a748b..fdb69d2f 100644 --- a/platforms/linux-s390x/meson.ini +++ b/platforms/linux-s390x/meson.ini @@ -17,4 +17,8 @@ pkg-config = ['s390x-linux-gnu-pkg-config', '--static'] [built-in options] libdir = 'lib' +datadir = '/usr/share' +localedir = '/usr/share/locale' +sysconfdir = '/etc' +localstatedir = '/var' wrap_mode = 'nofallback' diff --git a/platforms/linux-x64/meson.ini b/platforms/linux-x64/meson.ini index 981d25d0..2548a4c1 100644 --- a/platforms/linux-x64/meson.ini +++ b/platforms/linux-x64/meson.ini @@ -4,4 +4,8 @@ pkg-config = ['pkg-config', '--static'] [built-in options] libdir = 'lib' +datadir = '/usr/share' +localedir = '/usr/share/locale' +sysconfdir = '/etc' +localstatedir = '/var' wrap_mode = 'nofallback' diff --git a/platforms/linuxmusl-arm64v8/meson.ini b/platforms/linuxmusl-arm64v8/meson.ini index c8418115..435abb62 100644 --- a/platforms/linuxmusl-arm64v8/meson.ini +++ b/platforms/linuxmusl-arm64v8/meson.ini @@ -21,4 +21,8 @@ has_function_inotify_init1 = false [built-in options] libdir = 'lib' +datadir = '/usr/share' +localedir = '/usr/share/locale' +sysconfdir = '/etc' +localstatedir = '/var' wrap_mode = 'nofallback' diff --git a/platforms/linuxmusl-x64/meson.ini b/platforms/linuxmusl-x64/meson.ini index 12d1fec7..1bced856 100644 --- a/platforms/linuxmusl-x64/meson.ini +++ b/platforms/linuxmusl-x64/meson.ini @@ -8,4 +8,8 @@ pkg-config = ['pkg-config', '--static'] has_function_inotify_init1 = false [built-in options] +datadir = '/usr/share' +localedir = '/usr/share/locale' +sysconfdir = '/etc' +localstatedir = '/var' wrap_mode = 'nofallback' From 625f82e188dfb40298e805c686c906bd958a5924 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Mon, 1 Apr 2024 20:27:23 +0200 Subject: [PATCH 06/34] Bump deps: harfbuzz, pango, rsvg (#230) --- build/lin.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 18058362..4989e32b 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -111,12 +111,12 @@ VERSION_FREETYPE=2.13.2 VERSION_EXPAT=2.6.2 VERSION_ARCHIVE=3.7.2 VERSION_FONTCONFIG=2.15.0 -VERSION_HARFBUZZ=8.3.1 +VERSION_HARFBUZZ=8.4.0 VERSION_PIXMAN=0.43.4 VERSION_CAIRO=1.18.0 VERSION_FRIBIDI=1.0.13 -VERSION_PANGO=1.52.1 -VERSION_RSVG=2.57.2 +VERSION_PANGO=1.52.2 +VERSION_RSVG=2.57.3 VERSION_AOM=3.8.2 VERSION_HEIF=1.17.6 VERSION_CGIF=0.3.2 @@ -395,7 +395,7 @@ meson install -C _build --tag devel # https://bugs.freedesktop.org/show_bug.cgi?id=7331 # https://gitlab.freedesktop.org/pkg-config/pkg-config/-/commit/6d6dd43e75e2bc82cfe6544f8631b1bef6e1cf45 # TODO(kleisauke): Remove when Amazon Linux 2 reaches EOL. -sed -i'.bak' "/^Requires:/s/ freetype2,//" ${TARGET}/lib/pkgconfig/harfbuzz.pc +sed -i'.bak' "/^Requires:/s/ freetype2.*,//" ${TARGET}/lib/pkgconfig/harfbuzz.pc sed -i'.bak' "/^Libs:/s/$/ -lfreetype/" ${TARGET}/lib/pkgconfig/harfbuzz.pc build_freetype -Dharfbuzz=enabled From 8d0ec1ada5c4947464f27590795f4a999eb344d1 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 2 Apr 2024 13:10:54 +0200 Subject: [PATCH 07/34] vips: disable HBR support in heifsave (#231) --- build/lin.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/lin.sh b/build/lin.sh index 4989e32b..a4385461 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -458,6 +458,8 @@ meson install -C _build --tag devel mkdir ${DEPS}/vips $CURL https://github.com/libvips/libvips/releases/download/v${VERSION_VIPS}/vips-$(without_prerelease $VERSION_VIPS).tar.xz | tar xJC ${DEPS}/vips --strip-components=1 cd ${DEPS}/vips +# Disable HBR support in heifsave +$CURL https://github.com/kleisauke/libvips/commit/ad921cf9396dc5a224e93c71b601e87bd3a8a521.patch | patch -p1 # Link libvips.so.42 statically into libvips-cpp.so.42 sed -i'.bak' "s/library('vips'/static_&/" libvips/meson.build sed -i'.bak' "/version: library_version/{N;d;}" libvips/meson.build From a684ad0734f837bdcc03b982738a71e13654902a Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 2 Apr 2024 13:12:54 +0200 Subject: [PATCH 08/34] Update libpng licence location (#232) --- THIRD-PARTY-NOTICES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index 79e5bfc5..b84e3fac 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -23,7 +23,7 @@ used under the terms of the following licences: | libheif | LGPLv3 | | libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) | | libnsgif | MIT Licence | -| libpng | [libpng License](https://github.com/glennrp/libpng/blob/master/LICENSE) | +| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) | | librsvg | LGPLv3 | | libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) | | libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) | From 1acfeb9935c611b2659cde6157879ed564872565 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 14 Apr 2024 19:09:56 +0200 Subject: [PATCH 09/34] Bump deps: archive, cgif, webp (#235) --- build/lin.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index a4385461..f8aa1c51 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -102,14 +102,14 @@ VERSION_MOZJPEG=4.1.5 VERSION_PNG16=1.6.43 VERSION_SPNG=0.7.4 VERSION_IMAGEQUANT=2.4.1 -VERSION_WEBP=1.3.2 +VERSION_WEBP=1.4.0 VERSION_TIFF=4.6.0 VERSION_HWY=1.1.0 VERSION_PROXY_LIBINTL=0.4 VERSION_GDKPIXBUF=2.42.10 VERSION_FREETYPE=2.13.2 VERSION_EXPAT=2.6.2 -VERSION_ARCHIVE=3.7.2 +VERSION_ARCHIVE=3.7.3 VERSION_FONTCONFIG=2.15.0 VERSION_HARFBUZZ=8.4.0 VERSION_PIXMAN=0.43.4 @@ -119,7 +119,7 @@ VERSION_PANGO=1.52.2 VERSION_RSVG=2.57.3 VERSION_AOM=3.8.2 VERSION_HEIF=1.17.6 -VERSION_CGIF=0.3.2 +VERSION_CGIF=0.4.0 # Remove patch version component without_patch() { @@ -143,7 +143,7 @@ version_latest() { VERSION_SELECTOR="versions" fi if [[ "$3" == *"/"* ]]; then - VERSION_LATEST=$(git ls-remote --tags --refs https://github.com/$3.git | sort -t'/' -k3 -V | awk -F'/' 'END{print $3}' | tr -d 'vV') + VERSION_LATEST=$(git -c 'versionsort.suffix=-' ls-remote --tags --refs --sort='v:refname' https://github.com/$3.git | awk -F'/' 'END{print $3}' | tr -d 'v') else VERSION_LATEST=$($CURL "https://release-monitoring.org/api/v2/versions/?project_id=$3" | jq -j ".$VERSION_SELECTOR[0]" | tr '_' '.') fi @@ -449,7 +449,7 @@ PKG_CONFIG=${PKG_CONFIG/ --static/} ./configure --host=${CHOST} --prefix=${TARGE PKG_CONFIG_ALL_STATIC=1 make install-strip bin_SCRIPTS= mkdir ${DEPS}/cgif -$CURL https://github.com/dloebl/cgif/archive/V${VERSION_CGIF}.tar.gz | tar xzC ${DEPS}/cgif --strip-components=1 +$CURL https://github.com/dloebl/cgif/archive/v${VERSION_CGIF}.tar.gz | tar xzC ${DEPS}/cgif --strip-components=1 cd ${DEPS}/cgif CFLAGS="${CFLAGS} -O3" meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ -Dtests=false From 759ef305f378c25075b45d2042bfe965381da2f6 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sat, 27 Apr 2024 14:10:24 +0200 Subject: [PATCH 10/34] Bump deps: aom, archive, fribidi, rsvg - Remove unused gdk-pixbuf dependency. --- THIRD-PARTY-NOTICES.md | 1 - build.sh | 1 + build/lin.sh | 57 ++++++++------------------ platforms/linux-arm64v8/Dockerfile | 2 + platforms/linux-arm64v8/meson.ini | 1 - platforms/linux-armv6/Dockerfile | 2 + platforms/linux-armv6/meson.ini | 1 - platforms/linux-armv7/Dockerfile | 2 + platforms/linux-armv7/meson.ini | 1 - platforms/linux-s390x/Dockerfile | 2 + platforms/linux-s390x/meson.ini | 1 - platforms/linux-x64/Dockerfile | 2 + platforms/linux-x64/meson.ini | 1 - platforms/linuxmusl-arm64v8/Dockerfile | 14 ++++--- platforms/linuxmusl-arm64v8/meson.ini | 1 - platforms/linuxmusl-x64/Dockerfile | 12 +++--- platforms/linuxmusl-x64/meson.ini | 1 - 17 files changed, 44 insertions(+), 58 deletions(-) diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index b84e3fac..7b794812 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -12,7 +12,6 @@ used under the terms of the following licences: | fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) | | freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) | | fribidi | LGPLv3 | -| gdk-pixbuf | LGPLv3 | | glib | LGPLv3 | | harfbuzz | MIT Licence | | highway | Apache-2.0 License, BSD 3-Clause | diff --git a/build.sh b/build.sh index d32817a9..fa9350ab 100755 --- a/build.sh +++ b/build.sh @@ -60,6 +60,7 @@ for flavour in darwin-x64 darwin-arm64v8; do if [ $PLATFORM = "darwin-arm64v8" ]; then # ARM64 builds work via cross compilation from an x86_64 machine export CHOST="aarch64-apple-darwin" + export RUST_TARGET="aarch64-apple-darwin" export FLAGS+=" -target arm64-apple-macos11" # macOS 11 Big Sur is the first version to support ARM-based macs export MACOSX_DEPLOYMENT_TARGET="11.0" diff --git a/build/lin.sh b/build/lin.sh index f8aa1c51..cc37e800 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -106,18 +106,17 @@ VERSION_WEBP=1.4.0 VERSION_TIFF=4.6.0 VERSION_HWY=1.1.0 VERSION_PROXY_LIBINTL=0.4 -VERSION_GDKPIXBUF=2.42.10 VERSION_FREETYPE=2.13.2 VERSION_EXPAT=2.6.2 -VERSION_ARCHIVE=3.7.3 +VERSION_ARCHIVE=3.7.4 VERSION_FONTCONFIG=2.15.0 VERSION_HARFBUZZ=8.4.0 VERSION_PIXMAN=0.43.4 VERSION_CAIRO=1.18.0 -VERSION_FRIBIDI=1.0.13 +VERSION_FRIBIDI=1.0.14 VERSION_PANGO=1.52.2 -VERSION_RSVG=2.57.3 -VERSION_AOM=3.8.2 +VERSION_RSVG=2.58.91 +VERSION_AOM=3.9.0 VERSION_HEIF=1.17.6 VERSION_CGIF=0.4.0 @@ -165,7 +164,6 @@ version_latest "webp" "$VERSION_WEBP" "webmproject/libwebp" version_latest "tiff" "$VERSION_TIFF" "1738" version_latest "highway" "$VERSION_HWY" "205809" version_latest "proxy-libintl" "$VERSION_PROXY_LIBINTL" "frida/proxy-libintl" -version_latest "gdkpixbuf" "$VERSION_GDKPIXBUF" "9533" version_latest "freetype" "$VERSION_FREETYPE" "854" version_latest "expat" "$VERSION_EXPAT" "770" version_latest "archive" "$VERSION_ARCHIVE" "1558" @@ -175,7 +173,7 @@ version_latest "pixman" "$VERSION_PIXMAN" "3648" version_latest "cairo" "$VERSION_CAIRO" "247" version_latest "fribidi" "$VERSION_FRIBIDI" "857" version_latest "pango" "$VERSION_PANGO" "11783" -#version_latest "rsvg" "$VERSION_RSVG" "5420" # https://github.com/lovell/sharp-libvips/issues/226 +version_latest "rsvg" "$VERSION_RSVG" "5420" version_latest "aom" "$VERSION_AOM" "17628" version_latest "heif" "$VERSION_HEIF" "strukturag/libheif" version_latest "cgif" "$VERSION_CGIF" "dloebl/cgif" @@ -189,6 +187,7 @@ if [ "$DARWIN" = true ]; then if [ "$DARWIN_ARM" = true ]; then ${CARGO_HOME}/bin/rustup target add aarch64-apple-darwin fi + CFLAGS= cargo install cargo-c fi if [ "${PLATFORM%-*}" == "linuxmusl" ] || [ "$DARWIN" = true ]; then @@ -223,7 +222,7 @@ $CURL https://gist.github.com/kleisauke/284d685efa00908da99ea6afbaaf39ae/raw/36e meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ --force-fallback-for=gvdb -Dintrospection=disabled -Dnls=disabled -Dlibmount=disabled -Dlibelf=disabled \ -Dtests=false -Dglib_assert=false -Dglib_checks=false ${DARWIN:+-Dbsymbolic_functions=false} -# bin-devel is needed for glib-compile-resources, as required by gdk-pixbuf +# bin-devel is needed for glib-compile-resources meson install -C _build --tag bin-devel,devel mkdir ${DEPS}/xml2 @@ -326,27 +325,6 @@ if [ -z "$WITHOUT_HIGHWAY" ]; then make install/strip fi -mkdir ${DEPS}/gdkpixbuf -$CURL https://download.gnome.org/sources/gdk-pixbuf/$(without_patch $VERSION_GDKPIXBUF)/gdk-pixbuf-${VERSION_GDKPIXBUF}.tar.xz | tar xJC ${DEPS}/gdkpixbuf --strip-components=1 -cd ${DEPS}/gdkpixbuf -# Skip thumbnailer -sed -i'.bak' "/subdir('thumbnailer')/d" meson.build -sed -i'.bak' "/post-install/{N;N;N;N;d;}" meson.build -# Skip the built-in loaders for BMP, GIF, ICO, PNM, XPM, XBM, TGA, ICNS and QTIF -sed -i'.bak' "/'bmp':/{N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;d;}" gdk-pixbuf/meson.build -sed -i'.bak' "/'pnm':/{N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;N;d;}" gdk-pixbuf/meson.build -# Skip executables -sed -i'.bak' "/gdk-pixbuf-csource/{N;N;d;}" gdk-pixbuf/meson.build -sed -i'.bak' "/loaders_cache = custom/{N;N;N;N;N;N;N;N;N;c\\ - loaders_cache = []\\ - loaders_dep = declare_dependency() -}" gdk-pixbuf/meson.build -meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ - -Dtiff=disabled -Dintrospection=disabled -Dtests=false -Dinstalled_tests=false -Dgio_sniffing=false -Dman=false -Dbuiltin_loaders=png,jpeg -meson install -C _build --tag devel -# Include libjpeg and libpng as a dependency of gdk-pixbuf, see: https://gitlab.gnome.org/GNOME/gdk-pixbuf/merge_requests/50 -sed -i'.bak' "/^Requires:/s/$/ libjpeg, libpng16/" ${TARGET}/lib/pkgconfig/gdk-pixbuf-2.0.pc - build_freetype() { rm -rf ${DEPS}/freetype mkdir ${DEPS}/freetype @@ -435,18 +413,20 @@ meson install -C _build --tag devel mkdir ${DEPS}/rsvg $CURL https://download.gnome.org/sources/librsvg/$(without_patch $VERSION_RSVG)/librsvg-${VERSION_RSVG}.tar.xz | tar xJC ${DEPS}/rsvg --strip-components=1 cd ${DEPS}/rsvg -# Add missing pkg-config deps -sed -i'.bak' "/^Requires:/s/$/ cairo-gobject pangocairo libxml-2.0/" librsvg.pc.in -# LTO optimization does not work for staticlib+rlib compilation -sed -i'.bak' "/crate-type = /s/, \"rlib\"//" librsvg-c/Cargo.toml +# Disallow GIF and WebP embedded in SVG images +sed -i'.bak' "/image = /s/, \"gif\", \"webp\"//" rsvg/Cargo.toml # We build Cairo with `-Dzlib=disabled`, which implicitly disables the PDF/PostScript surface backends sed -i'.bak' "/cairo-rs = /s/, \"pdf\", \"ps\"//" {librsvg-c,rsvg}/Cargo.toml -# Remove the --static flag from the PKG_CONFIG env since Rust does not -# support that. Build with PKG_CONFIG_ALL_STATIC=1 instead. -PKG_CONFIG=${PKG_CONFIG/ --static/} ./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking \ - --disable-introspection --disable-pixbuf-loader ${DARWIN:+--disable-Bsymbolic} # Skip build of rsvg-convert -PKG_CONFIG_ALL_STATIC=1 make install-strip bin_SCRIPTS= +sed -i'.bak' "/subdir('rsvg_convert')/d" meson.build +# Regenerate the lockfile after making the above changes +cargo generate-lockfile +# Remove the --static flag from the PKG_CONFIG env since Rust does not +# parse that correctly. +PKG_CONFIG=${PKG_CONFIG/ --static/} meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ + -Dintrospection=disabled -Dpixbuf{,-loader}=disabled -Ddocs=disabled -Dvala=disabled -Dtests=false \ + ${RUST_TARGET:+-Dtriplet=$RUST_TARGET} +meson install -C _build --tag devel mkdir ${DEPS}/cgif $CURL https://github.com/dloebl/cgif/archive/v${VERSION_CGIF}.tar.gz | tar xzC ${DEPS}/cgif --strip-components=1 @@ -544,7 +524,6 @@ printf "{\n\ \"fontconfig\": \"${VERSION_FONTCONFIG}\",\n\ \"freetype\": \"${VERSION_FREETYPE}\",\n\ \"fribidi\": \"${VERSION_FRIBIDI}\",\n\ - \"gdkpixbuf\": \"${VERSION_GDKPIXBUF}\",\n\ \"glib\": \"${VERSION_GLIB}\",\n\ \"harfbuzz\": \"${VERSION_HARFBUZZ}\",\n\ \"heif\": \"${VERSION_HEIF}\",\n\ diff --git a/platforms/linux-arm64v8/Dockerfile b/platforms/linux-arm64v8/Dockerfile index 5d845107..60a73b24 100644 --- a/platforms/linux-arm64v8/Dockerfile +++ b/platforms/linux-arm64v8/Dockerfile @@ -28,6 +28,7 @@ RUN \ gperf \ jq \ make \ + openssl-devel \ patch \ pkgconfig \ python3 \ @@ -48,6 +49,7 @@ RUN \ --profile minimal \ --default-host aarch64-unknown-linux-gnu \ && \ + cargo install cargo-c && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ pip3 install meson ninja packaging diff --git a/platforms/linux-arm64v8/meson.ini b/platforms/linux-arm64v8/meson.ini index 2548a4c1..2f9d2ad0 100644 --- a/platforms/linux-arm64v8/meson.ini +++ b/platforms/linux-arm64v8/meson.ini @@ -1,6 +1,5 @@ [binaries] strip = 'strip' -pkg-config = ['pkg-config', '--static'] [built-in options] libdir = 'lib' diff --git a/platforms/linux-armv6/Dockerfile b/platforms/linux-armv6/Dockerfile index a28d057d..042e7278 100644 --- a/platforms/linux-armv6/Dockerfile +++ b/platforms/linux-armv6/Dockerfile @@ -23,6 +23,7 @@ RUN \ git \ gperf \ jq \ + libssl-dev \ libtool \ ninja-build \ pkg-config \ @@ -36,6 +37,7 @@ RUN \ --profile minimal \ && \ rustup target add arm-unknown-linux-gnueabihf && \ + cargo install cargo-c && \ pip3 install meson # Compiler settings diff --git a/platforms/linux-armv6/meson.ini b/platforms/linux-armv6/meson.ini index 0ea12eb2..d06f2638 100644 --- a/platforms/linux-armv6/meson.ini +++ b/platforms/linux-armv6/meson.ini @@ -12,7 +12,6 @@ nm = 'arm-rpi-linux-gnueabihf-gcc-nm' ld = 'arm-rpi-linux-gnueabihf-gcc-ld' strip = 'arm-rpi-linux-gnueabihf-strip' ranlib = 'arm-rpi-linux-gnueabihf-gcc-ranlib' -pkg-config = ['arm-linux-gnueabihf-pkg-config', '--static'] [built-in options] libdir = 'lib' diff --git a/platforms/linux-armv7/Dockerfile b/platforms/linux-armv7/Dockerfile index f5c3b1e0..cd41ef17 100644 --- a/platforms/linux-armv7/Dockerfile +++ b/platforms/linux-armv7/Dockerfile @@ -24,6 +24,7 @@ RUN \ git \ gperf \ jq \ + libssl-dev \ libtool \ ninja-build \ pkg-config \ @@ -35,6 +36,7 @@ RUN \ --profile minimal \ && \ rustup target add arm-unknown-linux-gnueabihf && \ + cargo install cargo-c && \ pip3 install meson # Compiler settings diff --git a/platforms/linux-armv7/meson.ini b/platforms/linux-armv7/meson.ini index 85c79a5d..af494050 100644 --- a/platforms/linux-armv7/meson.ini +++ b/platforms/linux-armv7/meson.ini @@ -12,7 +12,6 @@ nm = 'arm-linux-gnueabihf-gcc-nm' ld = 'arm-linux-gnueabihf-gcc-ld' strip = 'arm-linux-gnueabihf-strip' ranlib = 'arm-linux-gnueabihf-gcc-ranlib' -pkg-config = ['arm-linux-gnueabihf-pkg-config', '--static'] [built-in options] libdir = 'lib' diff --git a/platforms/linux-s390x/Dockerfile b/platforms/linux-s390x/Dockerfile index 8720d832..78d5638f 100644 --- a/platforms/linux-s390x/Dockerfile +++ b/platforms/linux-s390x/Dockerfile @@ -24,6 +24,7 @@ RUN \ git \ gperf \ jq \ + libssl-dev \ libtool \ ninja-build \ pkg-config \ @@ -35,6 +36,7 @@ RUN \ --profile minimal \ && \ rustup target add s390x-unknown-linux-gnu && \ + cargo install cargo-c && \ pip3 install meson # Handy for debugging the compiled targets in Highway (hwy_list_targets) diff --git a/platforms/linux-s390x/meson.ini b/platforms/linux-s390x/meson.ini index fdb69d2f..29cbf642 100644 --- a/platforms/linux-s390x/meson.ini +++ b/platforms/linux-s390x/meson.ini @@ -12,7 +12,6 @@ nm = 's390x-linux-gnu-gcc-nm' ld = 's390x-linux-gnu-gcc-ld' strip = 's390x-linux-gnu-strip' ranlib = 's390x-linux-gnu-gcc-ranlib' -pkg-config = ['s390x-linux-gnu-pkg-config', '--static'] #exe_wrapper = 'qemu-s390x-static' [built-in options] diff --git a/platforms/linux-x64/Dockerfile b/platforms/linux-x64/Dockerfile index 141328c1..be135987 100644 --- a/platforms/linux-x64/Dockerfile +++ b/platforms/linux-x64/Dockerfile @@ -29,6 +29,7 @@ RUN \ jq \ make \ nasm \ + openssl-devel \ patch \ pkgconfig \ python3 \ @@ -47,6 +48,7 @@ RUN \ --no-modify-path \ --profile minimal \ && \ + cargo install cargo-c && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ pip3 install meson ninja packaging diff --git a/platforms/linux-x64/meson.ini b/platforms/linux-x64/meson.ini index 2548a4c1..2f9d2ad0 100644 --- a/platforms/linux-x64/meson.ini +++ b/platforms/linux-x64/meson.ini @@ -1,6 +1,5 @@ [binaries] strip = 'strip' -pkg-config = ['pkg-config', '--static'] [built-in options] libdir = 'lib' diff --git a/platforms/linuxmusl-arm64v8/Dockerfile b/platforms/linuxmusl-arm64v8/Dockerfile index 0b6721c2..7ccc15e2 100644 --- a/platforms/linuxmusl-arm64v8/Dockerfile +++ b/platforms/linuxmusl-arm64v8/Dockerfile @@ -9,6 +9,12 @@ ENV \ CARGO_HOME="/usr/local/cargo" \ PATH="/usr/local/cargo/bin:$PATH" +# Musl defaults to static libs but we need them to be dynamic for host toolchain. +# The toolchain will produce static libs by default. +# We also need to add the directory containing libc.a to the library search path. +ENV \ + RUSTFLAGS="-Ctarget-feature=-crt-static -Lnative=/aarch64-linux-musl/lib" + # Build dependencies RUN \ apk update && apk upgrade && \ @@ -27,6 +33,7 @@ RUN \ libtool \ linux-headers \ ninja \ + openssl-dev \ pkgconf \ py3-packaging \ py3-pip \ @@ -39,6 +46,7 @@ RUN \ --profile minimal \ && \ rustup target add aarch64-unknown-linux-musl && \ + cargo install cargo-c && \ pip3 install meson # Compiler settings @@ -50,11 +58,5 @@ ENV \ FLAGS="-march=armv8-a" \ MESON="--cross-file=/root/meson.ini" -# Musl defaults to static libs but we need them to be dynamic for host toolchain. -# The toolchain will produce static libs by default. -# We also need to add the directory containing libc.a to the library search path. -ENV \ - RUSTFLAGS="-Ctarget-feature=-crt-static -Lnative=/aarch64-linux-musl/lib" - COPY Toolchain.cmake /root/ COPY meson.ini /root/ diff --git a/platforms/linuxmusl-arm64v8/meson.ini b/platforms/linuxmusl-arm64v8/meson.ini index 435abb62..4f47b7d5 100644 --- a/platforms/linuxmusl-arm64v8/meson.ini +++ b/platforms/linuxmusl-arm64v8/meson.ini @@ -12,7 +12,6 @@ nm = 'aarch64-linux-musl-nm' ld = 'aarch64-linux-musl-ld' strip = 'aarch64-linux-musl-strip' ranlib = 'aarch64-linux-musl-ranlib' -pkg-config = ['aarch64-linux-musl-pkg-config', '--static'] # Ensure we disable the inotify backend in GIO # See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2991#note_1592863 diff --git a/platforms/linuxmusl-x64/Dockerfile b/platforms/linuxmusl-x64/Dockerfile index b8dfd6df..31940da0 100644 --- a/platforms/linuxmusl-x64/Dockerfile +++ b/platforms/linuxmusl-x64/Dockerfile @@ -9,6 +9,11 @@ ENV \ CARGO_HOME="/usr/local/cargo" \ PATH="/usr/local/cargo/bin:$PATH" +# Musl defaults to static libs but we need them to be dynamic for host toolchain. +# The toolchain will produce static libs by default. +ENV \ + RUSTFLAGS="-Ctarget-feature=-crt-static" + # Build dependencies RUN \ apk update && apk upgrade && \ @@ -28,6 +33,7 @@ RUN \ linux-headers \ nasm \ ninja \ + openssl-dev \ pkgconf \ py3-packaging \ py3-pip \ @@ -37,6 +43,7 @@ RUN \ --no-modify-path \ --profile minimal \ && \ + cargo install cargo-c && \ pip3 install meson # Compiler settings @@ -46,10 +53,5 @@ ENV \ FLAGS="-march=nehalem" \ MESON="--cross-file=/root/meson.ini" -# Musl defaults to static libs but we need them to be dynamic for host toolchain. -# The toolchain will produce static libs by default. -ENV \ - RUSTFLAGS="-Ctarget-feature=-crt-static" - COPY Toolchain.cmake /root/ COPY meson.ini /root/ diff --git a/platforms/linuxmusl-x64/meson.ini b/platforms/linuxmusl-x64/meson.ini index 1bced856..8496c9bb 100644 --- a/platforms/linuxmusl-x64/meson.ini +++ b/platforms/linuxmusl-x64/meson.ini @@ -1,6 +1,5 @@ [binaries] strip = 'strip' -pkg-config = ['pkg-config', '--static'] # Ensure we disable the inotify backend in GIO # See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2991#note_1592863 From e4027448589c6a083441240197d7d011bd4fce9c Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sat, 27 Apr 2024 14:13:57 +0200 Subject: [PATCH 11/34] linux-s390x: upgrade to glibc 2.31 (Debian 11) --- platforms/linux-s390x/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platforms/linux-s390x/Dockerfile b/platforms/linux-s390x/Dockerfile index 78d5638f..11819c24 100644 --- a/platforms/linux-s390x/Dockerfile +++ b/platforms/linux-s390x/Dockerfile @@ -1,7 +1,7 @@ -FROM debian:buster +FROM debian:bullseye LABEL maintainer="Lovell Fuller " -# Create Debian 10 (glibc 2.28) container suitable for cross-compiling Linux s390x binaries +# Create Debian 11 (glibc 2.31) container suitable for cross-compiling Linux s390x binaries # Path settings ENV \ From 5f524acbc937c5f1822714ca3de0bc3d7beaf196 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 13 May 2024 15:35:13 +0100 Subject: [PATCH 12/34] Bump deps: glib, xml2 exif: patch for SRATIONAL denominator sanity check --- build/lin.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index cc37e800..4b17b760 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -94,8 +94,8 @@ CURL="curl --silent --location --retry 3 --retry-max-time 30" # Dependency version numbers VERSION_ZLIB_NG=2.1.6 VERSION_FFI=3.4.6 -VERSION_GLIB=2.80.0 -VERSION_XML2=2.12.6 +VERSION_GLIB=2.80.2 +VERSION_XML2=2.12.7 VERSION_EXIF=0.6.24 VERSION_LCMS2=2.16 VERSION_MOZJPEG=4.1.5 @@ -235,6 +235,8 @@ make install-strip mkdir ${DEPS}/exif $CURL https://github.com/libexif/libexif/releases/download/v${VERSION_EXIF}/libexif-${VERSION_EXIF}.tar.bz2 | tar xjC ${DEPS}/exif --strip-components=1 cd ${DEPS}/exif +# https://github.com/libexif/libexif/pull/147 +$CURL https://github.com/lovell/libexif/commit/db84aefa1deb103604c5860dd6486b1dd3af676b.patch | patch -p1 ./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking \ --disable-nls --without-libiconv-prefix --without-libintl-prefix \ CPPFLAGS="${CPPFLAGS} -DNO_VERBOSE_TAG_DATA" From 04439814fa726a4d60dfa743f386c416cf8a90f8 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Tue, 21 May 2024 10:13:05 +0100 Subject: [PATCH 13/34] Bump dep: harfbuzz --- build/lin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lin.sh b/build/lin.sh index 4b17b760..34fd2204 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -110,7 +110,7 @@ VERSION_FREETYPE=2.13.2 VERSION_EXPAT=2.6.2 VERSION_ARCHIVE=3.7.4 VERSION_FONTCONFIG=2.15.0 -VERSION_HARFBUZZ=8.4.0 +VERSION_HARFBUZZ=8.5.0 VERSION_PIXMAN=0.43.4 VERSION_CAIRO=1.18.0 VERSION_FRIBIDI=1.0.14 From f3aff14fc37cf7a8344d4b7242e7207d3f706b90 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Tue, 21 May 2024 10:15:20 +0100 Subject: [PATCH 14/34] CI: Upgrade to macOS 12 (Monterey) macOS 11 (Big Sur) will be removed on 28th June --- .github/workflows/build-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 66ad55d9..25026828 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -33,9 +33,9 @@ jobs: - 'win32-x64' - 'win32-arm64v8' include: - - os: macos-11 + - os: macos-12 platform: 'darwin-x64' - - os: macos-11 + - os: macos-12 platform: 'darwin-arm64v8' steps: - name: Checkout From cfe521581d7fcb94148aa78eb4fa45c69bcca84f Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 13 Jun 2024 11:24:21 +0100 Subject: [PATCH 15/34] Bump deps: aom, fribidi, glib, hwy, pango, xml2 --- build/lin.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 34fd2204..97ace25b 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -94,8 +94,8 @@ CURL="curl --silent --location --retry 3 --retry-max-time 30" # Dependency version numbers VERSION_ZLIB_NG=2.1.6 VERSION_FFI=3.4.6 -VERSION_GLIB=2.80.2 -VERSION_XML2=2.12.7 +VERSION_GLIB=2.80.3 +VERSION_XML2=2.13.0 VERSION_EXIF=0.6.24 VERSION_LCMS2=2.16 VERSION_MOZJPEG=4.1.5 @@ -104,7 +104,7 @@ VERSION_SPNG=0.7.4 VERSION_IMAGEQUANT=2.4.1 VERSION_WEBP=1.4.0 VERSION_TIFF=4.6.0 -VERSION_HWY=1.1.0 +VERSION_HWY=1.2.0 VERSION_PROXY_LIBINTL=0.4 VERSION_FREETYPE=2.13.2 VERSION_EXPAT=2.6.2 @@ -113,10 +113,10 @@ VERSION_FONTCONFIG=2.15.0 VERSION_HARFBUZZ=8.5.0 VERSION_PIXMAN=0.43.4 VERSION_CAIRO=1.18.0 -VERSION_FRIBIDI=1.0.14 -VERSION_PANGO=1.52.2 +VERSION_FRIBIDI=1.0.15 +VERSION_PANGO=1.54.0 VERSION_RSVG=2.58.91 -VERSION_AOM=3.9.0 +VERSION_AOM=3.9.1 VERSION_HEIF=1.17.6 VERSION_CGIF=0.4.0 @@ -406,10 +406,10 @@ meson install -C _build --tag devel mkdir ${DEPS}/pango $CURL https://download.gnome.org/sources/pango/$(without_patch $VERSION_PANGO)/pango-${VERSION_PANGO}.tar.xz | tar xJC ${DEPS}/pango --strip-components=1 cd ${DEPS}/pango -# Disable utils, examples, tests and tools -sed -i'.bak' "/subdir('utils')/{N;N;N;d;}" meson.build +# Disable utils and tools +sed -i'.bak' "/subdir('utils')/{N;d;}" meson.build meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ - -Dgtk_doc=false -Dintrospection=disabled -Dfontconfig=enabled + -Ddocumentation=false -Dbuild-testsuite=false -Dbuild-examples=false -Dintrospection=disabled -Dfontconfig=enabled meson install -C _build --tag devel mkdir ${DEPS}/rsvg From bc005dc4b2d164540239d566a83e15d7d6bb2d68 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 13 Jun 2024 11:56:13 +0100 Subject: [PATCH 16/34] linuxmusl: remove aom patch, now fixed upstream https://aomedia.googlesource.com/aom/+/0a0e504 --- build/lin.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 97ace25b..fb376fa2 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -251,10 +251,6 @@ meson install -C _build --tag devel mkdir ${DEPS}/aom $CURL https://storage.googleapis.com/aom-releases/libaom-${VERSION_AOM}.tar.gz | tar xzC ${DEPS}/aom --strip-components=1 cd ${DEPS}/aom -if [ "${PLATFORM%-*}" == "linuxmusl" ]; then - # https://bugs.chromium.org/p/aomedia/issues/detail?id=2754 - $CURL https://gist.github.com/lovell/3e70b51079af2c9b78e5a0e6f6ad0e59/raw/92864bf57345f57cf32307dd3b399a6bd430b78e/aom-ensure-thread-stack-size-is-at-least-256-KB.patch | patch -p1 -fi mkdir aom_build cd aom_build AOM_AS_FLAGS="${FLAGS}" cmake -G"Unix Makefiles" \ From 2335e6f20c996c7dd96b46cc4c46062a18c970b9 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 13 Jun 2024 12:22:47 +0100 Subject: [PATCH 17/34] macOS: pkg-config is already available --- .github/workflows/build-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 25026828..2c44a23a 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -44,7 +44,7 @@ jobs: if: runner.os == 'macOS' run: | pip3 install meson ninja packaging - brew install automake nasm pkg-config + brew install automake nasm - name: Build ${{ matrix.platform }} id: build-release run: ./build.sh $(cat LIBVIPS_VERSION) ${{ matrix.platform }} From 459b35f0b8b67dd3ae0bec9dc27ec6914f92981f Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 13 Jun 2024 12:23:35 +0100 Subject: [PATCH 18/34] Remove engines property from package.json files https://github.com/lovell/sharp/issues/4130 --- npm/darwin-arm64/package.json | 6 ------ npm/darwin-x64/package.json | 6 ------ npm/linux-arm/package.json | 5 +---- npm/linux-arm64/package.json | 5 +---- npm/linux-s390x/package.json | 5 +---- npm/linux-x64/package.json | 5 +---- npm/linuxmusl-arm64/package.json | 5 +---- npm/linuxmusl-x64/package.json | 5 +---- 8 files changed, 6 insertions(+), 36 deletions(-) diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index cae6a826..4db0ff46 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -27,12 +27,6 @@ "./package": "./package.json", "./versions": "./versions.json" }, - "engines": { - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", - "macos": ">=11" - }, "os": [ "darwin" ], diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index d72fe07a..d96aadc8 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -27,12 +27,6 @@ "./package": "./package.json", "./versions": "./versions.json" }, - "engines": { - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", - "macos": ">=10.13" - }, "os": [ "darwin" ], diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index b2ba2a5a..b7d0ff2a 100644 --- a/npm/linux-arm/package.json +++ b/npm/linux-arm/package.json @@ -27,10 +27,7 @@ "./versions": "./versions.json" }, "type": "commonjs", - "engines": { - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "config": { "glibc": ">=2.28" }, "os": [ diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index 4c5a982a..2d9b5ed2 100644 --- a/npm/linux-arm64/package.json +++ b/npm/linux-arm64/package.json @@ -27,10 +27,7 @@ "./package": "./package.json", "./versions": "./versions.json" }, - "engines": { - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "config": { "glibc": ">=2.26" }, "os": [ diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index 5d8d71f7..801fb02b 100644 --- a/npm/linux-s390x/package.json +++ b/npm/linux-s390x/package.json @@ -27,10 +27,7 @@ "./versions": "./versions.json" }, "type": "commonjs", - "engines": { - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "config": { "glibc": ">=2.28" }, "os": [ diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index ff499eef..af6ee5c0 100644 --- a/npm/linux-x64/package.json +++ b/npm/linux-x64/package.json @@ -27,10 +27,7 @@ "./package": "./package.json", "./versions": "./versions.json" }, - "engines": { - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "config": { "glibc": ">=2.26" }, "os": [ diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index df6cea90..2792ce2b 100644 --- a/npm/linuxmusl-arm64/package.json +++ b/npm/linuxmusl-arm64/package.json @@ -27,10 +27,7 @@ "./package": "./package.json", "./versions": "./versions.json" }, - "engines": { - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "config": { "musl": ">=1.2.2" }, "os": [ diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index 274672a3..d165920a 100644 --- a/npm/linuxmusl-x64/package.json +++ b/npm/linuxmusl-x64/package.json @@ -27,10 +27,7 @@ "./package": "./package.json", "./versions": "./versions.json" }, - "engines": { - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "config": { "musl": ">=1.2.2" }, "os": [ From ab05993c7e8f986656c3a5e4e1e9de5c77db8ef3 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 13 Jun 2024 15:39:03 +0100 Subject: [PATCH 19/34] linux-s390x: upgrade to glibc 2.31 (commit e402744) --- npm/linux-s390x/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index 801fb02b..e6a8456c 100644 --- a/npm/linux-s390x/package.json +++ b/npm/linux-s390x/package.json @@ -28,7 +28,7 @@ }, "type": "commonjs", "config": { - "glibc": ">=2.28" + "glibc": ">=2.31" }, "os": [ "linux" From 1eec548a4a239dcc5641bb352196c4c8dc7b5727 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 19 Jun 2024 07:39:32 +0100 Subject: [PATCH 20/34] Bump dep: cgif --- build/lin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lin.sh b/build/lin.sh index fb376fa2..053fec06 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -118,7 +118,7 @@ VERSION_PANGO=1.54.0 VERSION_RSVG=2.58.91 VERSION_AOM=3.9.1 VERSION_HEIF=1.17.6 -VERSION_CGIF=0.4.0 +VERSION_CGIF=0.4.1 # Remove patch version component without_patch() { From 8a25b0ac0ca482ae48c2e1d161c013def87816a7 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sat, 22 Jun 2024 11:41:03 +0200 Subject: [PATCH 21/34] Bump deps: xml2, zlib-ng (#237) --- build/lin.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 053fec06..ea5e7cb3 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -92,10 +92,10 @@ unset PKG_CONFIG_PATH CURL="curl --silent --location --retry 3 --retry-max-time 30" # Dependency version numbers -VERSION_ZLIB_NG=2.1.6 +VERSION_ZLIB_NG=2.1.7 VERSION_FFI=3.4.6 VERSION_GLIB=2.80.3 -VERSION_XML2=2.13.0 +VERSION_XML2=2.13.1 VERSION_EXIF=0.6.24 VERSION_LCMS2=2.16 VERSION_MOZJPEG=4.1.5 @@ -151,7 +151,7 @@ version_latest() { echo "$1 version $2 has been superseded by $VERSION_LATEST" fi } -version_latest "zlib-ng" "$VERSION_ZLIB_NG" "115592" +#version_latest "zlib-ng" "$VERSION_ZLIB_NG" "115592" # latest version in release monitoring is a release candidate version_latest "ffi" "$VERSION_FFI" "1611" version_latest "glib" "$VERSION_GLIB" "10024" "unstable" version_latest "xml2" "$VERSION_XML2" "1783" From 291ce6ade9c473090d59601ac02085935257116e Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Tue, 2 Jul 2024 20:26:23 +0100 Subject: [PATCH 22/34] Bump dep: zlib-ng --- build/lin.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index ea5e7cb3..633723ae 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -92,7 +92,7 @@ unset PKG_CONFIG_PATH CURL="curl --silent --location --retry 3 --retry-max-time 30" # Dependency version numbers -VERSION_ZLIB_NG=2.1.7 +VERSION_ZLIB_NG=2.2.1 VERSION_FFI=3.4.6 VERSION_GLIB=2.80.3 VERSION_XML2=2.13.1 @@ -151,7 +151,7 @@ version_latest() { echo "$1 version $2 has been superseded by $VERSION_LATEST" fi } -#version_latest "zlib-ng" "$VERSION_ZLIB_NG" "115592" # latest version in release monitoring is a release candidate +version_latest "zlib-ng" "$VERSION_ZLIB_NG" "115592" version_latest "ffi" "$VERSION_FFI" "1611" version_latest "glib" "$VERSION_GLIB" "10024" "unstable" version_latest "xml2" "$VERSION_XML2" "1783" @@ -175,7 +175,7 @@ version_latest "fribidi" "$VERSION_FRIBIDI" "857" version_latest "pango" "$VERSION_PANGO" "11783" version_latest "rsvg" "$VERSION_RSVG" "5420" version_latest "aom" "$VERSION_AOM" "17628" -version_latest "heif" "$VERSION_HEIF" "strukturag/libheif" +version_latest "heif" "$VERSION_HEIF" "64439" version_latest "cgif" "$VERSION_CGIF" "dloebl/cgif" if [ "$ALL_AT_VERSION_LATEST" = "false" ]; then exit 1; fi From e397099c39ee0e92394b88bfb06b76314e849dd0 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 3 Jul 2024 08:00:23 +0100 Subject: [PATCH 23/34] zlib-ng: prevent use of aligned_alloc with darwin-x64 This feature is unsupported on macOS 10.13. Can be removed when the minimum x64 macOS version increases to 10.15. --- build/lin.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/lin.sh b/build/lin.sh index 633723ae..2af913aa 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -203,6 +203,9 @@ fi mkdir ${DEPS}/zlib-ng $CURL https://github.com/zlib-ng/zlib-ng/archive/${VERSION_ZLIB_NG}.tar.gz | tar xzC ${DEPS}/zlib-ng --strip-components=1 cd ${DEPS}/zlib-ng +if [ "$MACOSX_DEPLOYMENT_TARGET" = "10.13" ]; then + sed -i'.bak' "/-DHAVE_ALIGNED_ALLOC/d" CMakeLists.txt +fi CFLAGS="${CFLAGS} -O3" cmake -G"Unix Makefiles" \ -DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=FALSE -DZLIB_COMPAT=TRUE -DWITH_ARMV6=FALSE From 4ef08c70b3b72292fa17e04670a0aaa439de6762 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Mon, 8 Jul 2024 11:14:28 +0200 Subject: [PATCH 24/34] Bump deps: glib, harfbuzz, xml2 (#239) --- build/lin.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 2af913aa..00629024 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -94,8 +94,8 @@ CURL="curl --silent --location --retry 3 --retry-max-time 30" # Dependency version numbers VERSION_ZLIB_NG=2.2.1 VERSION_FFI=3.4.6 -VERSION_GLIB=2.80.3 -VERSION_XML2=2.13.1 +VERSION_GLIB=2.81.0 +VERSION_XML2=2.13.2 VERSION_EXIF=0.6.24 VERSION_LCMS2=2.16 VERSION_MOZJPEG=4.1.5 @@ -110,7 +110,7 @@ VERSION_FREETYPE=2.13.2 VERSION_EXPAT=2.6.2 VERSION_ARCHIVE=3.7.4 VERSION_FONTCONFIG=2.15.0 -VERSION_HARFBUZZ=8.5.0 +VERSION_HARFBUZZ=9.0.0 VERSION_PIXMAN=0.43.4 VERSION_CAIRO=1.18.0 VERSION_FRIBIDI=1.0.15 @@ -223,7 +223,7 @@ $CURL https://download.gnome.org/sources/glib/$(without_patch $VERSION_GLIB)/gli cd ${DEPS}/glib $CURL https://gist.github.com/kleisauke/284d685efa00908da99ea6afbaaf39ae/raw/36e32c79e7962c5ea96cbb3f9c629e9145253e30/glib-without-gregex.patch | patch -p1 meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ - --force-fallback-for=gvdb -Dintrospection=disabled -Dnls=disabled -Dlibmount=disabled -Dlibelf=disabled \ + --force-fallback-for=gvdb -Dintrospection=disabled -Dnls=disabled -Dlibmount=disabled -Dsysprof=disabled -Dlibelf=disabled \ -Dtests=false -Dglib_assert=false -Dglib_checks=false ${DARWIN:+-Dbsymbolic_functions=false} # bin-devel is needed for glib-compile-resources meson install -C _build --tag bin-devel,devel @@ -258,7 +258,7 @@ mkdir aom_build cd aom_build AOM_AS_FLAGS="${FLAGS}" cmake -G"Unix Makefiles" \ -DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DBUILD_SHARED_LIBS=FALSE -DENABLE_DOCS=0 -DENABLE_TESTS=0 -DENABLE_TESTDATA=0 -DENABLE_TOOLS=0 -DENABLE_EXAMPLES=0 \ + -DBUILD_SHARED_LIBS=FALSE -DBUILD_TESTING=0 -DENABLE_DOCS=0 -DENABLE_TESTS=0 -DENABLE_TESTDATA=0 -DENABLE_TOOLS=0 -DENABLE_EXAMPLES=0 \ -DCONFIG_PIC=1 -DENABLE_NASM=1 ${WITHOUT_NEON:+-DENABLE_NEON=0} ${DARWIN_ARM:+-DCONFIG_RUNTIME_CPU_DETECT=0} \ -DCONFIG_AV1_HIGHBITDEPTH=0 -DCONFIG_WEBM_IO=0 \ .. From 2d75cd5c480b2ad921083de40dc634fb5e6fbfc7 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Mon, 8 Jul 2024 15:17:13 +0200 Subject: [PATCH 25/34] Disable build of cruft (#241) Mirrors commit libvips/libvips@ee482ca and libvips/libvips@a9e161f. --- build/lin.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 00629024..b96f73a6 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -215,7 +215,7 @@ mkdir ${DEPS}/ffi $CURL https://github.com/libffi/libffi/releases/download/v${VERSION_FFI}/libffi-${VERSION_FFI}.tar.gz | tar xzC ${DEPS}/ffi --strip-components=1 cd ${DEPS}/ffi ./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking \ - --disable-builddir --disable-multi-os-directory --disable-raw-api --disable-structs + --disable-builddir --disable-multi-os-directory --disable-raw-api --disable-structs --disable-docs make install-strip mkdir ${DEPS}/glib @@ -243,7 +243,7 @@ $CURL https://github.com/lovell/libexif/commit/db84aefa1deb103604c5860dd6486b1dd ./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking \ --disable-nls --without-libiconv-prefix --without-libintl-prefix \ CPPFLAGS="${CPPFLAGS} -DNO_VERBOSE_TAG_DATA" -make install-strip +make install-strip doc_DATA= mkdir ${DEPS}/lcms2 $CURL https://github.com/mm2/Little-CMS/releases/download/lcms${VERSION_LCMS2}/lcms2-${VERSION_LCMS2}.tar.gz | tar xzC ${DEPS}/lcms2 --strip-components=1 @@ -258,7 +258,7 @@ mkdir aom_build cd aom_build AOM_AS_FLAGS="${FLAGS}" cmake -G"Unix Makefiles" \ -DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DBUILD_SHARED_LIBS=FALSE -DBUILD_TESTING=0 -DENABLE_DOCS=0 -DENABLE_TESTS=0 -DENABLE_TESTDATA=0 -DENABLE_TOOLS=0 -DENABLE_EXAMPLES=0 \ + -DBUILD_SHARED_LIBS=FALSE -DENABLE_DOCS=0 -DENABLE_TESTS=0 -DENABLE_TESTDATA=0 -DENABLE_TOOLS=0 -DENABLE_EXAMPLES=0 \ -DCONFIG_PIC=1 -DENABLE_NASM=1 ${WITHOUT_NEON:+-DENABLE_NEON=0} ${DARWIN_ARM:+-DCONFIG_RUNTIME_CPU_DETECT=0} \ -DCONFIG_AV1_HIGHBITDEPTH=0 -DCONFIG_WEBM_IO=0 \ .. @@ -271,7 +271,7 @@ cd ${DEPS}/heif sed -i'.bak' "/^cmake_minimum_required/s/3.16.3/3.12/" CMakeLists.txt CFLAGS="${CFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3" cmake -G"Unix Makefiles" \ -DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=FALSE -DENABLE_PLUGIN_LOADING=0 -DWITH_EXAMPLES=0 -DWITH_LIBDE265=0 -DWITH_X265=0 + -DBUILD_SHARED_LIBS=FALSE -DBUILD_TESTING=0 -DENABLE_PLUGIN_LOADING=0 -DWITH_EXAMPLES=0 -DWITH_LIBDE265=0 -DWITH_X265=0 make install/strip mkdir ${DEPS}/jpeg @@ -285,14 +285,15 @@ make install/strip mkdir ${DEPS}/png16 $CURL https://downloads.sourceforge.net/project/libpng/libpng16/${VERSION_PNG16}/libpng-${VERSION_PNG16}.tar.xz | tar xJC ${DEPS}/png16 --strip-components=1 cd ${DEPS}/png16 -./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking -make install-strip +./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking \ + --disable-tools --without-binconfigs --disable-unversioned-libpng-config +make install-strip dist_man_MANS= mkdir ${DEPS}/spng $CURL https://github.com/randy408/libspng/archive/v${VERSION_SPNG}.tar.gz | tar xzC ${DEPS}/spng --strip-components=1 cd ${DEPS}/spng CFLAGS="${CFLAGS} -O3 -DSPNG_SSE=4" meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ - -Dstatic_zlib=true + -Dstatic_zlib=true -Dbuild_examples=false meson install -C _build --tag devel mkdir ${DEPS}/imagequant @@ -306,7 +307,7 @@ $CURL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/lib cd ${DEPS}/webp ./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking \ --enable-libwebpmux --enable-libwebpdemux ${WITHOUT_NEON:+--disable-neon} -make install-strip +make install-strip bin_PROGRAMS= noinst_PROGRAMS= man_MANS= mkdir ${DEPS}/tiff $CURL https://download.osgeo.org/libtiff/tiff-${VERSION_TIFF}.tar.gz | tar xzC ${DEPS}/tiff --strip-components=1 @@ -314,7 +315,7 @@ cd ${DEPS}/tiff # Propagate -pthread into CFLAGS to ensure WebP support CFLAGS="${CFLAGS} -pthread" ./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking \ --disable-tools --disable-tests --disable-contrib --disable-docs --disable-mdi --disable-pixarlog --disable-old-jpeg --disable-cxx --disable-lzma --disable-zstd -make install-strip +make install-strip noinst_PROGRAMS= dist_doc_DATA= if [ -z "$WITHOUT_HIGHWAY" ]; then mkdir ${DEPS}/hwy @@ -343,7 +344,7 @@ cd ${DEPS}/expat ./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared \ --disable-dependency-tracking --without-xmlwf --without-docbook --without-getrandom --without-sys-getrandom \ --without-libbsd --without-examples --without-tests -make install-strip +make install-strip dist_cmake_DATA= nodist_cmake_DATA= mkdir ${DEPS}/archive $CURL https://github.com/libarchive/libarchive/releases/download/v${VERSION_ARCHIVE}/libarchive-${VERSION_ARCHIVE}.tar.xz | tar xJC ${DEPS}/archive --strip-components=1 @@ -352,7 +353,7 @@ cd ${DEPS}/archive --disable-bsdtar --disable-bsdcat --disable-bsdcpio --disable-bsdunzip --disable-posix-regex-lib --disable-xattr --disable-acl \ --without-bz2lib --without-libb2 --without-iconv --without-lz4 --without-zstd --without-lzma \ --without-lzo2 --without-cng --without-openssl --without-xml2 --without-expat -make install-strip +make install-strip libarchive_man_MANS= mkdir ${DEPS}/fontconfig $CURL https://www.freedesktop.org/software/fontconfig/release/fontconfig-${VERSION_FONTCONFIG}.tar.xz | tar xJC ${DEPS}/fontconfig --strip-components=1 From ad960df07ac72b911086a514683dbd346038ff3f Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 9 Jul 2024 09:10:22 +0200 Subject: [PATCH 26/34] xml2: switch from autotools to meson (#240) --- build/lin.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index b96f73a6..8a729f50 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -231,9 +231,9 @@ meson install -C _build --tag bin-devel,devel mkdir ${DEPS}/xml2 $CURL https://download.gnome.org/sources/libxml2/$(without_patch $VERSION_XML2)/libxml2-${VERSION_XML2}.tar.xz | tar xJC ${DEPS}/xml2 --strip-components=1 cd ${DEPS}/xml2 -./configure --host=${CHOST} --prefix=${TARGET} --enable-static --disable-shared --disable-dependency-tracking \ - --with-minimum --with-reader --with-writer --with-valid --with-http --with-tree --with-zlib --without-python --without-lzma -make install-strip +meson setup _build --default-library=static --buildtype=release --strip --prefix=${TARGET} ${MESON} \ + -Dminimum=true +meson install -C _build --tag devel mkdir ${DEPS}/exif $CURL https://github.com/libexif/libexif/releases/download/v${VERSION_EXIF}/libexif-${VERSION_EXIF}.tar.bz2 | tar xjC ${DEPS}/exif --strip-components=1 From a34823b45f04b1efb923089e150eefc8ee7bb581 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 16 Jul 2024 14:32:24 +0200 Subject: [PATCH 27/34] Bump deps: heif, rsvg (#243) * Bump deps: heif, rsvg * Add tomli dependency in Docker containers Required by Cargo projects since Meson 1.5.0. Python >= 3.11 have one built-in, older Python versions require either the external `tomli` module or `toml2json` program. --- build/lin.sh | 4 ++-- platforms/linux-arm64v8/Dockerfile | 2 +- platforms/linux-armv6/Dockerfile | 2 +- platforms/linux-armv7/Dockerfile | 2 +- platforms/linux-s390x/Dockerfile | 2 +- platforms/linux-x64/Dockerfile | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 8a729f50..6544f6ee 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -115,9 +115,9 @@ VERSION_PIXMAN=0.43.4 VERSION_CAIRO=1.18.0 VERSION_FRIBIDI=1.0.15 VERSION_PANGO=1.54.0 -VERSION_RSVG=2.58.91 +VERSION_RSVG=2.58.92 VERSION_AOM=3.9.1 -VERSION_HEIF=1.17.6 +VERSION_HEIF=1.18.0 VERSION_CGIF=0.4.1 # Remove patch version component diff --git a/platforms/linux-arm64v8/Dockerfile b/platforms/linux-arm64v8/Dockerfile index 60a73b24..e034dd09 100644 --- a/platforms/linux-arm64v8/Dockerfile +++ b/platforms/linux-arm64v8/Dockerfile @@ -51,7 +51,7 @@ RUN \ && \ cargo install cargo-c && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ - pip3 install meson ninja packaging + pip3 install meson ninja packaging tomli # Compiler settings ENV \ diff --git a/platforms/linux-armv6/Dockerfile b/platforms/linux-armv6/Dockerfile index 042e7278..2ea91fec 100644 --- a/platforms/linux-armv6/Dockerfile +++ b/platforms/linux-armv6/Dockerfile @@ -38,7 +38,7 @@ RUN \ && \ rustup target add arm-unknown-linux-gnueabihf && \ cargo install cargo-c && \ - pip3 install meson + pip3 install meson tomli # Compiler settings ENV \ diff --git a/platforms/linux-armv7/Dockerfile b/platforms/linux-armv7/Dockerfile index cd41ef17..9cbbeed8 100644 --- a/platforms/linux-armv7/Dockerfile +++ b/platforms/linux-armv7/Dockerfile @@ -37,7 +37,7 @@ RUN \ && \ rustup target add arm-unknown-linux-gnueabihf && \ cargo install cargo-c && \ - pip3 install meson + pip3 install meson tomli # Compiler settings ENV \ diff --git a/platforms/linux-s390x/Dockerfile b/platforms/linux-s390x/Dockerfile index 11819c24..d88981d3 100644 --- a/platforms/linux-s390x/Dockerfile +++ b/platforms/linux-s390x/Dockerfile @@ -37,7 +37,7 @@ RUN \ && \ rustup target add s390x-unknown-linux-gnu && \ cargo install cargo-c && \ - pip3 install meson + pip3 install meson tomli # Handy for debugging the compiled targets in Highway (hwy_list_targets) #RUN apt-get install -y qemu-user-static diff --git a/platforms/linux-x64/Dockerfile b/platforms/linux-x64/Dockerfile index be135987..1743ce63 100644 --- a/platforms/linux-x64/Dockerfile +++ b/platforms/linux-x64/Dockerfile @@ -50,7 +50,7 @@ RUN \ && \ cargo install cargo-c && \ ln -s /usr/bin/cmake3 /usr/bin/cmake && \ - pip3 install meson ninja packaging + pip3 install meson ninja packaging tomli # Compiler settings ENV \ From 6651f42d25659eb200ea75f9d63ad742bbafaf0a Mon Sep 17 00:00:00 2001 From: sumitd2 <91451282+sumitd2@users.noreply.github.com> Date: Wed, 17 Jul 2024 19:57:54 +0530 Subject: [PATCH 28/34] Add linux-ppc64 (little endian) as supported platform (#242) --- .github/workflows/build-release.yml | 1 + README.md | 1 + build.sh | 3 +- npm/linux-ppc64/package.json | 42 +++++++++++++++++++ npm/package.json | 1 + npm/populate.sh | 9 +++- platforms/linux-ppc64le/Dockerfile | 55 +++++++++++++++++++++++++ platforms/linux-ppc64le/Toolchain.cmake | 15 +++++++ platforms/linux-ppc64le/meson.ini | 23 +++++++++++ 9 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 npm/linux-ppc64/package.json create mode 100644 platforms/linux-ppc64le/Dockerfile create mode 100644 platforms/linux-ppc64le/Toolchain.cmake create mode 100644 platforms/linux-ppc64le/meson.ini diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 2c44a23a..2a97cef3 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -27,6 +27,7 @@ jobs: - 'linux-armv7' - 'linuxmusl-x64' - 'linuxmusl-arm64v8' + - 'linux-ppc64le' - 'linux-s390x' - 'wasm32' - 'win32-ia32' diff --git a/README.md b/README.md index a9743ed3..48c76967 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ the same shared libraries within multiple containers. * [ARMv7-A glibc](platforms/linux-armv7/Dockerfile) * [ARM64v8-A glibc](platforms/linux-arm64v8/Dockerfile) * [ARM64v8-A musl](platforms/linuxmusl-arm64v8/Dockerfile) +* [ppc64le glibc](platforms/linux-ppc64le/Dockerfile) * [s390x glibc](platforms/linux-s390x/Dockerfile) ### Windows diff --git a/build.sh b/build.sh index fa9350ab..46337e0a 100755 --- a/build.sh +++ b/build.sh @@ -20,6 +20,7 @@ if [ $# -lt 1 ]; then echo "- linux-armv7" echo "- linux-arm64v8" echo "- linuxmusl-arm64v8" + echo "- linux-ppc64le" echo "- linux-s390x" echo "- darwin-x64" echo "- darwin-arm64v8" @@ -101,7 +102,7 @@ for flavour in win32-ia32 win32-x64 win32-arm64v8; do done # Linux (x64, ARMv6, ARMv7, ARM64v8) -for flavour in linux-x64 linuxmusl-x64 linux-armv6 linux-armv7 linux-arm64v8 linuxmusl-arm64v8 linux-s390x; do +for flavour in linux-x64 linuxmusl-x64 linux-armv6 linux-armv7 linux-arm64v8 linuxmusl-arm64v8 linux-ppc64le linux-s390x; do if [ $PLATFORM = "all" ] || [ $PLATFORM = $flavour ]; then echo "Building $flavour..." docker build -t vips-dev-$flavour platforms/$flavour diff --git a/npm/linux-ppc64/package.json b/npm/linux-ppc64/package.json new file mode 100644 index 00000000..5039afd7 --- /dev/null +++ b/npm/linux-ppc64/package.json @@ -0,0 +1,42 @@ +{ + "name": "@img/sharp-libvips-linux-ppc64", + "version": "1.0.2", + "description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) ppc64le", + "author": "Lovell Fuller ", + "homepage": "https://sharp.pixelplumbing.com", + "repository": { + "type": "git", + "url": "git+https://github.com/lovell/sharp-libvips.git", + "directory": "npm/linux-ppc64" + }, + "license": "LGPL-3.0-or-later", + "funding": { + "url": "https://opencollective.com/libvips" + }, + "preferUnplugged": true, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "versions.json" + ], + "exports": { + "./lib": "./lib/index.js", + "./package": "./package.json", + "./versions": "./versions.json" + }, + "type": "commonjs", + "config": { + "glibc": ">=2.31" + }, + "os": [ + "linux" + ], + "libc": [ + "glibc" + ], + "cpu": [ + "ppc64" + ] +} diff --git a/npm/package.json b/npm/package.json index 787d8538..a3446521 100644 --- a/npm/package.json +++ b/npm/package.json @@ -11,6 +11,7 @@ "linux-arm64", "linuxmusl-arm64", "linuxmusl-x64", + "linux-ppc64", "linux-s390x", "linux-x64", "win32-ia32", diff --git a/npm/populate.sh b/npm/populate.sh index 8f91a3a7..39229543 100755 --- a/npm/populate.sh +++ b/npm/populate.sh @@ -6,7 +6,14 @@ CURL="curl --silent --location" download_extract() { PLATFORM="$1" - PACKAGE="${1%v[68]}" # remove ARM version + case $1 in + *ppc64le) + PACKAGE="${1%??}" # package directory is named as npm/linux-ppc64 + ;; + *) + PACKAGE="${1%v[68]}" # remove ARM version + ;; + esac echo "$PLATFORM -> $PACKAGE" rm -rf "npm/$PACKAGE/include" "npm/$PACKAGE/lib" $CURL \ diff --git a/platforms/linux-ppc64le/Dockerfile b/platforms/linux-ppc64le/Dockerfile new file mode 100644 index 00000000..f2a30955 --- /dev/null +++ b/platforms/linux-ppc64le/Dockerfile @@ -0,0 +1,55 @@ +FROM debian:bullseye +LABEL maintainer="Lovell Fuller " + +# Create Debian 11 (glibc 2.31) container suitable for cross-compiling Linux ppc64le binaries + +# Path settings +ENV \ + RUSTUP_HOME="/usr/local/rustup" \ + CARGO_HOME="/usr/local/cargo" \ + PATH="/usr/local/cargo/bin:$PATH" + +# Build dependencies +RUN \ + apt-get update && \ + apt-get install -y curl && \ + dpkg --add-architecture ppc64el && \ + apt-get install -y \ + autoconf \ + autopoint \ + cmake \ + crossbuild-essential-ppc64el \ + gettext \ + git \ + gperf \ + jq \ + libssl-dev \ + libtool \ + ninja-build \ + pkg-config \ + python3-packaging \ + python3-pip \ + && \ + curl https://sh.rustup.rs -sSf | sh -s -- -y \ + --no-modify-path \ + --profile minimal \ + && \ + rustup target add powerpc64le-unknown-linux-gnu && \ + cargo install cargo-c && \ + pip3 install meson tomli + +# Handy for debugging the compiled targets in Highway (hwy_list_targets) +#RUN apt-get install -y qemu-user-static +#ENV QEMU_LD_PREFIX="/usr/powerpc64le-linux-gnu" + +# Compiler settings +ENV \ + PKG_CONFIG="powerpc64le-linux-gnu-pkg-config --static" \ + PLATFORM="linux-ppc64le" \ + CHOST="powerpc64le-linux-gnu" \ + RUST_TARGET="powerpc64le-unknown-linux-gnu" \ + FLAGS="" \ + MESON="--cross-file=/root/meson.ini" + +COPY Toolchain.cmake /root/ +COPY meson.ini /root/ diff --git a/platforms/linux-ppc64le/Toolchain.cmake b/platforms/linux-ppc64le/Toolchain.cmake new file mode 100644 index 00000000..3440b0be --- /dev/null +++ b/platforms/linux-ppc64le/Toolchain.cmake @@ -0,0 +1,15 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR ppc64le) + +SET(CMAKE_C_COMPILER powerpc64le-linux-gnu-gcc) +SET(CMAKE_CXX_COMPILER powerpc64le-linux-gnu-g++) +SET(CMAKE_AR powerpc64le-linux-gnu-gcc-ar) +SET(CMAKE_STRIP powerpc64le-linux-gnu-gcc-strip) +SET(CMAKE_RANLIB powerpc64le-linux-gnu-gcc-ranlib) + +#SET(CMAKE_CROSSCOMPILING_EMULATOR qemu-ppc64le-static) + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/platforms/linux-ppc64le/meson.ini b/platforms/linux-ppc64le/meson.ini new file mode 100644 index 00000000..d8e648a6 --- /dev/null +++ b/platforms/linux-ppc64le/meson.ini @@ -0,0 +1,23 @@ +[host_machine] +system = 'linux' +cpu_family = 'ppc64' +cpu = 'powerpc64le' +endian = 'little' + +[binaries] +c = 'powerpc64le-linux-gnu-gcc' +cpp = 'powerpc64le-linux-gnu-g++' +ar = 'powerpc64le-linux-gnu-gcc-ar' +nm = 'powerpc64le-linux-gnu-gcc-nm' +ld = 'powerpc64le-linux-gnu-gcc-ld' +strip = 'powerpc64le-linux-gnu-strip' +ranlib = 'powerpc64le-linux-gnu-gcc-ranlib' +#exe_wrapper = 'qemu-ppc64le-static' + +[built-in options] +libdir = 'lib' +datadir = '/usr/share' +localedir = '/usr/share/locale' +sysconfdir = '/etc' +localstatedir = '/var' +wrap_mode = 'nofallback' From d8ce72127239048574784145b5b55df3595f88ff Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 17 Jul 2024 15:31:21 +0100 Subject: [PATCH 29/34] linux-armv6: upgrade to Debian 11 (glibc 2.31) Allows use of the standard crossbuild tooling --- npm/linux-arm/package.json | 2 +- platforms/linux-armv6/Dockerfile | 11 +++++------ platforms/linux-armv6/Toolchain.cmake | 10 +++++----- platforms/linux-armv6/meson.ini | 14 +++++++------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index b7d0ff2a..710c1e70 100644 --- a/npm/linux-arm/package.json +++ b/npm/linux-arm/package.json @@ -28,7 +28,7 @@ }, "type": "commonjs", "config": { - "glibc": ">=2.28" + "glibc": ">=2.31" }, "os": [ "linux" diff --git a/platforms/linux-armv6/Dockerfile b/platforms/linux-armv6/Dockerfile index 2ea91fec..3ac139fa 100644 --- a/platforms/linux-armv6/Dockerfile +++ b/platforms/linux-armv6/Dockerfile @@ -1,13 +1,13 @@ -FROM debian:buster +FROM debian:bullseye LABEL maintainer="Lovell Fuller " -# Create Debian 10 (glibc 2.28) container suitable for cross-compiling Linux ARMv6 binaries +# Create Debian 11 (glibc 2.31) container suitable for cross-compiling Linux ARMv6 binaries # Path settings ENV \ RUSTUP_HOME="/usr/local/rustup" \ CARGO_HOME="/usr/local/cargo" \ - PATH="/usr/local/cargo/bin:/root/tools/x64-gcc-6.5.0/arm-rpi-linux-gnueabihf/bin:$PATH" + PATH="/usr/local/cargo/bin:$PATH" # Build dependencies RUN \ @@ -19,6 +19,7 @@ RUN \ autoconf \ autopoint \ cmake \ + crossbuild-essential-armhf \ gettext \ git \ gperf \ @@ -30,8 +31,6 @@ RUN \ python3-packaging \ python3-pip \ && \ - mkdir /root/tools && \ - curl -Ls https://github.com/rvagg/rpi-newer-crosstools/archive/master.tar.gz | tar xzC /root/tools --strip-components=1 && \ curl https://sh.rustup.rs -sSf | sh -s -- -y \ --no-modify-path \ --profile minimal \ @@ -44,7 +43,7 @@ RUN \ ENV \ PKG_CONFIG="arm-linux-gnueabihf-pkg-config --static" \ PLATFORM="linux-armv6" \ - CHOST="arm-rpi-linux-gnueabihf" \ + CHOST="arm-linux-gnueabihf" \ RUST_TARGET="arm-unknown-linux-gnueabihf" \ FLAGS="-marm -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" \ WITHOUT_NEON="true" \ diff --git a/platforms/linux-armv6/Toolchain.cmake b/platforms/linux-armv6/Toolchain.cmake index 279e2990..3ec1bca1 100644 --- a/platforms/linux-armv6/Toolchain.cmake +++ b/platforms/linux-armv6/Toolchain.cmake @@ -2,11 +2,11 @@ set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR armv6-a) -SET(CMAKE_C_COMPILER arm-rpi-linux-gnueabihf-gcc) -set(CMAKE_CXX_COMPILER arm-rpi-linux-gnueabihf-g++) -SET(CMAKE_AR arm-rpi-linux-gnueabihf-ar) -SET(CMAKE_STRIP arm-rpi-linux-gnueabihf-strip) -SET(CMAKE_RANLIB arm-rpi-linux-gnueabihf-ranlib) +SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) +set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) +SET(CMAKE_AR arm-linux-gnueabihf-ar) +SET(CMAKE_STRIP arm-linux-gnueabihf-strip) +SET(CMAKE_RANLIB arm-linux-gnueabihf-ranlib) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) diff --git a/platforms/linux-armv6/meson.ini b/platforms/linux-armv6/meson.ini index d06f2638..3920ebec 100644 --- a/platforms/linux-armv6/meson.ini +++ b/platforms/linux-armv6/meson.ini @@ -5,13 +5,13 @@ cpu = 'armv6-a' endian = 'little' [binaries] -c = 'arm-rpi-linux-gnueabihf-gcc' -cpp = 'arm-rpi-linux-gnueabihf-g++' -ar = 'arm-rpi-linux-gnueabihf-ar' -nm = 'arm-rpi-linux-gnueabihf-gcc-nm' -ld = 'arm-rpi-linux-gnueabihf-gcc-ld' -strip = 'arm-rpi-linux-gnueabihf-strip' -ranlib = 'arm-rpi-linux-gnueabihf-gcc-ranlib' +c = 'arm-linux-gnueabihf-gcc' +cpp = 'arm-linux-gnueabihf-g++' +ar = 'arm-linux-gnueabihf-ar' +nm = 'arm-linux-gnueabihf-gcc-nm' +ld = 'arm-linux-gnueabihf-gcc-ld' +strip = 'arm-linux-gnueabihf-strip' +ranlib = 'arm-linux-gnueabihf-gcc-ranlib' [built-in options] libdir = 'lib' From 43820a468ab2e896bf70d4ed50db663df69929a0 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 17 Jul 2024 16:09:04 +0100 Subject: [PATCH 30/34] Remove linux-armv7 This platform was not published to npm and GitHub releases are no longer used. Running 'npm install' on ARMv7 hardware will use the (32-bit) linux-arm package. --- .github/workflows/build-release.yml | 1 - README.md | 1 - build.sh | 5 ++- npm/populate.sh | 2 +- platforms/linux-armv7/Dockerfile | 52 --------------------------- platforms/linux-armv7/Toolchain.cmake | 13 ------- platforms/linux-armv7/meson.ini | 22 ------------ 7 files changed, 3 insertions(+), 93 deletions(-) delete mode 100644 platforms/linux-armv7/Dockerfile delete mode 100644 platforms/linux-armv7/Toolchain.cmake delete mode 100644 platforms/linux-armv7/meson.ini diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 2a97cef3..3796b6bd 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -24,7 +24,6 @@ jobs: platform: - 'linux-x64' - 'linux-armv6' - - 'linux-armv7' - 'linuxmusl-x64' - 'linuxmusl-arm64v8' - 'linux-ppc64le' diff --git a/README.md b/README.md index 48c76967..fb9c4aca 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ the same shared libraries within multiple containers. * [x64 glibc](platforms/linux-x64/Dockerfile) * [x64 musl](platforms/linuxmusl-x64/Dockerfile) * [ARMv6 glibc](platforms/linux-armv6/Dockerfile) -* [ARMv7-A glibc](platforms/linux-armv7/Dockerfile) * [ARM64v8-A glibc](platforms/linux-arm64v8/Dockerfile) * [ARM64v8-A musl](platforms/linuxmusl-arm64v8/Dockerfile) * [ppc64le glibc](platforms/linux-ppc64le/Dockerfile) diff --git a/build.sh b/build.sh index 46337e0a..40ec60c3 100755 --- a/build.sh +++ b/build.sh @@ -17,7 +17,6 @@ if [ $# -lt 1 ]; then echo "- linux-x64" echo "- linuxmusl-x64" echo "- linux-armv6" - echo "- linux-armv7" echo "- linux-arm64v8" echo "- linuxmusl-arm64v8" echo "- linux-ppc64le" @@ -101,8 +100,8 @@ for flavour in win32-ia32 win32-x64 win32-arm64v8; do fi done -# Linux (x64, ARMv6, ARMv7, ARM64v8) -for flavour in linux-x64 linuxmusl-x64 linux-armv6 linux-armv7 linux-arm64v8 linuxmusl-arm64v8 linux-ppc64le linux-s390x; do +# Linux (x64, ARMv6, ARM64v8) +for flavour in linux-x64 linuxmusl-x64 linux-armv6 linux-arm64v8 linuxmusl-arm64v8 linux-ppc64le linux-s390x; do if [ $PLATFORM = "all" ] || [ $PLATFORM = $flavour ]; then echo "Building $flavour..." docker build -t vips-dev-$flavour platforms/$flavour diff --git a/npm/populate.sh b/npm/populate.sh index 39229543..84f6c077 100755 --- a/npm/populate.sh +++ b/npm/populate.sh @@ -52,7 +52,7 @@ remove_unused() { } # Download and extract per-platform binaries -PLATFORMS=$(ls platforms --ignore=*armv7 --ignore=win32*) +PLATFORMS=$(ls platforms --ignore=win32*) for platform in $PLATFORMS; do download_extract "$platform" done diff --git a/platforms/linux-armv7/Dockerfile b/platforms/linux-armv7/Dockerfile deleted file mode 100644 index 9cbbeed8..00000000 --- a/platforms/linux-armv7/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -FROM debian:buster -LABEL maintainer="Lovell Fuller " - -# Create Debian 10 (glibc 2.28) container suitable for cross-compiling Linux ARMv7-A binaries - -# Path settings -ENV \ - RUSTUP_HOME="/usr/local/rustup" \ - CARGO_HOME="/usr/local/cargo" \ - PATH="/usr/local/cargo/bin:$PATH" - -# Build dependencies -RUN \ - apt-get update && \ - apt-get install -y curl && \ - dpkg --add-architecture armhf && \ - apt-get update && \ - apt-get install -y \ - autoconf \ - autopoint \ - cmake \ - crossbuild-essential-armhf \ - gettext \ - git \ - gperf \ - jq \ - libssl-dev \ - libtool \ - ninja-build \ - pkg-config \ - python3-packaging \ - python3-pip \ - && \ - curl https://sh.rustup.rs -sSf | sh -s -- -y \ - --no-modify-path \ - --profile minimal \ - && \ - rustup target add arm-unknown-linux-gnueabihf && \ - cargo install cargo-c && \ - pip3 install meson tomli - -# Compiler settings -ENV \ - PKG_CONFIG="arm-linux-gnueabihf-pkg-config --static" \ - PLATFORM="linux-armv7" \ - CHOST="arm-linux-gnueabihf" \ - RUST_TARGET="arm-unknown-linux-gnueabihf" \ - FLAGS="-marm -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard" \ - MESON="--cross-file=/root/meson.ini" - -COPY Toolchain.cmake /root/ -COPY meson.ini /root/ diff --git a/platforms/linux-armv7/Toolchain.cmake b/platforms/linux-armv7/Toolchain.cmake deleted file mode 100644 index 2acdf704..00000000 --- a/platforms/linux-armv7/Toolchain.cmake +++ /dev/null @@ -1,13 +0,0 @@ -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_VERSION 1) -set(CMAKE_SYSTEM_PROCESSOR armv7-a) - -SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) -SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) -SET(CMAKE_AR arm-linux-gnueabihf-gcc-ar) -SET(CMAKE_STRIP arm-linux-gnueabihf-gcc-strip) -SET(CMAKE_RANLIB arm-linux-gnueabihf-gcc-ranlib) - -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/platforms/linux-armv7/meson.ini b/platforms/linux-armv7/meson.ini deleted file mode 100644 index af494050..00000000 --- a/platforms/linux-armv7/meson.ini +++ /dev/null @@ -1,22 +0,0 @@ -[host_machine] -system = 'linux' -cpu_family = 'arm' -cpu = 'armv7-a' -endian = 'little' - -[binaries] -c = 'arm-linux-gnueabihf-gcc' -cpp = 'arm-linux-gnueabihf-g++' -ar = 'arm-linux-gnueabihf-gcc-ar' -nm = 'arm-linux-gnueabihf-gcc-nm' -ld = 'arm-linux-gnueabihf-gcc-ld' -strip = 'arm-linux-gnueabihf-strip' -ranlib = 'arm-linux-gnueabihf-gcc-ranlib' - -[built-in options] -libdir = 'lib' -datadir = '/usr/share' -localedir = '/usr/share/locale' -sysconfdir = '/etc' -localstatedir = '/var' -wrap_mode = 'nofallback' From dc8d356271c7b9d6799f7375a12e42935b91bc20 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 10 Aug 2024 10:13:32 +0100 Subject: [PATCH 31/34] Bump deps: glib, heif, rsvg, xml2 --- build/lin.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 6544f6ee..b308700b 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -94,8 +94,8 @@ CURL="curl --silent --location --retry 3 --retry-max-time 30" # Dependency version numbers VERSION_ZLIB_NG=2.2.1 VERSION_FFI=3.4.6 -VERSION_GLIB=2.81.0 -VERSION_XML2=2.13.2 +VERSION_GLIB=2.81.1 +VERSION_XML2=2.13.3 VERSION_EXIF=0.6.24 VERSION_LCMS2=2.16 VERSION_MOZJPEG=4.1.5 @@ -115,9 +115,9 @@ VERSION_PIXMAN=0.43.4 VERSION_CAIRO=1.18.0 VERSION_FRIBIDI=1.0.15 VERSION_PANGO=1.54.0 -VERSION_RSVG=2.58.92 +VERSION_RSVG=2.58.93 VERSION_AOM=3.9.1 -VERSION_HEIF=1.18.0 +VERSION_HEIF=1.18.2 VERSION_CGIF=0.4.1 # Remove patch version component From 82bee8fd32b32afc8a9a8fde59e174dd2fe88b8a Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 10 Aug 2024 14:58:03 +0100 Subject: [PATCH 32/34] Ensure cargo uses correct linker when cross-compiling --- build/lin.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/lin.sh b/build/lin.sh index b308700b..9710d265 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -85,6 +85,12 @@ export CARGO_PROFILE_RELEASE_PANIC=abort # https://reproducible-builds.org/docs/build-path/ export RUSTFLAGS+=" --remap-path-prefix=$CARGO_HOME/registry/=" +# Ensure Cargo uses correct linker when cross-compiling +if [ "$LINUX" = true ] && [ -n "$CHOST" ]; then + echo "[target.${RUST_TARGET}]" >> "$CARGO_HOME/config" + echo "linker = \"${CHOST}-gcc\"" >> "$CARGO_HOME/config" +fi + # We don't want to use any native libraries, so unset PKG_CONFIG_PATH unset PKG_CONFIG_PATH From e2d84650f12b9d12805d9b3bffe0794305f2bb72 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Mon, 12 Aug 2024 10:09:32 +0200 Subject: [PATCH 33/34] rsvg: workaround zune-jpeg issue (#244) See: https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/967#note_2088834 --- build/lin.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build/lin.sh b/build/lin.sh index 9710d265..49dd4281 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -85,12 +85,6 @@ export CARGO_PROFILE_RELEASE_PANIC=abort # https://reproducible-builds.org/docs/build-path/ export RUSTFLAGS+=" --remap-path-prefix=$CARGO_HOME/registry/=" -# Ensure Cargo uses correct linker when cross-compiling -if [ "$LINUX" = true ] && [ -n "$CHOST" ]; then - echo "[target.${RUST_TARGET}]" >> "$CARGO_HOME/config" - echo "linker = \"${CHOST}-gcc\"" >> "$CARGO_HOME/config" -fi - # We don't want to use any native libraries, so unset PKG_CONFIG_PATH unset PKG_CONFIG_PATH @@ -427,6 +421,13 @@ sed -i'.bak' "/image = /s/, \"gif\", \"webp\"//" rsvg/Cargo.toml sed -i'.bak' "/cairo-rs = /s/, \"pdf\", \"ps\"//" {librsvg-c,rsvg}/Cargo.toml # Skip build of rsvg-convert sed -i'.bak' "/subdir('rsvg_convert')/d" meson.build +# https://github.com/etemesi254/zune-image/pull/187 +# https://github.com/bevyengine/bevy/issues/14117#issuecomment-2236518551 +# https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section +cat >> Cargo.toml < Date: Mon, 12 Aug 2024 10:59:02 +0200 Subject: [PATCH 34/34] Upgrade to libvips v8.15.3 (#245) --- LIBVIPS_VERSION | 2 +- build/lin.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LIBVIPS_VERSION b/LIBVIPS_VERSION index e7ab33dc..d2c1cf91 100644 --- a/LIBVIPS_VERSION +++ b/LIBVIPS_VERSION @@ -1 +1 @@ -8.15.2 +8.15.3 diff --git a/build/lin.sh b/build/lin.sh index 49dd4281..bed28ed1 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -448,7 +448,7 @@ mkdir ${DEPS}/vips $CURL https://github.com/libvips/libvips/releases/download/v${VERSION_VIPS}/vips-$(without_prerelease $VERSION_VIPS).tar.xz | tar xJC ${DEPS}/vips --strip-components=1 cd ${DEPS}/vips # Disable HBR support in heifsave -$CURL https://github.com/kleisauke/libvips/commit/ad921cf9396dc5a224e93c71b601e87bd3a8a521.patch | patch -p1 +$CURL https://github.com/libvips/build-win64-mxe/raw/v${VERSION_VIPS}/build/patches/vips-8-heifsave-disable-hbr-support.patch | patch -p1 # Link libvips.so.42 statically into libvips-cpp.so.42 sed -i'.bak' "s/library('vips'/static_&/" libvips/meson.build sed -i'.bak' "/version: library_version/{N;d;}" libvips/meson.build