diff options
| author | Alexander Kanavin <alex@linutronix.de> | 2025-09-11 10:51:19 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-15 17:57:23 +0100 |
| commit | ebd7baf5f151d5a3f4707b16e828b61e86fbcb40 (patch) | |
| tree | 45d2e68409aa169d161a551e9e029d80381d31d7 | |
| parent | 4c56cbbdee4b82f0e0f509546c85594bab72d16d (diff) | |
| download | poky-ebd7baf5f151d5a3f4707b16e828b61e86fbcb40.tar.gz | |
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.
(From OE-Core rev: 17b146eb9584f71b62a9b8363a1d4fa91e8a24a8)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-graphics/fontconfig/fontconfig/musl-fix.patch | 66 | ||||
| -rw-r--r-- | meta/recipes-graphics/fontconfig/fontconfig_2.17.1.bb (renamed from meta/recipes-graphics/fontconfig/fontconfig_2.15.0.bb) | 15 |
2 files changed, 74 insertions, 7 deletions
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 0000000000..c4508bd15a --- /dev/null +++ b/meta/recipes-graphics/fontconfig/fontconfig/musl-fix.patch | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | From 75cc3e6ef0e451f42d3464ed4d639304ad9a4f58 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Akira TAGOH <akira@tagoh.org> | ||
| 3 | Date: Thu, 3 Jul 2025 03:31:49 +0900 | ||
| 4 | Subject: [PATCH] test: Fix a build issue with musl libc | ||
| 5 | |||
| 6 | Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/484 | ||
| 7 | |||
| 8 | Changelog: fixed | ||
| 9 | Upstream-Status: Backport [https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/75cc3e6ef0e451f42d3464ed4d639304ad9a4f58] | ||
| 10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 11 | --- | ||
| 12 | test/test-mt-fccfg.c | 22 ++++++++++++++++++++-- | ||
| 13 | 1 file changed, 20 insertions(+), 2 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/test/test-mt-fccfg.c b/test/test-mt-fccfg.c | ||
| 16 | index 24ad7583..3b7d843d 100644 | ||
| 17 | --- a/test/test-mt-fccfg.c | ||
| 18 | +++ b/test/test-mt-fccfg.c | ||
| 19 | @@ -1,9 +1,12 @@ | ||
| 20 | /* Copyright (C) 2025 fontconfig Authors */ | ||
| 21 | /* SPDX-License-Identifier: HPND */ | ||
| 22 | +#ifdef HAVE_CONFIG_H | ||
| 23 | +# include "config.h" | ||
| 24 | +#endif | ||
| 25 | + | ||
| 26 | #include <fontconfig/fontconfig.h> | ||
| 27 | |||
| 28 | #include <stdio.h> | ||
| 29 | -#define __USE_XOPEN | ||
| 30 | #include <pthread.h> | ||
| 31 | #include <stdlib.h> | ||
| 32 | |||
| 33 | @@ -13,6 +16,21 @@ struct thr_arg_s { | ||
| 34 | int thr_num; | ||
| 35 | }; | ||
| 36 | |||
| 37 | +#ifdef _WIN32 | ||
| 38 | +int | ||
| 39 | +setenv (const char *name, const char *value, int o) | ||
| 40 | +{ | ||
| 41 | + size_t len = strlen (name) + strlen (value) + 1; | ||
| 42 | + char *s = malloc (len + 1); | ||
| 43 | + int ret; | ||
| 44 | + | ||
| 45 | + snprintf (s, len, "%s=%s", name, value); | ||
| 46 | + ret = _putenv (s); | ||
| 47 | + free (s); | ||
| 48 | + return ret; | ||
| 49 | +} | ||
| 50 | +#endif | ||
| 51 | + | ||
| 52 | static void * | ||
| 53 | run_test_in_thread (void *arg) | ||
| 54 | { | ||
| 55 | @@ -61,7 +79,7 @@ test (void) | ||
| 56 | if (c1 == c2) | ||
| 57 | return 1; | ||
| 58 | /* To make visible if we have any references */ | ||
| 59 | - putenv ("FC_DEBUG=16"); | ||
| 60 | + setenv ("FC_DEBUG", "16", 1); | ||
| 61 | FcFini(); | ||
| 62 | |||
| 63 | return 0; | ||
| 64 | -- | ||
| 65 | GitLab | ||
| 66 | |||
diff --git a/meta/recipes-graphics/fontconfig/fontconfig_2.15.0.bb b/meta/recipes-graphics/fontconfig/fontconfig_2.17.1.bb index b737447e47..17d2f87dd6 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" | |||
| 13 | 13 | ||
| 14 | LICENSE = "MIT & MIT & PD" | 14 | LICENSE = "MIT & MIT & PD" |
| 15 | LIC_FILES_CHKSUM = "file://COPYING;md5=00252fd272bf2e722925613ad74cb6c7 \ | 15 | LIC_FILES_CHKSUM = "file://COPYING;md5=00252fd272bf2e722925613ad74cb6c7 \ |
| 16 | file://src/fcfreetype.c;endline=45;md5=ef8702fbf3dc506715be8a9d69cb0252 \ | 16 | file://src/fcfreetype.c;endline=23;md5=f7c0140c1b0387cf4cf45420b059847c \ |
| 17 | " | 17 | " |
| 18 | 18 | ||
| 19 | SECTION = "libs" | 19 | SECTION = "libs" |
| 20 | 20 | ||
| 21 | DEPENDS = "expat freetype zlib gperf-native util-linux" | 21 | DEPENDS = "expat freetype zlib gperf-native util-linux" |
| 22 | 22 | ||
| 23 | SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \ | 23 | SRC_URI = "https://gitlab.freedesktop.org/api/v4/projects/890/packages/generic/fontconfig/${PV}/fontconfig-${PV}.tar.xz \ |
| 24 | file://revert-static-pkgconfig.patch \ | 24 | file://revert-static-pkgconfig.patch \ |
| 25 | file://musl-fix.patch \ | ||
| 25 | " | 26 | " |
| 27 | SRC_URI[sha256sum] = "9f5cae93f4fffc1fbc05ae99cdfc708cd60dfd6612ffc0512827025c026fa541" | ||
| 26 | 28 | ||
| 27 | SRC_URI[sha256sum] = "f5f359d6332861bd497570848fcb42520964a9e83d5e3abe397b6b6db9bcaaf4" | 29 | UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/fontconfig/fontconfig/-/tags" |
| 28 | 30 | UPSTREAM_CHECK_REGEX = "releases/(?P<pver>.+)" | |
| 29 | UPSTREAM_CHECK_REGEX = "fontconfig-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" | ||
| 30 | 31 | ||
| 31 | do_configure:prepend() { | 32 | do_configure:prepend() { |
| 32 | # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280 | 33 | # work around https://bugs.freedesktop.org/show_bug.cgi?id=101280 |
| @@ -56,7 +57,7 @@ RREPLACES:fontconfig-utils = "libfontconfig-utils" | |||
| 56 | RCONFLICTS:fontconfig-utils = "libfontconfig-utils" | 57 | RCONFLICTS:fontconfig-utils = "libfontconfig-utils" |
| 57 | DEBIAN_NOAUTONAME:fontconfig-utils = "1" | 58 | DEBIAN_NOAUTONAME:fontconfig-utils = "1" |
| 58 | 59 | ||
| 59 | inherit autotools pkgconfig relative_symlinks gettext | 60 | inherit meson pkgconfig relative_symlinks gettext |
| 60 | 61 | ||
| 61 | FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig" | 62 | FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig" |
| 62 | 63 | ||
| @@ -64,6 +65,6 @@ FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig" | |||
| 64 | # /usr/share/fonts is already included by default (you can change it with --with-default-fonts) | 65 | # /usr/share/fonts is already included by default (you can change it with --with-default-fonts) |
| 65 | FONTCONFIG_FONT_DIRS ?= "no" | 66 | FONTCONFIG_FONT_DIRS ?= "no" |
| 66 | 67 | ||
| 67 | EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}" | 68 | EXTRA_OEMESON = " -Ddoc=disabled -Ddefault-fonts-dirs=${datadir}/fonts -Dcache-dir=${FONTCONFIG_CACHE_DIR} -Dadditional-fonts-dirs=${FONTCONFIG_FONT_DIRS}" |
| 68 | 69 | ||
| 69 | BBCLASSEXTEND = "native nativesdk" | 70 | BBCLASSEXTEND = "native nativesdk" |
