fontconfig: upgrade to 2.16.0

* external/fontconfig/ubsan.patch is fixed upstream

Downloaded from https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.16.0.tar.xz

Change-Id: Id1acbc473cc03e35c8a7a6bd2b2c080cbf653d1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180441
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli 2025-01-18 14:26:27 +01:00
parent fa3e0b2738
commit dda2475304
7 changed files with 11 additions and 30 deletions

View File

@ -121,8 +121,8 @@ FIREBIRD_TARBALL := Firebird-3.0.7.33374-0.tar.bz2
# three static lines
# so that git cherry-pick
# will not run into conflicts
FONTCONFIG_SHA256SUM := 63a0658d0e06e0fa886106452b58ef04f21f58202ea02a94c39de0d3335d7c0e
FONTCONFIG_TARBALL := fontconfig-2.15.0.tar.xz
FONTCONFIG_SHA256SUM := 6a33dc555cc9ba8b10caf7695878ef134eeb36d0af366041f639b1da9b6ed220
FONTCONFIG_TARBALL := fontconfig-2.16.0.tar.xz
# three static lines
# so that git cherry-pick
# will not run into conflicts

View File

@ -12,7 +12,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,fontconfig,fontconfig))
$(eval $(call gb_ExternalPackage_use_external_project,fontconfig,fontconfig))
ifeq ($(DISABLE_DYNLOADING),)
$(eval $(call gb_ExternalPackage_add_file,fontconfig,$(LIBO_LIB_FOLDER)/libfontconfig-lo.so.1.12.1,src/.libs/libfontconfig-lo.so.1.12.1))
$(eval $(call gb_ExternalPackage_add_file,fontconfig,$(LIBO_LIB_FOLDER)/libfontconfig-lo.so.1.15.0,src/.libs/libfontconfig-lo.so.1.15.0))
endif
# vim: set noet sw=4 ts=4:

View File

@ -15,6 +15,8 @@ $(eval $(call gb_ExternalPackage_add_files,fontconfig_data,$(LIBO_SHARE_FOLDER)/
fonts.conf \
))
# The list below is created with
# find workdir/UnpackedTarball/fontconfig/conf.d/ -name "*.conf" | LC_COLLATE=C sort | sed -e 's/^/ /' -e 's/$/ \\/' -e 's/workdir\/UnpackedTarball\/fontconfig\///'
$(eval $(call gb_ExternalPackage_add_unpacked_files,fontconfig_data,$(LIBO_SHARE_FOLDER)/fontconfig/conf.d,\
conf.d/05-reset-dirs-sample.conf \
conf.d/09-autohint-if-no-hinting.conf \
@ -53,6 +55,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,fontconfig_data,$(LIBO_SHARE
conf.d/65-khmer.conf \
conf.d/65-nonlatin.conf \
conf.d/69-unifont.conf \
conf.d/70-no-bitmaps-and-emoji.conf \
conf.d/70-no-bitmaps-except-emoji.conf \
conf.d/70-no-bitmaps.conf \
conf.d/70-yes-bitmaps.conf \
conf.d/80-delicious.conf \

View File

@ -15,7 +15,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,fontconfig,0))
$(eval $(call gb_UnpackedTarball_add_patches,fontconfig,\
external/fontconfig/fontconfig-2.12.1.patch.1 \
external/fontconfig/ubsan.patch \
external/fontconfig/libfontconfig-bundled-soname.patch.0 \
))

View File

@ -19,13 +19,13 @@ diff -up fontconfig/configure.dt fontconfig/configure
else
ld_shlibs=no
fi
@@ -11584,7 +11584,7 @@ _LT_EOF
@@ -11913,7 +11913,7 @@
;;
haiku*)
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $lib'
link_all_deplibs=yes
link_all_deplibs=no
;;
@@ -11680,13 +11680,13 @@ _LT_EOF

View File

@ -5,7 +5,7 @@
lib_LTLIBRARIES = libfontconfig.la
libfontconfig_la_LDFLAGS = \
- -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols)
+ -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols) -release lo -Wl,-soname -Wl,libfontconfig-lo.so.1.12.1
+ -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols) -release lo -Wl,-soname -Wl,libfontconfig-lo.so.1.15.0
libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) $(LTLIBINTL)
libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency)

View File

@ -1,22 +0,0 @@
--- src/fcdir.c
+++ src/fcdir.c
@@ -265,7 +265,7 @@
/*
* Sort files to make things prettier
*/
- qsort(files->strs, files->num, sizeof(FcChar8 *), cmpstringp);
+ if (files->num != 0) qsort(files->strs, files->num, sizeof(FcChar8 *), cmpstringp);
/*
* Scan file files to build font patterns
--- src/fcserialize.c
+++ src/fcserialize.c
@@ -163,7 +163,7 @@
size_t old_used = serialize->buckets_used;
size_t old_count = serialize->buckets_count;
FcSerializeBucket *old_buckets = serialize->buckets;
- FcSerializeBucket *old_buckets_end = old_buckets + old_count;
+ FcSerializeBucket *old_buckets_end = old_count == 0 ? old_buckets : old_buckets + old_count;
FcSerializeBucket *new_buckets = malloc (new_count * sizeof (*old_buckets));
if (!new_buckets)