From: Alexander Kanavin Date: Thu, 11 Sep 2025 08:51:19 +0000 (+0200) Subject: fontconfig: update 2.15.0 -> 2.17.1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17b146eb9584f71b62a9b8363a1d4fa91e8a24a8;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git fontconfig: update 2.15.0 -> 2.17.1 Tarballs have relocated to gitlab. Convert to meson. License-update: trim the code, keep only the license (there used to be a second copyright notice from a different author but with mostly same MIT-ish content) Add a backport to fix musl builds. Signed-off-by: Alexander Kanavin Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-graphics/fontconfig/fontconfig/musl-fix.patch b/meta/recipes-graphics/fontconfig/fontconfig/musl-fix.patch new file mode 100644 index 00000000000..c4508bd15a0 --- /dev/null +++ b/meta/recipes-graphics/fontconfig/fontconfig/musl-fix.patch @@ -0,0 +1,66 @@ +From 75cc3e6ef0e451f42d3464ed4d639304ad9a4f58 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 3 Jul 2025 03:31:49 +0900 +Subject: [PATCH] test: Fix a build issue with musl libc + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/484 + +Changelog: fixed +Upstream-Status: Backport [https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/75cc3e6ef0e451f42d3464ed4d639304ad9a4f58] +Signed-off-by: Alexander Kanavin +--- + test/test-mt-fccfg.c | 22 ++++++++++++++++++++-- + 1 file changed, 20 insertions(+), 2 deletions(-) + +diff --git a/test/test-mt-fccfg.c b/test/test-mt-fccfg.c +index 24ad7583..3b7d843d 100644 +--- a/test/test-mt-fccfg.c ++++ b/test/test-mt-fccfg.c +@@ -1,9 +1,12 @@ + /* Copyright (C) 2025 fontconfig Authors */ + /* SPDX-License-Identifier: HPND */ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ + #include + + #include +-#define __USE_XOPEN + #include + #include + +@@ -13,6 +16,21 @@ struct thr_arg_s { + int thr_num; + }; + ++#ifdef _WIN32 ++int ++setenv (const char *name, const char *value, int o) ++{ ++ size_t len = strlen (name) + strlen (value) + 1; ++ char *s = malloc (len + 1); ++ int ret; ++ ++ snprintf (s, len, "%s=%s", name, value); ++ ret = _putenv (s); ++ free (s); ++ return ret; ++} ++#endif ++ + static void * + run_test_in_thread (void *arg) + { +@@ -61,7 +79,7 @@ test (void) + if (c1 == c2) + return 1; + /* To make visible if we have any references */ +- putenv ("FC_DEBUG=16"); ++ setenv ("FC_DEBUG", "16", 1); + FcFini(); + + return 0; +-- +GitLab + diff --git a/meta/recipes-graphics/fontconfig/fontconfig_2.15.0.bb b/meta/recipes-graphics/fontconfig/fontconfig_2.17.1.bb similarity index 75% rename from meta/recipes-graphics/fontconfig/fontconfig_2.15.0.bb rename to meta/recipes-graphics/fontconfig/fontconfig_2.17.1.bb index b737447e472..17d2f87dd6f 100644 --- a/meta/recipes-graphics/fontconfig/fontconfig_2.15.0.bb +++ b/meta/recipes-graphics/fontconfig/fontconfig_2.17.1.bb @@ -13,20 +13,21 @@ BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" LICENSE = "MIT & MIT & PD" LIC_FILES_CHKSUM = "file://COPYING;md5=00252fd272bf2e722925613ad74cb6c7 \ - file://src/fcfreetype.c;endline=45;md5=ef8702fbf3dc506715be8a9d69cb0252 \ + file://src/fcfreetype.c;endline=23;md5=f7c0140c1b0387cf4cf45420b059847c \ " SECTION = "libs" DEPENDS = "expat freetype zlib gperf-native util-linux" -SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \ +SRC_URI = "https://gitlab.freedesktop.org/api/v4/projects/890/packages/generic/fontconfig/${PV}/fontconfig-${PV}.tar.xz \ file://revert-static-pkgconfig.patch \ + file://musl-fix.patch \ " +SRC_URI[sha256sum] = "9f5cae93f4fffc1fbc05ae99cdfc708cd60dfd6612ffc0512827025c026fa541" -SRC_URI[sha256sum] = "f5f359d6332861bd497570848fcb42520964a9e83d5e3abe397b6b6db9bcaaf4" - -UPSTREAM_CHECK_REGEX = "fontconfig-(?P\d+\.\d+\.(?!9\d+)\d+)" +UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/fontconfig/fontconfig/-/tags" +UPSTREAM_CHECK_REGEX = "releases/(?P.+)" do_configure:prepend() { # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280 @@ -56,7 +57,7 @@ RREPLACES:fontconfig-utils = "libfontconfig-utils" RCONFLICTS:fontconfig-utils = "libfontconfig-utils" DEBIAN_NOAUTONAME:fontconfig-utils = "1" -inherit autotools pkgconfig relative_symlinks gettext +inherit meson pkgconfig relative_symlinks gettext FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig" @@ -64,6 +65,6 @@ FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig" # /usr/share/fonts is already included by default (you can change it with --with-default-fonts) FONTCONFIG_FONT_DIRS ?= "no" -EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}" +EXTRA_OEMESON = " -Ddoc=disabled -Ddefault-fonts-dirs=${datadir}/fonts -Dcache-dir=${FONTCONFIG_CACHE_DIR} -Dadditional-fonts-dirs=${FONTCONFIG_FONT_DIRS}" BBCLASSEXTEND = "native nativesdk"