commit:     59e101c3166545a3d692d923b91c3306e3517f96
Author:     Michael Mair-Keimberger <mm1ke <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 23 16:08:13 2025 +0000
Commit:     Michael Mair-Keimberger <mm1ke <AT> gentoo <DOT> org>
CommitDate: Tue Sep 23 16:10:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59e101c3

media-libs/fontconfig: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mm1ke <AT> gentoo.org>

 .../fontconfig-2.14.2-fix-sysroot-fc-cache.patch   | 60 ----------------------
 .../files/fontconfig-2.14.2-math-fabs.patch        | 42 ---------------
 .../files/fontconfig-2.15.0-aliasing.patch         | 53 -------------------
 .../fontconfig/files/fontconfig-2.17.0-crash.patch | 32 ------------
 4 files changed, 187 deletions(-)

diff --git 
a/media-libs/fontconfig/files/fontconfig-2.14.2-fix-sysroot-fc-cache.patch 
b/media-libs/fontconfig/files/fontconfig-2.14.2-fix-sysroot-fc-cache.patch
deleted file mode 100644
index 8568d5f4a99f..000000000000
--- a/media-libs/fontconfig/files/fontconfig-2.14.2-fix-sysroot-fc-cache.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-https://bugs.gentoo.org/907424
-https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/2ef790a0dbbab24235d1b8c0325ab4414de5f0a9
-
-From 2ef790a0dbbab24235d1b8c0325ab4414de5f0a9 Mon Sep 17 00:00:00 2001
-From: Tom Anderson <[email protected]>
-Date: Thu, 9 Feb 2023 01:31:26 +0000
-Subject: [PATCH] Fix filepaths added when scanning with sysroot
-
-This fixes a regression introduced by 76f88e780.  When
-using FONTCONFIG_SYSROOT=/home/tom/test_fonts, strace
-reveals that fontconfig attempted to open /test_fonts/Ahem.ttf
-instead of /home/tom/test_fonts/Ahem.ttf.  The fix is to use
-`s_dir` instead of `dir` in `file_prefix`.
---- a/src/fcdir.c
-+++ b/src/fcdir.c
-@@ -201,7 +201,7 @@ FcDirScanConfig (FcFontSet *set,
-     DIR                       *d;
-     struct dirent     *e;
-     FcStrSet          *files;
--    FcChar8           *file_prefix, *s_dir = NULL;
-+    FcChar8           *file_prefix = NULL, *s_dir = NULL;
-     FcChar8           *base;
-     const FcChar8     *sysroot = FcConfigGetSysRoot (config);
-     FcBool            ret = FcTrue;
-@@ -213,16 +213,6 @@ FcDirScanConfig (FcFontSet        *set,
-     if (!set && !dirs)
-       return FcTrue;
- 
--    /* freed below */
--    file_prefix = (FcChar8 *) malloc (strlen ((char *) dir) + 1 + 
FC_MAX_FILE_LEN + 1);
--    if (!file_prefix) {
--      ret = FcFalse;
--      goto bail;
--    }
--    strcpy ((char *) file_prefix, (char *) dir);
--    strcat ((char *) file_prefix, FC_DIR_SEPARATOR_S);
--    base = file_prefix + strlen ((char *) file_prefix);
--
-     if (sysroot)
-       s_dir = FcStrBuildFilename (sysroot, dir, NULL);
-     else
-@@ -232,6 +222,16 @@ FcDirScanConfig (FcFontSet        *set,
-       goto bail;
-     }
- 
-+    /* freed below */
-+    file_prefix = (FcChar8 *) malloc (strlen ((char *) s_dir) + 1 + 
FC_MAX_FILE_LEN + 1);
-+    if (!file_prefix) {
-+      ret = FcFalse;
-+      goto bail;
-+    }
-+    strcpy ((char *) file_prefix, (char *) s_dir);
-+    strcat ((char *) file_prefix, FC_DIR_SEPARATOR_S);
-+    base = file_prefix + strlen ((char *) file_prefix);
-+
-     if (FcDebug () & FC_DBG_SCAN)
-       printf ("\tScanning dir %s\n", s_dir);
-       
--- 
-GitLab

diff --git a/media-libs/fontconfig/files/fontconfig-2.14.2-math-fabs.patch 
b/media-libs/fontconfig/files/fontconfig-2.14.2-math-fabs.patch
deleted file mode 100644
index 669e4ebbd65f..000000000000
--- a/media-libs/fontconfig/files/fontconfig-2.14.2-math-fabs.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/309
-
-From 81d410310ffee8761819e72151ec25efde2f5b24 Mon Sep 17 00:00:00 2001
-From: Sam James <[email protected]>
-Date: Wed, 14 Feb 2024 18:12:46 +0000
-Subject: [PATCH] meson: detect-and-use `-lm` for `fabs` in fcmatch
-
-We had a bug report in Gentoo of a sparc64 build failure with -O0:
-```
-FAILED: src/libfontconfig.so.1.13.0
-sparc64-unknown-linux-gnu-gcc  -o src/libfontconfig.so.1.13.0 
src/libfontconfig.so.1.13.0.p/fcatomic.c.o 
src/libfontconfig.so.1.13.0.p/fccache.c.o 
src/libfontconfig.so.1.13.0.p/fccfg.c.o 
src/libfontconfig.so.1.13.0.p/fccharset.c.o 
src/libfontconfig.so.1.13.0.p/fccompat.c.o 
src/libfontconfig.so.1.13.0.p/fcdbg.c.o 
src/libfontconfig.so.1.13.0.p/fcdefault.c.o 
src/libfontconfig.so.1.13.0.p/fcdir.c.o 
src/libfontconfig.so.1.13.0.p/fcformat.c.o 
src/libfontconfig.so.1.13.0.p/fcfreetype.c.o 
src/libfontconfig.so.1.13.0.p/fcfs.c.o 
src/libfontconfig.so.1.13.0.p/fcptrlist.c.o 
src/libfontconfig.so.1.13.0.p/fchash.c.o 
src/libfontconfig.so.1.13.0.p/fcinit.c.o 
src/libfontconfig.so.1.13.0.p/fclang.c.o 
src/libfontconfig.so.1.13.0.p/fclist.c.o 
src/libfontconfig.so.1.13.0.p/fcmatch.c.o 
src/libfontconfig.so.1.13.0.p/fcmatrix.c.o 
src/libfontconfig.so.1.13.0.p/fcname.c.o 
src/libfontconfig.so.1.13.0.p/fcobjs.c.o 
src/libfontconfig.so.1.13.0.p/fcpat.c.o 
src/libfontconfig.so.1.13.0.p/fcrange.c.o src/libfontconf
 ig.so.1.13.0.p/fcserialize.c.o src/libfontconfig.so.1.13.0.p/fcstat.c.o 
src/libfontconfig.so.1.13.0.p/fcstr.c.o 
src/libfontconfig.so.1.13.0.p/fcweight.c.o 
src/libfontconfig.so.1.13.0.p/fcxml.c.o 
src/libfontconfig.so.1.13.0.p/ftglue.c.o -Wl,--as-needed -Wl,--no-undefined 
-shared -fPIC -Wl,--start-group -Wl,-soname,libfontconfig.so.1 -m64 -g -O0 
-mno-app-regs -mcpu=ultrasparc -mtune=ultrasparc -mno-vis -mno-vis2 -mno-vis3 
-mno-vis4 -mno-vis4b -mno-cbcond -mno-fmaf -mno-fsmuld -mno-popc -mno-subxc 
-fno-builtin -fno-fast-math -Wl,-O1 -Wl,--as-needed -Wl,--no-keep-memory 
/usr/lib64/libfreetype.so /usr/lib64/libexpat.so -Wl,--end-group -pthread
-/usr/lib/gcc/sparc64-unknown-linux-gnu/12/../../../../sparc64-unknown-linux-gnu/bin/ld:
 src/libfontconfig.so.1.13.0.p/fcmatch.c.o: in function `FcCompareRange':
-/var/tmp/portage/media-libs/fontconfig-2.14.2-r3/work/fontconfig-2.14.2-.sparc64/../fontconfig-2.14.2/src/fcmatch.c:220:
 undefined reference to `fabs'
-```
-
-Ask Meson to detect `-lm` and add the missing `-lm` for `fabs` usage.
-
-Signed-off-by: Sam James <[email protected]>
---- a/meson.build
-+++ b/meson.build
-@@ -23,7 +23,7 @@ freetype_req = '>= 21.0.15'
- freetype_req_cmake = '>= 2.8.1'
- 
- cc = meson.get_compiler('c')
--
-+math_dep = cc.find_library('m', required: false)
- 
- freetype_dep = dependency('freetype2', method: 'pkg-config', version: 
freetype_req, required: false)
- 
---- a/src/meson.build
-+++ b/src/meson.build
-@@ -65,7 +65,7 @@ libfontconfig = library('fontconfig',
-   fc_sources, alias_headers, ft_alias_headers, fclang_h, fccase_h, 
fcobjshash_h,
-   c_args: c_args + fc_extra_c_args,
-   include_directories: incbase,
--  dependencies: deps,
-+  dependencies: [deps, math_dep],
-   install: true,
-   soversion: soversion,
-   version: libversion,
--- 
-GitLab

diff --git a/media-libs/fontconfig/files/fontconfig-2.15.0-aliasing.patch 
b/media-libs/fontconfig/files/fontconfig-2.15.0-aliasing.patch
deleted file mode 100644
index 03709ac2c3a7..000000000000
--- a/media-libs/fontconfig/files/fontconfig-2.15.0-aliasing.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/333
-
-From 8db62f5a77fd53543dd58e12da7bd96082228893 Mon Sep 17 00:00:00 2001
-From: Sam James <[email protected]>
-Date: Tue, 8 Oct 2024 16:48:19 +0100
-Subject: [PATCH] fontconfig: mark _FcPatternIter as may_alias
-
-We had a report of GCC 14 with -O3 -flto causing wrong font
-sizes with fontconfig (showing up in qalculate-gtk).
-
-It turns out to be because _FcPatternIter and _FcPatternPrivateIter
-are punned between which violates strict-aliasing rules, which
-manifested in FcDefaultSubstitute getting a bogus value from
-FcValueCanonicalize for size.
-
-void* isn't allowed to alias anything -- you can pass addresses
-around provided you cast back to the original type, but if you
-access through the wrong type, you've violated aliasing rules.
-
-Bug: https://bugs.gentoo.org/940923
-Signed-off-by: Sam James <[email protected]>
---- a/fontconfig/fontconfig.h
-+++ b/fontconfig/fontconfig.h
-@@ -32,8 +32,10 @@
- 
- #if defined(__GNUC__) && (__GNUC__ >= 4)
- #define FC_ATTRIBUTE_SENTINEL(x) __attribute__((__sentinel__(0)))
-+#define FC_ATTRIBUTE_MAY_ALIAS __attribute__((may_alias))
- #else
- #define FC_ATTRIBUTE_SENTINEL(x)
-+#define FC_ATTRIBUTE_MAY_ALIAS
- #endif
- 
- #ifndef FcPublic
-@@ -253,7 +255,7 @@ typedef enum _FcValueBinding {
- 
- typedef struct _FcPattern   FcPattern;
- 
--typedef struct _FcPatternIter {
-+typedef struct FC_ATTRIBUTE_MAY_ALIAS _FcPatternIter {
-     void *dummy1;
-     void *dummy2;
- } FcPatternIter;
-@@ -1160,6 +1162,7 @@ FcConfigParseAndLoadFromMemory (FcConfig       *config,
- _FCFUNCPROTOEND
- 
- #undef FC_ATTRIBUTE_SENTINEL
-+#undef FC_ATTRIBUTE_MAY_ALIAS
- 
- 
- #ifndef _FCINT_H_
--- 
-GitLab

diff --git a/media-libs/fontconfig/files/fontconfig-2.17.0-crash.patch 
b/media-libs/fontconfig/files/fontconfig-2.17.0-crash.patch
deleted file mode 100644
index 4e861a7f4ec1..000000000000
--- a/media-libs/fontconfig/files/fontconfig-2.17.0-crash.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-https://bugs.gentoo.org/959277
-https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/481
-https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/446
-https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/b9bec06d73340f1b5727302d13ac3df307b7febc
-
-From b9bec06d73340f1b5727302d13ac3df307b7febc Mon Sep 17 00:00:00 2001
-From: Akira TAGOH <[email protected]>
-Date: Mon, 30 Jun 2025 09:05:18 +0900
-Subject: [PATCH] Fix a heap buffer overflow
-
-https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/481
-
-Changelog: fixed
----
- src/fcfreetype.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/fcfreetype.c b/src/fcfreetype.c
-index 7a4d9811..0a87d27a 100644
---- a/src/fcfreetype.c
-+++ b/src/fcfreetype.c
-@@ -2661,7 +2661,7 @@ FcFontCapabilities (FT_Face face)
-       goto bail;
- 
-     maxsize = (((FT_ULong)gpos_count + (FT_ULong)gsub_count) * OTLAYOUT_LEN +
--               (issilgraphitefont ? strlen(fcSilfCapability) : 0));
-+               (issilgraphitefont ? strlen(fcSilfCapability) + 1: 0));
-     complex_ = malloc (sizeof (FcChar8) * maxsize);
-     if (!complex_)
-       goto bail;
--- 
-GitLab

Reply via email to