Warning, /graphics/krita/3rdparty/ext_fontconfig/0001-Fix-FC_DEFAULT_FONTS-on-macOS.patch is written in an unsupported language. File is not indexed.
0001 From 889097353ecd7b061ae7cf677e3db56db77a135f Mon Sep 17 00:00:00 2001 0002 From: Ryan Schmidt <git@ryandesign.com> 0003 Date: Thu, 8 Jul 2021 15:45:18 -0500 0004 Subject: [PATCH] Fix FC_DEFAULT_FONTS on macOS and with BSD sed 0005 0006 Fix processing of FC_DEFAULT_FONTS when it contains multiple comma- 0007 separated values (i.e. on macOS/Darwin) and fix inserting it into 0008 fonts.conf when using BSD sed. 0009 0010 Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/287 0011 --- 0012 Makefile.am | 2 +- 0013 Makefile.in | 2 +- 0014 configure | 7 +++++-- 0015 configure.ac | 7 +++++-- 0016 4 files changed, 12 insertions(+), 6 deletions(-) 0017 0018 diff -u -r a/Makefile.am b/Makefile.am 0019 --- a/Makefile.am 2021-01-28 11:53:32.000000000 +0000 0020 +++ b/Makefile.am 2021-01-28 11:53:32.000000000 +0000 0021 @@ -114,7 +114,7 @@ 0022 fonts.conf: fonts.conf.in Makefile 0023 sed \ 0024 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \ 0025 - -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \ 0026 + -e 's,@FC_DEFAULT_FONTS\@, $(FC_DEFAULT_FONTS),g' \ 0027 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \ 0028 -e 's,@CONFIGDIR\@,$(FC_CONFIGDIR),g' \ 0029 -e 's,@PACKAGE\@,$(PACKAGE),g' \ 0030 diff -u -r a/Makefile.in b/Makefile.in 0031 --- a/Makefile.in 2021-06-28 15:32:18.000000000 +0000 0032 +++ b/Makefile.in 2021-06-28 15:32:18.000000000 +0000 0033 @@ -1072,7 +1072,7 @@ 0034 fonts.conf: fonts.conf.in Makefile 0035 sed \ 0036 -e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \ 0037 - -e 's,@FC_DEFAULT_FONTS\@,$(FC_DEFAULT_FONTS),g' \ 0038 + -e 's,@FC_DEFAULT_FONTS\@, $(FC_DEFAULT_FONTS),g' \ 0039 -e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \ 0040 -e 's,@CONFIGDIR\@,$(FC_CONFIGDIR),g' \ 0041 -e 's,@PACKAGE\@,$(PACKAGE),g' \ 0042 diff -u -r a/configure b/configure 0043 --- a/configure 2021-06-28 15:32:19.000000000 +0000 0044 +++ b/configure 2021-06-28 15:32:19.000000000 +0000 0045 @@ -17941,8 +17941,11 @@ 0046 if test x${default_fonts+set} = xset; then 0047 fc_IFS=$IFS 0048 IFS="," 0049 - for p in "$default_fonts"; do 0050 - FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS\t<dir>$p</dir>\n" 0051 + for p in $default_fonts; do 0052 + if test x"$FC_DEFAULT_FONTS" != x; then 0053 + FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS " 0054 + fi 0055 + FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS<dir>$p</dir>" 0056 done 0057 IFS=$fc_IFS 0058 fi 0059 diff -u -r a/configure.ac b/configure.ac 0060 --- a/configure.ac 2021-06-28 13:45:02.000000000 +0000 0061 +++ b/configure.ac 2021-06-28 13:45:02.000000000 +0000 0062 @@ -499,8 +499,11 @@ 0063 if test x${default_fonts+set} = xset; then 0064 fc_IFS=$IFS 0065 IFS="," 0066 - for p in "$default_fonts"; do 0067 - FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS\t<dir>$p</dir>\n" 0068 + for p in $default_fonts; do 0069 + if test x"$FC_DEFAULT_FONTS" != x; then 0070 + FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS " 0071 + fi 0072 + FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS<dir>$p</dir>" 0073 done 0074 IFS=$fc_IFS 0075 fi 0076 -- 0077 GitLab 0078