Skip to content

Commit a321b4b

Browse files
committed
Dependency version bumps
- Update Expat to 2.4.4. - Update GLib to 2.71.1. - Update LCMS to 2.13. - Update ImageMagick to 6.9.12-37. - Update OpenEXR to 3.1.4. - Build Fontconfig with Meson and patch known leaks.
1 parent ece8474 commit a321b4b

File tree

6 files changed

+227
-313
lines changed

6 files changed

+227
-313
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Run the top-level [build script](build.sh) with the `--help` parameter for help.
2020
| [aom] | 3.2.0 | BSD 2-Clause + [Alliance for Open Media Patent License 1.0] |
2121
| [cairo] | 1.17.4 | Mozilla Public License 2.0 |
2222
| [cgif] | 0.1.0 | MIT Licence |
23-
| [expat] | 2.4.3 | MIT Licence |
23+
| [expat] | 2.4.4 | MIT Licence |
2424
| [fontconfig] | 2.13.94 | [fontconfig Licence] (BSD-like) |
2525
| [freetype] | 2.11.1 | [freetype Licence] (BSD-like) |
2626
| [fribidi] | 1.0.11 | LGPLv3 |
2727
| [gdk-pixbuf] | 2.42.6 | LGPLv3 |
28-
| [glib] | 2.71.0 | LGPLv3 |
28+
| [glib] | 2.71.1 | LGPLv3 |
2929
| [harfbuzz] | 3.2.0 | MIT Licence |
30-
| [lcms] | 2.12 | MIT Licence |
30+
| [lcms] | 2.13 | MIT Licence |
3131
| [libexif] | 0.6.24 | LGPLv3 |
3232
| [libffi] | 3.4.2 | MIT Licence |
3333
| [libgsf] | 1.14.48 | LGPLv3 |
@@ -97,12 +97,12 @@ Same as libvips-web + these extra dependencies:
9797
| [cfitsio] | 4.0.0 | BSD-like |
9898
| [fftw] | 3.3.10 | GPLv2 |
9999
| [highway] | 0.15.0 | Apache-2.0 License |
100-
| [imagemagick] | 6.9.12-35 | [ImageMagick License] (Apache-2.0-like) |
100+
| [imagemagick] | 6.9.12-37 | [ImageMagick License] (Apache-2.0-like) |
101101
| [imath] | 3.1.4 | BSD 3-Clause |
102102
| [libjxl] | 0.6.1 | BSD 3-Clause |
103103
| [matio] | 1.5.21 | BSD 2-Clause |
104104
| [nifticlib] | 3.0.0 | Public domain |
105-
| [openexr] | 3.1.3 | BSD 3-Clause |
105+
| [openexr] | 3.1.4 | BSD 3-Clause |
106106
| [openjpeg] | 2.4.0 | BSD 2-Clause |
107107
| [openslide] | 3.4.1 | LGPLv3 |
108108
| [poppler] | 22.01.0 | GPLv2 |

build/overrides.mk

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ matio_FILE := matio-$(matio_VERSION).tar.gz
3030
matio_URL := https://github.com/tbeu/matio/releases/download/v$(matio_VERSION)/$(matio_FILE)
3131

3232
# upstream version is 7, we want ImageMagick 6
33-
imagemagick_VERSION := 6.9.12-35
34-
imagemagick_CHECKSUM := d698b4bfb18249180d3fdc7f225823cf04bc339e35e7dd960da1119bae6c4e83
33+
imagemagick_VERSION := 6.9.12-37
34+
imagemagick_CHECKSUM := 5cc24677145105c9187978e1575ce66eac26dc26096f927a365abd4c58b523c5
3535
imagemagick_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/imagemagick-[0-9]*.patch)))
3636
imagemagick_GH_CONF := ImageMagick/ImageMagick6/tags
3737

@@ -62,13 +62,21 @@ fribidi_FILE := fribidi-$(fribidi_VERSION).tar.xz
6262
fribidi_URL := https://github.com/fribidi/fribidi/releases/download/v$(fribidi_VERSION)/$(fribidi_FILE)
6363

6464
# upstream version is 2.50.2
65-
glib_VERSION := 2.71.0
66-
glib_CHECKSUM := 926816526f6e4bba9af726970ff87be7dac0b70d5805050c6207b7bb17ea4fca
65+
glib_VERSION := 2.71.1
66+
glib_CHECKSUM := bf1807108bceb802bb6e837baae421edb8d78d463154beaab447cc5f4fb56792
6767
glib_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/glib-[0-9]*.patch)))
6868
glib_SUBDIR := glib-$(glib_VERSION)
6969
glib_FILE := glib-$(glib_VERSION).tar.xz
7070
glib_URL := https://download.gnome.org/sources/glib/$(call SHORT_PKG_VERSION,glib)/$(glib_FILE)
7171

72+
# upstream version is 2.4.3
73+
expat_VERSION := 2.4.4
74+
expat_CHECKSUM := b5d25d6e373351c2ed19b562b4732d01d2589ac8c8e9e7962d8df1207cc311b8
75+
expat_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/expat-[0-9]*.patch)))
76+
expat_SUBDIR := expat-$(expat_VERSION)
77+
expat_FILE := expat-$(expat_VERSION).tar.xz
78+
expat_URL := https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$(expat_VERSION))/$(expat_FILE)
79+
7280
# upstream version is 1.14.30
7381
libgsf_VERSION := 1.14.48
7482
libgsf_CHECKSUM := ff86d7f1d46dd0ebefb7bd830a74a41db64362b987bf8853fff6ab4c1132b837
@@ -94,8 +102,8 @@ cairo_URL := http://cairographics.org/snapshots/$(cairo_FILE)
94102
# upstream version is 2.2.0
95103
# cannot use GH_CONF:
96104
# openexr_GH_CONF := AcademySoftwareFoundation/openexr/tags
97-
openexr_VERSION := 3.1.3
98-
openexr_CHECKSUM := 6f70a624d1321319d8269a911c4032f24950cde52e76f46e9ecbebfcb762f28c
105+
openexr_VERSION := 3.1.4
106+
openexr_CHECKSUM := cb019c3c69ada47fe340f7fa6c8b863ca0515804dc60bdb25c942c1da886930b
99107
openexr_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/openexr-[0-9]*.patch)))
100108
openexr_SUBDIR := openexr-$(openexr_VERSION)
101109
openexr_FILE := openexr-$(openexr_VERSION).tar.gz
@@ -118,6 +126,14 @@ pixman_SUBDIR := pixman-$(pixman_VERSION)
118126
pixman_FILE := pixman-$(pixman_VERSION).tar.gz
119127
pixman_URL := https://cairographics.org/releases/$(pixman_FILE)
120128

129+
# upstream version is 2.12
130+
lcms_VERSION := 2.13
131+
lcms_CHECKSUM := 0c67a5cc144029cfa34647a52809ec399aae488db4258a6a66fba318474a070f
132+
lcms_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/lcms-[0-9]*.patch)))
133+
lcms_SUBDIR := lcms2-$(lcms_VERSION)
134+
lcms_FILE := lcms2-$(lcms_VERSION).tar.gz
135+
lcms_URL := https://$(SOURCEFORGE_MIRROR)/project/lcms/lcms/$(lcms_VERSION)/$(lcms_FILE)
136+
121137
# upstream version is 2.13.1
122138
fontconfig_VERSION := 2.13.94
123139
fontconfig_CHECKSUM := a5f052cb73fd479ffb7b697980510903b563bbb55b8f7a2b001fcfb94026003c
@@ -162,7 +178,6 @@ harfbuzz_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIS
162178
libxml2_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/libxml2-[0-9]*.patch)))
163179
poppler_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/poppler-[0-9]*.patch)))
164180
tiff_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/tiff-[0-9]*.patch)))
165-
lcms_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/lcms-[0-9]*.patch)))
166181

167182
# zlib will make libzlib.dll, but we want libz.dll so we must
168183
# patch CMakeLists.txt
@@ -404,9 +419,6 @@ endef
404419
# build with -DCMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT to avoid a
405420
# horrible hack (we don't target pre-Windows XP, so it should be safe)
406421
define lcms_BUILD
407-
# need to regenerate the configure script
408-
cd '$(SOURCE_DIR)' && autoreconf -fi
409-
410422
cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
411423
$(MXE_CONFIGURE_OPTS) \
412424
--with-zlib \
@@ -466,17 +478,18 @@ define libjpeg-turbo_BUILD
466478
$(MAKE) -C '$(BUILD_DIR)' -j 1 $(subst -,/,$(INSTALL_STRIP_LIB))
467479
endef
468480

469-
# build with --disable-nls
481+
# build with the Meson build system
482+
# build with -Dnls=disabled
470483
define fontconfig_BUILD
471-
cd '$(SOURCE_DIR)' && autoreconf -fi
472-
cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
473-
$(MXE_CONFIGURE_OPTS) \
474-
--with-arch='$(TARGET)' \
475-
--with-expat='$(PREFIX)/$(TARGET)' \
476-
--disable-docs \
477-
--disable-nls
478-
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS)
479-
$(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_LIB) $(MXE_DISABLE_PROGRAMS)
484+
'$(TARGET)-meson' \
485+
-Ddoc=disabled \
486+
-Dnls=disabled \
487+
-Dtests=disabled \
488+
-Dtools=disabled \
489+
'$(SOURCE_DIR)' \
490+
'$(BUILD_DIR)'
491+
492+
ninja -C '$(BUILD_DIR)' install
480493
endef
481494

482495
# disable GObject introspection

build/patches/fontconfig-2-fixes.patch

Lines changed: 164 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
55
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
66
From: Kleis Auke Wolthuizen <[email protected]>
77
Date: Thu, 13 Feb 2020 16:00:00 +0100
8-
Subject: [PATCH 1/1] Ignore an error when loading the default config file
8+
Subject: [PATCH 1/4] Ignore an error when loading the default config file
99

1010
This error can be safely ignored since Windows doesn't ship
1111
a fonts.conf file. It can also be disabled by setting the
@@ -26,3 +26,166 @@ index 1111111..2222222 100644
2626
FcStrBufDestroy (&reason);
2727
return FcFalse;
2828
}
29+
30+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
31+
From: Akira TAGOH <[email protected]>
32+
Date: Wed, 25 Aug 2021 15:52:53 +0900
33+
Subject: [PATCH 2/4] Fix a memory leak when trying to open a non-existing file
34+
35+
https://bugzilla.redhat.com/show_bug.cgi?id=1914716
36+
37+
Upstream-Status: Accepted [https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/57032f489b2cbe98c8e7927f4c18738869831f41]
38+
39+
diff --git a/src/fccache.c b/src/fccache.c
40+
index 1111111..2222222 100644
41+
--- a/src/fccache.c
42+
+++ b/src/fccache.c
43+
@@ -1111,7 +1111,7 @@ FcCache *
44+
FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat)
45+
{
46+
int fd;
47+
- FcCache *cache;
48+
+ FcCache *cache = NULL;
49+
struct stat my_file_stat;
50+
FcConfig *config;
51+
52+
@@ -1121,11 +1121,13 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat)
53+
if (!config)
54+
return NULL;
55+
fd = FcDirCacheOpenFile (cache_file, file_stat);
56+
- if (fd < 0)
57+
- return NULL;
58+
- cache = FcDirCacheMapFd (config, fd, file_stat, NULL);
59+
+ if (fd >= 0)
60+
+ {
61+
+ cache = FcDirCacheMapFd (config, fd, file_stat, NULL);
62+
+ close (fd);
63+
+ }
64+
FcConfigDestroy (config);
65+
- close (fd);
66+
+
67+
return cache;
68+
}
69+
70+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
71+
From: Ben Wagner <[email protected]>
72+
Date: Tue, 31 Aug 2021 12:47:48 -0400
73+
Subject: [PATCH 3/4] Free local FcCache lock on contention
74+
75+
If two threads attempt to create the FcCache lock in lock_cache at the
76+
same time, both threads may create and initialize a local FcMutex. One
77+
thread will atomically make cache_lock point to its FcMutex. The other
78+
thread currently calls FcMutexFinish on the local lock, but does not
79+
free it. Change this behavior to free the unused lock.
80+
81+
Found with test/test-pthread on an LeakSanitizer enabled build.
82+
83+
Upstream-Status: Accepted [https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/efc71a3c132be05461ffc872e70390d61f27bc7e]
84+
85+
diff --git a/src/fccache.c b/src/fccache.c
86+
index 1111111..2222222 100644
87+
--- a/src/fccache.c
88+
+++ b/src/fccache.c
89+
@@ -495,6 +495,7 @@ retry:
90+
FcMutexInit (lock);
91+
if (!fc_atomic_ptr_cmpexch (&cache_lock, NULL, lock)) {
92+
FcMutexFinish (lock);
93+
+ free (lock);
94+
goto retry;
95+
}
96+
97+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
98+
From: Akira TAGOH <[email protected]>
99+
Date: Mon, 31 Jan 2022 19:03:29 +0900
100+
Subject: [PATCH 4/4] Fix possible memory leaks in FcPatternObjectAddWithBinding
101+
102+
Reported by Ruth Ivimey-Cook
103+
104+
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/302
105+
106+
Upstream-Status: Accepted [https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/875878efb7ddd57303b75320b4ea10ee2b9cf370]
107+
108+
diff --git a/src/fcpat.c b/src/fcpat.c
109+
index 1111111..2222222 100644
110+
--- a/src/fcpat.c
111+
+++ b/src/fcpat.c
112+
@@ -142,27 +142,7 @@ FcValueListDestroy (FcValueListPtr l)
113+
FcValueListPtr next;
114+
for (; l; l = next)
115+
{
116+
- switch ((int) l->value.type) {
117+
- case FcTypeString:
118+
- FcFree (l->value.u.s);
119+
- break;
120+
- case FcTypeMatrix:
121+
- FcMatrixFree ((FcMatrix *)l->value.u.m);
122+
- break;
123+
- case FcTypeCharSet:
124+
- FcCharSetDestroy
125+
- ((FcCharSet *) (l->value.u.c));
126+
- break;
127+
- case FcTypeLangSet:
128+
- FcLangSetDestroy
129+
- ((FcLangSet *) (l->value.u.l));
130+
- break;
131+
- case FcTypeRange:
132+
- FcRangeDestroy ((FcRange *) (l->value.u.r));
133+
- break;
134+
- default:
135+
- break;
136+
- }
137+
+ FcValueDestroy (l->value);
138+
next = FcValueListNext(l);
139+
free(l);
140+
}
141+
@@ -708,30 +688,29 @@ FcPatternObjectAddWithBinding (FcPattern *p,
142+
if (!new)
143+
goto bail0;
144+
145+
- value = FcValueSave (value);
146+
- if (value.type == FcTypeVoid)
147+
+ new->value = FcValueSave (value);
148+
+ new->binding = binding;
149+
+ new->next = NULL;
150+
+
151+
+ if (new->value.type == FcTypeVoid)
152+
goto bail1;
153+
154+
/*
155+
* Make sure the stored type is valid for built-in objects
156+
*/
157+
- if (!FcObjectValidType (object, value.type))
158+
+ if (!FcObjectValidType (object, new->value.type))
159+
{
160+
fprintf (stderr,
161+
"Fontconfig warning: FcPattern object %s does not accept value",
162+
FcObjectName (object));
163+
- FcValuePrintFile (stderr, value);
164+
+ FcValuePrintFile (stderr, new->value);
165+
fprintf (stderr, "\n");
166+
goto bail1;
167+
}
168+
169+
- new->value = value;
170+
- new->binding = binding;
171+
- new->next = NULL;
172+
-
173+
e = FcPatternObjectInsertElt (p, object);
174+
if (!e)
175+
- goto bail2;
176+
+ goto bail1;
177+
178+
if (append)
179+
{
180+
@@ -747,10 +726,8 @@ FcPatternObjectAddWithBinding (FcPattern *p,
181+
182+
return FcTrue;
183+
184+
-bail2:
185+
- FcValueDestroy (value);
186+
bail1:
187+
- free (new);
188+
+ FcValueListDestroy (new);
189+
bail0:
190+
return FcFalse;
191+
}

build/patches/glib-2-fixes.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ diff --git a/glib/meson.build b/glib/meson.build
1515
index 1111111..2222222 100644
1616
--- a/glib/meson.build
1717
+++ b/glib/meson.build
18-
@@ -360,19 +360,19 @@ libglib = library('glib-2.0',
18+
@@ -371,19 +371,19 @@ libglib = library('glib-2.0',
1919
link_args : [noseh_link_args, glib_link_flags, win32_ldflags],
2020
include_directories : configinc,
2121
link_with: [charset_lib, gnulib_lib],
@@ -35,26 +35,26 @@ index 1111111..2222222 100644
3535
pkg.generate(libglib,
3636
- libraries : [libintl_deps],
3737
+ libraries : [libintl],
38-
libraries_private : [osx_ldflags, win32_ldflags],
38+
libraries_private : [win32_ldflags],
3939
subdirs : ['glib-2.0'],
4040
extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
4141
diff --git a/meson.build b/meson.build
4242
index 1111111..2222222 100644
4343
--- a/meson.build
4444
+++ b/meson.build
45-
@@ -2060,40 +2060,17 @@ endif
45+
@@ -2055,40 +2055,17 @@ endif
4646
# proxy-libintl subproject.
4747
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
4848
# implementations. This could be extended if issues are found in some platforms.
4949
-libintl_deps = []
50-
if cc.has_function('ngettext', args : osx_ldflags)
50+
if cc.has_function('ngettext')
5151
+ libintl = []
5252
have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
5353
else
5454
- # First just find the bare library.
5555
libintl = cc.find_library('intl', required : false)
5656
- # The bare library probably won't link without help if it's static.
57-
- if libintl.found() and not cc.has_function('ngettext', args : osx_ldflags, dependencies : libintl)
57+
- if libintl.found() and not cc.has_function('ngettext', dependencies : libintl)
5858
- libintl_iconv = cc.find_library('iconv', required : false)
5959
- # libintl supports different threading APIs, which may not
6060
- # require additional flags, but it defaults to using pthreads if
@@ -64,10 +64,10 @@ index 1111111..2222222 100644
6464
- # also defining the macros with the -pthread flag.
6565
- libintl_pthread = cc.find_library('pthread', required : false)
6666
- # Try linking with just libiconv.
67-
- if libintl_iconv.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv])
67+
- if libintl_iconv.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_iconv])
6868
- libintl_deps += [libintl_iconv]
6969
- # Then also try linking with pthreads.
70-
- elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv, libintl_pthread])
70+
- elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_iconv, libintl_pthread])
7171
- libintl_deps += [libintl_iconv, libintl_pthread]
7272
- else
7373
- libintl = disabler()
@@ -79,7 +79,7 @@ index 1111111..2222222 100644
7979
have_bind_textdomain_codeset = true # proxy-libintl supports it
8080
else
8181
- libintl_deps = [libintl] + libintl_deps
82-
have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags,
82+
have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset',
8383
- dependencies : libintl_deps)
8484
+ dependencies : libintl)
8585
endif

0 commit comments

Comments
 (0)