Skip to content

Commit

Permalink
Update for 8.12.0-rc1
Browse files Browse the repository at this point in the history
- Update librsvg to 2.52.4.
- Update Pango to 1.49.3.
- Update ImageMagick to 6.9.11-28.
- Update libjxl to 0.6.1.
- Update Poppler to 21.11.0.
- Include cgif as dependency for GIF save support.
- Add libheif patch to improve colour conversion performance.
- Include "Upstream-Status"-labels in patches.

MXE Updates:
- Update HarfBuzz to 3.1.1.
  • Loading branch information
kleisauke committed Nov 14, 2021
1 parent 4ba87ed commit 81f8856
Show file tree
Hide file tree
Showing 21 changed files with 163 additions and 51 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,42 @@ Run the top-level [build script](build.sh) with the `--help` parameter for help.
|-----------------|-----------|--------------------------------------------------------------|
| [aom] | 3.2.0 | BSD 2-Clause + [Alliance for Open Media Patent License 1.0] |
| [cairo] | 1.17.4 | Mozilla Public License 2.0 |
| [cgif] | 0.0.2 | MIT Licence |
| [expat] | 2.4.1 | MIT Licence |
| [fontconfig] | 2.13.94 | [fontconfig Licence] (BSD-like) |
| [freetype] | 2.11.0 | [freetype Licence] (BSD-like) |
| [fribidi] | 1.0.11 | LGPLv3 |
| [gdk-pixbuf] | 2.42.6 | LGPLv3 |
| [glib] | 2.70.1 | LGPLv3 |
| [harfbuzz] | 3.0.0 | MIT Licence |
| [harfbuzz] | 3.1.1 | MIT Licence |
| [lcms] | 2.12 | MIT Licence |
| [libexif] | 0.6.23 | LGPLv3 |
| [libffi] | 3.4.2 | MIT Licence |
| [libgsf] | 1.14.47 | LGPLv3 |
| [libheif] | 1.12.0 | LGPLv3 |
| [libimagequant] | 2.4.1¹ | BSD 2-Clause |
| [libpng] | 1.6.37 | [libpng License version 2] |
| [librsvg] | 2.52.3 | LGPLv3 |
| [librsvg] | 2.52.4 | LGPLv3 |
| [libspng] | 0.7.0 | BSD 2-Clause |
| [libtiff] | 4.3.0 | [libtiff License] (BSD-like) |
| [libvips] | 8.11.4 | LGPLv3 |
| [libvips] | 8.12.0² | LGPLv3 |
| [libwebp] | 1.2.1 | New BSD License |
| [libxml2] | 2.9.12 | MIT Licence |
| [mozjpeg] | 4.0.3 | [zlib License, IJG License, BSD-3-Clause] |
| [orc] | 0.4.32 | [orc License] (BSD-like) |
| [pango] | 1.49.1 | LGPLv3 |
| [pango] | 1.49.3 | LGPLv3 |
| [pixman] | 0.40.0 | MIT Licence |
| [proxy-libintl] | 0.2 | LGPLv3 |
| [zlib-ng] | 2.0.5 | [zlib-ng Licence] |

¹ [A fork](https://github.com/lovell/libimagequant) of the BSD 2-Clause licensed libimagequant v2.4.1 is used.
² libvips is built from the [`v8.12.0-rc1`](https://github.com/libvips/libvips/tree/v8.12.0-rc1) tag, see:
https://github.com/libvips/libvips/releases/tag/v8.12.0-rc1

[aom]: https://aomedia.googlesource.com/aom/
[Alliance for Open Media Patent License 1.0]: https://aomedia.org/license/patent-license/
[cairo]: https://gitlab.freedesktop.org/cairo/cairo
[cgif]: https://github.com/dloebl/cgif
[expat]: https://github.com/libexpat/libexpat
[fontconfig]: https://gitlab.freedesktop.org/fontconfig/fontconfig
[fontconfig Licence]: https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/master/COPYING
Expand Down Expand Up @@ -95,15 +99,15 @@ Same as libvips-web + these extra dependencies:
| [cfitsio] | 4.0.0 | BSD-like |
| [fftw] | 3.3.10 | GPLv2 |
| [highway] | 0.14.2 | Apache-2.0 License |
| [imagemagick] | 6.9.12-27 | [ImageMagick License] (Apache-2.0-like) |
| [imagemagick] | 6.9.12-28 | [ImageMagick License] (Apache-2.0-like) |
| [imath] | 3.1.3 | BSD 3-Clause |
| [libjxl] | 0.6 | BSD 3-Clause |
| [libjxl] | 0.6.1 | BSD 3-Clause |
| [matio] | 1.5.21 | BSD 2-Clause |
| [nifticlib] | 2.0.0 | Public domain |
| [openexr] | 3.1.3 | BSD 3-Clause |
| [openjpeg] | 2.4.0 | BSD 2-Clause |
| [openslide] | 3.4.1 | LGPLv3 |
| [poppler] | 21.10.0 | GPLv2 |
| [poppler] | 21.11.0 | GPLv2 |
| [sqlite] | 3.36.0 | Public domain |

[brotli]: https://github.com/google/brotli
Expand Down
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fi
# Always checkout a particular revision which will successfully build.
# This ensures that it will not suddenly break a build.
# Note: Must be regularly updated.
revision="4d7331c95f14a9db5a66033c5c81d2e8dfb343f8"
revision="02852a7b690aa411ce2a2089deea25a7292a33d6"
initialize=false

if [ -f "$mxe_dir/Makefile" ]; then
Expand Down
19 changes: 19 additions & 0 deletions build/cgif.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
PKG := cgif
$(PKG)_WEBSITE := https://github.com/dloebl/cgif
$(PKG)_DESCR := A fast and lightweight GIF encoder
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.0.2
$(PKG)_CHECKSUM := 679e8012b9fe387086e6b3bcc42373dbc66fb26f8d070d7a1d23f39d42842258
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch)))
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_GH_CONF := dloebl/cgif/tags,V
$(PKG)_DEPS := cc

define $(PKG)_BUILD
'$(TARGET)-meson' \
-Dtests=false \
'$(SOURCE_DIR)' \
'$(BUILD_DIR)'

ninja -C '$(BUILD_DIR)' install
endef
4 changes: 2 additions & 2 deletions build/libjxl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PKG := libjxl
$(PKG)_WEBSITE := https://github.com/libjxl/libjxl
$(PKG)_DESCR := JPEG XL image format reference implementation
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.6
$(PKG)_CHECKSUM := 89584e20c6e537d8d65d286fd6ae48d5d6abb087ca89f3207238d8d7e6ced4dc
$(PKG)_VERSION := 0.6.1
$(PKG)_CHECKSUM := ccbd5a729d730152303be399f033b905e608309d5802d77a61a95faa092592c5
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/libjxl-[0-9]*.patch)))
$(PKG)_GH_CONF := libjxl/libjxl/tags,v
$(PKG)_DEPS := cc brotli highway lcms libjpeg-turbo libpng
Expand Down
16 changes: 8 additions & 8 deletions build/overrides.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ matio_FILE := matio-$(matio_VERSION).tar.gz
matio_URL := https://github.com/tbeu/matio/releases/download/v$(matio_VERSION)/$(matio_FILE)

# upstream version is 7, we want ImageMagick 6
imagemagick_VERSION := 6.9.12-27
imagemagick_CHECKSUM := 2dc8037c98e7cef54018bf12659a0a1602cb41c512e72763269fd4625361c069
imagemagick_VERSION := 6.9.12-28
imagemagick_CHECKSUM := 31564e017110287d675bb997233b73a6fb5bd62671ca7f708503d26232f8598b
imagemagick_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/imagemagick-[0-9]*.patch)))
imagemagick_GH_CONF := ImageMagick/ImageMagick6/tags

# upstream version is 2.40.5
librsvg_VERSION := 2.52.3
librsvg_CHECKSUM := 36e7f5bc88d78608ea7f6c05e4afe4acc1606b9af13c2845d4385073d082b8a4
librsvg_VERSION := 2.52.4
librsvg_CHECKSUM := 660ec8836a3a91587bc9384920132d4c38d1d1718c67fe160c5213fe4dec2928
librsvg_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/librsvg-[0-9]*.patch)))
librsvg_SUBDIR := librsvg-$(librsvg_VERSION)
librsvg_FILE := librsvg-$(librsvg_VERSION).tar.xz
librsvg_URL := https://download.gnome.org/sources/librsvg/$(call SHORT_PKG_VERSION,librsvg)/$(librsvg_FILE)

# upstream version is 1.37.4
pango_VERSION := 1.49.1
pango_CHECKSUM := c4266dc06c01bf0133d3815502426d209de5ea7abd895899e73e7edebaf48f6f
pango_VERSION := 1.49.3
pango_CHECKSUM := 45c403b89910a121ad8eb6d57b5be1d8f19499d39b686435dc6f29b106d2be93
pango_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/pango-[0-9]*.patch)))
pango_SUBDIR := pango-$(pango_VERSION)
pango_FILE := pango-$(pango_VERSION).tar.xz
Expand Down Expand Up @@ -139,8 +139,8 @@ fftw_FILE := fftw-$(fftw_VERSION).tar.gz
fftw_URL := http://www.fftw.org/$(fftw_FILE)

# upstream version is 21.06.1
poppler_VERSION := 21.10.0
poppler_CHECKSUM := 964b5b16290fbec3fae57c2a5bcdea49bb0736bd750c3a3711c47995c9efc394
poppler_VERSION := 21.11.0
poppler_CHECKSUM := 31b76b5cac0a48612fdd154c02d9eca01fd38fb8eaa77c1196840ecdeb53a584
poppler_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/poppler-[0-9]*.patch)))
poppler_SUBDIR := poppler-$(poppler_VERSION)
poppler_FILE := poppler-$(poppler_VERSION).tar.xz
Expand Down
8 changes: 6 additions & 2 deletions build/patches/cairo-1-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ index 1111111..2222222 100644
unset cairo_cv_warn_cflags

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <[email protected]>
Date: Wed, 12 Feb 2020 20:00:00 +0100
From: Peter Wang <[email protected]>
Date: Mon, 21 Oct 2019 12:22:44 +1100
Subject: [PATCH 2/3] Always define _cairo_utf8_to_utf16 on Windows

_cairo_utf8_to_utf16 is used by _cairo_fopen on Windows so it must
be defined even if Win32 fonts or other features are disabled.

Fixes #381

Upstream-Status: Accepted [https://gitlab.freedesktop.org/cairo/cairo/-/commit/bd54a1bf9805ebb7905b857d7234271ae496f904]

diff --git a/src/cairoint.h b/src/cairoint.h
index 1111111..2222222 100644
--- a/src/cairoint.h
Expand Down
26 changes: 24 additions & 2 deletions build/patches/glib-2-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <[email protected]>
Date: Wed, 1 Jul 2020 12:30:21 +0200
Subject: [PATCH 1/2] Revert "meson: Fix underlinking of static libintl by trying
Subject: [PATCH 1/3] Revert "meson: Fix underlinking of static libintl by trying
iconv and pthread"

This reverts commit 56271ff27119f0b6b7dc6cc0c081d64bec06b473 as it causes
Expand Down Expand Up @@ -88,7 +88,7 @@ index 1111111..2222222 100644
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <[email protected]>
Date: Mon, 13 May 2019 18:00:00 +0200
Subject: [PATCH 2/2] Disable some tests
Subject: [PATCH 2/3] Disable some tests


diff --git a/gio/tests/meson.build b/gio/tests/meson.build
Expand All @@ -113,3 +113,25 @@ index 1111111..2222222 100644

plugin_resources_c = custom_target('plugin-resources.c',
input : 'test4.gresource.xml',

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <[email protected]>
Date: Sun, 7 Nov 2021 00:22:21 +0100
Subject: [PATCH 3/3] Fix link to pcre-8.37.tar.bz2

ftp.pcre.org FTP site is no longer available

Upstream-Status: Accepted [https://gitlab.gnome.org/GNOME/glib/-/commit/e5dc299701df7189685d322cb709649ce3c9c81d]

diff --git a/subprojects/libpcre.wrap b/subprojects/libpcre.wrap
index 1111111..2222222 100644
--- a/subprojects/libpcre.wrap
+++ b/subprojects/libpcre.wrap
@@ -1,6 +1,6 @@
[wrap-file]
directory = pcre-8.37
-source_url = https://ftp.pcre.org/pub/pcre/pcre-8.37.tar.bz2
+source_url = https://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.bz2
source_filename = pcre-8.37.tar.bz2
source_hash = 51679ea8006ce31379fb0860e46dd86665d864b5020fc9cd19e71260eef4789d
patch_filename = pcre_8.37-2_patch.zip
3 changes: 3 additions & 0 deletions build/patches/imath-3-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Subject: [PATCH 1/1] Make libraries private within the pkg-config file
Assuming that Imath is built statically, this ensures that the
libraries are not exposed during linking.

Upstream-Status: Inappropriate [other]
Upstream may still build it as a shared library.

diff --git a/config/Imath.pc.in b/config/Imath.pc.in
index 1111111..2222222 100644
--- a/config/Imath.pc.in
Expand Down
5 changes: 5 additions & 0 deletions build/patches/lcms-2-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ From: Kleis Auke Wolthuizen <[email protected]>
Date: Fri, 4 Jun 2021 12:12:02 +0200
Subject: [PATCH 1/3] Ensure threadsafe alternative of gmtime is used

Upstream-Status: Accepted [https://github.com/mm2/Little-CMS/commit/45a7fea828e1fbaca3c11d1110eec65890231fd8]

diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
Expand Down Expand Up @@ -70,6 +71,8 @@ Subject: [PATCH 2/3] Provide a thread-safe get time function

Use the context pool mutex in the case of none of the re-entrant alternatives to gmtime() is available

Upstream-Status: Accepted [https://github.com/mm2/Little-CMS/commit/79e8395cd405daa9fc99d7ab154762718587887a]

diff --git a/src/cmsio0.c b/src/cmsio0.c
index 1111111..2222222 100644
--- a/src/cmsio0.c
Expand Down Expand Up @@ -169,6 +172,8 @@ being called on Windows 32-bit, which will not work.
This commit also generally ensures that a threadsafe alternative
is provided for toolchains targeting Windows i686.

Upstream-Status: Accepted [https://github.com/mm2/Little-CMS/commit/68ee2ffca663f2b705dc84614f37b179a81b826c]

diff --git a/configure.ac b/configure.ac
index 1111111..2222222 100644
--- a/configure.ac
Expand Down
1 change: 1 addition & 0 deletions build/patches/libgsf-1-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ From: Morten Welinder <[email protected]>
Date: Sat, 2 May 2020 21:24:12 -0400
Subject: [PATCH 4/4] Compilation: fix win32 build

Upstream-Status: Accepted [https://gitlab.gnome.org/GNOME/libgsf/-/commit/8441d5863cb90ed48199d6976bc6e2fcfbe3365a]

diff --git a/gsf/Makefile.am b/gsf/Makefile.am
index 1111111..2222222 100644
Expand Down
41 changes: 38 additions & 3 deletions build/patches/libheif-1-fixes.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lovell Fuller <[email protected]>
Date: Fri, 7 May 2021 21:43:51 +0100
Subject: [PATCH 1/3] aom encoder: improve performance by ~2x using new 'all intra'
Subject: [PATCH 1/4] aom encoder: improve performance by ~2x using new 'all intra'
mode

Available from aom v3.1.0, this usage mode is considered the
Expand All @@ -12,6 +12,8 @@ in significantly fewer memory allocations and halves CPU time.

libavif has already adopted this as the default.

Upstream-Status: Accepted [https://github.com/strukturag/libheif/commit/de0c159a60c2c50931321f06e36a3b6640c5c807]

diff --git a/libheif/heif_encoder_aom.cc b/libheif/heif_encoder_aom.cc
index 1111111..2222222 100644
--- a/libheif/heif_encoder_aom.cc
Expand All @@ -32,8 +34,9 @@ index 1111111..2222222 100644
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lovell Fuller <[email protected]>
Date: Sat, 8 May 2021 10:02:18 +0100
Subject: [PATCH 2/3] aom: expose decoder error messages
Subject: [PATCH 2/4] aom: expose decoder error messages

Upstream-Status: Accepted [https://github.com/strukturag/libheif/commit/7e1c1888023f6dd68cf33e537e7eb8e4d5e17588]

diff --git a/libheif/heif_decoder_aom.cc b/libheif/heif_decoder_aom.cc
index 1111111..2222222 100644
Expand All @@ -60,10 +63,12 @@ index 1111111..2222222 100644
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lovell Fuller <[email protected]>
Date: Thu, 13 May 2021 09:37:26 +0100
Subject: [PATCH 3/3] Detect and prevent negative overflow of clap box dimensions
Subject: [PATCH 3/4] Detect and prevent negative overflow of clap box dimensions
in the 32-bit unsigned to signed conversion, which can cause a divide-by-zero
floating point exception when rounded.

Upstream-Status: Accepted [https://github.com/strukturag/libheif/commit/e625a702ec7d46ce042922547d76045294af71d6]

diff --git a/libheif/box.cc b/libheif/box.cc
index 1111111..2222222 100644
--- a/libheif/box.cc
Expand All @@ -79,3 +84,33 @@ index 1111111..2222222 100644
m_clean_aperture_width = Fraction(clean_aperture_width_num,
clean_aperture_width_den);
m_clean_aperture_height = Fraction(clean_aperture_height_num,

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexander Karpinsky <[email protected]>
Date: Sun, 17 Oct 2021 13:57:05 +0300
Subject: [PATCH 4/4] Avoid lroundf using

Upstream-Status: Submitted [https://github.com/strukturag/libheif/pull/551]

diff --git a/libheif/heif_colorconversion.cc b/libheif/heif_colorconversion.cc
index 1111111..2222222 100644
--- a/libheif/heif_colorconversion.cc
+++ b/libheif/heif_colorconversion.cc
@@ -306,7 +306,7 @@ static inline uint8_t clip_int_u8(int x)

static inline uint16_t clip_f_u16(float fx, int32_t maxi)
{
- long x = lroundf(fx);
+ long x = (long int) (fx + 0.5);
if (x < 0) return 0;
if (x > maxi) return (uint16_t) maxi;
return static_cast<uint16_t>(x);
@@ -1961,7 +1961,7 @@ Op_RGB24_32_to_YCbCr::state_after_conversion(ColorState input_state,

static inline uint8_t clip_f_u8(float fx)
{
- long x = lroundf(fx);
+ long x = (long int) (fx + 0.5);
if (x < 0) return 0;
if (x > 255) return 255;
return static_cast<uint8_t>(x);
14 changes: 10 additions & 4 deletions build/patches/libjxl-0.6-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ From: Kleis Auke Wolthuizen <[email protected]>
Date: Wed, 2 Jun 2021 14:07:04 +0200
Subject: [PATCH 1/6] Remove LCMS mutex

See: https://github.com/libjxl/libjxl/pull/112
Upstream-Status: Submitted [https://github.com/libjxl/libjxl/pull/112]

diff --git a/lib/jxl/enc_color_management.cc b/lib/jxl/enc_color_management.cc
index 1111111..2222222 100644
Expand Down Expand Up @@ -339,11 +339,17 @@ index 1111111..2222222 100644
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <[email protected]>
Date: Wed, 9 Jun 2021 19:38:33 +0200
Subject: [PATCH 5/6] tsc_timer: sync with highway
Subject: [PATCH 5/6] tsc_timer.h: sync with nanobenchmark.cc from Highway (#797)

Fixes compilation with llvm-mingw targeting i686.
This file was originally originated from nanobenchmark.cc on the
Highway project. Re-syncing this file ensures that the fixes from
commit google/highway@3769cb2, google/highway@1df8ed4 and
google/highway@f2efb75 are incorporated.

See: https://github.com/libjxl/libjxl/pull/797
Including these commits also resolves the compilation with
llvm-mingw targeting i686 when build with support for profiling.

Upstream-Status: Accepted [https://github.com/libjxl/libjxl/commit/0b70567432ab630c2d71a70ebdf3792fbdbf5768]

diff --git a/lib/profiler/tsc_timer.h b/lib/profiler/tsc_timer.h
index 1111111..2222222 100644
Expand Down
3 changes: 2 additions & 1 deletion build/patches/mingw-w64-9-ucrtbased.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ From: Kleis Auke Wolthuizen <[email protected]>
Date: Sat, 18 Sep 2021 20:50:00 +0200
Subject: [PATCH 1/2] crt: Support ucrtbased

See: https://github.com/mstorsjo/llvm-mingw/issues/228
Upstream-Status: Pending [https://github.com/mstorsjo/llvm-mingw/issues/228]

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 1111111..2222222 100644
Expand Down Expand Up @@ -113,6 +113,7 @@ From: Kleis Auke Wolthuizen <[email protected]>
Date: Sat, 18 Sep 2021 21:00:00 +0200
Subject: [PATCH 2/2] crt: Regenerate Makefile.in

Upstream-Status: Pending [https://github.com/mstorsjo/llvm-mingw/issues/228]

diff --git a/mingw-w64-crt/Makefile.in b/mingw-w64-crt/Makefile.in
index 1111111..2222222 100644
Expand Down
Loading

0 comments on commit 81f8856

Please sign in to comment.