From e06087b23479e07639475b3627739c41145dcfe4 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 7 Sep 2015 10:56:03 +0900 Subject: [PATCH 001/154] Add file triggers for fonts. --- fontconfig.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 0ef491a..b4cf732 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.11.94 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -105,6 +105,12 @@ fi %postun -p /sbin/ldconfig +%transfiletriggerin -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts +HOME=/root /usr/bin/fc-cache -s + +%transfiletriggerpostun -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts +HOME=/root /usr/bin/fc-cache -s + %files %doc README AUTHORS COPYING %doc fontconfig-user.txt fontconfig-user.html @@ -138,6 +144,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Sep 7 2015 Akira TAGOH - 2.11.94-5 +- Add file triggers for fonts. + * Fri Aug 14 2015 Akira TAGOH - 2.11.94-4 - Revise the patch. (#1236034) From d8e7dfee443e6f1d5b9f0a31e64d67880b58a242 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 20:39:45 +0000 Subject: [PATCH 002/154] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index b4cf732..465dcf9 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.11.94 -Release: 5%{?dist} +Release: 6%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -144,6 +144,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 2.11.94-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Mon Sep 7 2015 Akira TAGOH - 2.11.94-5 - Add file triggers for fonts. From fdb339dcb11abde6e521b95ba09b680a09ce9b9e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Mar 2016 14:06:17 +0900 Subject: [PATCH 003/154] Add Requires: freetype. --- fontconfig.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 465dcf9..c164dc8 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.11.94 -Release: 6%{?dist} +Release: 7%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -24,7 +24,7 @@ BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel BuildRequires: autoconf automake libtool -Requires: fontpackages-filesystem +Requires: fontpackages-filesystem freetype Requires(pre): freetype Requires(post): grep coreutils Requires: font(:lang=en) @@ -144,6 +144,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Mar 28 2016 Akira TAGOH - 2.11.94-7 +- Add Requires: freetype. + * Wed Feb 03 2016 Fedora Release Engineering - 2.11.94-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 711f06d607d575ce1624eb1d522cf9763b1af93e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 12 Apr 2016 14:48:23 +0900 Subject: [PATCH 004/154] New upstream release. (#1325560) --- fontconfig-fix-SIGFPE.patch | 25 -- fontconfig-lock-cache.patch | 456 ------------------------------------ fontconfig.spec | 14 +- 3 files changed, 7 insertions(+), 488 deletions(-) delete mode 100644 fontconfig-fix-SIGFPE.patch delete mode 100644 fontconfig-lock-cache.patch diff --git a/fontconfig-fix-SIGFPE.patch b/fontconfig-fix-SIGFPE.patch deleted file mode 100644 index dfb4e36..0000000 --- a/fontconfig-fix-SIGFPE.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7bc07cf6c2a5685ab95f146f5af2b3bcd5f5864d Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Mon, 30 Mar 2015 15:18:44 +0900 -Subject: [PATCH] Fix SIGFPE - ---- - src/fcrange.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/fcrange.c b/src/fcrange.c -index 37cf067..9b1b67b 100644 ---- a/src/fcrange.c -+++ b/src/fcrange.c -@@ -204,7 +204,7 @@ FcRangeHash (const FcRange *r) - { - FcRange c = FcRangeCanonicalize (r); - int b = (int) (c.u.d.begin * 100); -- int e = (int) (c.u.d.end * 100); -+ int e = FcDoubleCmpEQ (c.u.d.end, DBL_MAX) ? INT_MAX : (int) (c.u.d.end * 100); - - return b ^ (b << 1) ^ (e << 9); - } --- -2.1.0 - diff --git a/fontconfig-lock-cache.patch b/fontconfig-lock-cache.patch deleted file mode 100644 index 2659b6d..0000000 --- a/fontconfig-lock-cache.patch +++ /dev/null @@ -1,456 +0,0 @@ -From ad9f5880502c9a3f8e7f8919336888ee056f17ba Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Fri, 14 Aug 2015 17:17:34 +0900 -Subject: [PATCH] Fix the broken cache more. - -Take a look at the nano second in the mtime to figure out -if the cache needs to be updated if available. -and do the mutex lock between scanning and writing a cache -to avoid the conflict. - -Also we don't need to scan directories again after writing -caches. so getting rid of the related code as well. - -https://bugs.freedesktop.org/show_bug.cgi?id=69845 - -and for reference: - -https://bugzilla.redhat.com/show_bug.cgi?id=1236034 ---- - configure.ac | 3 ++ - fc-cache/fc-cache.c | 75 +++++++++++++------------------------ - fontconfig/fontconfig.h | 2 +- - src/fcarch.c | 2 +- - src/fccache.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++- - src/fcdir.c | 6 +++ - src/fcint.h | 8 ++++ - 7 files changed, 142 insertions(+), 52 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e888f2c..0ab3cfc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -167,6 +167,9 @@ AC_CHECK_SYMBOL([posix_fadvise], [fcntl.h], [fc_func_posix_fadvise=1], [fc_func_ - AC_DEFINE_UNQUOTED([HAVE_POSIX_FADVISE], [$fc_func_posix_fadvise], [Define to 1 if you have the 'posix_fadvise' function.]) - - # -+AC_CHECK_MEMBERS([struct stat.st_mtim],,, [#include ]) -+ -+# - if test "x$ac_cv_func_fstatvfs" = "xyes"; then - AC_CHECK_MEMBERS([struct statvfs.f_basetype, struct statvfs.f_fstypename],,, - [#include ]) -diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c -index 18cd6c5..0336073 100644 ---- a/fc-cache/fc-cache.c -+++ b/fc-cache/fc-cache.c -@@ -122,7 +122,7 @@ usage (char *program, int error) - static FcStrSet *processed_dirs; - - static int --scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, FcBool recursive, FcBool error_on_no_fonts, int *changed, FcStrSet *updateDirs) -+scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, FcBool error_on_no_fonts, int *changed) - { - int ret = 0; - const FcChar8 *dir; -@@ -142,15 +142,13 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, - { - if (verbose) - { -- if (!recursive) -- printf ("Re-scanning "); - if (sysroot) - printf ("[%s]", sysroot); - printf ("%s: ", dir); - fflush (stdout); - } - -- if (recursive && FcStrSetMember (processed_dirs, dir)) -+ if (FcStrSetMember (processed_dirs, dir)) - { - if (verbose) - printf ("skipping, looped directory detected\n"); -@@ -194,13 +192,8 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, - - if (!cache) - { -- if (!recursive) -- cache = FcDirCacheRescan (dir, config); -- else -- { -- (*changed)++; -- cache = FcDirCacheRead (dir, FcTrue, config); -- } -+ (*changed)++; -+ cache = FcDirCacheRead (dir, FcTrue, config); - if (!cache) - { - fprintf (stderr, "%s: error scanning\n", dir); -@@ -229,37 +222,30 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, - } - } - -- if (recursive) -+ subdirs = FcStrSetCreate (); -+ if (!subdirs) - { -- subdirs = FcStrSetCreate (); -- if (!subdirs) -- { -- fprintf (stderr, "%s: Can't create subdir set\n", dir); -- ret++; -- FcDirCacheUnload (cache); -- continue; -- } -- for (i = 0; i < FcCacheNumSubdir (cache); i++) -- FcStrSetAdd (subdirs, FcCacheSubdir (cache, i)); -- if (updateDirs && FcCacheNumSubdir (cache) > 0) -- FcStrSetAdd (updateDirs, dir); -- -+ fprintf (stderr, "%s: Can't create subdir set\n", dir); -+ ret++; - FcDirCacheUnload (cache); -+ continue; -+ } -+ for (i = 0; i < FcCacheNumSubdir (cache); i++) -+ FcStrSetAdd (subdirs, FcCacheSubdir (cache, i)); - -- sublist = FcStrListCreate (subdirs); -- FcStrSetDestroy (subdirs); -- if (!sublist) -- { -- fprintf (stderr, "%s: Can't create subdir list\n", dir); -- ret++; -- continue; -- } -- FcStrSetAdd (processed_dirs, dir); -- ret += scanDirs (sublist, config, force, really_force, verbose, recursive, error_on_no_fonts, changed, updateDirs); -- FcStrListDone (sublist); -+ FcDirCacheUnload (cache); -+ -+ sublist = FcStrListCreate (subdirs); -+ FcStrSetDestroy (subdirs); -+ if (!sublist) -+ { -+ fprintf (stderr, "%s: Can't create subdir list\n", dir); -+ ret++; -+ continue; - } -- else -- FcDirCacheUnload (cache); -+ FcStrSetAdd (processed_dirs, dir); -+ ret += scanDirs (sublist, config, force, really_force, verbose, error_on_no_fonts, changed); -+ FcStrListDone (sublist); - } - if (error_on_no_fonts && !was_processed) - ret++; -@@ -290,7 +276,7 @@ cleanCacheDirectories (FcConfig *config, FcBool verbose) - int - main (int argc, char **argv) - { -- FcStrSet *dirs, *updateDirs; -+ FcStrSet *dirs; - FcStrList *list; - FcBool verbose = FcFalse; - FcBool force = FcFalse; -@@ -393,18 +379,9 @@ main (int argc, char **argv) - return 1; - } - -- updateDirs = FcStrSetCreate (); - changed = 0; -- ret = scanDirs (list, config, force, really_force, verbose, FcTrue, error_on_no_fonts, &changed, updateDirs); -- /* Update the directory cache again to avoid the race condition as much as possible */ -+ ret = scanDirs (list, config, force, really_force, verbose, error_on_no_fonts, &changed); - FcStrListDone (list); -- list = FcStrListCreate (updateDirs); -- if (list) -- { -- ret += scanDirs (list, config, FcTrue, FcFalse, verbose, FcFalse, error_on_no_fonts, &changed, NULL); -- FcStrListDone (list); -- } -- FcStrSetDestroy (updateDirs); - - /* - * Try to create CACHEDIR.TAG anyway. -diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h -index a570b2f..57c1b68 100644 ---- a/fontconfig/fontconfig.h -+++ b/fontconfig/fontconfig.h -@@ -66,7 +66,7 @@ typedef int FcBool; - * it means multiple copies of the font information. - */ - --#define FC_CACHE_VERSION_NUMBER 6 -+#define FC_CACHE_VERSION_NUMBER 7 - #define _FC_STRINGIFY_(s) #s - #define _FC_STRINGIFY(s) _FC_STRINGIFY_(s) - #define FC_CACHE_VERSION _FC_STRINGIFY(FC_CACHE_VERSION_NUMBER) -diff --git a/src/fcarch.c b/src/fcarch.c -index 4a921c0..da33a83 100644 ---- a/src/fcarch.c -+++ b/src/fcarch.c -@@ -48,7 +48,7 @@ FC_ASSERT_STATIC (0x08 + 1*FC_MAX(SIZEOF_VOID_P,ALIGNOF_DOUBLE) == sizeof (FcVal - FC_ASSERT_STATIC (0x00 + 2*SIZEOF_VOID_P == sizeof (FcPatternElt)); - FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcPattern)); - FC_ASSERT_STATIC (0x08 + 2*SIZEOF_VOID_P == sizeof (FcCharSet)); --FC_ASSERT_STATIC (0x08 + 6*SIZEOF_VOID_P == sizeof (FcCache)); -+FC_ASSERT_STATIC (0x08 + 7*SIZEOF_VOID_P == sizeof (FcCache)); - - - int -diff --git a/src/fccache.c b/src/fccache.c -index fc3ed41..20c4418 100644 ---- a/src/fccache.c -+++ b/src/fccache.c -@@ -253,6 +253,7 @@ struct _FcCacheSkip { - dev_t cache_dev; - ino_t cache_ino; - time_t cache_mtime; -+ long cache_mtime_nano; - FcCacheSkip *next[1]; - }; - -@@ -380,12 +381,18 @@ FcCacheInsert (FcCache *cache, struct stat *cache_stat) - s->cache_dev = cache_stat->st_dev; - s->cache_ino = cache_stat->st_ino; - s->cache_mtime = cache_stat->st_mtime; -+#ifdef HAVE_STRUCT_STAT_ST_MTIM -+ s->cache_mtime_nano = cache_stat->st_mtim.tv_nsec; -+#else -+ s->cache_mtime_nano = 0; -+#endif - } - else - { - s->cache_dev = 0; - s->cache_ino = 0; - s->cache_mtime = 0; -+ s->cache_mtime_nano = 0; - } - - /* -@@ -473,6 +480,10 @@ FcCacheFindByStat (struct stat *cache_stat) - s->cache_ino == cache_stat->st_ino && - s->cache_mtime == cache_stat->st_mtime) - { -+#ifdef HAVE_STRUCT_STAT_ST_MTIM -+ if (s->cache_mtime != cache_stat->st_mtim.tv_nsec) -+ continue; -+#endif - FcRefInc (&s->ref); - unlock_cache (); - return s->cache; -@@ -540,6 +551,7 @@ static FcBool - FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat) - { - struct stat dir_static; -+ FcBool fnano = FcTrue; - - if (!dir_stat) - { -@@ -558,10 +570,18 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat) - FcStrFree (d); - dir_stat = &dir_static; - } -+#ifdef HAVE_STRUCT_STAT_ST_MTIM -+ fnano = (cache->checksum_nano == dir_stat->st_mtim.tv_nsec); -+ if (FcDebug () & FC_DBG_CACHE) -+ printf ("FcCacheTimeValid dir \"%s\" cache checksum %d.%ld dir checksum %d.%ld\n", -+ FcCacheDir (cache), cache->checksum, cache->checksum_nano, (int) dir_stat->st_mtime, dir_stat->st_mtim.tv_nsec); -+#else - if (FcDebug () & FC_DBG_CACHE) - printf ("FcCacheTimeValid dir \"%s\" cache checksum %d dir checksum %d\n", - FcCacheDir (cache), cache->checksum, (int) dir_stat->st_mtime); -- return cache->checksum == (int) dir_stat->st_mtime; -+#endif -+ -+ return cache->checksum == (int) dir_stat->st_mtime && fnano; - } - - static FcBool -@@ -757,6 +777,10 @@ FcDirCacheValidateHelper (FcConfig *config, int fd, struct stat *fd_stat, struct - ret = FcFalse; - else if (c.checksum != (int) dir_stat->st_mtime) - ret = FcFalse; -+#ifdef HAVE_STRUCT_STAT_ST_MTIM -+ else if (c.checksum_nano != dir_stat->st_mtim.tv_nsec) -+ ret = FcFalse; -+#endif - return ret; - } - -@@ -831,6 +855,9 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt - cache->version = FC_CACHE_VERSION_NUMBER; - cache->size = serialize->size; - cache->checksum = (int) dir_stat->st_mtime; -+#ifdef HAVE_STRUCT_STAT_ST_MTIM -+ cache->checksum_nano = dir_stat->st_mtim.tv_nsec; -+#endif - - /* - * Serialize directory name -@@ -1018,6 +1045,11 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config) - skip->cache_dev = cache_stat.st_dev; - skip->cache_ino = cache_stat.st_ino; - skip->cache_mtime = cache_stat.st_mtime; -+#ifdef HAVE_STRUCT_STAT_ST_MTIM -+ skip->cache_mtime_nano = cache_stat.st_mtim.tv_nsec; -+#else -+ skip->cache_mtime_nano = 0; -+#endif - } - unlock_cache (); - } -@@ -1142,6 +1174,70 @@ FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose) - return ret; - } - -+int -+FcDirCacheLock (const FcChar8 *dir, -+ FcConfig *config) -+{ -+ FcChar8 *cache_hashed = NULL; -+ FcChar8 cache_base[CACHEBASE_LEN]; -+ FcStrList *list; -+ FcChar8 *cache_dir; -+ const FcChar8 *sysroot = FcConfigGetSysRoot (config); -+ int fd = -1; -+ -+ FcDirCacheBasename (dir, cache_base); -+ list = FcStrListCreate (config->cacheDirs); -+ if (!list) -+ return -1; -+ -+ while ((cache_dir = FcStrListNext (list))) -+ { -+ if (sysroot) -+ cache_hashed = FcStrBuildFilename (sysroot, cache_dir, cache_base, NULL); -+ else -+ cache_hashed = FcStrBuildFilename (cache_dir, cache_base, NULL); -+ if (!cache_hashed) -+ break; -+ fd = FcOpen ((const char *)cache_hashed, O_RDWR); -+ /* No caches in that directory. simply retry with another one */ -+ if (fd != -1) -+ { -+ struct flock fl; -+ -+ fl.l_type = F_WRLCK; -+ fl.l_whence = SEEK_SET; -+ fl.l_start = 0; -+ fl.l_len = 0; -+ fl.l_pid = getpid (); -+ if (fcntl (fd, F_SETLKW, &fl) == -1) -+ goto bail; -+ break; -+ } -+ } -+ return fd; -+bail: -+ if (fd != -1) -+ close (fd); -+ return -1; -+} -+ -+void -+FcDirCacheUnlock (int fd) -+{ -+ struct flock fl; -+ -+ if (fd != -1) -+ { -+ fl.l_type = F_UNLCK; -+ fl.l_whence = SEEK_SET; -+ fl.l_start = 0; -+ fl.l_len = 0; -+ fl.l_pid = getpid (); -+ fcntl (fd, F_SETLK, &fl); -+ close (fd); -+ } -+} -+ - /* - * Hokey little macro trick to permit the definitions of C functions - * with the same name as CPP macros -diff --git a/src/fcdir.c b/src/fcdir.c -index 2e7f0dc..f4807dd 100644 ---- a/src/fcdir.c -+++ b/src/fcdir.c -@@ -332,6 +332,7 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) - struct stat dir_stat; - const FcChar8 *sysroot = FcConfigGetSysRoot (config); - FcChar8 *d; -+ int fd = -1; - - if (sysroot) - d = FcStrBuildFilename (sysroot, dir, NULL); -@@ -352,6 +353,7 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) - if (!dirs) - goto bail1; - -+ fd = FcDirCacheLock (dir, config); - /* - * Scan the dir - */ -@@ -371,6 +373,7 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) - FcDirCacheWrite (cache, config); - - bail2: -+ FcDirCacheUnlock (fd); - FcStrSetDestroy (dirs); - bail1: - FcFontSetDestroy (set); -@@ -389,6 +392,7 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) - FcStrSet *dirs; - const FcChar8 *sysroot = FcConfigGetSysRoot (config); - FcChar8 *d = NULL; -+ int fd = -1; - - cache = FcDirCacheLoad (dir, config, NULL); - if (!cache) -@@ -404,6 +408,7 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) - if (!dirs) - goto bail; - -+ fd = FcDirCacheLock (dir, config); - /* - * Scan the dir - */ -@@ -422,6 +427,7 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) - FcDirCacheWrite (new, config); - - bail1: -+ FcDirCacheUnlock (fd); - FcStrSetDestroy (dirs); - bail: - if (d) -diff --git a/src/fcint.h b/src/fcint.h -index 15e22fd..68f9817 100644 ---- a/src/fcint.h -+++ b/src/fcint.h -@@ -369,6 +369,7 @@ struct _FcCache { - int dirs_count; /* number of subdir strings */ - intptr_t set; /* offset to font set */ - int checksum; /* checksum of directory state */ -+ long checksum_nano; /* checksum of directory state */ - }; - - #undef FcCacheDir -@@ -590,6 +591,13 @@ FcCacheFini (void); - FcPrivate void - FcDirCacheReference (FcCache *cache, int nref); - -+FcPrivate int -+FcDirCacheLock (const FcChar8 *dir, -+ FcConfig *config); -+ -+FcPrivate void -+FcDirCacheUnlock (int fd); -+ - /* fccfg.c */ - - FcPrivate FcBool --- -2.4.3 - diff --git a/fontconfig.spec b/fontconfig.spec index c164dc8..f3fa26c 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,22 +2,19 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.11.94 -Release: 7%{?dist} +Version: 2.11.95 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD # otherwise MIT License: MIT and Public Domain and UCD -Group: System Environment/Libraries Source: http://fontconfig.org/release/%{name}-%{version}.tar.bz2 URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1236034 -Patch1: %{name}-lock-cache.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -61,7 +58,6 @@ which is useful for developing applications that uses fontconfig. %prep %setup -q %patch0 -p1 -b .sleep-less -%patch1 -p1 -b .lock-cache %build # We don't want to rebuild the docs, but we want to install the included ones. @@ -112,9 +108,10 @@ HOME=/root /usr/bin/fc-cache -s HOME=/root /usr/bin/fc-cache -s %files -%doc README AUTHORS COPYING +%doc README AUTHORS %doc fontconfig-user.txt fontconfig-user.html %doc %{_fontconfig_confdir}/README +%license COPYING %{_libdir}/libfontconfig.so.* %{_bindir}/fc-cache %{_bindir}/fc-cat @@ -144,6 +141,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Tue Apr 12 2016 Akira TAGOH - 2.11.95-1 +- New upstream release. (#1325560) + * Mon Mar 28 2016 Akira TAGOH - 2.11.94-7 - Add Requires: freetype. From e3fd660cff415f03d615b851aedc2b1bcdfd2d30 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 12 Apr 2016 15:32:25 +0900 Subject: [PATCH 005/154] New upstream release. (#1325560) --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7c182ee..36da790 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.11.92.tar.bz2 /fontconfig-2.11.93.tar.bz2 /fontconfig-2.11.94.tar.bz2 +/fontconfig-2.11.95.tar.bz2 diff --git a/sources b/sources index c3817f3..4f131bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c988ea12f4117330246e041109152b4a fontconfig-2.11.94.tar.bz2 +d9ab403942976ddaa031f07edc01ee71 fontconfig-2.11.95.tar.bz2 From 7bd4790a1ad7d79d6e2c4a119223adfabd6298b1 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 15 Jun 2016 20:46:42 +0900 Subject: [PATCH 006/154] New upstream release. --- .gitignore | 1 + fontconfig.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 36da790..6505d43 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.11.93.tar.bz2 /fontconfig-2.11.94.tar.bz2 /fontconfig-2.11.95.tar.bz2 +/fontconfig-2.12.0.tar.bz2 diff --git a/fontconfig.spec b/fontconfig.spec index f3fa26c..128c180 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,7 +2,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.11.95 +Version: 2.12.0 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -141,6 +141,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jun 15 2016 Akira TAGOH - 2.12.0-1 +- New upstream release. + * Tue Apr 12 2016 Akira TAGOH - 2.11.95-1 - New upstream release. (#1325560) diff --git a/sources b/sources index 4f131bb..210d8ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d9ab403942976ddaa031f07edc01ee71 fontconfig-2.11.95.tar.bz2 +f0313daaec6dce8471a2e57ac08c9fda fontconfig-2.12.0.tar.bz2 From d5f2814b4e69fdb9b59019b2150baf572687e256 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 5 Aug 2016 17:20:17 +0900 Subject: [PATCH 007/154] New upstream release. --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 128c180..9dea9ca 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,7 +2,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.0 +Version: 2.12.1 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -141,6 +141,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Aug 5 2016 Akira TAGOH - 2.12.1-1 +- New upstream release. + * Wed Jun 15 2016 Akira TAGOH - 2.12.0-1 - New upstream release. From bb21e1aefa8afde0bf44a6e52e28162a4065efa6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 5 Aug 2016 17:23:06 +0900 Subject: [PATCH 008/154] New upstream release. --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6505d43..d13380a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.11.94.tar.bz2 /fontconfig-2.11.95.tar.bz2 /fontconfig-2.12.0.tar.bz2 +/fontconfig-2.12.1.tar.bz2 diff --git a/sources b/sources index 210d8ee..5a8dd8b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f0313daaec6dce8471a2e57ac08c9fda fontconfig-2.12.0.tar.bz2 +b5af5a423ee3b5cfc34846838963c058 fontconfig-2.12.1.tar.bz2 From c039c293bbd9f2ff57bf665ea0a7d067dfbc0f42 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 09:54:50 +0000 Subject: [PATCH 009/154] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 9dea9ca..b7d69eb 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.1 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -141,6 +141,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 2.12.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Aug 5 2016 Akira TAGOH - 2.12.1-1 - New upstream release. From cffc8785e299ea3a59334491c449556bf0f8b998 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 22 Feb 2017 20:59:53 +0900 Subject: [PATCH 010/154] Fix FTBFS (#1423570) --- fontconfig-glibc-limits.patch | 47 +++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 ++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 fontconfig-glibc-limits.patch diff --git a/fontconfig-glibc-limits.patch b/fontconfig-glibc-limits.patch new file mode 100644 index 0000000..8eff160 --- /dev/null +++ b/fontconfig-glibc-limits.patch @@ -0,0 +1,47 @@ +From 1ab5258f7c2abfafcd63a760ca08bf93591912da Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 14 Dec 2016 16:11:05 -0800 +Subject: [PATCH] Avoid conflicts with integer width macros from TS + 18661-1:2014 + +glibc 2.25+ has now defined these macros in +https://sourceware.org/git/?p=glibc.git;a=commit;h=5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a + +Create an alias for FC_CHAR_WIDTH for ABI compatibility + +Signed-off-by: Khem Raj +--- + fontconfig/fontconfig.h | 3 ++- + src/fcobjs.h | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h +index 5c72b22..070a557 100644 +--- a/fontconfig/fontconfig.h ++++ b/fontconfig/fontconfig.h +@@ -128,7 +128,8 @@ typedef int FcBool; + #define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION + + /* Adjust outline rasterizer */ +-#define FC_CHAR_WIDTH "charwidth" /* Int */ ++#define FC_CHARWIDTH "charwidth" /* Int */ ++#define FC_CHAR_WIDTH FC_CHARWIDTH + #define FC_CHAR_HEIGHT "charheight"/* Int */ + #define FC_MATRIX "matrix" /* FcMatrix */ + +diff --git a/src/fcobjs.h b/src/fcobjs.h +index 1fc4f65..d27864b 100644 +--- a/src/fcobjs.h ++++ b/src/fcobjs.h +@@ -51,7 +51,7 @@ FC_OBJECT (DPI, FcTypeDouble, NULL) + FC_OBJECT (RGBA, FcTypeInteger, NULL) + FC_OBJECT (SCALE, FcTypeDouble, NULL) + FC_OBJECT (MINSPACE, FcTypeBool, NULL) +-FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL) ++FC_OBJECT (CHARWIDTH, FcTypeInteger, NULL) + FC_OBJECT (CHAR_HEIGHT, FcTypeInteger, NULL) + FC_OBJECT (MATRIX, FcTypeMatrix, NULL) + FC_OBJECT (CHARSET, FcTypeCharSet, FcCompareCharSet) +-- +2.9.3 + diff --git a/fontconfig.spec b/fontconfig.spec index b7d69eb..8596a7c 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.1 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -15,6 +15,7 @@ Source1: 25-no-bitmap-fedora.conf # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch +Patch1: %{name}-glibc-limits.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -141,6 +142,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Feb 22 2017 Akira TAGOH - 2.12.1-3 +- Fix FTBFS (#1423570) + * Fri Feb 10 2017 Fedora Release Engineering - 2.12.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From bb30f8e8ff795b9ffae783c8a783f37939dfa15e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 22 Feb 2017 21:04:37 +0900 Subject: [PATCH 011/154] Fix FTBFS (#1423570) --- fontconfig.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fontconfig.spec b/fontconfig.spec index 8596a7c..ecc8ddf 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -59,6 +59,7 @@ which is useful for developing applications that uses fontconfig. %prep %setup -q %patch0 -p1 -b .sleep-less +%patch1 -p1 -b .glibc-limits %build # We don't want to rebuild the docs, but we want to install the included ones. From 073a4b048f45d93f84a727a5ae95a7870b5a7da1 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 22 Feb 2017 21:16:36 +0900 Subject: [PATCH 012/154] Fix FTBFS (#1423570) --- fontconfig.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fontconfig.spec b/fontconfig.spec index ecc8ddf..04548f8 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -21,6 +21,7 @@ BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel BuildRequires: autoconf automake libtool +BuildRequires: gperf Requires: fontpackages-filesystem freetype Requires(pre): freetype From 6742b0b9a6868e1d0eb00e763a87a7a44f80ad86 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Feb 2017 21:44:33 +0900 Subject: [PATCH 013/154] Fix FTBFS (#1423570) --- fontconfig-gperf-3.1.patch | 65 ++++++++++++++++++++++++++++++++++++++ fontconfig.spec | 3 ++ 2 files changed, 68 insertions(+) create mode 100644 fontconfig-gperf-3.1.patch diff --git a/fontconfig-gperf-3.1.patch b/fontconfig-gperf-3.1.patch new file mode 100644 index 0000000..e13efbe --- /dev/null +++ b/fontconfig-gperf-3.1.patch @@ -0,0 +1,65 @@ +From 9878b306f6c673d3d6cd9db487f67eb426cc03df Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 23 Feb 2017 21:39:10 +0900 +Subject: [PATCH] Fix the build issue with gperf 3.1 + +To support the one of changes in gperf 3.1: +* The 'len' parameter of the hash function and of the lookup function is now + of type 'size_t' instead of 'unsigned int'. This makes it safe to call these + functions with strings of length > 4 GB, on 64-bit machines. +--- + configure.ac | 20 ++++++++++++++++++++ + src/fcobjs.c | 4 ++-- + 2 files changed, 22 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4948816..8fbf3d3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -193,6 +193,26 @@ fi + AC_CHECK_MEMBERS([struct dirent.d_type],,, + [#include ]) + ++# Check the argument type of the gperf hash/lookup function ++AC_MSG_CHECKING([The type of len parameter of gperf hash/lookup function]) ++fc_gperf_test="$(echo 'foo' | gperf -L ANSI-C)" ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ ++ const char *in_word_set(register const char *, register size_t); ++ $fc_gperf_test ++ ]])], [FC_GPERF_SIZE_T=size_t], ++ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ ++ const char *in_word_set(register const char *, register unsigned int); ++ $fc_gperf_test ++ ]])], [FC_GPERF_SIZE_T="unsigned int"], ++ [AC_MSG_ERROR([Unable to determine the type of the len parameter of the gperf hash/lookup function])] ++)]) ++AC_DEFINE_UNQUOTED(FC_GPERF_SIZE_T, $FC_GPERF_SIZE_T, [The type of len parameter of the gperf hash/lookup function]) ++AC_MSG_RESULT($FC_GPERF_SIZE_T) ++ + # + # Checks for iconv + # +diff --git a/src/fcobjs.c b/src/fcobjs.c +index 16ff31c..33bba8d 100644 +--- a/src/fcobjs.c ++++ b/src/fcobjs.c +@@ -25,10 +25,10 @@ + #include "fcint.h" + + static unsigned int +-FcObjectTypeHash (register const char *str, register unsigned int len); ++FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len); + + static const struct FcObjectTypeInfo * +-FcObjectTypeLookup (register const char *str, register unsigned int len); ++FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len); + + #include "fcobjshash.h" + +-- +2.9.3 + diff --git a/fontconfig.spec b/fontconfig.spec index 04548f8..fd8127f 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -16,6 +16,7 @@ Source1: 25-no-bitmap-fedora.conf # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-glibc-limits.patch +Patch2: %{name}-gperf-3.1.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -61,11 +62,13 @@ which is useful for developing applications that uses fontconfig. %setup -q %patch0 -p1 -b .sleep-less %patch1 -p1 -b .glibc-limits +%patch2 -p1 -b .gperf %build # We don't want to rebuild the docs, but we want to install the included ones. export HASDOCBOOK=no +autoreconf %configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ --disable-static From 0a18327487431b3c32618b08e582b47e8a262dfd Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Feb 2017 22:14:07 +0900 Subject: [PATCH 014/154] Fix FTBFS (#1423570) --- fontconfig-freetype-2.7.1.patch | 19 +++++++++++++++++++ fontconfig.spec | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 fontconfig-freetype-2.7.1.patch diff --git a/fontconfig-freetype-2.7.1.patch b/fontconfig-freetype-2.7.1.patch new file mode 100644 index 0000000..3f995e2 --- /dev/null +++ b/fontconfig-freetype-2.7.1.patch @@ -0,0 +1,19 @@ +diff --git a/test/out.expected b/test/out.expected +index 39634c5..f3a8856 100644 +--- a/test/out.expected ++++ b/test/out.expected +@@ -1,8 +1,8 @@ +-Fixed:pixelsize=16 +-Fixed:pixelsize=6 ++Misc Fixed:pixelsize=16 ++Sony Fixed:pixelsize=6 + = +-Fixed:pixelsize=16 +-Fixed:pixelsize=6 ++Misc Fixed:pixelsize=16 ++Sony Fixed:pixelsize=6 + = +-Fixed:pixelsize=16 +-Fixed:pixelsize=6 ++Misc Fixed:pixelsize=16 ++Sony Fixed:pixelsize=6 diff --git a/fontconfig.spec b/fontconfig.spec index fd8127f..7235dcc 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -17,6 +17,7 @@ Source1: 25-no-bitmap-fedora.conf Patch0: %{name}-sleep-less.patch Patch1: %{name}-glibc-limits.patch Patch2: %{name}-gperf-3.1.patch +Patch3: %{name}-freetype-2.7.1.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -63,6 +64,7 @@ which is useful for developing applications that uses fontconfig. %patch0 -p1 -b .sleep-less %patch1 -p1 -b .glibc-limits %patch2 -p1 -b .gperf +%patch3 -p1 -b .freetype %build # We don't want to rebuild the docs, but we want to install the included ones. From e79992bb046839946a090bdd9b5cc89e5eb2b58f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Feb 2017 22:25:58 +0900 Subject: [PATCH 015/154] Fix FTBFS (#1423570) --- fontconfig-freetype-2.7.1.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fontconfig-freetype-2.7.1.patch b/fontconfig-freetype-2.7.1.patch index 3f995e2..72bad89 100644 --- a/fontconfig-freetype-2.7.1.patch +++ b/fontconfig-freetype-2.7.1.patch @@ -1,19 +1,19 @@ diff --git a/test/out.expected b/test/out.expected -index 39634c5..f3a8856 100644 +index 39634c5..d069723 100644 --- a/test/out.expected +++ b/test/out.expected @@ -1,8 +1,8 @@ -Fixed:pixelsize=16 -Fixed:pixelsize=6 -+Misc Fixed:pixelsize=16 -+Sony Fixed:pixelsize=6 ++Misc Fixed:pixelsize=6 ++Sony Fixed:pixelsize=16 = -Fixed:pixelsize=16 -Fixed:pixelsize=6 -+Misc Fixed:pixelsize=16 -+Sony Fixed:pixelsize=6 ++Misc Fixed:pixelsize=6 ++Sony Fixed:pixelsize=16 = -Fixed:pixelsize=16 -Fixed:pixelsize=6 -+Misc Fixed:pixelsize=16 -+Sony Fixed:pixelsize=6 ++Misc Fixed:pixelsize=6 ++Sony Fixed:pixelsize=16 From d5e37249efa6bde8bb3ce23f30420b5a1db18849 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Feb 2017 23:32:10 +0900 Subject: [PATCH 016/154] Move the cache files into /usr/lib/fontconfig/cache (#1377367, #1416380) --- fontconfig.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 7235dcc..8ba86a7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.1 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -72,7 +72,7 @@ export HASDOCBOOK=no autoreconf %configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ - --disable-static + --disable-static --with-cache-dir=/usr/lib/fontconfig/cache make %{?_smp_mflags} @@ -97,7 +97,9 @@ make check umask 0022 -mkdir -p %{_localstatedir}/cache/fontconfig +mkdir -p /usr/lib/fontconfig/cache + +[[ -d %{_localstatedir}/cache/fontconfig ]] && rm -rf %{_localstatedir}/cache/fontconfig/* 2> /dev/null || : # Force regeneration of all fontconfig cache files # The check for existance is needed on dual-arch installs (the second @@ -135,7 +137,7 @@ HOME=/root /usr/bin/fc-cache -s # If you want to do so, you should use local.conf instead. %config %{_fontconfig_masterdir}/fonts.conf %config(noreplace) %{_fontconfig_confdir}/*.conf -%dir %{_localstatedir}/cache/fontconfig +%dir /usr/lib/fontconfig/cache %{_mandir}/man1/* %{_mandir}/man5/* @@ -149,6 +151,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Feb 23 2017 Akira TAGOH - 2.12.1-4 +- Move the cache files into /usr/lib/fontconfig/cache (#1377367, #1416380) + * Wed Feb 22 2017 Akira TAGOH - 2.12.1-3 - Fix FTBFS (#1423570) From 518193d777ef49b3856fc9d16a1ef43af9dceb6e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 31 May 2017 17:04:10 +0900 Subject: [PATCH 017/154] New upstream release. --- .gitignore | 1 + fontconfig-freetype-2.7.1.patch | 19 ---------- fontconfig-glibc-limits.patch | 47 ------------------------ fontconfig-gperf-3.1.patch | 65 --------------------------------- fontconfig.spec | 13 +++---- sources | 2 +- 6 files changed, 7 insertions(+), 140 deletions(-) delete mode 100644 fontconfig-freetype-2.7.1.patch delete mode 100644 fontconfig-glibc-limits.patch delete mode 100644 fontconfig-gperf-3.1.patch diff --git a/.gitignore b/.gitignore index d13380a..c0334df 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.11.95.tar.bz2 /fontconfig-2.12.0.tar.bz2 /fontconfig-2.12.1.tar.bz2 +/fontconfig-2.12.2.tar.bz2 diff --git a/fontconfig-freetype-2.7.1.patch b/fontconfig-freetype-2.7.1.patch deleted file mode 100644 index 72bad89..0000000 --- a/fontconfig-freetype-2.7.1.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/test/out.expected b/test/out.expected -index 39634c5..d069723 100644 ---- a/test/out.expected -+++ b/test/out.expected -@@ -1,8 +1,8 @@ --Fixed:pixelsize=16 --Fixed:pixelsize=6 -+Misc Fixed:pixelsize=6 -+Sony Fixed:pixelsize=16 - = --Fixed:pixelsize=16 --Fixed:pixelsize=6 -+Misc Fixed:pixelsize=6 -+Sony Fixed:pixelsize=16 - = --Fixed:pixelsize=16 --Fixed:pixelsize=6 -+Misc Fixed:pixelsize=6 -+Sony Fixed:pixelsize=16 diff --git a/fontconfig-glibc-limits.patch b/fontconfig-glibc-limits.patch deleted file mode 100644 index 8eff160..0000000 --- a/fontconfig-glibc-limits.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 1ab5258f7c2abfafcd63a760ca08bf93591912da Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 14 Dec 2016 16:11:05 -0800 -Subject: [PATCH] Avoid conflicts with integer width macros from TS - 18661-1:2014 - -glibc 2.25+ has now defined these macros in -https://sourceware.org/git/?p=glibc.git;a=commit;h=5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a - -Create an alias for FC_CHAR_WIDTH for ABI compatibility - -Signed-off-by: Khem Raj ---- - fontconfig/fontconfig.h | 3 ++- - src/fcobjs.h | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h -index 5c72b22..070a557 100644 ---- a/fontconfig/fontconfig.h -+++ b/fontconfig/fontconfig.h -@@ -128,7 +128,8 @@ typedef int FcBool; - #define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION - - /* Adjust outline rasterizer */ --#define FC_CHAR_WIDTH "charwidth" /* Int */ -+#define FC_CHARWIDTH "charwidth" /* Int */ -+#define FC_CHAR_WIDTH FC_CHARWIDTH - #define FC_CHAR_HEIGHT "charheight"/* Int */ - #define FC_MATRIX "matrix" /* FcMatrix */ - -diff --git a/src/fcobjs.h b/src/fcobjs.h -index 1fc4f65..d27864b 100644 ---- a/src/fcobjs.h -+++ b/src/fcobjs.h -@@ -51,7 +51,7 @@ FC_OBJECT (DPI, FcTypeDouble, NULL) - FC_OBJECT (RGBA, FcTypeInteger, NULL) - FC_OBJECT (SCALE, FcTypeDouble, NULL) - FC_OBJECT (MINSPACE, FcTypeBool, NULL) --FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL) -+FC_OBJECT (CHARWIDTH, FcTypeInteger, NULL) - FC_OBJECT (CHAR_HEIGHT, FcTypeInteger, NULL) - FC_OBJECT (MATRIX, FcTypeMatrix, NULL) - FC_OBJECT (CHARSET, FcTypeCharSet, FcCompareCharSet) --- -2.9.3 - diff --git a/fontconfig-gperf-3.1.patch b/fontconfig-gperf-3.1.patch deleted file mode 100644 index e13efbe..0000000 --- a/fontconfig-gperf-3.1.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 9878b306f6c673d3d6cd9db487f67eb426cc03df Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Thu, 23 Feb 2017 21:39:10 +0900 -Subject: [PATCH] Fix the build issue with gperf 3.1 - -To support the one of changes in gperf 3.1: -* The 'len' parameter of the hash function and of the lookup function is now - of type 'size_t' instead of 'unsigned int'. This makes it safe to call these - functions with strings of length > 4 GB, on 64-bit machines. ---- - configure.ac | 20 ++++++++++++++++++++ - src/fcobjs.c | 4 ++-- - 2 files changed, 22 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 4948816..8fbf3d3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -193,6 +193,26 @@ fi - AC_CHECK_MEMBERS([struct dirent.d_type],,, - [#include ]) - -+# Check the argument type of the gperf hash/lookup function -+AC_MSG_CHECKING([The type of len parameter of gperf hash/lookup function]) -+fc_gperf_test="$(echo 'foo' | gperf -L ANSI-C)" -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ -+ const char *in_word_set(register const char *, register size_t); -+ $fc_gperf_test -+ ]])], [FC_GPERF_SIZE_T=size_t], -+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ -+ const char *in_word_set(register const char *, register unsigned int); -+ $fc_gperf_test -+ ]])], [FC_GPERF_SIZE_T="unsigned int"], -+ [AC_MSG_ERROR([Unable to determine the type of the len parameter of the gperf hash/lookup function])] -+)]) -+AC_DEFINE_UNQUOTED(FC_GPERF_SIZE_T, $FC_GPERF_SIZE_T, [The type of len parameter of the gperf hash/lookup function]) -+AC_MSG_RESULT($FC_GPERF_SIZE_T) -+ - # - # Checks for iconv - # -diff --git a/src/fcobjs.c b/src/fcobjs.c -index 16ff31c..33bba8d 100644 ---- a/src/fcobjs.c -+++ b/src/fcobjs.c -@@ -25,10 +25,10 @@ - #include "fcint.h" - - static unsigned int --FcObjectTypeHash (register const char *str, register unsigned int len); -+FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len); - - static const struct FcObjectTypeInfo * --FcObjectTypeLookup (register const char *str, register unsigned int len); -+FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len); - - #include "fcobjshash.h" - --- -2.9.3 - diff --git a/fontconfig.spec b/fontconfig.spec index 8ba86a7..1253f65 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,8 +2,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.1 -Release: 4%{?dist} +Version: 2.12.2 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -15,9 +15,6 @@ Source1: 25-no-bitmap-fedora.conf # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch -Patch1: %{name}-glibc-limits.patch -Patch2: %{name}-gperf-3.1.patch -Patch3: %{name}-freetype-2.7.1.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -62,9 +59,6 @@ which is useful for developing applications that uses fontconfig. %prep %setup -q %patch0 -p1 -b .sleep-less -%patch1 -p1 -b .glibc-limits -%patch2 -p1 -b .gperf -%patch3 -p1 -b .freetype %build # We don't want to rebuild the docs, but we want to install the included ones. @@ -151,6 +145,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed May 31 2017 Akira TAGOH - 2.12.2-1 +- New upstream release. + * Thu Feb 23 2017 Akira TAGOH - 2.12.1-4 - Move the cache files into /usr/lib/fontconfig/cache (#1377367, #1416380) diff --git a/sources b/sources index 5a8dd8b..c8077cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b5af5a423ee3b5cfc34846838963c058 fontconfig-2.12.1.tar.bz2 +SHA512 (fontconfig-2.12.2.tar.bz2) = 9c1487925b700d6b4c87f1dfdeb389c585c79face53bedb930d6e6628e4c2881e321c56048bf6faeb6b57fd83a0e09e00b27036f2e23d21d5957a08227367d51 From fa557fa3398f3513c5e7656ea9a400bfafee4af0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 31 May 2017 17:56:29 +0900 Subject: [PATCH 018/154] Remove fcobjshash.h to be regenerated --- fontconfig.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fontconfig.spec b/fontconfig.spec index 1253f65..c978dcf 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -68,6 +68,8 @@ autoreconf %configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ --disable-static --with-cache-dir=/usr/lib/fontconfig/cache +# regenerate hash functions +rm src/fcobjshash.h make %{?_smp_mflags} %install From f1ad5e89b77f113e308fc5e659bbd6f400f0f5d6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 31 May 2017 18:28:51 +0900 Subject: [PATCH 019/154] New upstream release. --- .gitignore | 1 + fontconfig.spec | 4 ++-- sources | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c0334df..ff6f6d0 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.0.tar.bz2 /fontconfig-2.12.1.tar.bz2 /fontconfig-2.12.2.tar.bz2 +/fontconfig-2.12.3.tar.bz2 diff --git a/fontconfig.spec b/fontconfig.spec index c978dcf..fc815c6 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,7 +2,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.2 +Version: 2.12.3 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -147,7 +147,7 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog -* Wed May 31 2017 Akira TAGOH - 2.12.2-1 +* Wed May 31 2017 Akira TAGOH - 2.12.3-1 - New upstream release. * Thu Feb 23 2017 Akira TAGOH - 2.12.1-4 diff --git a/sources b/sources index c8077cd..ae5dd88 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.2.tar.bz2) = 9c1487925b700d6b4c87f1dfdeb389c585c79face53bedb930d6e6628e4c2881e321c56048bf6faeb6b57fd83a0e09e00b27036f2e23d21d5957a08227367d51 +SHA512 (fontconfig-2.12.3.tar.bz2) = 4c5fffc7e856bd65c1eed912a29492fadf8299d75829bd11b3b9bed1431b7e286b5b939f72607477e41fa9b238d8025e5fda647d1a68c4112bb0974cc31f8bf3 From dbef993536a69f615860b62347c4c930982be5a6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 31 May 2017 18:46:46 +0900 Subject: [PATCH 020/154] New upstream release. --- sources | 1 + 1 file changed, 1 insertion(+) diff --git a/sources b/sources index ae5dd88..cdcd81d 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (fontconfig-2.12.3.tar.bz2) = 4c5fffc7e856bd65c1eed912a29492fadf8299d75829bd11b3b9bed1431b7e286b5b939f72607477e41fa9b238d8025e5fda647d1a68c4112bb0974cc31f8bf3 +SHA512 (fontconfig-2.12.3.tar.bz2) = 603b5c6d3fef42f9ecface43ad183cbb2ae589dc5a36e9e495f39a99a7c03539264f18a81931d94d17fc139742374e1655999aa3b0d947554bb40090ee1dd60a From a8be0bfda6c1a2b9c10131c4ca97728da5b68002 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 31 May 2017 18:50:53 +0900 Subject: [PATCH 021/154] New upstream release. --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index cdcd81d..785a218 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (fontconfig-2.12.3.tar.bz2) = 4c5fffc7e856bd65c1eed912a29492fadf8299d75829bd11b3b9bed1431b7e286b5b939f72607477e41fa9b238d8025e5fda647d1a68c4112bb0974cc31f8bf3 SHA512 (fontconfig-2.12.3.tar.bz2) = 603b5c6d3fef42f9ecface43ad183cbb2ae589dc5a36e9e495f39a99a7c03539264f18a81931d94d17fc139742374e1655999aa3b0d947554bb40090ee1dd60a From 7ca611ce05c922959a1d943bea72e5fa6191a75f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 31 May 2017 20:11:59 +0900 Subject: [PATCH 022/154] New upstream release. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 785a218..512b9a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.3.tar.bz2) = 603b5c6d3fef42f9ecface43ad183cbb2ae589dc5a36e9e495f39a99a7c03539264f18a81931d94d17fc139742374e1655999aa3b0d947554bb40090ee1dd60a +SHA512 (fontconfig-2.12.3.tar.bz2) = 311a3c98a05afbe35c1215b41edb2bbcfe3069f85814c882ef0e40f0404cca4bb59a544b14eee9430ea902fd8bc3bfeccb37e42b9fe3bb3a6c71bb0c5332f2c7 From a5b217079a6898a271c91b177c8bd5f5601e4f5e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 5 Jul 2017 17:42:52 +0900 Subject: [PATCH 023/154] New upstream release. --- .gitignore | 1 + fontconfig.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ff6f6d0..0b01175 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.1.tar.bz2 /fontconfig-2.12.2.tar.bz2 /fontconfig-2.12.3.tar.bz2 +/fontconfig-2.12.4.tar.bz2 diff --git a/fontconfig.spec b/fontconfig.spec index fc815c6..82cf01d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,7 +2,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.3 +Version: 2.12.4 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -147,6 +147,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jul 5 2017 Akira TAGOH - 2.12.4-1 +- New upstream release. + * Wed May 31 2017 Akira TAGOH - 2.12.3-1 - New upstream release. diff --git a/sources b/sources index 512b9a1..9a766d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.3.tar.bz2) = 311a3c98a05afbe35c1215b41edb2bbcfe3069f85814c882ef0e40f0404cca4bb59a544b14eee9430ea902fd8bc3bfeccb37e42b9fe3bb3a6c71bb0c5332f2c7 +SHA512 (fontconfig-2.12.4.tar.bz2) = f336e9220afe738e0bf7186d87a5eb09842342ad99ca2102c69820a1f0b232e15c61ef72ae3f5d56503f5be32557d09180a80e05690e85b4eb13ed88f5cece81 From 94b0cacf6c27c4f969fd7560831fda4dafe071cd Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 5 Jul 2017 17:48:47 +0900 Subject: [PATCH 024/154] remove unnecessary stuff --- fontconfig.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 82cf01d..f03f4ee 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -68,8 +68,6 @@ autoreconf %configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ --disable-static --with-cache-dir=/usr/lib/fontconfig/cache -# regenerate hash functions -rm src/fcobjshash.h make %{?_smp_mflags} %install From 61e3ec408bea23dc19d5f31df185898da6b0f1f9 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 24 Jul 2017 18:18:44 +0900 Subject: [PATCH 025/154] Allow installing 32/64 bit version of fc-cache at the same time. (#1474257) Add fc-cache script to invoke both version of fc-cache if available. --- fc-cache | 4 ++++ fontconfig.spec | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100755 fc-cache diff --git a/fc-cache b/fc-cache new file mode 100755 index 0000000..6807246 --- /dev/null +++ b/fc-cache @@ -0,0 +1,4 @@ +#! /bin/sh + +[ -x /usr/bin/fc-cache-32 ] && /usr/bin/fc-cache-32 $@ +[ -x /usr/bin/fc-cache-64 ] && /usr/bin/fc-cache-64 $@ diff --git a/fontconfig.spec b/fontconfig.spec index f03f4ee..b0d85aa 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -12,6 +12,7 @@ License: MIT and Public Domain and UCD Source: http://fontconfig.org/release/%{name}-%{version}.tar.bz2 URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf +Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch @@ -78,11 +79,16 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ -# move installed doc files back to build directory to package themm +# move installed doc files back to build directory to package them # in the right place mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* . rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/ +# rename fc-cache binary +mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits} + +install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache + %check make check @@ -117,7 +123,7 @@ HOME=/root /usr/bin/fc-cache -s %doc %{_fontconfig_confdir}/README %license COPYING %{_libdir}/libfontconfig.so.* -%{_bindir}/fc-cache +%{_bindir}/fc-cache* %{_bindir}/fc-cat %{_bindir}/fc-list %{_bindir}/fc-match @@ -145,6 +151,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Jul 24 2017 Akira TAGOH - 2.12.4-2 +- Allow installing 32/64 bit version of fc-cache at the same time. (#1474257) +- Add fc-cache script to invoke both version of fc-cache if available. + * Wed Jul 5 2017 Akira TAGOH - 2.12.4-1 - New upstream release. From d1d042dc463004c5d988de8428a6135c3b0e62a4 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 24 Jul 2017 18:18:57 +0900 Subject: [PATCH 026/154] Allow installing 32/64 bit version of fc-cache at the same time. (#1474257) Add fc-cache script to invoke both version of fc-cache if available. --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index b0d85aa..644c1e1 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.4 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD From 11b4d3f085ea43f70c5d25f7c40b30ed3341c940 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 08:36:37 +0000 Subject: [PATCH 027/154] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 644c1e1..e133e0e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.4 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -151,6 +151,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 2.12.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Mon Jul 24 2017 Akira TAGOH - 2.12.4-2 - Allow installing 32/64 bit version of fc-cache at the same time. (#1474257) - Add fc-cache script to invoke both version of fc-cache if available. From a2fdd44c3efdfae28ef162adcc615b509762dfe2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 31 Jul 2017 20:19:05 +0100 Subject: [PATCH 028/154] Fix exiting with 1 on 32bit arch. (#1476831) --- fc-cache | 4 ++-- fontconfig.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fc-cache b/fc-cache index 6807246..6a12446 100755 --- a/fc-cache +++ b/fc-cache @@ -1,4 +1,4 @@ #! /bin/sh -[ -x /usr/bin/fc-cache-32 ] && /usr/bin/fc-cache-32 $@ -[ -x /usr/bin/fc-cache-64 ] && /usr/bin/fc-cache-64 $@ +[ -x /usr/bin/fc-cache-32 ] && /usr/bin/fc-cache-32 $@ || : +[ -x /usr/bin/fc-cache-64 ] && /usr/bin/fc-cache-64 $@ || : diff --git a/fontconfig.spec b/fontconfig.spec index e133e0e..e4ac26d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.4 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -151,6 +151,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Jul 31 2017 Akira TAGOH - 2.12.4-4 +- Fix exiting with 1 on 32bit arch. (#1476831) + * Wed Jul 26 2017 Fedora Release Engineering - 2.12.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 3b658cf3f72bb641952f040893830a89f5b168cc Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 9 Sep 2017 22:27:46 +0900 Subject: [PATCH 029/154] New upstream release. --- .gitignore | 1 + fontconfig.spec | 7 +++++-- sources | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0b01175..2dfe799 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.2.tar.bz2 /fontconfig-2.12.3.tar.bz2 /fontconfig-2.12.4.tar.bz2 +/fontconfig-2.12.5.tar.bz2 diff --git a/fontconfig.spec b/fontconfig.spec index e4ac26d..5d92070 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,8 +2,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.4 -Release: 4%{?dist} +Version: 2.12.5 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -151,6 +151,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Sat Sep 9 2017 Akira TAGOH - 2.12.5-1 +- New upstream release. + * Mon Jul 31 2017 Akira TAGOH - 2.12.4-4 - Fix exiting with 1 on 32bit arch. (#1476831) diff --git a/sources b/sources index 9a766d8..baf30d3 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (fontconfig-2.12.4.tar.bz2) = f336e9220afe738e0bf7186d87a5eb09842342ad99ca2102c69820a1f0b232e15c61ef72ae3f5d56503f5be32557d09180a80e05690e85b4eb13ed88f5cece81 +SHA512 (fontconfig-2.12.5.tar.bz2) = 6bdc90740fd8eb2ac14fa748212506b7cecfa057b5fd1109e1741eaec9374e1256b3b5523b021d2bfcad42defc61aa5e7b8430d87a35057b36c40cbfb41324fe From bbf7ede4b9220e553a54ca27e41839a1fa2f9034 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 9 Sep 2017 22:28:03 +0900 Subject: [PATCH 030/154] New upstream release. --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index baf30d3..9513691 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (fontconfig-2.12.4.tar.bz2) = f336e9220afe738e0bf7186d87a5eb09842342ad99ca2102c69820a1f0b232e15c61ef72ae3f5d56503f5be32557d09180a80e05690e85b4eb13ed88f5cece81 SHA512 (fontconfig-2.12.5.tar.bz2) = 6bdc90740fd8eb2ac14fa748212506b7cecfa057b5fd1109e1741eaec9374e1256b3b5523b021d2bfcad42defc61aa5e7b8430d87a35057b36c40cbfb41324fe From 5b02cfe67bbff9f001be055e4344d8300217db81 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 9 Sep 2017 22:38:16 +0900 Subject: [PATCH 031/154] New upstream release. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 9513691..3193dfa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.5.tar.bz2) = 6bdc90740fd8eb2ac14fa748212506b7cecfa057b5fd1109e1741eaec9374e1256b3b5523b021d2bfcad42defc61aa5e7b8430d87a35057b36c40cbfb41324fe +SHA512 (fontconfig-2.12.5.tar.bz2) = be0c2bfe0a00e713be5882cf948df5f5bdefe17c224d4a7ae7d24dee6e4172d11f1d0b6ac981ef8739a579c8451c51a1e47f3a718d7b511314fcf710ca9b37a2 From 360658fdb5f2bc0d464400eebe140f6442b0d6f6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 21 Sep 2017 17:13:02 +0900 Subject: [PATCH 032/154] New upstream release. --- .gitignore | 1 + fontconfig.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2dfe799..73405e9 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.3.tar.bz2 /fontconfig-2.12.4.tar.bz2 /fontconfig-2.12.5.tar.bz2 +/fontconfig-2.12.6.tar.bz2 diff --git a/fontconfig.spec b/fontconfig.spec index 5d92070..4646cc9 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,7 +2,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.5 +Version: 2.12.6 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -151,6 +151,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Sep 21 2017 Akira TAGOH - 2.12.6-1 +- New upstream release. + * Sat Sep 9 2017 Akira TAGOH - 2.12.5-1 - New upstream release. diff --git a/sources b/sources index 3193dfa..deaf5ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.5.tar.bz2) = be0c2bfe0a00e713be5882cf948df5f5bdefe17c224d4a7ae7d24dee6e4172d11f1d0b6ac981ef8739a579c8451c51a1e47f3a718d7b511314fcf710ca9b37a2 +SHA512 (fontconfig-2.12.6.tar.bz2) = 2a1d3e62cae2bfcae2e67e9cb75ab6534a35bda4215f1ad4b8bf757e77e7d9d609c016562f5288fd10046a0e94655a807f6dd044d7868ed81a146c4275c4dd06 From 446f303a1db50b40731f2063b2ab5a23412a5f0a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 3 Oct 2017 20:50:42 +0900 Subject: [PATCH 033/154] Bump the release to address the upgrade path issue. --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 4646cc9..9c51c90 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.6 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -151,6 +151,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Tue Oct 3 2017 Akira TAGOH - 2.12.6-2 +- Bump the release to address the upgrade path issue. + * Thu Sep 21 2017 Akira TAGOH - 2.12.6-1 - New upstream release. From ce2cb4fb5dffb45d6d8b57d3306dca43d22a3eb7 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 5 Oct 2017 20:36:31 +0900 Subject: [PATCH 034/154] Backport a patch to change the order of the emoji fonts. (#1496761) --- fontconfig-emoji.patch | 94 ++++++++++++++++++++++++++++++++++++++++++ fontconfig.spec | 8 +++- 2 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 fontconfig-emoji.patch diff --git a/fontconfig-emoji.patch b/fontconfig-emoji.patch new file mode 100644 index 0000000..2c39e1b --- /dev/null +++ b/fontconfig-emoji.patch @@ -0,0 +1,94 @@ +From b861a2a5b09e06795dea4de6e72447d364b89473 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 5 Oct 2017 12:17:59 +0200 +Subject: [PATCH] conf: Prefer system emoji fonts to third-party ones + +Prefer the system provided emoji fonts on systems which provide one, +such as Windows, MacOS and Android, even if the Emoji One or Emoji Two +fonts are installed. + +This also allows free software OSes such as GNOME to prefer the Emoji +One font, which is not used in other OSes and therefore has a unique +brand identity, by installing them and only them by default. + +Users can use more capable fonts while Emoji One and Emoji Two catch up +by installing a font otherwise already used by another system, such as +Google's freely redistributable Noto Emoji font. + +https://bugzilla.redhat.com/show_bug.cgi?id=1496761 +--- + conf.d/45-generic.conf | 16 +++++++++------- + conf.d/60-generic.conf | 5 +++-- + 2 files changed, 12 insertions(+), 9 deletions(-) + +diff --git a/conf.d/45-generic.conf b/conf.d/45-generic.conf +index f6076bb..791d12d 100644 +--- a/conf.d/45-generic.conf ++++ b/conf.d/45-generic.conf +@@ -5,32 +5,34 @@ + + + ++ + +- Emoji Two ++ Noto Color Emoji + emoji + + +- Emoji One ++ Apple Color Emoji + emoji + + +- Noto Color Emoji ++ Segoe UI Emoji + emoji + + +- Apple Color Emoji ++ Twitter Color Emoji + emoji + + +- Segoe UI Emoji ++ EmojiOne Mozilla + emoji + ++ + +- Twitter Color Emoji ++ Emoji Two + emoji + + +- EmojiOne Mozilla ++ Emoji One + emoji + + +diff --git a/conf.d/60-generic.conf b/conf.d/60-generic.conf +index 2a2b809..7985ce9 100644 +--- a/conf.d/60-generic.conf ++++ b/conf.d/60-generic.conf +@@ -29,14 +29,15 @@ + + emoji + +- Emoji Two +- Emoji One + + Noto Color Emoji + Apple Color Emoji + Segoe UI Emoji + Twitter Color Emoji + EmojiOne Mozilla ++ ++ Emoji Two ++ Emoji One + + Noto Emoji + Android Emoji +-- +2.14.1 + diff --git a/fontconfig.spec b/fontconfig.spec index 9c51c90..0fc9bef 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.6 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -16,6 +16,8 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1496761 +Patch1: %{name}-emoji.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -60,6 +62,7 @@ which is useful for developing applications that uses fontconfig. %prep %setup -q %patch0 -p1 -b .sleep-less +%patch1 -p1 -b .emoji %build # We don't want to rebuild the docs, but we want to install the included ones. @@ -151,6 +154,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Oct 5 2017 Akira TAGOH - 2.12.6-3 +- Backport a patch to change the order of the emoji fonts. (#1496761) + * Tue Oct 3 2017 Akira TAGOH - 2.12.6-2 - Bump the release to address the upgrade path issue. From d261f1511da818b64f3c1cc9e83d5ec648326351 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 8 Nov 2017 15:01:00 +0900 Subject: [PATCH 035/154] Remove the debug print in fc-query. (#1509790) --- fontconfig.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 0fc9bef..b557d8e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.6 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -18,6 +18,8 @@ Source2: fc-cache Patch0: %{name}-sleep-less.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1496761 Patch1: %{name}-emoji.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1509790 +Patch2: %{name}-remove-debug-print-in-fc-query.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -63,6 +65,7 @@ which is useful for developing applications that uses fontconfig. %setup -q %patch0 -p1 -b .sleep-less %patch1 -p1 -b .emoji +%patch2 -p1 -b .fc-query %build # We don't want to rebuild the docs, but we want to install the included ones. @@ -154,6 +157,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Nov 8 2017 Akira TAGOH - 2.12.6-4 +- Remove the debug print in fc-query. (#1509790) + * Thu Oct 5 2017 Akira TAGOH - 2.12.6-3 - Backport a patch to change the order of the emoji fonts. (#1496761) From 5a062b2ec87f1a215c4190621625174a2c171128 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 8 Nov 2017 15:01:20 +0900 Subject: [PATCH 036/154] Remove the debug print in fc-query. (#1509790) --- ...onfig-remove-debug-print-in-fc-query.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 fontconfig-remove-debug-print-in-fc-query.patch diff --git a/fontconfig-remove-debug-print-in-fc-query.patch b/fontconfig-remove-debug-print-in-fc-query.patch new file mode 100644 index 0000000..9aa0218 --- /dev/null +++ b/fontconfig-remove-debug-print-in-fc-query.patch @@ -0,0 +1,25 @@ +From b56207a069be2574df455ede0a6ab61f44d5ca2b Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod +Date: Tue, 12 Sep 2017 13:25:46 -0400 +Subject: [PATCH] Remove stray printf() + +Ouch. +--- + fc-query/fc-query.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/fc-query/fc-query.c b/fc-query/fc-query.c +index 842a8b6..6cd5abd 100644 +--- a/fc-query/fc-query.c ++++ b/fc-query/fc-query.c +@@ -170,7 +170,6 @@ main (int argc, char **argv) + FcPattern *pat; + + id = ((instance_num << 16) + face_num); +- printf("id %d\n", id); + if (FT_New_Face (ftLibrary, argv[i], id, &face)) + break; + num_faces = face->num_faces; +-- +2.13.6 + From 4dc1c1f9ef40c39b8ac99290b10d1f068676d6f8 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 14 Dec 2017 16:48:17 +0900 Subject: [PATCH 037/154] New upstream release. --- .gitignore | 1 + fontconfig-emoji.patch | 94 ------------------- ...onfig-remove-debug-print-in-fc-query.patch | 25 ----- fontconfig.spec | 18 ++-- sources | 2 +- 5 files changed, 9 insertions(+), 131 deletions(-) delete mode 100644 fontconfig-emoji.patch delete mode 100644 fontconfig-remove-debug-print-in-fc-query.patch diff --git a/.gitignore b/.gitignore index 73405e9..b6cca53 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.4.tar.bz2 /fontconfig-2.12.5.tar.bz2 /fontconfig-2.12.6.tar.bz2 +/fontconfig-2.12.91.tar.bz2 diff --git a/fontconfig-emoji.patch b/fontconfig-emoji.patch deleted file mode 100644 index 2c39e1b..0000000 --- a/fontconfig-emoji.patch +++ /dev/null @@ -1,94 +0,0 @@ -From b861a2a5b09e06795dea4de6e72447d364b89473 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 5 Oct 2017 12:17:59 +0200 -Subject: [PATCH] conf: Prefer system emoji fonts to third-party ones - -Prefer the system provided emoji fonts on systems which provide one, -such as Windows, MacOS and Android, even if the Emoji One or Emoji Two -fonts are installed. - -This also allows free software OSes such as GNOME to prefer the Emoji -One font, which is not used in other OSes and therefore has a unique -brand identity, by installing them and only them by default. - -Users can use more capable fonts while Emoji One and Emoji Two catch up -by installing a font otherwise already used by another system, such as -Google's freely redistributable Noto Emoji font. - -https://bugzilla.redhat.com/show_bug.cgi?id=1496761 ---- - conf.d/45-generic.conf | 16 +++++++++------- - conf.d/60-generic.conf | 5 +++-- - 2 files changed, 12 insertions(+), 9 deletions(-) - -diff --git a/conf.d/45-generic.conf b/conf.d/45-generic.conf -index f6076bb..791d12d 100644 ---- a/conf.d/45-generic.conf -+++ b/conf.d/45-generic.conf -@@ -5,32 +5,34 @@ - - - -+ - -- Emoji Two -+ Noto Color Emoji - emoji - - -- Emoji One -+ Apple Color Emoji - emoji - - -- Noto Color Emoji -+ Segoe UI Emoji - emoji - - -- Apple Color Emoji -+ Twitter Color Emoji - emoji - - -- Segoe UI Emoji -+ EmojiOne Mozilla - emoji - -+ - -- Twitter Color Emoji -+ Emoji Two - emoji - - -- EmojiOne Mozilla -+ Emoji One - emoji - - -diff --git a/conf.d/60-generic.conf b/conf.d/60-generic.conf -index 2a2b809..7985ce9 100644 ---- a/conf.d/60-generic.conf -+++ b/conf.d/60-generic.conf -@@ -29,14 +29,15 @@ - - emoji - -- Emoji Two -- Emoji One - - Noto Color Emoji - Apple Color Emoji - Segoe UI Emoji - Twitter Color Emoji - EmojiOne Mozilla -+ -+ Emoji Two -+ Emoji One - - Noto Emoji - Android Emoji --- -2.14.1 - diff --git a/fontconfig-remove-debug-print-in-fc-query.patch b/fontconfig-remove-debug-print-in-fc-query.patch deleted file mode 100644 index 9aa0218..0000000 --- a/fontconfig-remove-debug-print-in-fc-query.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b56207a069be2574df455ede0a6ab61f44d5ca2b Mon Sep 17 00:00:00 2001 -From: Behdad Esfahbod -Date: Tue, 12 Sep 2017 13:25:46 -0400 -Subject: [PATCH] Remove stray printf() - -Ouch. ---- - fc-query/fc-query.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/fc-query/fc-query.c b/fc-query/fc-query.c -index 842a8b6..6cd5abd 100644 ---- a/fc-query/fc-query.c -+++ b/fc-query/fc-query.c -@@ -170,7 +170,6 @@ main (int argc, char **argv) - FcPattern *pat; - - id = ((instance_num << 16) + face_num); -- printf("id %d\n", id); - if (FT_New_Face (ftLibrary, argv[i], id, &face)) - break; - num_faces = face->num_faces; --- -2.13.6 - diff --git a/fontconfig.spec b/fontconfig.spec index b557d8e..1cfa40b 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,8 +2,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.6 -Release: 4%{?dist} +Version: 2.12.91 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -16,15 +16,11 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1496761 -Patch1: %{name}-emoji.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1509790 -Patch2: %{name}-remove-debug-print-in-fc-query.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel -BuildRequires: autoconf automake libtool +BuildRequires: autoconf automake libtool gettext BuildRequires: gperf Requires: fontpackages-filesystem freetype @@ -62,10 +58,7 @@ The fontconfig-devel-doc package contains the documentation files which is useful for developing applications that uses fontconfig. %prep -%setup -q -%patch0 -p1 -b .sleep-less -%patch1 -p1 -b .emoji -%patch2 -p1 -b .fc-query +%autosetup %build # We don't want to rebuild the docs, but we want to install the included ones. @@ -157,6 +150,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Dec 14 2017 Akira TAGOH - 2.12.91-1 +- New upstream release. + * Wed Nov 8 2017 Akira TAGOH - 2.12.6-4 - Remove the debug print in fc-query. (#1509790) diff --git a/sources b/sources index deaf5ad..2413228 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.6.tar.bz2) = 2a1d3e62cae2bfcae2e67e9cb75ab6534a35bda4215f1ad4b8bf757e77e7d9d609c016562f5288fd10046a0e94655a807f6dd044d7868ed81a146c4275c4dd06 +SHA512 (fontconfig-2.12.91.tar.bz2) = 755a288e798c6c93acde8307905bef63fcc0cf85d69855334042897e1c26ed089626b1e42d2cfe3de657c623b19dec469b483a75d64502954cc8641290f23301 From dc4c588340b6475e4893e461f1c17db781ab958c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 14 Dec 2017 16:52:23 +0900 Subject: [PATCH 038/154] New upstream release. --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 1cfa40b..3b5a434 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -58,7 +58,7 @@ The fontconfig-devel-doc package contains the documentation files which is useful for developing applications that uses fontconfig. %prep -%autosetup +%autosetup -p1 %build # We don't want to rebuild the docs, but we want to install the included ones. From e11abafffe8f0132906ee93d0388a01b869ab676 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 14 Dec 2017 17:01:11 +0900 Subject: [PATCH 039/154] New upstream release. --- fontconfig-sleep-less.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fontconfig-sleep-less.patch b/fontconfig-sleep-less.patch index e0b0b9c..bd9c58c 100644 --- a/fontconfig-sleep-less.patch +++ b/fontconfig-sleep-less.patch @@ -1,12 +1,12 @@ -diff -pruN fontconfig-2.11.0.orig/fc-cache/fc-cache.c fontconfig-2.11.0/fc-cache/fc-cache.c ---- fontconfig-2.11.0.orig/fc-cache/fc-cache.c 2013-10-11 12:10:17.000000000 +0900 -+++ fontconfig-2.11.0/fc-cache/fc-cache.c 2013-10-11 13:09:48.000000000 +0900 -@@ -399,7 +399,7 @@ main (int argc, char **argv) +diff -pruN fontconfig-2.12.91.orig/fc-cache/fc-cache.c fontconfig-2.12.91/fc-cache/fc-cache.c +--- fontconfig-2.12.91.orig/fc-cache/fc-cache.c 2017-11-20 21:02:20.000000000 +0900 ++++ fontconfig-2.12.91/fc-cache/fc-cache.c 2017-12-14 16:59:19.002003145 +0900 +@@ -413,7 +413,7 @@ main (int argc, char **argv) */ /* the resolution of mtime on FAT is 2 seconds */ if (changed) - sleep (2); + sleep (1); if (verbose) - printf ("%s: %s\n", argv[0], ret ? "failed" : "succeeded"); + printf ("%s: %s\n", argv[0], ret ? _("failed") : _("succeeded")); return ret; From 5bceb3eeb58511a45ffaf165ee051ed749c9afff Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 14 Dec 2017 17:12:13 +0900 Subject: [PATCH 040/154] New upstream release. --- fontconfig.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 3b5a434..429815a 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -20,7 +20,7 @@ Patch0: %{name}-sleep-less.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel -BuildRequires: autoconf automake libtool gettext +BuildRequires: autoconf automake libtool gettext itstool BuildRequires: gperf Requires: fontpackages-filesystem freetype @@ -88,6 +88,8 @@ mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache +%find_lang %{name} + %check make check @@ -116,7 +118,7 @@ HOME=/root /usr/bin/fc-cache -s %transfiletriggerpostun -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts HOME=/root /usr/bin/fc-cache -s -%files +%files -f %{name}.lang %doc README AUTHORS %doc fontconfig-user.txt fontconfig-user.html %doc %{_fontconfig_confdir}/README @@ -124,6 +126,7 @@ HOME=/root /usr/bin/fc-cache -s %{_libdir}/libfontconfig.so.* %{_bindir}/fc-cache* %{_bindir}/fc-cat +%{_bindir}/fc-conflist %{_bindir}/fc-list %{_bindir}/fc-match %{_bindir}/fc-pattern From 01873bf4317cc55530e5695df1a815f8c21f3c87 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 14 Dec 2017 17:13:25 +0900 Subject: [PATCH 041/154] New upstream release. --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 429815a..c5864ee 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -1,4 +1,4 @@ -%global freetype_version 2.1.4 +%global freetype_version 2.8.1 Summary: Font configuration and customization library Name: fontconfig From 829417676fe8af4f6b1cf81f356ce8917b3c9caa Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 22 Dec 2017 16:23:51 +0900 Subject: [PATCH 042/154] Update the required version of freetype and deps --- fontconfig-required-freetype-version.patch | 12 ++++++++++++ fontconfig.spec | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 fontconfig-required-freetype-version.patch diff --git a/fontconfig-required-freetype-version.patch b/fontconfig-required-freetype-version.patch new file mode 100644 index 0000000..6ed1e8f --- /dev/null +++ b/fontconfig-required-freetype-version.patch @@ -0,0 +1,12 @@ +diff -pruN fontconfig-2.12.91.orig/configure.ac fontconfig-2.12.91/configure.ac +--- fontconfig-2.12.91.orig/configure.ac 2017-12-14 15:44:20.000000000 +0900 ++++ fontconfig-2.12.91/configure.ac 2017-12-22 16:20:11.556717785 +0900 +@@ -314,7 +314,7 @@ AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv, + # Checks for FreeType + # + dnl See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT for versioning in freetype +-PKG_CHECK_MODULES(FREETYPE, freetype2 >= 21.0.15) ++PKG_CHECK_MODULES(FREETYPE, freetype2 >= 20.0.14) + PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2" + + AC_SUBST(FREETYPE_LIBS) diff --git a/fontconfig.spec b/fontconfig.spec index c5864ee..132aa5a 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -1,4 +1,4 @@ -%global freetype_version 2.8.1 +%global freetype_version 2.8-7 Summary: Font configuration and customization library Name: fontconfig @@ -16,6 +16,7 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch +Patch1: %{name}-required-freetype-version.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -24,7 +25,7 @@ BuildRequires: autoconf automake libtool gettext itstool BuildRequires: gperf Requires: fontpackages-filesystem freetype -Requires(pre): freetype +Requires(pre): freetype >= 2.8-7 Requires(post): grep coreutils Requires: font(:lang=en) From e051f51f93142719d804f13c1d0570ffbb66b357 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 22 Dec 2017 16:38:04 +0900 Subject: [PATCH 043/154] Add BR: libuuid-devel --- fontconfig.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fontconfig.spec b/fontconfig.spec index 132aa5a..8967b9f 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -21,6 +21,7 @@ Patch1: %{name}-required-freetype-version.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel +BuildRequires: libuuid-devel BuildRequires: autoconf automake libtool gettext itstool BuildRequires: gperf From b59765abeec5286a17bf4b98fb5ccd7a40332e18 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 22 Dec 2017 16:43:10 +0900 Subject: [PATCH 044/154] trivial --- fontconfig.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 8967b9f..af5dd96 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -90,8 +90,6 @@ mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache -%find_lang %{name} - %check make check @@ -120,7 +118,7 @@ HOME=/root /usr/bin/fc-cache -s %transfiletriggerpostun -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts HOME=/root /usr/bin/fc-cache -s -%files -f %{name}.lang +%files %doc README AUTHORS %doc fontconfig-user.txt fontconfig-user.html %doc %{_fontconfig_confdir}/README From 1dba14a54dcb350e97253fba1fe2596eeaa88b50 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 23 Dec 2017 14:11:07 +0900 Subject: [PATCH 045/154] Fix crash (#1528706) --- fontconfig-fix-crash.patch | 53 ++++++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 ++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-crash.patch diff --git a/fontconfig-fix-crash.patch b/fontconfig-fix-crash.patch new file mode 100644 index 0000000..64ce911 --- /dev/null +++ b/fontconfig-fix-crash.patch @@ -0,0 +1,53 @@ +From 7ca28c2fedb34c1db5ee3116d335f15195859db0 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod +Date: Mon, 18 Dec 2017 21:22:21 -0500 +Subject: [PATCH 1/8] Don't crash + +Not proper fix necessarily. But fixes this crash: +https://bugs.freedesktop.org/show_bug.cgi?id=101889#c81 +--- + src/fcmatch.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fcmatch.c b/src/fcmatch.c +index 5d30cc7..95bb204 100644 +--- a/src/fcmatch.c ++++ b/src/fcmatch.c +@@ -653,7 +653,7 @@ FcFontRenderPrepare (FcConfig *config, + if (!l) + goto bail0; + dir = FcStrDirname (FcValueString (&l->value)); +- if (FcHashTableFind (config->alias_table, dir, (void **) &alias)) ++ if (config && FcHashTableFind (config->alias_table, dir, (void **) &alias)) + { + FcChar8 *base = FcStrBasename (FcValueString (&l->value)); + FcChar8 *s = FcStrBuildFilename (alias, base, NULL); +-- +2.14.3 + +From aa85a2b3b6b652c079e895865e800e3d9b60a5f5 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Tue, 19 Dec 2017 12:16:48 +0900 +Subject: [PATCH 3/8] Try to get current instance of FcConfig as far as + possible + +--- + src/fcmatch.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/fcmatch.c b/src/fcmatch.c +index 95bb204..f06d98a 100644 +--- a/src/fcmatch.c ++++ b/src/fcmatch.c +@@ -653,6 +653,8 @@ FcFontRenderPrepare (FcConfig *config, + if (!l) + goto bail0; + dir = FcStrDirname (FcValueString (&l->value)); ++ if (!config) ++ config = FcConfigGetCurrent (); + if (config && FcHashTableFind (config->alias_table, dir, (void **) &alias)) + { + FcChar8 *base = FcStrBasename (FcValueString (&l->value)); +-- +2.14.3 + diff --git a/fontconfig.spec b/fontconfig.spec index af5dd96..5a2b48c 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.91 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -17,6 +17,7 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch +Patch2: %{name}-fix-crash.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -153,6 +154,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Sat Dec 23 2017 Akira TAGOH - 2.12.91-2 +- Fix crash (#1528706) + * Thu Dec 14 2017 Akira TAGOH - 2.12.91-1 - New upstream release. From 2c038fbec80f4840cd895539c71239627dc9848b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 4 Jan 2018 22:01:15 +0900 Subject: [PATCH 046/154] New upstream release. Fix the mis-ordering of evaluating config. (#1530211) --- .gitignore | 1 + fontconfig-fix-crash.patch | 53 -------------------------------------- fontconfig.spec | 9 ++++--- sources | 2 +- 4 files changed, 8 insertions(+), 57 deletions(-) delete mode 100644 fontconfig-fix-crash.patch diff --git a/.gitignore b/.gitignore index b6cca53..dda0808 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.5.tar.bz2 /fontconfig-2.12.6.tar.bz2 /fontconfig-2.12.91.tar.bz2 +/fontconfig-2.12.92.tar.bz2 diff --git a/fontconfig-fix-crash.patch b/fontconfig-fix-crash.patch deleted file mode 100644 index 64ce911..0000000 --- a/fontconfig-fix-crash.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 7ca28c2fedb34c1db5ee3116d335f15195859db0 Mon Sep 17 00:00:00 2001 -From: Behdad Esfahbod -Date: Mon, 18 Dec 2017 21:22:21 -0500 -Subject: [PATCH 1/8] Don't crash - -Not proper fix necessarily. But fixes this crash: -https://bugs.freedesktop.org/show_bug.cgi?id=101889#c81 ---- - src/fcmatch.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/fcmatch.c b/src/fcmatch.c -index 5d30cc7..95bb204 100644 ---- a/src/fcmatch.c -+++ b/src/fcmatch.c -@@ -653,7 +653,7 @@ FcFontRenderPrepare (FcConfig *config, - if (!l) - goto bail0; - dir = FcStrDirname (FcValueString (&l->value)); -- if (FcHashTableFind (config->alias_table, dir, (void **) &alias)) -+ if (config && FcHashTableFind (config->alias_table, dir, (void **) &alias)) - { - FcChar8 *base = FcStrBasename (FcValueString (&l->value)); - FcChar8 *s = FcStrBuildFilename (alias, base, NULL); --- -2.14.3 - -From aa85a2b3b6b652c079e895865e800e3d9b60a5f5 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Tue, 19 Dec 2017 12:16:48 +0900 -Subject: [PATCH 3/8] Try to get current instance of FcConfig as far as - possible - ---- - src/fcmatch.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/fcmatch.c b/src/fcmatch.c -index 95bb204..f06d98a 100644 ---- a/src/fcmatch.c -+++ b/src/fcmatch.c -@@ -653,6 +653,8 @@ FcFontRenderPrepare (FcConfig *config, - if (!l) - goto bail0; - dir = FcStrDirname (FcValueString (&l->value)); -+ if (!config) -+ config = FcConfigGetCurrent (); - if (config && FcHashTableFind (config->alias_table, dir, (void **) &alias)) - { - FcChar8 *base = FcStrBasename (FcValueString (&l->value)); --- -2.14.3 - diff --git a/fontconfig.spec b/fontconfig.spec index 5a2b48c..271047a 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,8 +2,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.91 -Release: 2%{?dist} +Version: 2.12.92 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -17,7 +17,6 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch -Patch2: %{name}-fix-crash.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -154,6 +153,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jan 4 2018 Akira TAGOH - 2.12.92-1 +- New upstream release. +- Fix the mis-ordering of evaluating config. (#1530211) + * Sat Dec 23 2017 Akira TAGOH - 2.12.91-2 - Fix crash (#1528706) diff --git a/sources b/sources index 2413228..aab7bde 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.91.tar.bz2) = 755a288e798c6c93acde8307905bef63fcc0cf85d69855334042897e1c26ed089626b1e42d2cfe3de657c623b19dec469b483a75d64502954cc8641290f23301 +SHA512 (fontconfig-2.12.92.tar.bz2) = 4925cde8c988f25f40786b32937df68a9152a9a1e5645d3894aa5b9d70cffb7fd1a7b3e1480d716b93618ad7414bac752be6a77c71f1065dcee57368064030ab From db4c5fb083d992385225447f7a7459eb0275761b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 09:56:56 +0000 Subject: [PATCH 047/154] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 271047a..cbdef33 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.12.92 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -153,6 +153,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 2.12.92-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Jan 4 2018 Akira TAGOH - 2.12.92-1 - New upstream release. - Fix the mis-ordering of evaluating config. (#1530211) From 54fea1e356aa1765f51d43ff40f34e6b18ff14b7 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 15 Feb 2018 22:26:51 +0900 Subject: [PATCH 048/154] New upstream release. --- .gitignore | 1 + fontconfig.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dda0808..25ea05f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.6.tar.bz2 /fontconfig-2.12.91.tar.bz2 /fontconfig-2.12.92.tar.bz2 +/fontconfig-2.12.93.tar.bz2 diff --git a/fontconfig.spec b/fontconfig.spec index cbdef33..f28a5dc 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,8 +2,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.92 -Release: 2%{?dist} +Version: 2.12.93 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -153,6 +153,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Feb 15 2018 Akira TAGOH - 2.12.93-1 +- New upstream release. + * Wed Feb 07 2018 Fedora Release Engineering - 2.12.92-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index aab7bde..dc0178d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.92.tar.bz2) = 4925cde8c988f25f40786b32937df68a9152a9a1e5645d3894aa5b9d70cffb7fd1a7b3e1480d716b93618ad7414bac752be6a77c71f1065dcee57368064030ab +SHA512 (fontconfig-2.12.93.tar.bz2) = f7e83707a9f2f134b3d33b43c2b8b274a16cee3c9705a5acf2883355e1c575e50422cf2bd2bd60cb481708f8ed72cc57e80ca616af0f19a9db3f35c30f7ea8f5 From 4b36dd488ba90207419f09fd34a4ffb1dbcc95d5 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 15 Feb 2018 22:34:39 +0900 Subject: [PATCH 049/154] New upstream release. --- fontconfig-required-freetype-version.patch | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fontconfig-required-freetype-version.patch b/fontconfig-required-freetype-version.patch index 6ed1e8f..6f7aae3 100644 --- a/fontconfig-required-freetype-version.patch +++ b/fontconfig-required-freetype-version.patch @@ -1,12 +1,14 @@ -diff -pruN fontconfig-2.12.91.orig/configure.ac fontconfig-2.12.91/configure.ac ---- fontconfig-2.12.91.orig/configure.ac 2017-12-14 15:44:20.000000000 +0900 -+++ fontconfig-2.12.91/configure.ac 2017-12-22 16:20:11.556717785 +0900 -@@ -314,7 +314,7 @@ AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv, +diff -pruN fontconfig-2.12.93.orig/configure.ac fontconfig-2.12.93/configure.ac +--- fontconfig-2.12.93.orig/configure.ac 2018-02-15 22:01:54.000000000 +0900 ++++ fontconfig-2.12.93/configure.ac 2018-02-15 22:33:42.353941393 +0900 +@@ -308,8 +308,8 @@ AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv, # Checks for FreeType # dnl See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT for versioning in freetype -PKG_CHECK_MODULES(FREETYPE, freetype2 >= 21.0.15) +-PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 21.0.15" +PKG_CHECK_MODULES(FREETYPE, freetype2 >= 20.0.14) - PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2" ++PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 20.0.14" AC_SUBST(FREETYPE_LIBS) + AC_SUBST(FREETYPE_CFLAGS) From ff451d6b4f225eb267b5602fffcb44446a4dafdd Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 15 Feb 2018 22:40:56 +0900 Subject: [PATCH 050/154] New upstream release. --- fontconfig.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fontconfig.spec b/fontconfig.spec index f28a5dc..8035ae8 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -41,6 +41,7 @@ Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} Requires: freetype-devel >= %{freetype_version} Requires: pkgconfig +Requires: gettext %description devel The fontconfig-devel package includes the header files, @@ -148,6 +149,8 @@ HOME=/root /usr/bin/fc-cache -s %{_libdir}/pkgconfig/* %{_includedir}/fontconfig %{_mandir}/man3/* +%{_datadir}/gettext/its/fontconfig.its +%{_datadir}/gettext/its/fontconfig.loc %files devel-doc %doc fontconfig-devel.txt fontconfig-devel From 55aab9c0ffc17391bf2ca69cb888ac2b141b9996 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 6 Mar 2018 13:08:09 +0900 Subject: [PATCH 051/154] New upstream release. --- .gitignore | 1 + fontconfig.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 25ea05f..da98c57 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.91.tar.bz2 /fontconfig-2.12.92.tar.bz2 /fontconfig-2.12.93.tar.bz2 +/fontconfig-2.13.0.tar.bz2 diff --git a/fontconfig.spec b/fontconfig.spec index 8035ae8..e671faf 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -2,7 +2,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.12.93 +Version: 2.13.0 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -156,6 +156,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Tue Mar 06 2018 Akira TAGOH - 2.13.0-1 +- New upstream release. + * Thu Feb 15 2018 Akira TAGOH - 2.12.93-1 - New upstream release. diff --git a/sources b/sources index dc0178d..6c9c723 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.12.93.tar.bz2) = f7e83707a9f2f134b3d33b43c2b8b274a16cee3c9705a5acf2883355e1c575e50422cf2bd2bd60cb481708f8ed72cc57e80ca616af0f19a9db3f35c30f7ea8f5 +SHA512 (fontconfig-2.13.0.tar.bz2) = f0ad8f2542c8b1e900f5c3d213466a31dd3785da726d6eb455b6734c71c6e5751b28172203e2f9668e9c8e1512072235ea46a1a5e6a85ec54ccc332adb4e5fbc From d35bda76670619d9bdb721aa0d3ae6616e3a9b07 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 6 Mar 2018 13:19:22 +0900 Subject: [PATCH 052/154] New upstream release. --- fontconfig.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index e671faf..fddec17 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -91,6 +91,8 @@ mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache +%find_lang %{name} + %check make check @@ -119,7 +121,7 @@ HOME=/root /usr/bin/fc-cache -s %transfiletriggerpostun -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts HOME=/root /usr/bin/fc-cache -s -%files +%files -f %{name}.lang %doc README AUTHORS %doc fontconfig-user.txt fontconfig-user.html %doc %{_fontconfig_confdir}/README From 9973b49c818a2ca9e1170887d38cb072f02808d1 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 6 Mar 2018 13:29:55 +0900 Subject: [PATCH 053/154] New upstream release. --- fontconfig.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fontconfig.spec b/fontconfig.spec index fddec17..d69b27b 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -92,6 +92,8 @@ mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache %find_lang %{name} +%find_lang %{name}-conf +cat %{name}-conf.lang >> %{name}.lang %check make check From 59f675746d4961ae2453c5ac09835a2d57806b93 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 12 Mar 2018 11:56:13 +0900 Subject: [PATCH 054/154] Allow the const names in the range. --- fontconfig-const-name-in-range.patch | 60 ++++++++++++++++++++++++++++ fontconfig.spec | 6 ++- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 fontconfig-const-name-in-range.patch diff --git a/fontconfig-const-name-in-range.patch b/fontconfig-const-name-in-range.patch new file mode 100644 index 0000000..728c2c3 --- /dev/null +++ b/fontconfig-const-name-in-range.patch @@ -0,0 +1,60 @@ +From 198358dd8ff858c9e36531a7406ccb2246ae77b7 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Mon, 12 Mar 2018 11:49:58 +0900 +Subject: [PATCH] Allow the constant names in the range + +https://bugs.freedesktop.org/show_bug.cgi?id=105415 +--- + src/fcname.c | 34 +++++++++++++++++++++++++++++----- + 1 file changed, 29 insertions(+), 5 deletions(-) + +diff --git a/src/fcname.c b/src/fcname.c +index 79e413e..15fb659 100644 +--- a/src/fcname.c ++++ b/src/fcname.c +@@ -330,13 +330,37 @@ FcNameConvert (FcType type, FcChar8 *string) + case FcTypeRange: + if (sscanf ((char *) string, "[%lg %lg]", &b, &e) != 2) + { +- v.u.d = strtod ((char *) string, &p); +- if (p != NULL && p[0] != 0) ++ char *sc, *ec; ++ size_t len = strlen ((const char *) string); ++ int si, ei; ++ ++ sc = malloc (len); ++ ec = malloc (len); ++ if (sc && ec && sscanf ((char *) string, "[%s %[^]]]", sc, ec) == 2) + { +- v.type = FcTypeVoid; +- break; ++ if (FcNameConstant ((const FcChar8 *) sc, &si) && ++ FcNameConstant ((const FcChar8 *) ec, &ei)) ++ v.u.r = FcRangeCreateDouble (si, ei); ++ else ++ goto bail1; ++ } ++ else ++ { ++ bail1: ++ v.type = FcTypeDouble; ++ if (FcNameConstant (string, &si)) ++ { ++ v.u.d = (double) si; ++ } else { ++ v.u.d = strtod ((char *) string, &p); ++ if (p != NULL && p[0] != 0) ++ v.type = FcTypeVoid; ++ } + } +- v.type = FcTypeDouble; ++ if (sc) ++ free (sc); ++ if (ec) ++ free (ec); + } + else + v.u.r = FcRangeCreateDouble (b, e); +-- +2.14.3 + diff --git a/fontconfig.spec b/fontconfig.spec index d69b27b..4a8e23b 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.0 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -17,6 +17,7 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch +Patch2: %{name}-const-name-in-range.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -160,6 +161,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Mar 12 2018 Akira TAGOH - 2.13.0-2 +- Allow the const names in the range. + * Tue Mar 06 2018 Akira TAGOH - 2.13.0-1 - New upstream release. From dbbd149f294949dafb1e183adc950f2f0afb4586 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 15 Mar 2018 14:03:46 +0900 Subject: [PATCH 055/154] Another fix to accept the const names in param. Fix locale issue. --- ...onfig-implicit-object-for-const-name.patch | 31 ++ fontconfig-locale.patch | 274 ++++++++++++++++++ fontconfig.spec | 8 +- 3 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 fontconfig-implicit-object-for-const-name.patch create mode 100644 fontconfig-locale.patch diff --git a/fontconfig-implicit-object-for-const-name.patch b/fontconfig-implicit-object-for-const-name.patch new file mode 100644 index 0000000..8dbde51 --- /dev/null +++ b/fontconfig-implicit-object-for-const-name.patch @@ -0,0 +1,31 @@ +From 4699406a68321179b14fae7412f828e2f37a7033 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 14 Mar 2018 18:31:30 +0900 +Subject: [PATCH 2/5] Add the value of the constant name to the implicit object + in the pattern + +For objects which has been changed the object type to FcTypeRange. + +https://bugs.freedesktop.org/show_bug.cgi?id=105415 +--- + src/fcname.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/fcname.c b/src/fcname.c +index 15fb659..c9320ae 100644 +--- a/src/fcname.c ++++ b/src/fcname.c +@@ -490,6 +490,10 @@ FcNameParse (const FcChar8 *name) + if (!FcPatternAddBool (pat, c->object, c->value)) + goto bail2; + break; ++ case FcTypeRange: ++ if (!FcPatternAddInteger (pat, c->object, c->value)) ++ goto bail2; ++ break; + default: + break; + } +-- +2.14.3 + diff --git a/fontconfig-locale.patch b/fontconfig-locale.patch new file mode 100644 index 0000000..c63a717 --- /dev/null +++ b/fontconfig-locale.patch @@ -0,0 +1,274 @@ +From 923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 14 Mar 2018 12:35:05 +0900 +Subject: [PATCH 1/5] Do not override locale if already set by app + +https://bugs.freedesktop.org/show_bug.cgi?id=105492 +--- + src/fccfg.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/fccfg.c b/src/fccfg.c +index eb0b76d..e311f17 100644 +--- a/src/fccfg.c ++++ b/src/fccfg.c +@@ -45,11 +45,16 @@ retry_locale: + is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized); + if (!is_locale_initialized) + { ++ char *loc; ++ + is_locale_initialized = FcTrue; + if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL, + (void *)(intptr_t) is_locale_initialized)) + goto retry_locale; +- setlocale (LC_ALL, ""); ++ ++ loc = setlocale (LC_ALL, NULL); ++ if (!loc || strcmp (loc, "C") == 0) ++ setlocale (LC_ALL, ""); + } + retry_config: + config = fc_atomic_ptr_get (&_fcConfig); +-- +2.14.3 + +From 98eaef69af1350e459bf9c175476d3b772968874 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 15 Mar 2018 12:17:52 +0900 +Subject: [PATCH 4/5] Leave the locale setting to applications + +https://bugs.freedesktop.org/show_bug.cgi?id=105492 +--- + fc-conflist/fc-conflist.c | 2 ++ + src/fccfg.c | 22 ++-------------------- + 2 files changed, 4 insertions(+), 20 deletions(-) + +diff --git a/fc-conflist/fc-conflist.c b/fc-conflist/fc-conflist.c +index d02273b..5c40a0f 100644 +--- a/fc-conflist/fc-conflist.c ++++ b/fc-conflist/fc-conflist.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + #ifdef ENABLE_NLS + #include +@@ -102,6 +103,7 @@ main (int argc, char **argv) + #if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + ++ setlocale (LC_ALL, ""); + #if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "Vh", longopts, NULL)) != -1) + #else +diff --git a/src/fccfg.c b/src/fccfg.c +index e311f17..e35c451 100644 +--- a/src/fccfg.c ++++ b/src/fccfg.c +@@ -26,7 +26,6 @@ + + #include "fcint.h" + #include +-#include + #include + + #if defined (_WIN32) && !defined (R_OK) +@@ -39,24 +38,7 @@ static FcConfig * + FcConfigEnsure (void) + { + FcConfig *config; +- FcBool is_locale_initialized; +- static void *static_is_locale_initialized; +-retry_locale: +- is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized); +- if (!is_locale_initialized) +- { +- char *loc; +- +- is_locale_initialized = FcTrue; +- if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL, +- (void *)(intptr_t) is_locale_initialized)) +- goto retry_locale; +- +- loc = setlocale (LC_ALL, NULL); +- if (!loc || strcmp (loc, "C") == 0) +- setlocale (LC_ALL, ""); +- } +-retry_config: ++retry: + config = fc_atomic_ptr_get (&_fcConfig); + if (!config) + { +@@ -64,7 +46,7 @@ retry_config: + + if (!fc_atomic_ptr_cmpexch (&_fcConfig, NULL, config)) { + FcConfigDestroy (config); +- goto retry_config; ++ goto retry; + } + } + return config; +-- +2.14.3 + +From 2938e4d72da40f6bb0d22086c519a9852a820f40 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 15 Mar 2018 12:54:02 +0900 +Subject: [PATCH 5/5] call setlocale + +--- + fc-cache/fc-cache.c | 2 ++ + fc-cat/fc-cat.c | 2 ++ + fc-list/fc-list.c | 2 ++ + fc-match/fc-match.c | 2 ++ + fc-pattern/fc-pattern.c | 2 ++ + fc-query/fc-query.c | 2 ++ + fc-scan/fc-scan.c | 2 ++ + 7 files changed, 14 insertions(+) + +diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c +index dc93c19..87e3020 100644 +--- a/fc-cache/fc-cache.c ++++ b/fc-cache/fc-cache.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + #if defined (_WIN32) + #define STRICT +@@ -302,6 +303,7 @@ main (int argc, char **argv) + #if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + ++ setlocale (LC_ALL, ""); + #if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "Efrsy:Vvh", longopts, NULL)) != -1) + #else +diff --git a/fc-cat/fc-cat.c b/fc-cat/fc-cat.c +index dfe30d7..69611bc 100644 +--- a/fc-cat/fc-cat.c ++++ b/fc-cat/fc-cat.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #ifdef ENABLE_NLS + #include +@@ -271,6 +272,7 @@ main (int argc, char **argv) + #if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + ++ setlocale (LC_ALL, ""); + #if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "Vvrh", longopts, NULL)) != -1) + #else +diff --git a/fc-list/fc-list.c b/fc-list/fc-list.c +index 5cded50..2039acd 100644 +--- a/fc-list/fc-list.c ++++ b/fc-list/fc-list.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_CONFIG_H + #include + #else +@@ -117,6 +118,7 @@ main (int argc, char **argv) + #if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + ++ setlocale (LC_ALL, ""); + #if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "vbf:qVh", longopts, NULL)) != -1) + #else +diff --git a/fc-match/fc-match.c b/fc-match/fc-match.c +index 7902707..dee6147 100644 +--- a/fc-match/fc-match.c ++++ b/fc-match/fc-match.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #ifdef ENABLE_NLS + #include +@@ -121,6 +122,7 @@ main (int argc, char **argv) + #if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + ++ setlocale (LC_ALL, ""); + #if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "asvbf:Vh", longopts, NULL)) != -1) + #else +diff --git a/fc-pattern/fc-pattern.c b/fc-pattern/fc-pattern.c +index f63761c..7989b81 100644 +--- a/fc-pattern/fc-pattern.c ++++ b/fc-pattern/fc-pattern.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #ifdef ENABLE_NLS + #include +@@ -111,6 +112,7 @@ main (int argc, char **argv) + #if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + ++ setlocale (LC_ALL, ""); + #if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "cdf:Vh", longopts, NULL)) != -1) + #else +diff --git a/fc-query/fc-query.c b/fc-query/fc-query.c +index 9da090d..fbffb84 100644 +--- a/fc-query/fc-query.c ++++ b/fc-query/fc-query.c +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + + #ifdef ENABLE_NLS + #include +@@ -115,6 +116,7 @@ main (int argc, char **argv) + #if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + ++ setlocale (LC_ALL, ""); + #if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "i:bf:Vh", longopts, NULL)) != -1) + #else +diff --git a/fc-scan/fc-scan.c b/fc-scan/fc-scan.c +index edb967c..9302ac5 100644 +--- a/fc-scan/fc-scan.c ++++ b/fc-scan/fc-scan.c +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + + #ifdef ENABLE_NLS + #include +@@ -110,6 +111,7 @@ main (int argc, char **argv) + #if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + ++ setlocale (LC_ALL, ""); + #if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "bf:Vh", longopts, NULL)) != -1) + #else +-- +2.14.3 + diff --git a/fontconfig.spec b/fontconfig.spec index 4a8e23b..ed52930 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.0 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -18,6 +18,8 @@ Source2: fc-cache Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch Patch2: %{name}-const-name-in-range.patch +Patch3: %{name}-implicit-object-for-const-name.patch +Patch4: %{name}-locale.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -161,6 +163,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Mar 15 2018 Akira TAGOH - 2.13.0-3 +- Another fix to accept the const names in param. +- Fix locale issue. + * Mon Mar 12 2018 Akira TAGOH - 2.13.0-2 - Allow the const names in the range. From 484997d220f5977a16c7bf5009107b741f566918 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 11 May 2018 22:27:47 +0900 Subject: [PATCH 056/154] Fix the emboldening logic. (#1575649) --- fontconfig-fix-embolden-logic.patch | 31 +++++++++++++++++++++++++++++ fontconfig.spec | 6 +++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-embolden-logic.patch diff --git a/fontconfig-fix-embolden-logic.patch b/fontconfig-fix-embolden-logic.patch new file mode 100644 index 0000000..766b7be --- /dev/null +++ b/fontconfig-fix-embolden-logic.patch @@ -0,0 +1,31 @@ +From 454923709a1a1e480554c400e053aea9a1ba951a Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 10 May 2018 22:01:29 +0900 +Subject: [PATCH] Change the emboldening logic again + +enable emboldening when request was >= bold and font was <= medium + +https://bugs.freedesktop.org/show_bug.cgi?id=106460 +--- + conf.d/90-synthetic.conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/conf.d/90-synthetic.conf b/conf.d/90-synthetic.conf +index e344e4a..6b929dd 100644 +--- a/conf.d/90-synthetic.conf ++++ b/conf.d/90-synthetic.conf +@@ -42,9 +42,9 @@ + --> + + +- ++ + +- regular ++ medium + + + +-- +2.17.0 + diff --git a/fontconfig.spec b/fontconfig.spec index ed52930..1c8a112 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -3,7 +3,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.0 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -20,6 +20,7 @@ Patch1: %{name}-required-freetype-version.patch Patch2: %{name}-const-name-in-range.patch Patch3: %{name}-implicit-object-for-const-name.patch Patch4: %{name}-locale.patch +Patch5: %{name}-fix-embolden-logic.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -163,6 +164,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri May 11 2018 Akira TAGOH - 2.13.0-4 +- Fix the emboldening logic. (#1575649) + * Thu Mar 15 2018 Akira TAGOH - 2.13.0-3 - Another fix to accept the const names in param. - Fix locale issue. From 171686acad4eb1e126f9982025264e04001b95a0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 6 Jun 2018 12:12:22 +0900 Subject: [PATCH 057/154] Update the version deps of freetype to resolve FT_Done_MM_Var symbol. (#1579464) --- fontconfig.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 1c8a112..ae13c90 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -1,9 +1,11 @@ -%global freetype_version 2.8-7 +# ifdef'd in source code but runtime dep will be made for FT_Done_MM_Var symbol in freetype-2.9.1 +# so update the build deps as well to keep deps consistency between runtime and build time. +%global freetype_version 2.9.1 Summary: Font configuration and customization library Name: fontconfig Version: 2.13.0 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -30,7 +32,7 @@ BuildRequires: autoconf automake libtool gettext itstool BuildRequires: gperf Requires: fontpackages-filesystem freetype -Requires(pre): freetype >= 2.8-7 +Requires(pre): freetype >= 2.9.1 Requires(post): grep coreutils Requires: font(:lang=en) @@ -164,6 +166,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jun 06 2018 Akira TAGOH - 2.13.0-5 +- Update the version deps of freetype to resolve FT_Done_MM_Var symbol. (#1579464) + * Fri May 11 2018 Akira TAGOH - 2.13.0-4 - Fix the emboldening logic. (#1575649) From daa95780d98c57c6e7e5fb17c623e529736bdc30 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 7 Jun 2018 17:01:51 +0900 Subject: [PATCH 058/154] Add Suggests: dejavu-sans-fonts to address pulling the unpredicted font package as dependency. (#1321551) --- fontconfig.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index ae13c90..1e8da5e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.0 -Release: 5%{?dist} +Release: 6%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -35,6 +35,7 @@ Requires: fontpackages-filesystem freetype Requires(pre): freetype >= 2.9.1 Requires(post): grep coreutils Requires: font(:lang=en) +Suggests: dejavu-sans-fonts %description Fontconfig is designed to locate fonts within the @@ -166,6 +167,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jun 07 2018 Akira TAGOH - 2.13.0-6 +- Add Suggests: dejavu-sans-fonts to address pulling the unpredicted + font package as dependency. (#1321551) + * Wed Jun 06 2018 Akira TAGOH - 2.13.0-5 - Update the version deps of freetype to resolve FT_Done_MM_Var symbol. (#1579464) From da37d70f96fa9c4294fe7b0a1756f820b5d4ac0c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 29 Jun 2018 07:14:07 +0000 Subject: [PATCH 059/154] Use ldconfig rpm macro. --- fontconfig.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 1e8da5e..66daa20 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.0 -Release: 6%{?dist} +Release: 7%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -33,7 +33,8 @@ BuildRequires: gperf Requires: fontpackages-filesystem freetype Requires(pre): freetype >= 2.9.1 -Requires(post): grep coreutils +Requires(post): grep coreutils /sbin/ldconfig +Requires(postun): /sbin/ldconfig Requires: font(:lang=en) Suggests: dejavu-sans-fonts @@ -106,7 +107,7 @@ cat %{name}-conf.lang >> %{name}.lang make check %post -/sbin/ldconfig +%{?ldconfig: %ldconfig} umask 0022 @@ -122,7 +123,7 @@ if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{vers HOME=/root /usr/bin/fc-cache -f fi -%postun -p /sbin/ldconfig +%ldconfig_postun %transfiletriggerin -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts HOME=/root /usr/bin/fc-cache -s @@ -167,6 +168,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jun 29 2018 Akira TAGOH - 2.13.0-7 +- Use ldconfig rpm macro. + * Thu Jun 07 2018 Akira TAGOH - 2.13.0-6 - Add Suggests: dejavu-sans-fonts to address pulling the unpredicted font package as dependency. (#1321551) From 4c91eeac5d43cbabf98e2297cd4a11b2c62c065a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 00:43:59 +0000 Subject: [PATCH 060/154] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 66daa20..dcea52c 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.0 -Release: 7%{?dist} +Release: 8%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -168,6 +168,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 2.13.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Jun 29 2018 Akira TAGOH - 2.13.0-7 - Use ldconfig rpm macro. From d4bb4b1ba900903e3d319e1691e65dd80db628fd Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 30 Aug 2018 09:53:28 +0000 Subject: [PATCH 061/154] New upstream release. --- .gitignore | 1 + fc-cache | 4 +- fontconfig-const-name-in-range.patch | 60 ---- fontconfig-fix-embolden-logic.patch | 31 -- ...onfig-implicit-object-for-const-name.patch | 31 -- fontconfig-locale.patch | 274 ------------------ fontconfig.spec | 11 +- sources | 2 +- 8 files changed, 9 insertions(+), 405 deletions(-) delete mode 100644 fontconfig-const-name-in-range.patch delete mode 100644 fontconfig-fix-embolden-logic.patch delete mode 100644 fontconfig-implicit-object-for-const-name.patch delete mode 100644 fontconfig-locale.patch diff --git a/.gitignore b/.gitignore index da98c57..f153c22 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.92.tar.bz2 /fontconfig-2.12.93.tar.bz2 /fontconfig-2.13.0.tar.bz2 +/fontconfig-2.13.1.tar.bz2 diff --git a/fc-cache b/fc-cache index 6a12446..8253ae7 100755 --- a/fc-cache +++ b/fc-cache @@ -1,4 +1,4 @@ #! /bin/sh -[ -x /usr/bin/fc-cache-32 ] && /usr/bin/fc-cache-32 $@ || : -[ -x /usr/bin/fc-cache-64 ] && /usr/bin/fc-cache-64 $@ || : +[ -x /usr/bin/fc-cache-32 ] && /usr/bin/fc-cache-32 "$@" || : +[ -x /usr/bin/fc-cache-64 ] && /usr/bin/fc-cache-64 "$@" || : diff --git a/fontconfig-const-name-in-range.patch b/fontconfig-const-name-in-range.patch deleted file mode 100644 index 728c2c3..0000000 --- a/fontconfig-const-name-in-range.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 198358dd8ff858c9e36531a7406ccb2246ae77b7 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Mon, 12 Mar 2018 11:49:58 +0900 -Subject: [PATCH] Allow the constant names in the range - -https://bugs.freedesktop.org/show_bug.cgi?id=105415 ---- - src/fcname.c | 34 +++++++++++++++++++++++++++++----- - 1 file changed, 29 insertions(+), 5 deletions(-) - -diff --git a/src/fcname.c b/src/fcname.c -index 79e413e..15fb659 100644 ---- a/src/fcname.c -+++ b/src/fcname.c -@@ -330,13 +330,37 @@ FcNameConvert (FcType type, FcChar8 *string) - case FcTypeRange: - if (sscanf ((char *) string, "[%lg %lg]", &b, &e) != 2) - { -- v.u.d = strtod ((char *) string, &p); -- if (p != NULL && p[0] != 0) -+ char *sc, *ec; -+ size_t len = strlen ((const char *) string); -+ int si, ei; -+ -+ sc = malloc (len); -+ ec = malloc (len); -+ if (sc && ec && sscanf ((char *) string, "[%s %[^]]]", sc, ec) == 2) - { -- v.type = FcTypeVoid; -- break; -+ if (FcNameConstant ((const FcChar8 *) sc, &si) && -+ FcNameConstant ((const FcChar8 *) ec, &ei)) -+ v.u.r = FcRangeCreateDouble (si, ei); -+ else -+ goto bail1; -+ } -+ else -+ { -+ bail1: -+ v.type = FcTypeDouble; -+ if (FcNameConstant (string, &si)) -+ { -+ v.u.d = (double) si; -+ } else { -+ v.u.d = strtod ((char *) string, &p); -+ if (p != NULL && p[0] != 0) -+ v.type = FcTypeVoid; -+ } - } -- v.type = FcTypeDouble; -+ if (sc) -+ free (sc); -+ if (ec) -+ free (ec); - } - else - v.u.r = FcRangeCreateDouble (b, e); --- -2.14.3 - diff --git a/fontconfig-fix-embolden-logic.patch b/fontconfig-fix-embolden-logic.patch deleted file mode 100644 index 766b7be..0000000 --- a/fontconfig-fix-embolden-logic.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 454923709a1a1e480554c400e053aea9a1ba951a Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Thu, 10 May 2018 22:01:29 +0900 -Subject: [PATCH] Change the emboldening logic again - -enable emboldening when request was >= bold and font was <= medium - -https://bugs.freedesktop.org/show_bug.cgi?id=106460 ---- - conf.d/90-synthetic.conf | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/conf.d/90-synthetic.conf b/conf.d/90-synthetic.conf -index e344e4a..6b929dd 100644 ---- a/conf.d/90-synthetic.conf -+++ b/conf.d/90-synthetic.conf -@@ -42,9 +42,9 @@ - --> - - -- -+ - -- regular -+ medium - - - --- -2.17.0 - diff --git a/fontconfig-implicit-object-for-const-name.patch b/fontconfig-implicit-object-for-const-name.patch deleted file mode 100644 index 8dbde51..0000000 --- a/fontconfig-implicit-object-for-const-name.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 4699406a68321179b14fae7412f828e2f37a7033 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 14 Mar 2018 18:31:30 +0900 -Subject: [PATCH 2/5] Add the value of the constant name to the implicit object - in the pattern - -For objects which has been changed the object type to FcTypeRange. - -https://bugs.freedesktop.org/show_bug.cgi?id=105415 ---- - src/fcname.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/fcname.c b/src/fcname.c -index 15fb659..c9320ae 100644 ---- a/src/fcname.c -+++ b/src/fcname.c -@@ -490,6 +490,10 @@ FcNameParse (const FcChar8 *name) - if (!FcPatternAddBool (pat, c->object, c->value)) - goto bail2; - break; -+ case FcTypeRange: -+ if (!FcPatternAddInteger (pat, c->object, c->value)) -+ goto bail2; -+ break; - default: - break; - } --- -2.14.3 - diff --git a/fontconfig-locale.patch b/fontconfig-locale.patch deleted file mode 100644 index c63a717..0000000 --- a/fontconfig-locale.patch +++ /dev/null @@ -1,274 +0,0 @@ -From 923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 14 Mar 2018 12:35:05 +0900 -Subject: [PATCH 1/5] Do not override locale if already set by app - -https://bugs.freedesktop.org/show_bug.cgi?id=105492 ---- - src/fccfg.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/fccfg.c b/src/fccfg.c -index eb0b76d..e311f17 100644 ---- a/src/fccfg.c -+++ b/src/fccfg.c -@@ -45,11 +45,16 @@ retry_locale: - is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized); - if (!is_locale_initialized) - { -+ char *loc; -+ - is_locale_initialized = FcTrue; - if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL, - (void *)(intptr_t) is_locale_initialized)) - goto retry_locale; -- setlocale (LC_ALL, ""); -+ -+ loc = setlocale (LC_ALL, NULL); -+ if (!loc || strcmp (loc, "C") == 0) -+ setlocale (LC_ALL, ""); - } - retry_config: - config = fc_atomic_ptr_get (&_fcConfig); --- -2.14.3 - -From 98eaef69af1350e459bf9c175476d3b772968874 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Thu, 15 Mar 2018 12:17:52 +0900 -Subject: [PATCH 4/5] Leave the locale setting to applications - -https://bugs.freedesktop.org/show_bug.cgi?id=105492 ---- - fc-conflist/fc-conflist.c | 2 ++ - src/fccfg.c | 22 ++-------------------- - 2 files changed, 4 insertions(+), 20 deletions(-) - -diff --git a/fc-conflist/fc-conflist.c b/fc-conflist/fc-conflist.c -index d02273b..5c40a0f 100644 ---- a/fc-conflist/fc-conflist.c -+++ b/fc-conflist/fc-conflist.c -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - - #ifdef ENABLE_NLS - #include -@@ -102,6 +103,7 @@ main (int argc, char **argv) - #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; - -+ setlocale (LC_ALL, ""); - #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "Vh", longopts, NULL)) != -1) - #else -diff --git a/src/fccfg.c b/src/fccfg.c -index e311f17..e35c451 100644 ---- a/src/fccfg.c -+++ b/src/fccfg.c -@@ -26,7 +26,6 @@ - - #include "fcint.h" - #include --#include - #include - - #if defined (_WIN32) && !defined (R_OK) -@@ -39,24 +38,7 @@ static FcConfig * - FcConfigEnsure (void) - { - FcConfig *config; -- FcBool is_locale_initialized; -- static void *static_is_locale_initialized; --retry_locale: -- is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized); -- if (!is_locale_initialized) -- { -- char *loc; -- -- is_locale_initialized = FcTrue; -- if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL, -- (void *)(intptr_t) is_locale_initialized)) -- goto retry_locale; -- -- loc = setlocale (LC_ALL, NULL); -- if (!loc || strcmp (loc, "C") == 0) -- setlocale (LC_ALL, ""); -- } --retry_config: -+retry: - config = fc_atomic_ptr_get (&_fcConfig); - if (!config) - { -@@ -64,7 +46,7 @@ retry_config: - - if (!fc_atomic_ptr_cmpexch (&_fcConfig, NULL, config)) { - FcConfigDestroy (config); -- goto retry_config; -+ goto retry; - } - } - return config; --- -2.14.3 - -From 2938e4d72da40f6bb0d22086c519a9852a820f40 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Thu, 15 Mar 2018 12:54:02 +0900 -Subject: [PATCH 5/5] call setlocale - ---- - fc-cache/fc-cache.c | 2 ++ - fc-cat/fc-cat.c | 2 ++ - fc-list/fc-list.c | 2 ++ - fc-match/fc-match.c | 2 ++ - fc-pattern/fc-pattern.c | 2 ++ - fc-query/fc-query.c | 2 ++ - fc-scan/fc-scan.c | 2 ++ - 7 files changed, 14 insertions(+) - -diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c -index dc93c19..87e3020 100644 ---- a/fc-cache/fc-cache.c -+++ b/fc-cache/fc-cache.c -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include - - #if defined (_WIN32) - #define STRICT -@@ -302,6 +303,7 @@ main (int argc, char **argv) - #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; - -+ setlocale (LC_ALL, ""); - #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "Efrsy:Vvh", longopts, NULL)) != -1) - #else -diff --git a/fc-cat/fc-cat.c b/fc-cat/fc-cat.c -index dfe30d7..69611bc 100644 ---- a/fc-cat/fc-cat.c -+++ b/fc-cat/fc-cat.c -@@ -40,6 +40,7 @@ - #include - #include - #include -+#include - - #ifdef ENABLE_NLS - #include -@@ -271,6 +272,7 @@ main (int argc, char **argv) - #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; - -+ setlocale (LC_ALL, ""); - #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "Vvrh", longopts, NULL)) != -1) - #else -diff --git a/fc-list/fc-list.c b/fc-list/fc-list.c -index 5cded50..2039acd 100644 ---- a/fc-list/fc-list.c -+++ b/fc-list/fc-list.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - #ifdef HAVE_CONFIG_H - #include - #else -@@ -117,6 +118,7 @@ main (int argc, char **argv) - #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; - -+ setlocale (LC_ALL, ""); - #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "vbf:qVh", longopts, NULL)) != -1) - #else -diff --git a/fc-match/fc-match.c b/fc-match/fc-match.c -index 7902707..dee6147 100644 ---- a/fc-match/fc-match.c -+++ b/fc-match/fc-match.c -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - - #ifdef ENABLE_NLS - #include -@@ -121,6 +122,7 @@ main (int argc, char **argv) - #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; - -+ setlocale (LC_ALL, ""); - #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "asvbf:Vh", longopts, NULL)) != -1) - #else -diff --git a/fc-pattern/fc-pattern.c b/fc-pattern/fc-pattern.c -index f63761c..7989b81 100644 ---- a/fc-pattern/fc-pattern.c -+++ b/fc-pattern/fc-pattern.c -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - - #ifdef ENABLE_NLS - #include -@@ -111,6 +112,7 @@ main (int argc, char **argv) - #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; - -+ setlocale (LC_ALL, ""); - #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "cdf:Vh", longopts, NULL)) != -1) - #else -diff --git a/fc-query/fc-query.c b/fc-query/fc-query.c -index 9da090d..fbffb84 100644 ---- a/fc-query/fc-query.c -+++ b/fc-query/fc-query.c -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - - #ifdef ENABLE_NLS - #include -@@ -115,6 +116,7 @@ main (int argc, char **argv) - #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; - -+ setlocale (LC_ALL, ""); - #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "i:bf:Vh", longopts, NULL)) != -1) - #else -diff --git a/fc-scan/fc-scan.c b/fc-scan/fc-scan.c -index edb967c..9302ac5 100644 ---- a/fc-scan/fc-scan.c -+++ b/fc-scan/fc-scan.c -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - - #ifdef ENABLE_NLS - #include -@@ -110,6 +111,7 @@ main (int argc, char **argv) - #if HAVE_GETOPT_LONG || HAVE_GETOPT - int c; - -+ setlocale (LC_ALL, ""); - #if HAVE_GETOPT_LONG - while ((c = getopt_long (argc, argv, "bf:Vh", longopts, NULL)) != -1) - #else --- -2.14.3 - diff --git a/fontconfig.spec b/fontconfig.spec index dcea52c..9ad661f 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.13.0 -Release: 8%{?dist} +Version: 2.13.1 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -19,10 +19,6 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch -Patch2: %{name}-const-name-in-range.patch -Patch3: %{name}-implicit-object-for-const-name.patch -Patch4: %{name}-locale.patch -Patch5: %{name}-fix-embolden-logic.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -168,6 +164,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Aug 30 2018 Akira TAGOH - 2.13.1-1 +- New upstream release. + * Fri Jul 13 2018 Fedora Release Engineering - 2.13.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 6c9c723..61cde62 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.13.0.tar.bz2) = f0ad8f2542c8b1e900f5c3d213466a31dd3785da726d6eb455b6734c71c6e5751b28172203e2f9668e9c8e1512072235ea46a1a5e6a85ec54ccc332adb4e5fbc +SHA512 (fontconfig-2.13.1.tar.bz2) = f97f2a9db294fd72d416a7d76dd7db5934ade2cf76903764b09e7decc33e0e2eed1a1d35c5f1c7fd9ea39e2c7653b9e65365f0c6205e047e95e38ba5000dd100 From 67bdb043b7fc8b86df5b58850535bdc3d220865f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 26 Sep 2018 08:59:41 +0000 Subject: [PATCH 062/154] Add man page for fc-cache-* links to fc-cache. --- fontconfig.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fontconfig.spec b/fontconfig.spec index 9ad661f..3aa329f 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -93,6 +93,9 @@ rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/ # rename fc-cache binary mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits} +# create link to man page +echo ".so man1/fc-cache.1" > $RPM_BUILD_ROOT%{_mandir}/man1/fc-cache-%{__isa_bits}.1 + install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache %find_lang %{name} @@ -164,6 +167,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Sep 26 2018 Akira TAGOH - 2.13.1-2 +- Add man page for fc-cache-* links to fc-cache. + * Thu Aug 30 2018 Akira TAGOH - 2.13.1-1 - New upstream release. From f106891fe93f38ac2a2cae0e6aab4f53ae44246f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 26 Sep 2018 09:00:29 +0000 Subject: [PATCH 063/154] Drop unnecessary BR. --- fontconfig.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 3aa329f..45691ec 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -24,7 +24,7 @@ BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel BuildRequires: libuuid-devel -BuildRequires: autoconf automake libtool gettext itstool +BuildRequires: autoconf automake libtool gettext BuildRequires: gperf Requires: fontpackages-filesystem freetype @@ -169,6 +169,7 @@ HOME=/root /usr/bin/fc-cache -s %changelog * Wed Sep 26 2018 Akira TAGOH - 2.13.1-2 - Add man page for fc-cache-* links to fc-cache. +- Drop unnecessary BR. * Thu Aug 30 2018 Akira TAGOH - 2.13.1-1 - New upstream release. From 04871bfde59a9c59ad74e5c4401045254357d18b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 7 Nov 2018 06:06:51 +0000 Subject: [PATCH 064/154] Stop cleaning up .uuid file even when a directory is empty. --- fontconfig-stop-cleanup-uuid.patch | 93 ++++++++++++++++++++++++++++++ fontconfig.spec | 6 +- 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 fontconfig-stop-cleanup-uuid.patch diff --git a/fontconfig-stop-cleanup-uuid.patch b/fontconfig-stop-cleanup-uuid.patch new file mode 100644 index 0000000..9972cd2 --- /dev/null +++ b/fontconfig-stop-cleanup-uuid.patch @@ -0,0 +1,93 @@ +From 5f12f564f8748deaa603adb7a4b8f616b6390ad4 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Wed, 17 Oct 2018 21:15:47 -0700 +Subject: [PATCH 1/2] Do not remove UUID file when a scanned directory is empty + +Because FcDirCacheDeleteUUID does not reset the modification time on +the directory, and because FcDirCacheRead unconditionally creates the +UUID file each time it is run, any empty directory in the cache will +get its timestamp changed each time the cache for that directory is +read. + +Instead, just leave the UUID file around as it is harmless. + +The alternative would be to only create the UUID file after the cache +has been created and the directory has been discovered to be +non-empty, but that would delay the creation of the UUID file. + +Signed-off-by: Keith Packard +--- + src/fcdir.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/src/fcdir.c b/src/fcdir.c +index 93f220c..bfcdf95 100644 +--- a/src/fcdir.c ++++ b/src/fcdir.c +@@ -421,13 +421,6 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) + /* Not using existing cache file, construct new cache */ + if (!cache) + cache = FcDirCacheScan (dir, config); +- if (cache) +- { +- FcFontSet *fs = FcCacheSet (cache); +- +- if (cache->dirs_count == 0 && (!fs || fs->nfont == 0)) +- FcDirCacheDeleteUUID (dir, config); +- } + + return cache; + } +-- +2.19.1 + +From e9113a764a1001165711022aceb45aa2765feb8b Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 25 Oct 2018 07:16:32 +0000 +Subject: [PATCH 2/2] Do not run a test case for .uuid deletion + +--- + test/run-test.sh | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/test/run-test.sh b/test/run-test.sh +index e76e39b..ed41456 100644 +--- a/test/run-test.sh ++++ b/test/run-test.sh +@@ -239,19 +239,19 @@ fi + + rm -rf $MyPWD/sysroot + +-dotest "deleting .uuid file on empty dir" +-prep +-cp $FONT1 $FONT2 $FONTDIR +-$FCCACHE $FONTDIR +-sleep 1 +-rm -f $FONTDIR/*pcf +-$FCCACHE $FONTDIR +-rmdir $FONTDIR > /dev/null 2>&1 +-if [ $? != 0 ]; then +- echo "*** Test failed: $TEST" +- echo "$FONTDIR isn't empty" +- ls -al $FONTDIR +- exit 1 +-fi ++# dotest "deleting .uuid file on empty dir" ++# prep ++# cp $FONT1 $FONT2 $FONTDIR ++# $FCCACHE $FONTDIR ++# sleep 1 ++# rm -f $FONTDIR/*pcf ++# $FCCACHE $FONTDIR ++# rmdir $FONTDIR > /dev/null 2>&1 ++# if [ $? != 0 ]; then ++# echo "*** Test failed: $TEST" ++# echo "$FONTDIR isn't empty" ++# ls -al $FONTDIR ++# exit 1 ++# fi + + rm -rf $FONTDIR $CACHEFILE $CACHEDIR $FONTCONFIG_FILE out +-- +2.19.1 + diff --git a/fontconfig.spec b/fontconfig.spec index 45691ec..83efebc 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.1 -Release: 1%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -19,6 +19,7 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch +Patch2: %{name}-stop-cleanup-uuid.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -167,6 +168,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Nov 07 2018 Akira TAGOH - 2.13.1-3 +- Stop cleaning up .uuid file even when a directory is empty. + * Wed Sep 26 2018 Akira TAGOH - 2.13.1-2 - Add man page for fc-cache-* links to fc-cache. - Drop unnecessary BR. From b2a0a1a3641739cdefef334d11d320967eeae537 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 13 Nov 2018 07:15:34 +0000 Subject: [PATCH 065/154] Use Rachana instead of Meera for serif subsitution. (#1649184) --- fontconfig-use-rachana.patch | 26 ++++++++++++++++++++++++++ fontconfig.spec | 6 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 fontconfig-use-rachana.patch diff --git a/fontconfig-use-rachana.patch b/fontconfig-use-rachana.patch new file mode 100644 index 0000000..e4fadcc --- /dev/null +++ b/fontconfig-use-rachana.patch @@ -0,0 +1,26 @@ +From 13b4ba91353a4ead4623d0133f6eb0283e91b15a Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Tue, 13 Nov 2018 06:34:11 +0000 +Subject: [PATCH] Use Rachana instead of Meera for Malayalam + +Meera is a sans-serif font for Malayalam. that should be substituted for serif. +--- + conf.d/65-nonlatin.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/conf.d/65-nonlatin.conf b/conf.d/65-nonlatin.conf +index 54fb974f..1b9de316 100644 +--- a/conf.d/65-nonlatin.conf ++++ b/conf.d/65-nonlatin.conf +@@ -63,7 +63,7 @@ + Lohit Sindhi + Lohit Punjabi + Lohit Tamil +- Meera ++ Rachana + Lohit Malayalam + Lohit Kannada + Lohit Telugu +-- +2.19.1 + diff --git a/fontconfig.spec b/fontconfig.spec index 83efebc..9b8ce17 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.1 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -20,6 +20,7 @@ Source2: fc-cache Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch Patch2: %{name}-stop-cleanup-uuid.patch +Patch3: %{name}-use-rachana.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -168,6 +169,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Tue Nov 13 2018 Akira TAGOH - 2.13.1-4 +- Use Rachana instead of Meera for serif subsitution. (#1649184) + * Wed Nov 07 2018 Akira TAGOH - 2.13.1-3 - Stop cleaning up .uuid file even when a directory is empty. From 93f4fdf3eadaf532e355360fefc1e8ca0dd5697e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 13 Nov 2018 10:36:56 +0000 Subject: [PATCH 066/154] Use Rachana instead of Meera for serif subsitution. (#1649184) --- fontconfig-test-delay.patch | 79 +++++++++++++++++++++++++++++++++++++ fontconfig.spec | 1 + 2 files changed, 80 insertions(+) create mode 100644 fontconfig-test-delay.patch diff --git a/fontconfig-test-delay.patch b/fontconfig-test-delay.patch new file mode 100644 index 0000000..4a0ef1e --- /dev/null +++ b/fontconfig-test-delay.patch @@ -0,0 +1,79 @@ +From 0ddacad43d7fce4668914a4695898902d1006965 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Mon, 29 Oct 2018 16:36:11 -0700 +Subject: [PATCH] Add delays to test-bz106632, check UptoDate separately + +On a file system with one-second time stamps, extra delays are needed +between cache modification operations to ensure that fontconfig isn't +fooled. + +And, when the timestamps are checked correctly, we need to make sure +that FcConfigUptoDate returns false whenever we change a font +directory, so separate that out from the call to reinitialize the core +config. + +Signed-off-by: Keith Packard +--- + test/test-bz106632.c | 24 ++++++++++++++++++------ + 1 file changed, 18 insertions(+), 6 deletions(-) + +diff --git a/test/test-bz106632.c b/test/test-bz106632.c +index c2edd72..87a5ec0 100644 +--- a/test/test-bz106632.c ++++ b/test/test-bz106632.c +@@ -186,7 +186,7 @@ main (void) + mkdir_p (cachedir); + + fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); +- snprintf (cmd, 512, "cp -a %s %s", FONTFILE, fontdir); ++ snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir); + system (cmd); + + fprintf (stderr, "D: Loading a config\n"); +@@ -215,15 +215,21 @@ main (void) + goto bail; + } + fprintf (stderr, "D: Removing %s\n", fontdir); +- snprintf (cmd, 512, "rm -f %s%s*; sleep 1", fontdir, FC_DIR_SEPARATOR_S); ++ snprintf (cmd, 512, "sleep 1; rm -f %s%s*; sleep 1", fontdir, FC_DIR_SEPARATOR_S); + system (cmd); + fprintf (stderr, "D: Reinitializing\n"); +- if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) ++ if (FcConfigUptoDate(config)) + { +- fprintf (stderr, "E: Unable to reinitialize\n"); ++ fprintf (stderr, "E: Config reports up-to-date\n"); + ret = 2; + goto bail; + } ++ if (!FcInitReinitialize ()) ++ { ++ fprintf (stderr, "E: Unable to reinitialize\n"); ++ ret = 3; ++ goto bail; ++ } + if (FcConfigGetCurrent () == config) + { + fprintf (stderr, "E: config wasn't reloaded\n"); +@@ -254,10 +260,16 @@ main (void) + goto bail; + } + fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); +- snprintf (cmd, 512, "cp -a %s %s; sleep 1", FONTFILE, fontdir); ++ snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir); + system (cmd); + fprintf (stderr, "D: Reinitializing\n"); +- if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) ++ if (FcConfigUptoDate(config)) ++ { ++ fprintf (stderr, "E: Config up-to-date after addition\n"); ++ ret = 3; ++ goto bail; ++ } ++ if (!FcInitReinitialize ()) + { + fprintf (stderr, "E: Unable to reinitialize\n"); + ret = 2; +-- +2.19.1 + diff --git a/fontconfig.spec b/fontconfig.spec index 9b8ce17..95117a7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -21,6 +21,7 @@ Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch Patch2: %{name}-stop-cleanup-uuid.patch Patch3: %{name}-use-rachana.patch +Patch4: %{name}-test-delay.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} From ede0a63bf771aeb02b2f771ec0ea0186cf4084c3 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 13 Nov 2018 11:58:10 +0000 Subject: [PATCH 067/154] Use Rachana instead of Meera for serif subsitution. (#1649184) --- fontconfig-test-delay.patch | 49 ++++++++++--------------------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/fontconfig-test-delay.patch b/fontconfig-test-delay.patch index 4a0ef1e..6b2fe3c 100644 --- a/fontconfig-test-delay.patch +++ b/fontconfig-test-delay.patch @@ -1,27 +1,7 @@ -From 0ddacad43d7fce4668914a4695898902d1006965 Mon Sep 17 00:00:00 2001 -From: Keith Packard -Date: Mon, 29 Oct 2018 16:36:11 -0700 -Subject: [PATCH] Add delays to test-bz106632, check UptoDate separately - -On a file system with one-second time stamps, extra delays are needed -between cache modification operations to ensure that fontconfig isn't -fooled. - -And, when the timestamps are checked correctly, we need to make sure -that FcConfigUptoDate returns false whenever we change a font -directory, so separate that out from the call to reinitialize the core -config. - -Signed-off-by: Keith Packard ---- - test/test-bz106632.c | 24 ++++++++++++++++++------ - 1 file changed, 18 insertions(+), 6 deletions(-) - -diff --git a/test/test-bz106632.c b/test/test-bz106632.c -index c2edd72..87a5ec0 100644 ---- a/test/test-bz106632.c -+++ b/test/test-bz106632.c -@@ -186,7 +186,7 @@ main (void) +diff -pruN fontconfig-2.13.1.orig/test/test-bz106632.c fontconfig-2.13.1/test/test-bz106632.c +--- fontconfig-2.13.1.orig/test/test-bz106632.c 2018-08-29 09:55:14.000000000 +0000 ++++ fontconfig-2.13.1/test/test-bz106632.c 2018-11-13 11:57:37.822142424 +0000 +@@ -197,7 +197,7 @@ main (void) mkdir_p (cachedir); fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); @@ -30,16 +10,16 @@ index c2edd72..87a5ec0 100644 system (cmd); fprintf (stderr, "D: Loading a config\n"); -@@ -215,15 +215,21 @@ main (void) +@@ -226,15 +226,21 @@ main (void) goto bail; } fprintf (stderr, "D: Removing %s\n", fontdir); -- snprintf (cmd, 512, "rm -f %s%s*; sleep 1", fontdir, FC_DIR_SEPARATOR_S); +- snprintf (cmd, 512, "rm -f %s%s*", fontdir, FC_DIR_SEPARATOR_S); + snprintf (cmd, 512, "sleep 1; rm -f %s%s*; sleep 1", fontdir, FC_DIR_SEPARATOR_S); system (cmd); fprintf (stderr, "D: Reinitializing\n"); - if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) -+ if (FcConfigUptoDate(config)) ++ if (!FcConfigUptoDate (config)) { - fprintf (stderr, "E: Unable to reinitialize\n"); + fprintf (stderr, "E: Config reports up-to-date\n"); @@ -55,25 +35,22 @@ index c2edd72..87a5ec0 100644 if (FcConfigGetCurrent () == config) { fprintf (stderr, "E: config wasn't reloaded\n"); -@@ -254,10 +260,16 @@ main (void) +@@ -265,10 +271,16 @@ main (void) goto bail; } fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); -- snprintf (cmd, 512, "cp -a %s %s; sleep 1", FONTFILE, fontdir); +- snprintf (cmd, 512, "cp -a %s %s", FONTFILE, fontdir); + snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir); system (cmd); fprintf (stderr, "D: Reinitializing\n"); - if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) -+ if (FcConfigUptoDate(config)) ++ if (!FcConfigUptoDate (config)) + { -+ fprintf (stderr, "E: Config up-to-date after addition\n"); -+ ret = 3; -+ goto bail; ++ fprintf (stderr, "E: Config up-to-date after addition\n"); ++ ret = 3; ++ goto bail; + } + if (!FcInitReinitialize ()) { fprintf (stderr, "E: Unable to reinitialize\n"); ret = 2; --- -2.19.1 - From 23005793fafa1c4a42f4ac5573002390d73749f2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 14 Nov 2018 05:27:02 +0000 Subject: [PATCH 068/154] Use Rachana instead of Meera for serif subsitution. (#1649184) --- fontconfig-test-delay.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fontconfig-test-delay.patch b/fontconfig-test-delay.patch index 6b2fe3c..2a344cb 100644 --- a/fontconfig-test-delay.patch +++ b/fontconfig-test-delay.patch @@ -19,7 +19,7 @@ diff -pruN fontconfig-2.13.1.orig/test/test-bz106632.c fontconfig-2.13.1/test/te system (cmd); fprintf (stderr, "D: Reinitializing\n"); - if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) -+ if (!FcConfigUptoDate (config)) ++ if (FcConfigUptoDate (config)) { - fprintf (stderr, "E: Unable to reinitialize\n"); + fprintf (stderr, "E: Config reports up-to-date\n"); @@ -44,7 +44,7 @@ diff -pruN fontconfig-2.13.1.orig/test/test-bz106632.c fontconfig-2.13.1/test/te system (cmd); fprintf (stderr, "D: Reinitializing\n"); - if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) -+ if (!FcConfigUptoDate (config)) ++ if (FcConfigUptoDate (config)) + { + fprintf (stderr, "E: Config up-to-date after addition\n"); + ret = 3; From 68f25d201745eaa8ee2a0932c9c50aba2b3df913 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 22 Jan 2019 18:38:57 +0100 Subject: [PATCH 069/154] Remove obsolete ldconfig scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- fontconfig.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 95117a7..89a1776 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -32,7 +32,7 @@ BuildRequires: gperf Requires: fontpackages-filesystem freetype Requires(pre): freetype >= 2.9.1 -Requires(post): grep coreutils /sbin/ldconfig +Requires(post): grep coreutils Requires(postun): /sbin/ldconfig Requires: font(:lang=en) Suggests: dejavu-sans-fonts @@ -109,7 +109,7 @@ cat %{name}-conf.lang >> %{name}.lang make check %post -%{?ldconfig: %ldconfig} +%{?ldconfig} umask 0022 From 6957dc9adde2025fa59bf1ca51d119140557638e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:44 +0100 Subject: [PATCH 070/154] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- fontconfig.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 89a1776..d0c9e77 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -44,7 +44,6 @@ applications. %package devel Summary: Font configuration and customization library -Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} Requires: freetype-devel >= %{freetype_version} Requires: pkgconfig @@ -59,7 +58,6 @@ will use fontconfig. %package devel-doc Summary: Development Documentation files for fontconfig library -Group: Documentation BuildArch: noarch Requires: %{name}-devel = %{version}-%{release} From 5689b719543deca222cadd73f709dbd42c933a4c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 19:58:15 +0000 Subject: [PATCH 071/154] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index d0c9e77..38f1b87 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.1 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -168,6 +168,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 2.13.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Tue Nov 13 2018 Akira TAGOH - 2.13.1-4 - Use Rachana instead of Meera for serif subsitution. (#1649184) From 65fe527585c7de1165b1635f9a07702754048d0c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 22 Feb 2019 03:48:26 +0000 Subject: [PATCH 072/154] Update freetype version for runtime dependency to ensure they have FT_Done_MM_Var symbol certainly. (#1679619) --- fontconfig.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 38f1b87..993c90c 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.1 -Release: 5%{?dist} +Release: 6%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -31,7 +31,7 @@ BuildRequires: autoconf automake libtool gettext BuildRequires: gperf Requires: fontpackages-filesystem freetype -Requires(pre): freetype >= 2.9.1 +Requires(pre): freetype >= 2.9.1-6 Requires(post): grep coreutils Requires(postun): /sbin/ldconfig Requires: font(:lang=en) @@ -168,6 +168,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Feb 22 2019 Akira TAGOH - 2.13.1-6 +- Update freetype version for runtime dependency to ensure + they have FT_Done_MM_Var symbol certainly. (#1679619) + * Thu Jan 31 2019 Fedora Release Engineering - 2.13.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From cd60c583596fb203150e412278fbcdaadf415944 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 10 Jun 2019 08:28:29 +0000 Subject: [PATCH 073/154] New upstream release. --- .gitignore | 1 + fontconfig-stop-cleanup-uuid.patch | 93 ------------------------------ fontconfig-test-delay.patch | 56 ------------------ fontconfig-use-rachana.patch | 26 --------- fontconfig.spec | 12 ++-- sources | 1 + 6 files changed, 8 insertions(+), 181 deletions(-) delete mode 100644 fontconfig-stop-cleanup-uuid.patch delete mode 100644 fontconfig-test-delay.patch delete mode 100644 fontconfig-use-rachana.patch diff --git a/.gitignore b/.gitignore index f153c22..239114e 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.93.tar.bz2 /fontconfig-2.13.0.tar.bz2 /fontconfig-2.13.1.tar.bz2 +/fontconfig-2.13.91.tar.xz diff --git a/fontconfig-stop-cleanup-uuid.patch b/fontconfig-stop-cleanup-uuid.patch deleted file mode 100644 index 9972cd2..0000000 --- a/fontconfig-stop-cleanup-uuid.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 5f12f564f8748deaa603adb7a4b8f616b6390ad4 Mon Sep 17 00:00:00 2001 -From: Keith Packard -Date: Wed, 17 Oct 2018 21:15:47 -0700 -Subject: [PATCH 1/2] Do not remove UUID file when a scanned directory is empty - -Because FcDirCacheDeleteUUID does not reset the modification time on -the directory, and because FcDirCacheRead unconditionally creates the -UUID file each time it is run, any empty directory in the cache will -get its timestamp changed each time the cache for that directory is -read. - -Instead, just leave the UUID file around as it is harmless. - -The alternative would be to only create the UUID file after the cache -has been created and the directory has been discovered to be -non-empty, but that would delay the creation of the UUID file. - -Signed-off-by: Keith Packard ---- - src/fcdir.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/src/fcdir.c b/src/fcdir.c -index 93f220c..bfcdf95 100644 ---- a/src/fcdir.c -+++ b/src/fcdir.c -@@ -421,13 +421,6 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) - /* Not using existing cache file, construct new cache */ - if (!cache) - cache = FcDirCacheScan (dir, config); -- if (cache) -- { -- FcFontSet *fs = FcCacheSet (cache); -- -- if (cache->dirs_count == 0 && (!fs || fs->nfont == 0)) -- FcDirCacheDeleteUUID (dir, config); -- } - - return cache; - } --- -2.19.1 - -From e9113a764a1001165711022aceb45aa2765feb8b Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Thu, 25 Oct 2018 07:16:32 +0000 -Subject: [PATCH 2/2] Do not run a test case for .uuid deletion - ---- - test/run-test.sh | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -diff --git a/test/run-test.sh b/test/run-test.sh -index e76e39b..ed41456 100644 ---- a/test/run-test.sh -+++ b/test/run-test.sh -@@ -239,19 +239,19 @@ fi - - rm -rf $MyPWD/sysroot - --dotest "deleting .uuid file on empty dir" --prep --cp $FONT1 $FONT2 $FONTDIR --$FCCACHE $FONTDIR --sleep 1 --rm -f $FONTDIR/*pcf --$FCCACHE $FONTDIR --rmdir $FONTDIR > /dev/null 2>&1 --if [ $? != 0 ]; then -- echo "*** Test failed: $TEST" -- echo "$FONTDIR isn't empty" -- ls -al $FONTDIR -- exit 1 --fi -+# dotest "deleting .uuid file on empty dir" -+# prep -+# cp $FONT1 $FONT2 $FONTDIR -+# $FCCACHE $FONTDIR -+# sleep 1 -+# rm -f $FONTDIR/*pcf -+# $FCCACHE $FONTDIR -+# rmdir $FONTDIR > /dev/null 2>&1 -+# if [ $? != 0 ]; then -+# echo "*** Test failed: $TEST" -+# echo "$FONTDIR isn't empty" -+# ls -al $FONTDIR -+# exit 1 -+# fi - - rm -rf $FONTDIR $CACHEFILE $CACHEDIR $FONTCONFIG_FILE out --- -2.19.1 - diff --git a/fontconfig-test-delay.patch b/fontconfig-test-delay.patch deleted file mode 100644 index 2a344cb..0000000 --- a/fontconfig-test-delay.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -pruN fontconfig-2.13.1.orig/test/test-bz106632.c fontconfig-2.13.1/test/test-bz106632.c ---- fontconfig-2.13.1.orig/test/test-bz106632.c 2018-08-29 09:55:14.000000000 +0000 -+++ fontconfig-2.13.1/test/test-bz106632.c 2018-11-13 11:57:37.822142424 +0000 -@@ -197,7 +197,7 @@ main (void) - mkdir_p (cachedir); - - fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); -- snprintf (cmd, 512, "cp -a %s %s", FONTFILE, fontdir); -+ snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir); - system (cmd); - - fprintf (stderr, "D: Loading a config\n"); -@@ -226,15 +226,21 @@ main (void) - goto bail; - } - fprintf (stderr, "D: Removing %s\n", fontdir); -- snprintf (cmd, 512, "rm -f %s%s*", fontdir, FC_DIR_SEPARATOR_S); -+ snprintf (cmd, 512, "sleep 1; rm -f %s%s*; sleep 1", fontdir, FC_DIR_SEPARATOR_S); - system (cmd); - fprintf (stderr, "D: Reinitializing\n"); -- if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) -+ if (FcConfigUptoDate (config)) - { -- fprintf (stderr, "E: Unable to reinitialize\n"); -+ fprintf (stderr, "E: Config reports up-to-date\n"); - ret = 2; - goto bail; - } -+ if (!FcInitReinitialize ()) -+ { -+ fprintf (stderr, "E: Unable to reinitialize\n"); -+ ret = 3; -+ goto bail; -+ } - if (FcConfigGetCurrent () == config) - { - fprintf (stderr, "E: config wasn't reloaded\n"); -@@ -265,10 +271,16 @@ main (void) - goto bail; - } - fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); -- snprintf (cmd, 512, "cp -a %s %s", FONTFILE, fontdir); -+ snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir); - system (cmd); - fprintf (stderr, "D: Reinitializing\n"); -- if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) -+ if (FcConfigUptoDate (config)) -+ { -+ fprintf (stderr, "E: Config up-to-date after addition\n"); -+ ret = 3; -+ goto bail; -+ } -+ if (!FcInitReinitialize ()) - { - fprintf (stderr, "E: Unable to reinitialize\n"); - ret = 2; diff --git a/fontconfig-use-rachana.patch b/fontconfig-use-rachana.patch deleted file mode 100644 index e4fadcc..0000000 --- a/fontconfig-use-rachana.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 13b4ba91353a4ead4623d0133f6eb0283e91b15a Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Tue, 13 Nov 2018 06:34:11 +0000 -Subject: [PATCH] Use Rachana instead of Meera for Malayalam - -Meera is a sans-serif font for Malayalam. that should be substituted for serif. ---- - conf.d/65-nonlatin.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/conf.d/65-nonlatin.conf b/conf.d/65-nonlatin.conf -index 54fb974f..1b9de316 100644 ---- a/conf.d/65-nonlatin.conf -+++ b/conf.d/65-nonlatin.conf -@@ -63,7 +63,7 @@ - Lohit Sindhi - Lohit Punjabi - Lohit Tamil -- Meera -+ Rachana - Lohit Malayalam - Lohit Kannada - Lohit Telugu --- -2.19.1 - diff --git a/fontconfig.spec b/fontconfig.spec index 993c90c..3a3f0bd 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.13.1 -Release: 6%{?dist} +Version: 2.13.91 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -19,9 +19,6 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch -Patch2: %{name}-stop-cleanup-uuid.patch -Patch3: %{name}-use-rachana.patch -Patch4: %{name}-test-delay.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -35,7 +32,7 @@ Requires(pre): freetype >= 2.9.1-6 Requires(post): grep coreutils Requires(postun): /sbin/ldconfig Requires: font(:lang=en) -Suggests: dejavu-sans-fonts +Suggests: font(dejavusans) %description Fontconfig is designed to locate fonts within the @@ -168,6 +165,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Jun 10 2019 Akira TAGOH - 2.13.91-1 +- New upstream release. + * Fri Feb 22 2019 Akira TAGOH - 2.13.1-6 - Update freetype version for runtime dependency to ensure they have FT_Done_MM_Var symbol certainly. (#1679619) diff --git a/sources b/sources index 61cde62..193fe3d 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (fontconfig-2.13.1.tar.bz2) = f97f2a9db294fd72d416a7d76dd7db5934ade2cf76903764b09e7decc33e0e2eed1a1d35c5f1c7fd9ea39e2c7653b9e65365f0c6205e047e95e38ba5000dd100 +SHA512 (fontconfig-2.13.91.tar.xz) = 2d7f749883dd0e1b393dc03698d06dc4431ecf2f06da1928e9d9ea4a878fd11ff4a8f5d86143c5df14460c04938105a1e80d501ac680790dad857d1f0d0f51ae From 0b05d6df6284dc0c1cd4c79ce0ced19607ef251e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 10 Jun 2019 08:32:35 +0000 Subject: [PATCH 074/154] New upstream release. --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 3a3f0bd..0b4d13a 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -11,7 +11,7 @@ Release: 1%{?dist} # fc-case/CaseFolding.txt is in the UCD # otherwise MIT License: MIT and Public Domain and UCD -Source: http://fontconfig.org/release/%{name}-%{version}.tar.bz2 +Source: http://fontconfig.org/release/%{name}-%{version}.tar.xz URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf Source2: fc-cache From 7440bfb1d65e53b7d80d7dc93f2ff9bc9d6d759c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 10 Jun 2019 12:10:44 +0000 Subject: [PATCH 075/154] New upstream release. --- sources | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources b/sources index 193fe3d..9082b79 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (fontconfig-2.13.1.tar.bz2) = f97f2a9db294fd72d416a7d76dd7db5934ade2cf76903764b09e7decc33e0e2eed1a1d35c5f1c7fd9ea39e2c7653b9e65365f0c6205e047e95e38ba5000dd100 -SHA512 (fontconfig-2.13.91.tar.xz) = 2d7f749883dd0e1b393dc03698d06dc4431ecf2f06da1928e9d9ea4a878fd11ff4a8f5d86143c5df14460c04938105a1e80d501ac680790dad857d1f0d0f51ae +SHA512 (fontconfig-2.13.91.tar.xz) = 4a3c6635049ba5c8af87b35a65374508fbe2d90b1e08636f7bdb461de181d1f268992c435e96a0c5807cb1cd97a072789719cf08abd07c391c7f84efdd8c623a From cae69d4e82d1c7b88c502c2e0b9ac3a0adb2c1c2 Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Sun, 16 Jun 2019 23:56:02 +0000 Subject: [PATCH 076/154] Update scriptlets and requirements Since Fedora 28, ldconfig is automatically run as a file trigger, so it is no longer necessary to call it from package scriptlets (cf. https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets). Also, in commit 89aa83ab308550f4b7bfb4949fbad6362b6a91a5, "PreReq: freetype" was replaced with "Requires(pre): freetype". While this is effectively the same, the latter suggests that a "%pre" scriptlet exists that needs freetype to run. As fontconfig does not have a "%pre" scriptlet, this change replaces it again with a "PreReq" tag. --- fontconfig.spec | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 0b4d13a..9085e22 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.91 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -28,9 +28,8 @@ BuildRequires: autoconf automake libtool gettext BuildRequires: gperf Requires: fontpackages-filesystem freetype -Requires(pre): freetype >= 2.9.1-6 +PreReq: freetype >= 2.9.1-6 Requires(post): grep coreutils -Requires(postun): /sbin/ldconfig Requires: font(:lang=en) Suggests: font(dejavusans) @@ -104,8 +103,6 @@ cat %{name}-conf.lang >> %{name}.lang make check %post -%{?ldconfig} - umask 0022 mkdir -p /usr/lib/fontconfig/cache @@ -120,8 +117,6 @@ if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{vers HOME=/root /usr/bin/fc-cache -f fi -%ldconfig_postun - %transfiletriggerin -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts HOME=/root /usr/bin/fc-cache -s @@ -165,6 +160,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Sun Jun 16 2019 Tim Landscheidt - 2.13.91-2 +- Remove calls to ldconfig from scriptlets +- Use "PreReq" instead of "Requires(pre)" for freetype + * Mon Jun 10 2019 Akira TAGOH - 2.13.91-1 - New upstream release. From 8757b5b6c0a3d24a70a8c3025e8677c6d0639e4e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 00:51:04 +0000 Subject: [PATCH 077/154] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 9085e22..4635444 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.91 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -160,6 +160,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 2.13.91-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Jun 16 2019 Tim Landscheidt - 2.13.91-2 - Remove calls to ldconfig from scriptlets - Use "PreReq" instead of "Requires(pre)" for freetype From 2ac78c5b23562da27b64550ce39b3c134de7b334 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 31 Jul 2019 22:24:12 +0900 Subject: [PATCH 078/154] Fix make check fails. --- fontconfig-fix-make-check.patch | 119 ++++++++++++++++++++++++++++++++ fontconfig.spec | 6 +- 2 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-make-check.patch diff --git a/fontconfig-fix-make-check.patch b/fontconfig-fix-make-check.patch new file mode 100644 index 0000000..e8a73dc --- /dev/null +++ b/fontconfig-fix-make-check.patch @@ -0,0 +1,119 @@ +From 01e4f088bf467738d6cd547d4dea0e2bfe5eca57 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 31 Jul 2019 13:18:51 +0000 +Subject: [PATCH] Fix the fails of make check when SOURCE_DATE_EPOCH is set + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/172 +--- + test/run-test.sh | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/test/run-test.sh b/test/run-test.sh +index 12198ff6..2e00f795 100644 +--- a/test/run-test.sh ++++ b/test/run-test.sh +@@ -82,11 +82,17 @@ export FONTCONFIG_FILE + dotest "Basic check" + prep + cp $FONT1 $FONT2 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + check + + dotest "With a subdir" + prep + cp $FONT1 $FONT2 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + $FCCACHE $FONTDIR + check + +@@ -94,6 +100,9 @@ dotest "Subdir with a cache file" + prep + mkdir $FONTDIR/a + cp $FONT1 $FONT2 $FONTDIR/a ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/a ++fi + $FCCACHE $FONTDIR/a + check + +@@ -104,7 +113,13 @@ mkdir $FONTDIR/a/a + mkdir $FONTDIR/b + mkdir $FONTDIR/b/a + cp $FONT1 $FONTDIR/a ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/a ++fi + cp $FONT2 $FONTDIR/b/a ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/b/a ++fi + check + + dotest "Subdir with an out-of-date cache file" +@@ -141,6 +156,9 @@ if [ x"$BWRAP" != "x" -a "x$EXEEXT" = "x" ]; then + dotest "Basic functionality with the bind-mounted cache dir" + prep + cp $FONT1 $FONT2 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + $FCCACHE $FONTDIR + sleep 1 + ls -l $CACHEDIR > out1 +@@ -180,6 +198,9 @@ rm -rf $TESTTMPDIR out1 out2 xxx flist1 flist2 bind-fonts.conf + dotest "Different directory content between host and sandbox" + prep + cp $FONT1 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + $FCCACHE $FONTDIR + sleep 1 + ls -1 --color=no $CACHEDIR/*cache*> out1 +@@ -187,6 +208,9 @@ stat -c '%n %s %y %z' `cat out1` > stat1 + TESTTMPDIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` + TESTTMP2DIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` + cp $FONT2 $TESTTMP2DIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $TESTTMP2DIR ++fi + sed "s!@FONTDIR@!$TESTTMPDIR/fonts$FONTDIR! + s!@REMAPDIR@!$TESTTMPDIR/fonts! + s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < $TESTDIR/fonts.conf.in > bind-fonts.conf +@@ -227,6 +251,9 @@ dotest "Check consistency of MD5 in cache name" + prep + mkdir -p $FONTDIR/sub + cp $FONT1 $FONTDIR/sub ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/sub ++fi + $FCCACHE $FONTDIR + sleep 1 + (cd $CACHEDIR; ls -1 --color=no *cache*) > out1 +@@ -251,6 +278,9 @@ rm -rf $TESTTMPDIR out1 out2 bind-fonts.conf + dotest "Fallback to uuid" + prep + cp $FONT1 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + touch -d @`stat -c %Y $FONTDIR` $FONTDIR + $FCCACHE $FONTDIR + sleep 1 +@@ -291,6 +321,9 @@ mkdir -p $MyPWD/sysroot/$FONTDIR + mkdir -p $MyPWD/sysroot/$CACHEDIR + mkdir -p $MyPWD/sysroot/$MyPWD + cp $FONT1 $MyPWD/sysroot/$FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $MyPWD/sysroot/$FONTDIR ++fi + cp $MyPWD/fonts.conf $MyPWD/sysroot/$MyPWD/fonts.conf + $FCCACHE -y $MyPWD/sysroot + +-- +2.22.0 + diff --git a/fontconfig.spec b/fontconfig.spec index 4635444..28e492c 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.91 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -19,6 +19,7 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch +Patch2: %{name}-fix-make-check.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -160,6 +161,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jul 31 2019 Akira TAGOH - 2.13.91-4 +- Fix make check fails. + * Thu Jul 25 2019 Fedora Release Engineering - 2.13.91-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 2f252b10fae07f0c600e153b513cec7e9be19734 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 9 Aug 2019 11:27:21 +0000 Subject: [PATCH 079/154] New upstream release. --- .gitignore | 1 + fontconfig-fix-make-check.patch | 119 -------------------------------- fontconfig.spec | 8 ++- sources | 2 +- 4 files changed, 7 insertions(+), 123 deletions(-) delete mode 100644 fontconfig-fix-make-check.patch diff --git a/.gitignore b/.gitignore index 239114e..807c56c 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.13.0.tar.bz2 /fontconfig-2.13.1.tar.bz2 /fontconfig-2.13.91.tar.xz +/fontconfig-2.13.92.tar.xz diff --git a/fontconfig-fix-make-check.patch b/fontconfig-fix-make-check.patch deleted file mode 100644 index e8a73dc..0000000 --- a/fontconfig-fix-make-check.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 01e4f088bf467738d6cd547d4dea0e2bfe5eca57 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 31 Jul 2019 13:18:51 +0000 -Subject: [PATCH] Fix the fails of make check when SOURCE_DATE_EPOCH is set - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/172 ---- - test/run-test.sh | 33 +++++++++++++++++++++++++++++++++ - 1 file changed, 33 insertions(+) - -diff --git a/test/run-test.sh b/test/run-test.sh -index 12198ff6..2e00f795 100644 ---- a/test/run-test.sh -+++ b/test/run-test.sh -@@ -82,11 +82,17 @@ export FONTCONFIG_FILE - dotest "Basic check" - prep - cp $FONT1 $FONT2 $FONTDIR -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR -+fi - check - - dotest "With a subdir" - prep - cp $FONT1 $FONT2 $FONTDIR -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR -+fi - $FCCACHE $FONTDIR - check - -@@ -94,6 +100,9 @@ dotest "Subdir with a cache file" - prep - mkdir $FONTDIR/a - cp $FONT1 $FONT2 $FONTDIR/a -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/a -+fi - $FCCACHE $FONTDIR/a - check - -@@ -104,7 +113,13 @@ mkdir $FONTDIR/a/a - mkdir $FONTDIR/b - mkdir $FONTDIR/b/a - cp $FONT1 $FONTDIR/a -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/a -+fi - cp $FONT2 $FONTDIR/b/a -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/b/a -+fi - check - - dotest "Subdir with an out-of-date cache file" -@@ -141,6 +156,9 @@ if [ x"$BWRAP" != "x" -a "x$EXEEXT" = "x" ]; then - dotest "Basic functionality with the bind-mounted cache dir" - prep - cp $FONT1 $FONT2 $FONTDIR -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR -+fi - $FCCACHE $FONTDIR - sleep 1 - ls -l $CACHEDIR > out1 -@@ -180,6 +198,9 @@ rm -rf $TESTTMPDIR out1 out2 xxx flist1 flist2 bind-fonts.conf - dotest "Different directory content between host and sandbox" - prep - cp $FONT1 $FONTDIR -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR -+fi - $FCCACHE $FONTDIR - sleep 1 - ls -1 --color=no $CACHEDIR/*cache*> out1 -@@ -187,6 +208,9 @@ stat -c '%n %s %y %z' `cat out1` > stat1 - TESTTMPDIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` - TESTTMP2DIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` - cp $FONT2 $TESTTMP2DIR -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $TESTTMP2DIR -+fi - sed "s!@FONTDIR@!$TESTTMPDIR/fonts$FONTDIR! - s!@REMAPDIR@!$TESTTMPDIR/fonts! - s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < $TESTDIR/fonts.conf.in > bind-fonts.conf -@@ -227,6 +251,9 @@ dotest "Check consistency of MD5 in cache name" - prep - mkdir -p $FONTDIR/sub - cp $FONT1 $FONTDIR/sub -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/sub -+fi - $FCCACHE $FONTDIR - sleep 1 - (cd $CACHEDIR; ls -1 --color=no *cache*) > out1 -@@ -251,6 +278,9 @@ rm -rf $TESTTMPDIR out1 out2 bind-fonts.conf - dotest "Fallback to uuid" - prep - cp $FONT1 $FONTDIR -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR -+fi - touch -d @`stat -c %Y $FONTDIR` $FONTDIR - $FCCACHE $FONTDIR - sleep 1 -@@ -291,6 +321,9 @@ mkdir -p $MyPWD/sysroot/$FONTDIR - mkdir -p $MyPWD/sysroot/$CACHEDIR - mkdir -p $MyPWD/sysroot/$MyPWD - cp $FONT1 $MyPWD/sysroot/$FONTDIR -+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then -+ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $MyPWD/sysroot/$FONTDIR -+fi - cp $MyPWD/fonts.conf $MyPWD/sysroot/$MyPWD/fonts.conf - $FCCACHE -y $MyPWD/sysroot - --- -2.22.0 - diff --git a/fontconfig.spec b/fontconfig.spec index 28e492c..e7ee136 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.13.91 -Release: 4%{?dist} +Version: 2.13.92 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -19,7 +19,6 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch -Patch2: %{name}-fix-make-check.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -161,6 +160,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Aug 9 2019 Akira TAGOH - 2.13.92-1 +- New upstream release. + * Wed Jul 31 2019 Akira TAGOH - 2.13.91-4 - Fix make check fails. diff --git a/sources b/sources index 9082b79..7eee036 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.13.91.tar.xz) = 4a3c6635049ba5c8af87b35a65374508fbe2d90b1e08636f7bdb461de181d1f268992c435e96a0c5807cb1cd97a072789719cf08abd07c391c7f84efdd8c623a +SHA512 (fontconfig-2.13.92.tar.xz) = 3c8c75ac51cb45531aa02654ce6e32e6db2650679531d2c84df00dd38425c27344599484b2625983ec55b1ba7bab3be8464d7eb75286ea3a0e97a361d2ae91d4 From 89a58046fe65b4d871a178a1fe621e73df95acd3 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 9 Aug 2019 12:26:58 +0000 Subject: [PATCH 080/154] Fix to affect fonthashint property for score on match. --- fontconfig-score-hint-on-match.patch | 36 ++++++++++++++++++++++++++++ fontconfig.spec | 6 ++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 fontconfig-score-hint-on-match.patch diff --git a/fontconfig-score-hint-on-match.patch b/fontconfig-score-hint-on-match.patch new file mode 100644 index 0000000..404d7be --- /dev/null +++ b/fontconfig-score-hint-on-match.patch @@ -0,0 +1,36 @@ +From cb1036a7c7f1cb79fa799b1db368c86b018ec368 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Fri, 9 Aug 2019 12:22:08 +0000 +Subject: [PATCH] Affect FC_FONT_HAS_HINT property to score on matcher + +--- + src/fcmatch.c | 1 + + src/fcobjs.h | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/fcmatch.c b/src/fcmatch.c +index c3d2b8ad..78bcf7b4 100644 +--- a/src/fcmatch.c ++++ b/src/fcmatch.c +@@ -342,6 +342,7 @@ typedef enum _FcMatcherPriority { + PRI1(SLANT), + PRI1(WEIGHT), + PRI1(WIDTH), ++ PRI1(FONT_HAS_HINT), + PRI1(DECORATIVE), + PRI1(ANTIALIAS), + PRI1(RASTERIZER), +diff --git a/src/fcobjs.h b/src/fcobjs.h +index 7bb97d09..dd4a6ec3 100644 +--- a/src/fcobjs.h ++++ b/src/fcobjs.h +@@ -72,5 +72,5 @@ FC_OBJECT (COLOR, FcTypeBool, FcCompareBool) + FC_OBJECT (SYMBOL, FcTypeBool, FcCompareBool) + FC_OBJECT (FONT_VARIATIONS, FcTypeString, NULL) + FC_OBJECT (VARIABLE, FcTypeBool, FcCompareBool) +-FC_OBJECT (FONT_HAS_HINT, FcTypeBool, NULL) ++FC_OBJECT (FONT_HAS_HINT, FcTypeBool, FcCompareBool) + /* ^-------------- Add new objects here. */ +-- +2.22.0 + diff --git a/fontconfig.spec b/fontconfig.spec index e7ee136..7ef03b9 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.92 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -19,6 +19,7 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch +Patch2: %{name}-score-hint-on-match.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -160,6 +161,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Aug 9 2019 Akira TAGOH - 2.13.92-2 +- Fix to affect fonthashint property for score on match. + * Fri Aug 9 2019 Akira TAGOH - 2.13.92-1 - New upstream release. From a2ef9569f548a65b3e0ff48586fc6f690193db54 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 28 Aug 2019 17:52:50 +0900 Subject: [PATCH 081/154] Do not return false on FcConfigParseAndLoad*() if complain is set to false. Resolves: rhbz#1744377 --- fontconfig-fix-1744377.patch | 122 +++++++++++++++++++++++++++++++++++ fontconfig.spec | 7 +- 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-1744377.patch diff --git a/fontconfig-fix-1744377.patch b/fontconfig-fix-1744377.patch new file mode 100644 index 0000000..fda5c2d --- /dev/null +++ b/fontconfig-fix-1744377.patch @@ -0,0 +1,122 @@ +From fcada522913e5e07efa6367eff87ace9f06d24c8 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 28 Aug 2019 17:46:03 +0900 +Subject: [PATCH] Do not return FcFalse from FcConfigParseAndLoad*() if + complain is set to false + +https://bugzilla.redhat.com/show_bug.cgi?id=1744377 +--- + src/fcxml.c | 8 ++++--- + test/Makefile.am | 4 ++++ + test/test-bz1744377.c | 51 +++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 60 insertions(+), 3 deletions(-) + create mode 100644 test/test-bz1744377.c + +diff --git a/src/fcxml.c b/src/fcxml.c +index 2e26e77a..076fa301 100644 +--- a/src/fcxml.c ++++ b/src/fcxml.c +@@ -3526,7 +3526,7 @@ _FcConfigParse (FcConfig *config, + int len; + FcStrBuf sbuf; + char buf[BUFSIZ]; +- FcBool ret = FcFalse; ++ FcBool ret = FcFalse, complain_again = complain; + + #ifdef _WIN32 + if (!pGetSystemWindowsDirectory) +@@ -3605,7 +3605,7 @@ _FcConfigParse (FcConfig *config, + close (fd); + + ret = FcConfigParseAndLoadFromMemoryInternal (config, filename, FcStrBufDoneStatic (&sbuf), complain, load); +- complain = FcFalse; /* no need to reclaim here */ ++ complain_again = FcFalse; /* no need to reclaim here */ + bail1: + FcStrBufDestroy (&sbuf); + bail0: +@@ -3613,7 +3613,9 @@ bail0: + FcStrFree (filename); + if (realfilename) + FcStrFree (realfilename); +- if (!ret && complain) ++ if (!complain) ++ return FcTrue; ++ if (!ret && complain_again) + { + if (name) + FcConfigMessage (0, FcSevereError, "Cannot %s config file \"%s\"", load ? "load" : "scan", name); +diff --git a/test/Makefile.am b/test/Makefile.am +index f9c21581..a9fa089a 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -131,6 +131,10 @@ TESTS += test-d1f48f11 + endif + endif + ++check_PROGRAMS += test-bz1744377 ++test_bz1744377_LDADD = $(top_builddir)/src/libfontconfig.la ++TESTS += test-bz1744377 ++ + EXTRA_DIST=run-test.sh run-test-conf.sh $(LOG_COMPILER) $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names + + CLEANFILES=out out1 out2 fonts.conf out.expected +diff --git a/test/test-bz1744377.c b/test/test-bz1744377.c +new file mode 100644 +index 00000000..d7f10535 +--- /dev/null ++++ b/test/test-bz1744377.c +@@ -0,0 +1,51 @@ ++/* ++ * fontconfig/test/test-bz1744377.c ++ * ++ * Copyright © 2000 Keith Packard ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of the author(s) not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. The authors make no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++#include ++ ++int ++main (void) ++{ ++ const FcChar8 *doc = "" ++ "\n" ++ " blahblahblah\n" ++ "\n" ++ ""; ++ const FcChar8 *doc2 = "" ++ "\n" ++ " blahblahblah\n" ++ "\n" ++ ""; ++ FcConfig *cfg = FcConfigCreate (); ++ ++ if (!FcConfigParseAndLoadFromMemory (cfg, doc, FcTrue)) ++ return 1; ++ if (FcConfigParseAndLoadFromMemory (cfg, doc2, FcTrue)) ++ return 1; ++ if (!FcConfigParseAndLoadFromMemory (cfg, doc2, FcFalse)) ++ return 1; ++ ++ FcConfigDestroy (cfg); ++ ++ return 0; ++} +-- +2.23.0 + diff --git a/fontconfig.spec b/fontconfig.spec index 7ef03b9..6ba81f5 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.92 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -20,6 +20,7 @@ Source2: fc-cache Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch Patch2: %{name}-score-hint-on-match.patch +Patch3: %{name}-fix-1744377.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -161,6 +162,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Aug 28 2019 Akira TAGOH - 2.13.92-3 +- Do not return false on FcConfigParseAndLoad*() if complain is set to false. + Resolves: rhbz#1744377 + * Fri Aug 9 2019 Akira TAGOH - 2.13.92-2 - Fix to affect fonthashint property for score on match. From 16209d7cfc325a5deb1fd45c8c852985e8ee546b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 20 Jan 2020 13:12:24 +0900 Subject: [PATCH 082/154] Drop font(:lang=...) from %{=pkgkit} format. Reference: rhbz#1792463 --- fontconfig-drop-lang-from-pkgkit-format.patch | 12 ++++++++++++ fontconfig.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 fontconfig-drop-lang-from-pkgkit-format.patch diff --git a/fontconfig-drop-lang-from-pkgkit-format.patch b/fontconfig-drop-lang-from-pkgkit-format.patch new file mode 100644 index 0000000..8b77308 --- /dev/null +++ b/fontconfig-drop-lang-from-pkgkit-format.patch @@ -0,0 +1,12 @@ +diff -pruN fontconfig-2.13.92.orig/src/fcformat.c fontconfig-2.13.92/src/fcformat.c +--- fontconfig-2.13.92.orig/src/fcformat.c 2018-07-19 12:14:39.000000000 +0900 ++++ fontconfig-2.13.92/src/fcformat.c 2020-01-20 13:05:33.626227767 +0900 +@@ -78,7 +78,7 @@ + #define FCCAT_FORMAT "\"%{file|basename|cescape}\" %{index} \"%{-file{%{=unparse|cescape}}}\"" + #define FCMATCH_FORMAT "%{file:-|basename}: \"%{family[0]:-}\" \"%{style[0]:-}\"" + #define FCLIST_FORMAT "%{?file{%{file}: }}%{-file{%{=unparse}}}" +-#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}%{[]lang{font(:lang=%{lang|downcase|translate(_,-)})\n}}" ++#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}" + + + static void diff --git a/fontconfig.spec b/fontconfig.spec index 6ba81f5..99805dc 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.92 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -21,6 +21,7 @@ Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch Patch2: %{name}-score-hint-on-match.patch Patch3: %{name}-fix-1744377.patch +Patch4: %{name}-drop-lang-from-pkgkit-format.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -162,6 +163,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Jan 20 2020 Akira TAGOH - 2.13.92-4 +- Drop font(:lang=...) from %%{=pkgkit} format. + Reference: rhbz#1792463 + * Wed Aug 28 2019 Akira TAGOH - 2.13.92-3 - Do not return false on FcConfigParseAndLoad*() if complain is set to false. Resolves: rhbz#1744377 From 87b690f6f7ed9c3c88d31a475643860be86b19fe Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 20 Jan 2020 13:17:02 +0900 Subject: [PATCH 083/154] Get rid of the unnecessary builddep --- fontconfig.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 99805dc..2271b25 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -26,7 +26,6 @@ Patch4: %{name}-drop-lang-from-pkgkit-format.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel -BuildRequires: libuuid-devel BuildRequires: autoconf automake libtool gettext BuildRequires: gperf From dee5c096c285ea3f71ebe51b212fec584cdf25f6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 18:48:00 +0000 Subject: [PATCH 084/154] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 2271b25..a6fd7eb 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.92 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -162,6 +162,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 2.13.92-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Mon Jan 20 2020 Akira TAGOH - 2.13.92-4 - Drop font(:lang=...) from %%{=pkgkit} format. Reference: rhbz#1792463 From 0455f7a71daa5231026d9051518a920b3dd5f2e0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 30 Jan 2020 18:53:45 +0900 Subject: [PATCH 085/154] Fix reading the outdated caches. Apply a patch to make it MT-safe more. --- fontconfig-mt.patch | 1439 ++++++++++++++++++++++++++++ fontconfig-read-latest-cache.patch | 228 +++++ fontconfig.spec | 8 +- 3 files changed, 1674 insertions(+), 1 deletion(-) create mode 100644 fontconfig-mt.patch create mode 100644 fontconfig-read-latest-cache.patch diff --git a/fontconfig-mt.patch b/fontconfig-mt.patch new file mode 100644 index 0000000..31a3748 --- /dev/null +++ b/fontconfig-mt.patch @@ -0,0 +1,1439 @@ +From b5bcf61fe789e66df2de609ec246cb7e4d326180 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Fri, 1 Nov 2019 14:43:42 +0900 +Subject: [PATCH 3/9] Use FcConfigReference/Destroy appropriately instead of + FcConfigGetCurrent + +This may improves to be MT-safe. + +Reported at https://bugs.chromium.org/p/chromium/issues/detail?id=1004254 +--- + doc/fcconfig.fncs | 20 ++++ + fontconfig/fontconfig.h | 4 +- + src/fccache.c | 73 +++++++++--- + src/fccfg.c | 237 ++++++++++++++++++++++++--------------- + src/fcdir.c | 31 ++++- + src/fcinit.c | 15 ++- + src/fclist.c | 25 +++-- + src/fcmatch.c | 48 ++++---- + test/Makefile.am | 5 + + test/run-test.sh | 15 +++ + test/test-crbug1004254.c | 116 +++++++++++++++++++ + 11 files changed, 436 insertions(+), 153 deletions(-) + create mode 100644 test/test-crbug1004254.c + +diff --git a/doc/fcconfig.fncs b/doc/fcconfig.fncs +index 82769d5..e709b54 100644 +--- a/doc/fcconfig.fncs ++++ b/doc/fcconfig.fncs +@@ -174,6 +174,10 @@ Returns one of the two sets of fonts from the configuration as specified + by set. This font set is owned by the library and must + not be modified or freed. + If config is NULL, the current configuration is used. ++ ++This function isn't MT-safe. FcConfigReference must be called ++before using this and then FcConfigDestroy when ++the return value is no longer referenced. + @@ + + @RET@ FcBlanks * +@@ -407,6 +411,10 @@ parse error, semantic error or allocation failure. Otherwise returns FcTrue. + Obtains the system root directory in 'config' if available. All files + (including file properties in patterns) obtained from this 'config' are + relative to this system root directory. ++ ++This function isn't MT-safe. FcConfigReference must be called ++before using this and then FcConfigDestroy when ++the return value is no longer referenced. + @SINCE@ 2.10.92 + @@ + +@@ -433,6 +441,10 @@ When setting this on the current config this causes changing current config + @PURPOSE@ Initialize the iterator + @DESC@ + Initialize 'iter' with the first iterator in the config file information list. ++ ++This function isn't MT-safe. FcConfigReference must be called ++before using this and then FcConfigDestroy when the relevant ++values are no longer referenced. + @SINCE@ 2.12.91 + @@ + +@@ -444,6 +456,10 @@ Initialize 'iter' with the first iterator in the config file information list. + @DESC@ + Set 'iter' to point to the next node in the config file information list. + If there is no next node, FcFalse is returned. ++ ++This function isn't MT-safe. FcConfigReference must be called ++before using FcConfigFileInfoIterInit and then ++FcConfigDestroy when the relevant values are no longer referenced. + @SINCE@ 2.12.91 + @@ + +@@ -459,5 +475,9 @@ If there is no next node, FcFalse is returned. + Obtain the filename, the description and the flag whether it is enabled or not + for 'iter' where points to current configuration file information. + If the iterator is invalid, FcFalse is returned. ++ ++This function isn't MT-safe. FcConfigReference must be called ++before using FcConfigFileInfoIterInit and then ++FcConfigDestroy when the relevant values are no longer referenced. + @SINCE@ 2.12.91 + @@ +diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h +index 2f0e8cf..c795245 100644 +--- a/fontconfig/fontconfig.h ++++ b/fontconfig/fontconfig.h +@@ -375,7 +375,7 @@ FcPublic FcBool + FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose); + + FcPublic void +-FcCacheCreateTagFile (const FcConfig *config); ++FcCacheCreateTagFile (FcConfig *config); + + FcPublic FcBool + FcDirCacheCreateUUID (FcChar8 *dir, +@@ -437,7 +437,7 @@ FcPublic FcBlanks * + FcConfigGetBlanks (FcConfig *config); + + FcPublic FcStrList * +-FcConfigGetCacheDirs (const FcConfig *config); ++FcConfigGetCacheDirs (FcConfig *config); + + FcPublic int + FcConfigGetRescanInterval (FcConfig *config); +diff --git a/src/fccache.c b/src/fccache.c +index c565560..d8f1dab 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -58,11 +58,15 @@ FcDirCacheDeleteUUID (const FcChar8 *dir, + { + FcBool ret = FcTrue; + #ifndef _WIN32 +- const FcChar8 *sysroot = FcConfigGetSysRoot (config); ++ const FcChar8 *sysroot; + FcChar8 *target, *d; + struct stat statb; + struct timeval times[2]; + ++ config = FcConfigReference (config); ++ if (!config) ++ return FcFalse; ++ sysroot = FcConfigGetSysRoot (config); + if (sysroot) + d = FcStrBuildFilename (sysroot, dir, NULL); + else +@@ -94,6 +98,7 @@ FcDirCacheDeleteUUID (const FcChar8 *dir, + bail: + FcStrFree (d); + #endif ++ FcConfigDestroy (config); + + return ret; + } +@@ -265,7 +270,13 @@ FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config) + #endif + FcStrList *list; + FcChar8 *cache_dir; +- const FcChar8 *sysroot = FcConfigGetSysRoot (config); ++ const FcChar8 *sysroot; ++ FcBool ret = FcTrue; ++ ++ config = FcConfigReference (config); ++ if (!config) ++ return FcFalse; ++ sysroot = FcConfigGetSysRoot (config); + + FcDirCacheBasenameMD5 (config, dir, cache_base); + #ifndef _WIN32 +@@ -274,7 +285,10 @@ FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config) + + list = FcStrListCreate (config->cacheDirs); + if (!list) +- return FcFalse; ++ { ++ ret = FcFalse; ++ goto bail; ++ } + + while ((cache_dir = FcStrListNext (list))) + { +@@ -304,8 +318,11 @@ FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config) + FcDirCacheDeleteUUID (dir, config); + /* return FcFalse if something went wrong */ + if (cache_dir) +- return FcFalse; +- return FcTrue; ++ ret = FcFalse; ++bail: ++ FcConfigDestroy (config); ++ ++ return ret; + } + + static int +@@ -1041,10 +1058,15 @@ FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file) + { + FcCache *cache = NULL; + ++ config = FcConfigReference (config); ++ if (!config) ++ return NULL; + if (!FcDirCacheProcess (config, dir, + FcDirCacheMapHelper, + &cache, cache_file)) +- return NULL; ++ cache = NULL; ++ ++ FcConfigDestroy (config); + + return cache; + } +@@ -1055,13 +1077,16 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat) + int fd; + FcCache *cache; + struct stat my_file_stat; ++ FcConfig *config; + + if (!file_stat) + file_stat = &my_file_stat; + fd = FcDirCacheOpenFile (cache_file, file_stat); + if (fd < 0) + return NULL; +- cache = FcDirCacheMapFd (FcConfigGetCurrent (), fd, file_stat, NULL); ++ config = FcConfigReference (NULL); ++ cache = FcDirCacheMapFd (config, fd, file_stat, NULL); ++ FcConfigDestroy (config); + close (fd); + return cache; + } +@@ -1155,12 +1180,16 @@ FcBool + FcDirCacheValid (const FcChar8 *dir) + { + FcConfig *config; ++ FcBool ret; + +- config = FcConfigGetCurrent (); ++ config = FcConfigReference (NULL); + if (!config) + return FcFalse; + +- return FcDirCacheValidConfig (dir, config); ++ ret = FcDirCacheValidConfig (dir, config); ++ FcConfigDestroy (config); ++ ++ return ret; + } + + /* +@@ -1438,9 +1467,13 @@ FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose) + FcCache *cache; + struct stat target_stat; + const FcChar8 *sysroot; ++ FcConfig *config; + ++ config = FcConfigReference (NULL); ++ if (!config) ++ return FcFalse; + /* FIXME: this API needs to support non-current FcConfig */ +- sysroot = FcConfigGetSysRoot (NULL); ++ sysroot = FcConfigGetSysRoot (config); + if (sysroot) + dir = FcStrBuildFilename (sysroot, cache_dir, NULL); + else +@@ -1448,7 +1481,8 @@ FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose) + if (!dir) + { + fprintf (stderr, "Fontconfig error: %s: out of memory\n", cache_dir); +- return FcFalse; ++ ret = FcFalse; ++ goto bail; + } + if (access ((char *) dir, W_OK) != 0) + { +@@ -1525,8 +1559,10 @@ FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose) + } + + closedir (d); +- bail0: ++bail0: + FcStrFree (dir); ++bail: ++ FcConfigDestroy (config); + + return ret; + } +@@ -1968,15 +2004,20 @@ FcDirCacheCreateTagFile (const FcChar8 *cache_dir) + } + + void +-FcCacheCreateTagFile (const FcConfig *config) ++FcCacheCreateTagFile (FcConfig *config) + { + FcChar8 *cache_dir = NULL, *d = NULL; + FcStrList *list; +- const FcChar8 *sysroot = FcConfigGetSysRoot (config); ++ const FcChar8 *sysroot; ++ ++ config = FcConfigReference (config); ++ if (!config) ++ return; ++ sysroot = FcConfigGetSysRoot (config); + + list = FcConfigGetCacheDirs (config); + if (!list) +- return; ++ goto bail; + + while ((cache_dir = FcStrListNext (list))) + { +@@ -1992,6 +2033,8 @@ FcCacheCreateTagFile (const FcConfig *config) + if (d) + FcStrFree (d); + FcStrListDone (list); ++bail: ++ FcConfigDestroy (config); + } + + #define __fccache__ +diff --git a/src/fccfg.c b/src/fccfg.c +index 21ccd25..11dc876 100644 +--- a/src/fccfg.c ++++ b/src/fccfg.c +@@ -237,12 +237,12 @@ FcConfigUptoDate (FcConfig *config) + { + FcFileTime config_time, config_dir_time, font_time; + time_t now = time(0); ++ FcBool ret = FcTrue; ++ ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return FcFalse; +- } ++ return FcFalse; ++ + config_time = FcConfigNewestFile (config->configFiles); + config_dir_time = FcConfigNewestFile (config->configDirs); + font_time = FcConfigNewestFile (config->fontDirs); +@@ -258,13 +258,19 @@ FcConfigUptoDate (FcConfig *config) + fprintf (stderr, + "Fontconfig warning: Directory/file mtime in the future. New fonts may not be detected.\n"); + config->rescanTime = now; +- return FcTrue; ++ goto bail; + } + else +- return FcFalse; ++ { ++ ret = FcFalse; ++ goto bail; ++ } + } + config->rescanTime = now; +- return FcTrue; ++bail: ++ FcConfigDestroy (config); ++ ++ return ret; + } + + FcExpr * +@@ -291,11 +297,26 @@ FcConfigReference (FcConfig *config) + { + if (!config) + { +- config = FcConfigGetCurrent (); ++ /* Do not use FcConfigGetCurrent () for the purpose of obtaining current FcConfig here. ++ * because the reference counter must be increased before setting it to _fcConfig. ++ */ ++ retry: ++ config = fc_atomic_ptr_get (&_fcConfig); + if (!config) +- return 0; +- } ++ { ++ config = FcConfigCreate (); ++ FcRefInc (&config->ref); + ++ config = FcInitLoadOwnConfigAndFonts (config); ++ if (!fc_atomic_ptr_cmpexch (&_fcConfig, NULL, config)) ++ { ++ FcConfigDestroy (config); /* To decrease the refcount for the above one. */ ++ FcConfigDestroy (config); /* To destroy it actualy */ ++ goto retry; ++ } ++ return config; ++ } ++ } + FcRefInc (&config->ref); + + return config; +@@ -475,25 +496,32 @@ FcBool + FcConfigBuildFonts (FcConfig *config) + { + FcFontSet *fonts; ++ FcBool ret = FcTrue; + ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return FcFalse; +- } ++ return FcFalse; + + fonts = FcFontSetCreate (); + if (!fonts) +- return FcFalse; ++ { ++ ret = FcFalse; ++ goto bail; ++ } + + FcConfigSetFonts (config, fonts, FcSetSystem); + + if (!FcConfigAddDirList (config, FcSetSystem, config->fontDirs)) +- return FcFalse; ++ { ++ ret = FcFalse; ++ goto bail; ++ } + if (FcDebug () & FC_DBG_FONTSET) + FcFontSetPrint (fonts); +- return FcTrue; ++bail: ++ FcConfigDestroy (config); ++ ++ return ret; + } + + FcBool +@@ -537,13 +565,15 @@ FcConfigAddConfigDir (FcConfig *config, + FcStrList * + FcConfigGetConfigDirs (FcConfig *config) + { ++ FcStrList *ret; ++ ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; +- } +- return FcStrListCreate (config->configDirs); ++ return NULL; ++ ret = FcStrListCreate (config->configDirs); ++ FcConfigDestroy (config); ++ ++ return ret; + } + + FcBool +@@ -579,13 +609,15 @@ FcConfigResetFontDirs (FcConfig *config) + FcStrList * + FcConfigGetFontDirs (FcConfig *config) + { ++ FcStrList *ret; ++ ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; +- } +- return FcStrListCreate (config->fontDirs); ++ return NULL; ++ ret = FcStrListCreate (config->fontDirs); ++ FcConfigDestroy (config); ++ ++ return ret; + } + + static FcBool +@@ -670,15 +702,17 @@ FcConfigAddCacheDir (FcConfig *config, + } + + FcStrList * +-FcConfigGetCacheDirs (const FcConfig *config) ++FcConfigGetCacheDirs (FcConfig *config) + { ++ FcStrList *ret; ++ ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; +- } +- return FcStrListCreate (config->cacheDirs); ++ return NULL; ++ ret = FcStrListCreate (config->cacheDirs); ++ FcConfigDestroy (config); ++ ++ return ret; + } + + FcBool +@@ -699,13 +733,15 @@ FcConfigAddConfigFile (FcConfig *config, + FcStrList * + FcConfigGetConfigFiles (FcConfig *config) + { ++ FcStrList *ret; ++ ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; +- } +- return FcStrListCreate (config->configFiles); ++ return NULL; ++ ret = FcStrListCreate (config->configFiles); ++ FcConfigDestroy (config); ++ ++ return ret; + } + + FcChar8 * +@@ -784,25 +820,26 @@ FcConfigAddBlank (FcConfig *config FC_UNUSED, + int + FcConfigGetRescanInterval (FcConfig *config) + { ++ int ret; ++ ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; +- } +- return config->rescanInterval; ++ return 0; ++ ret = config->rescanInterval; ++ FcConfigDestroy (config); ++ ++ return ret; + } + + FcBool + FcConfigSetRescanInterval (FcConfig *config, int rescanInterval) + { ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return FcFalse; +- } ++ return FcFalse; + config->rescanInterval = rescanInterval; ++ FcConfigDestroy (config); ++ + return FcTrue; + } + +@@ -1670,15 +1707,13 @@ FcConfigSubstituteWithPat (FcConfig *config, + FcBool retval = FcTrue; + FcTest **tst = NULL; + +- if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return FcFalse; +- } +- + if (kind < FcMatchKindBegin || kind >= FcMatchKindEnd) + return FcFalse; ++ ++ config = FcConfigReference (config); ++ if (!config) ++ return FcFalse; ++ + s = config->subst[kind]; + if (kind == FcMatchPattern) + { +@@ -1973,6 +2008,7 @@ bail1: + free (value); + if (tst) + free (tst); ++ FcConfigDestroy (config); + + return retval; + } +@@ -2290,12 +2326,9 @@ FcConfigGetFilename (FcConfig *config, + FcChar8 *file, *dir, **path, **p; + const FcChar8 *sysroot; + ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return NULL; +- } ++ return NULL; + sysroot = FcConfigGetSysRoot (config); + if (!url || !*url) + { +@@ -2306,7 +2339,10 @@ FcConfigGetFilename (FcConfig *config, + file = 0; + + if (FcStrIsAbsoluteFilename(url)) +- return FcConfigFileExists (sysroot, url); ++ { ++ file = FcConfigFileExists (sysroot, url); ++ goto bail; ++ } + + if (*url == '~') + { +@@ -2330,7 +2366,10 @@ FcConfigGetFilename (FcConfig *config, + { + path = FcConfigGetPath (); + if (!path) +- return NULL; ++ { ++ file = NULL; ++ goto bail; ++ } + for (p = path; *p; p++) + { + FcChar8 *s; +@@ -2347,6 +2386,9 @@ FcConfigGetFilename (FcConfig *config, + } + FcConfigFreePath (path); + } ++bail: ++ FcConfigDestroy (config); ++ + return file; + } + +@@ -2409,17 +2451,18 @@ FcConfigAppFontAddFile (FcConfig *config, + FcStrSet *subdirs; + FcStrList *sublist; + FcChar8 *subdir; ++ FcBool ret = FcTrue; + ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return FcFalse; +- } ++ return FcFalse; + + subdirs = FcStrSetCreateEx (FCSS_GROW_BY_64); + if (!subdirs) +- return FcFalse; ++ { ++ ret = FcFalse; ++ goto bail; ++ } + + set = FcConfigGetFonts (config, FcSetApplication); + if (!set) +@@ -2428,7 +2471,8 @@ FcConfigAppFontAddFile (FcConfig *config, + if (!set) + { + FcStrSetDestroy (subdirs); +- return FcFalse; ++ ret = FcFalse; ++ goto bail; + } + FcConfigSetFonts (config, set, FcSetApplication); + } +@@ -2436,7 +2480,8 @@ FcConfigAppFontAddFile (FcConfig *config, + if (!FcFileScanConfig (set, subdirs, file, config)) + { + FcStrSetDestroy (subdirs); +- return FcFalse; ++ ret = FcFalse; ++ goto bail; + } + if ((sublist = FcStrListCreate (subdirs))) + { +@@ -2447,7 +2492,10 @@ FcConfigAppFontAddFile (FcConfig *config, + FcStrListDone (sublist); + } + FcStrSetDestroy (subdirs); +- return FcTrue; ++bail: ++ FcConfigDestroy (config); ++ ++ return ret; + } + + FcBool +@@ -2456,17 +2504,18 @@ FcConfigAppFontAddDir (FcConfig *config, + { + FcFontSet *set; + FcStrSet *dirs; ++ FcBool ret = FcTrue; + ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return FcFalse; +- } ++ return FcFalse; + + dirs = FcStrSetCreateEx (FCSS_GROW_BY_64); + if (!dirs) +- return FcFalse; ++ { ++ ret = FcFalse; ++ goto bail; ++ } + + set = FcConfigGetFonts (config, FcSetApplication); + if (!set) +@@ -2475,7 +2524,8 @@ FcConfigAppFontAddDir (FcConfig *config, + if (!set) + { + FcStrSetDestroy (dirs); +- return FcFalse; ++ ret = FcFalse; ++ goto bail; + } + FcConfigSetFonts (config, set, FcSetApplication); + } +@@ -2485,23 +2535,26 @@ FcConfigAppFontAddDir (FcConfig *config, + if (!FcConfigAddDirList (config, FcSetApplication, dirs)) + { + FcStrSetDestroy (dirs); +- return FcFalse; ++ ret = FcFalse; ++ goto bail; + } + FcStrSetDestroy (dirs); +- return FcTrue; ++bail: ++ FcConfigDestroy (config); ++ ++ return ret; + } + + void + FcConfigAppFontClear (FcConfig *config) + { ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return; +- } ++ return; + + FcConfigSetFonts (config, 0, FcSetApplication); ++ ++ FcConfigDestroy (config); + } + + /* +diff --git a/src/fcdir.c b/src/fcdir.c +index 7d7b23c..693c845 100644 +--- a/src/fcdir.c ++++ b/src/fcdir.c +@@ -167,7 +167,16 @@ FcFileScan (FcFontSet *set, + const FcChar8 *file, + FcBool force FC_UNUSED) + { +- return FcFileScanConfig (set, dirs, file, FcConfigGetCurrent ()); ++ FcConfig *config; ++ FcBool ret; ++ ++ config = FcConfigReference (NULL); ++ if (!config) ++ return FcFalse; ++ ret = FcFileScanConfig (set, dirs, file, config); ++ FcConfigDestroy (config); ++ ++ return ret; + } + + /* +@@ -271,10 +280,19 @@ FcDirScan (FcFontSet *set, + const FcChar8 *dir, + FcBool force FC_UNUSED) + { ++ FcConfig *config; ++ FcBool ret; ++ + if (cache || !force) + return FcFalse; + +- return FcDirScanConfig (set, dirs, dir, force, FcConfigGetCurrent ()); ++ config = FcConfigReference (NULL); ++ if (!config) ++ return FcFalse; ++ ret = FcDirScanConfig (set, dirs, dir, force, config); ++ FcConfigDestroy (config); ++ ++ return ret; + } + + /* +@@ -353,12 +371,16 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) + FcCache *new = NULL; + struct stat dir_stat; + FcStrSet *dirs; +- const FcChar8 *sysroot = FcConfigGetSysRoot (config); ++ const FcChar8 *sysroot; + FcChar8 *d = NULL; + #ifndef _WIN32 + int fd = -1; + #endif + ++ config = FcConfigReference (config); ++ if (!config) ++ return NULL; ++ sysroot = FcConfigGetSysRoot (config); + cache = FcDirCacheLoad (dir, config, NULL); + if (!cache) + goto bail; +@@ -401,6 +423,7 @@ bail1: + bail: + if (d) + FcStrFree (d); ++ FcConfigDestroy (config); + + return new; + } +@@ -413,6 +436,7 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) + { + FcCache *cache = NULL; + ++ config = FcConfigReference (config); + /* Try to use existing cache file */ + if (!force) + cache = FcDirCacheLoad (dir, config, NULL); +@@ -420,6 +444,7 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) + /* Not using existing cache file, construct new cache */ + if (!cache) + cache = FcDirCacheScan (dir, config); ++ FcConfigDestroy (config); + + return cache; + } +diff --git a/src/fcinit.c b/src/fcinit.c +index 5831a19..6f82ebd 100644 +--- a/src/fcinit.c ++++ b/src/fcinit.c +@@ -229,7 +229,8 @@ FcInitReinitialize (void) + FcBool + FcInitBringUptoDate (void) + { +- FcConfig *config = FcConfigGetCurrent (); ++ FcConfig *config = FcConfigReference (NULL); ++ FcBool ret = FcTrue; + time_t now; + + if (!config) +@@ -238,19 +239,23 @@ FcInitBringUptoDate (void) + * rescanInterval == 0 disables automatic up to date + */ + if (config->rescanInterval == 0) +- return FcTrue; ++ goto bail; + /* + * Check no more often than rescanInterval seconds + */ + now = time (0); + if (config->rescanTime + config->rescanInterval - now > 0) +- return FcTrue; ++ goto bail; + /* + * If up to date, don't reload configuration + */ + if (FcConfigUptoDate (0)) +- return FcTrue; +- return FcInitReinitialize (); ++ goto bail; ++ ret = FcInitReinitialize (); ++bail: ++ FcConfigDestroy (config); ++ ++ return ret; + } + + #define __fcinit__ +diff --git a/src/fclist.c b/src/fclist.c +index 494bdea..053803b 100644 +--- a/src/fclist.c ++++ b/src/fclist.c +@@ -491,11 +491,10 @@ FcFontSetList (FcConfig *config, + { + if (!FcInitBringUptoDate ()) + goto bail0; +- +- config = FcConfigGetCurrent (); +- if (!config) +- goto bail0; + } ++ config = FcConfigReference (config); ++ if (!config) ++ goto bail0; + FcListHashTableInit (&table); + + if (!os) +@@ -558,7 +557,7 @@ FcFontSetList (FcConfig *config, + */ + ret = FcFontSetCreate (); + if (!ret) +- goto bail0; ++ goto bail1; + for (i = 0; i < FC_LIST_HASH_SIZE; i++) + while ((bucket = table.buckets[i])) + { +@@ -570,6 +569,7 @@ FcFontSetList (FcConfig *config, + + if (destroy_os) + FcObjectSetDestroy (os); ++ FcConfigDestroy (config); + + return ret; + +@@ -577,6 +577,7 @@ bail2: + FcFontSetDestroy (ret); + bail1: + FcListHashTableCleanup (&table); ++ FcConfigDestroy (config); + bail0: + if (destroy_os) + FcObjectSetDestroy (os); +@@ -588,24 +589,26 @@ FcFontList (FcConfig *config, + FcPattern *p, + FcObjectSet *os) + { +- FcFontSet *sets[2]; ++ FcFontSet *sets[2], *ret; + int nsets; + + if (!config) + { + if (!FcInitBringUptoDate ()) + return 0; +- +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; + } ++ config = FcConfigReference (config); ++ if (!config) ++ return NULL; + nsets = 0; + if (config->fonts[FcSetSystem]) + sets[nsets++] = config->fonts[FcSetSystem]; + if (config->fonts[FcSetApplication]) + sets[nsets++] = config->fonts[FcSetApplication]; +- return FcFontSetList (config, sets, nsets, p, os); ++ ret = FcFontSetList (config, sets, nsets, p, os); ++ FcConfigDestroy (config); ++ ++ return ret; + } + #define __fclist__ + #include "fcaliastail.h" +diff --git a/src/fcmatch.c b/src/fcmatch.c +index 78bcf7b..3bc352b 100644 +--- a/src/fcmatch.c ++++ b/src/fcmatch.c +@@ -845,7 +845,7 @@ FcFontSetMatch (FcConfig *config, + FcPattern *p, + FcResult *result) + { +- FcPattern *best; ++ FcPattern *best, *ret = NULL; + + assert (sets != NULL); + assert (p != NULL); +@@ -853,17 +853,16 @@ FcFontSetMatch (FcConfig *config, + + *result = FcResultNoMatch; + ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; +- } ++ return NULL; + best = FcFontSetMatchInternal (sets, nsets, p, result); + if (best) +- return FcFontRenderPrepare (config, p, best); +- else +- return NULL; ++ ret = FcFontRenderPrepare (config, p, best); ++ ++ FcConfigDestroy (config); ++ ++ return ret; + } + + FcPattern * +@@ -873,19 +872,16 @@ FcFontMatch (FcConfig *config, + { + FcFontSet *sets[2]; + int nsets; +- FcPattern *best; ++ FcPattern *best, *ret = NULL; + + assert (p != NULL); + assert (result != NULL); + + *result = FcResultNoMatch; + ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; +- } ++ return NULL; + nsets = 0; + if (config->fonts[FcSetSystem]) + sets[nsets++] = config->fonts[FcSetSystem]; +@@ -894,9 +890,11 @@ FcFontMatch (FcConfig *config, + + best = FcFontSetMatchInternal (sets, nsets, p, result); + if (best) +- return FcFontRenderPrepare (config, p, best); +- else +- return NULL; ++ ret = FcFontRenderPrepare (config, p, best); ++ ++ FcConfigDestroy (config); ++ ++ return ret; + } + + typedef struct _FcSortNode { +@@ -1183,7 +1181,7 @@ FcFontSort (FcConfig *config, + FcCharSet **csp, + FcResult *result) + { +- FcFontSet *sets[2]; ++ FcFontSet *sets[2], *ret; + int nsets; + + assert (p != NULL); +@@ -1191,18 +1189,18 @@ FcFontSort (FcConfig *config, + + *result = FcResultNoMatch; + ++ config = FcConfigReference (config); + if (!config) +- { +- config = FcConfigGetCurrent (); +- if (!config) +- return 0; +- } ++ return NULL; + nsets = 0; + if (config->fonts[FcSetSystem]) + sets[nsets++] = config->fonts[FcSetSystem]; + if (config->fonts[FcSetApplication]) + sets[nsets++] = config->fonts[FcSetApplication]; +- return FcFontSetSort (config, sets, nsets, p, trim, csp, result); ++ ret = FcFontSetSort (config, sets, nsets, p, trim, csp, result); ++ FcConfigDestroy (config); ++ ++ return ret; + } + #define __fcmatch__ + #include "fcaliastail.h" +diff --git a/test/Makefile.am b/test/Makefile.am +index e44aa0b..aae45cb 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -42,6 +42,11 @@ test_pthread_LDADD = $(top_builddir)/src/libfontconfig.la + # We don't enable this test by default because it will require config and fonts + # to meaningfully test anything, and we are not installed yet. + #TESTS += test-pthread ++ ++check_PROGRAMS += test-crbug1004254 ++test_crbug1004254_LDADD = $(top_builddir)/src/libfontconfig.la ++# Disabling this for the same reason as above but trying to run in run-test.sh. ++#TESTS += test-crbug1004254 + endif + check_PROGRAMS += test-bz89617 + test_bz89617_CFLAGS = \ +diff --git a/test/run-test.sh b/test/run-test.sh +index 8ad09e3..e1ee6d0 100644 +--- a/test/run-test.sh ++++ b/test/run-test.sh +@@ -20,6 +20,8 @@ + # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + # PERFORMANCE OF THIS SOFTWARE. ++set -e ++ + case "$OSTYPE" in + msys ) MyPWD=`pwd -W` ;; # On Msys/MinGW, returns a MS Windows style path. + * ) MyPWD=`pwd` ;; # On any other platforms, returns a Unix style path. +@@ -408,4 +410,17 @@ rm -rf $MYCACHEBASEDIR $MYCONFIG my-fonts.conf my-out my-out.expected + + fi # if [ "x$EXEEXT" = "x" ] + ++if [ -x $BUILDTESTDIR/test-crbug1004254 ]; then ++ dotest "MT-safe global config" ++ prep ++ curl -s -o $FONTDIR/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip ++ (cd $FONTDIR; unzip noto.zip) ++ if [ -n ${SOURCE_DATE_EPOCH:-} ] && [ ${#SOURCE_DATE_EPOCH} -gt 0 ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++ fi ++ $BUILDTESTDIR/test-crbug1004254 ++else ++ echo "No test-crbug1004254: skipped" ++fi ++ + rm -rf $FONTDIR $CACHEFILE $CACHEDIR $BASEDIR $FONTCONFIG_FILE out +diff --git a/test/test-crbug1004254.c b/test/test-crbug1004254.c +new file mode 100644 +index 0000000..1cc6fc7 +--- /dev/null ++++ b/test/test-crbug1004254.c +@@ -0,0 +1,116 @@ ++/* ++ * fontconfig/test/test-pthread.c ++ * ++ * Copyright © 2000 Keith Packard ++ * Copyright © 2013 Raimund Steger ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of the author(s) not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. The authors make no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++#include ++#include ++#include ++#include ++#include ++ ++struct thr_arg_s ++{ ++ int thr_num; ++}; ++ ++static void ++run_query (void) ++{ ++ FcPattern *pat = FcPatternCreate (), *match; ++ FcResult result; ++ ++ FcPatternAddString (pat, FC_FAMILY, "sans-serif"); ++ FcPatternAddBool (pat, FC_SCALABLE, FcTrue); ++ FcConfigSubstitute (NULL, pat, FcMatchPattern); ++ FcDefaultSubstitute (pat); ++ match = FcFontMatch (NULL, pat, &result); ++ if (result != FcResultMatch || !match) ++ { ++ fprintf (stderr, "ERROR: No matches found\n"); ++ } ++ if (match) ++ FcPatternDestroy (match); ++ FcPatternDestroy (pat); ++} ++ ++static void ++run_reinit (void) ++{ ++ if (!FcInitReinitialize ()) ++ { ++ fprintf (stderr, "ERROR: Reinitializing failed\n"); ++ } ++} ++ ++#define NTEST 3000 ++ ++static void * ++run_test_in_thread (void *arg) ++{ ++ struct thr_arg_s *thr_arg = (struct thr_arg_s *) arg; ++ int thread_num = thr_arg->thr_num; ++ ++ fprintf (stderr, "Worker %d: started (round %d)\n", thread_num % 2, thread_num / 2); ++ if ((thread_num % 2) == 0) ++ { ++ run_query (); ++ } ++ else ++ { ++ run_reinit (); ++ } ++ fprintf (stderr, "Worker %d: done (round %d)\n", thread_num % 2, thread_num / 2); ++ ++ return NULL; ++} ++ ++int ++main (int argc, char **argv) ++{ ++ pthread_t threads[NTEST]; ++ struct thr_arg_s thr_arg[NTEST]; ++ int i, j; ++ ++ for (i = 0; i < NTEST; i++) ++ { ++ int result; ++ ++ fprintf (stderr, "Thread %d (worker %d round %d): creating\n", i, i % 2, i / 2); ++ thr_arg[i].thr_num = i; ++ result = pthread_create (&threads[i], NULL, run_test_in_thread, ++ (void *) &thr_arg[i]); ++ if (result != 0) ++ { ++ fprintf (stderr, "Cannot create thread %d\n", i); ++ break; ++ } ++ } ++ for (j = 0; j < i; j++) ++ { ++ pthread_join(threads[j], NULL); ++ fprintf (stderr, "Joined thread %d\n", j); ++ } ++ FcFini (); ++ ++ return 0; ++} +-- +2.24.1 + +From aa8c8cfa9fb2563482336249e3f56459099fcf6e Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Sat, 2 Nov 2019 00:14:48 +0900 +Subject: [PATCH 4/9] Fix potential race condition in FcConfigSetCurrent and + FcConfigReference + +--- + src/fccache.c | 2 + + src/fccfg.c | 105 ++++++++++++++++++++++++++++++++++++++++++-------- + 2 files changed, 90 insertions(+), 17 deletions(-) + +diff --git a/src/fccache.c b/src/fccache.c +index d8f1dab..4744a84 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -1085,6 +1085,8 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat) + if (fd < 0) + return NULL; + config = FcConfigReference (NULL); ++ if (!config) ++ return NULL; + cache = FcDirCacheMapFd (config, fd, file_stat, NULL); + FcConfigDestroy (config); + close (fd); +diff --git a/src/fccfg.c b/src/fccfg.c +index 11dc876..30f37af 100644 +--- a/src/fccfg.c ++++ b/src/fccfg.c +@@ -33,6 +33,49 @@ + #endif + + static FcConfig *_fcConfig; /* MT-safe */ ++static FcMutex *_lock; ++ ++static void ++lock_config (void) ++{ ++ FcMutex *lock; ++retry: ++ lock = fc_atomic_ptr_get (&_lock); ++ if (!lock) ++ { ++ lock = (FcMutex *) malloc (sizeof (FcMutex)); ++ FcMutexInit (lock); ++ if (!fc_atomic_ptr_cmpexch (&_lock, NULL, lock)) ++ { ++ FcMutexFinish (lock); ++ goto retry; ++ } ++ FcMutexLock (lock); ++ /* Initialize random state */ ++ FcRandom (); ++ return; ++ } ++ FcMutexLock (lock); ++} ++ ++static void ++unlock_config (void) ++{ ++ FcMutexUnlock (_lock); ++} ++ ++static void ++free_lock (void) ++{ ++ FcMutex *lock; ++ ++ lock = fc_atomic_ptr_get (&_lock); ++ if (lock && fc_atomic_ptr_cmpexch (&_lock, lock, NULL)) ++ { ++ FcMutexFinish (lock); ++ free (lock); ++ } ++} + + static FcConfig * + FcConfigEnsure (void) +@@ -44,8 +87,9 @@ retry: + { + config = FcInitLoadConfigAndFonts (); + +- if (!fc_atomic_ptr_cmpexch (&_fcConfig, NULL, config)) { +- FcConfigDestroy (config); ++ if (!config || !fc_atomic_ptr_cmpexch (&_fcConfig, NULL, config)) { ++ if (config) ++ FcConfigDestroy (config); + goto retry; + } + } +@@ -76,6 +120,7 @@ FcConfigFini (void) + FcConfig *cfg = fc_atomic_ptr_get (&_fcConfig); + if (cfg && fc_atomic_ptr_cmpexch (&_fcConfig, cfg, NULL)) + FcConfigDestroy (cfg); ++ free_lock (); + } + + static FcChar8 * +@@ -297,27 +342,31 @@ FcConfigReference (FcConfig *config) + { + if (!config) + { +- /* Do not use FcConfigGetCurrent () for the purpose of obtaining current FcConfig here. +- * because the reference counter must be increased before setting it to _fcConfig. ++ /* lock during obtaining the value from _fcConfig and count up refcount there, ++ * there are the race between them. + */ ++ lock_config (); + retry: + config = fc_atomic_ptr_get (&_fcConfig); + if (!config) + { +- config = FcConfigCreate (); +- FcRefInc (&config->ref); ++ unlock_config (); + +- config = FcInitLoadOwnConfigAndFonts (config); ++ config = FcInitLoadConfigAndFonts (); ++ if (!config) ++ goto retry; ++ lock_config (); + if (!fc_atomic_ptr_cmpexch (&_fcConfig, NULL, config)) + { +- FcConfigDestroy (config); /* To decrease the refcount for the above one. */ +- FcConfigDestroy (config); /* To destroy it actualy */ ++ FcConfigDestroy (config); + goto retry; + } +- return config; + } ++ FcRefInc (&config->ref); ++ unlock_config (); + } +- FcRefInc (&config->ref); ++ else ++ FcRefInc (&config->ref); + + return config; + } +@@ -529,20 +578,29 @@ FcConfigSetCurrent (FcConfig *config) + { + FcConfig *cfg; + ++ if (config) ++ { ++ if (!config->fonts[FcSetSystem]) ++ if (!FcConfigBuildFonts (config)) ++ return FcFalse; ++ FcRefInc (&config->ref); ++ } ++ ++ lock_config (); + retry: + cfg = fc_atomic_ptr_get (&_fcConfig); + + if (config == cfg) ++ { ++ unlock_config (); ++ if (config) ++ FcConfigDestroy (config); + return FcTrue; +- +- if (config && !config->fonts[FcSetSystem]) +- if (!FcConfigBuildFonts (config)) +- return FcFalse; ++ } + + if (!fc_atomic_ptr_cmpexch (&_fcConfig, cfg, config)) + goto retry; +- +- FcConfigReference (config); ++ unlock_config (); + if (cfg) + FcConfigDestroy (cfg); + +@@ -2649,7 +2707,9 @@ FcConfigSetSysRoot (FcConfig *config, + { + FcChar8 *s = NULL; + FcBool init = FcFalse; ++ int nretry = 3; + ++retry: + if (!config) + { + /* We can't use FcConfigGetCurrent() here to ensure +@@ -2681,6 +2741,17 @@ FcConfigSetSysRoot (FcConfig *config, + if (init) + { + config = FcInitLoadOwnConfigAndFonts (config); ++ if (!config) ++ { ++ /* Something failed. this is usually unlikely. so retrying */ ++ init = FcFalse; ++ if (--nretry == 0) ++ { ++ fprintf (stderr, "Fontconfig warning: Unable to initialize config and retry limit exceeded. sysroot functionality may not work as expected.\n"); ++ return; ++ } ++ goto retry; ++ } + FcConfigSetCurrent (config); + /* FcConfigSetCurrent() increases the refcount. + * decrease it here to avoid the memory leak. +-- +2.24.1 + diff --git a/fontconfig-read-latest-cache.patch b/fontconfig-read-latest-cache.patch new file mode 100644 index 0000000..8b70dc0 --- /dev/null +++ b/fontconfig-read-latest-cache.patch @@ -0,0 +1,228 @@ +From c9862b6ea7c3234b29f6500c7d07359847e55ed7 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Mon, 28 Oct 2019 17:11:38 +0900 +Subject: [PATCH 1/9] Read latest cache in paths + +Right now fontconfig uses a cache found first in a path and +cachedirs are the order of the system-wide path and then the user path. +this is due to avoid writing caches into the user path when running as root. + +However, changing caches by certain config only, e.g. using +may not take effect by this behavior, because it may be stored into the user path. + +Thus, needing to find the latest cache out from paths. + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/182 +--- + src/fccache.c | 36 +++++++++++++++++++++----- + test/run-test.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 96 insertions(+), 6 deletions(-) + +diff --git a/src/fccache.c b/src/fccache.c +index 0976201..4acde22 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -338,7 +338,7 @@ FcDirCacheOpenFile (const FcChar8 *cache_file, struct stat *file_stat) + static FcBool + FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + FcBool (*callback) (FcConfig *config, int fd, struct stat *fd_stat, +- struct stat *dir_stat, void *closure), ++ struct stat *dir_stat, struct timeval *cache_mtime, void *closure), + void *closure, FcChar8 **cache_file_ret) + { + int fd = -1; +@@ -348,6 +348,7 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + struct stat file_stat, dir_stat; + FcBool ret = FcFalse; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); ++ struct timeval latest_mtime = (struct timeval){ 0 }; + + if (sysroot) + d = FcStrBuildFilename (sysroot, dir, NULL); +@@ -383,15 +384,18 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + #endif + fd = FcDirCacheOpenFile (cache_hashed, &file_stat); + if (fd >= 0) { +- ret = (*callback) (config, fd, &file_stat, &dir_stat, closure); ++ ret = (*callback) (config, fd, &file_stat, &dir_stat, &latest_mtime, closure); + close (fd); + if (ret) + { + if (cache_file_ret) ++ { ++ if (*cache_file_ret) ++ FcStrFree (*cache_file_ret); + *cache_file_ret = cache_hashed; ++ } + else + FcStrFree (cache_hashed); +- break; + } + } + #ifndef _WIN32 +@@ -414,7 +418,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + } + } + #endif +- FcStrFree (cache_hashed); ++ else ++ FcStrFree (cache_hashed); + } + FcStrListDone (list); + +@@ -998,12 +1003,31 @@ FcDirCacheUnload (FcCache *cache) + } + + static FcBool +-FcDirCacheMapHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure) ++FcDirCacheMapHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure) + { + FcCache *cache = FcDirCacheMapFd (config, fd, fd_stat, dir_stat); ++ struct timeval cache_mtime; + + if (!cache) + return FcFalse; ++ cache_mtime.tv_sec = fd_stat->st_mtime; ++#ifdef HAVE_STRUCT_STAT_ST_MTIM ++ cache_mtime.tv_usec = fd_stat->st_mtim.tv_nsec / 1000; ++#else ++ cache_mtime.tv_usec = 0; ++#endif ++ if (timercmp (latest_cache_mtime, &cache_mtime, <)) ++ { ++ if (*((FcCache **) closure)) ++ FcDirCacheUnload (*((FcCache **) closure)); ++ } ++ else ++ { ++ FcDirCacheUnload (cache); ++ return FcFalse; ++ } ++ latest_cache_mtime->tv_sec = cache_mtime.tv_sec; ++ latest_cache_mtime->tv_usec = cache_mtime.tv_usec; + *((FcCache **) closure) = cache; + return FcTrue; + } +@@ -1093,7 +1117,7 @@ FcDirChecksumNano (struct stat *statb) + * the magic number and the size field + */ + static FcBool +-FcDirCacheValidateHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure FC_UNUSED) ++FcDirCacheValidateHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure FC_UNUSED) + { + FcBool ret = FcTrue; + FcCache c; +diff --git a/test/run-test.sh b/test/run-test.sh +index 4e5968b..8ad09e3 100644 +--- a/test/run-test.sh ++++ b/test/run-test.sh +@@ -340,6 +340,72 @@ fi + + rm -rf $MyPWD/sysroot + ++dotest "read newer caches when multiple places are allowed to store" ++prep ++cp $FONT1 $FONT2 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ] && [ ${#SOURCE_DATE_EPOCH} -gt 0 ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi ++MYCACHEBASEDIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` ++MYCACHEDIR=$MYCACHEBASEDIR/cache.dir ++MYOWNCACHEDIR=$MYCACHEBASEDIR/owncache.dir ++MYCONFIG=`mktemp /tmp/fontconfig.XXXXXXXX` ++ ++mkdir -p $MYCACHEDIR ++mkdir -p $MYOWNCACHEDIR ++ ++sed "s!@FONTDIR@!$FONTDIR! ++s!@REMAPDIR@!! ++s!@CACHEDIR@!$MYCACHEDIR!" < $TESTDIR/fonts.conf.in > my-fonts.conf ++ ++FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCCACHE $FONTDIR ++ ++sleep 1 ++cat<$MYCONFIG ++ ++ ++ $FONTDIR/4x6.pcf ++ 8 ++ ++ ++EOF ++sed "s!@FONTDIR@!$FONTDIR! ++s!@REMAPDIR@!$MYCONFIG! ++s!@CACHEDIR@!$MYOWNCACHEDIR!" < $TESTDIR/fonts.conf.in > my-fonts.conf ++ ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ old_epoch=${SOURCE_DATE_EPOCH} ++ SOURCE_DATE_EPOCH=`expr $SOURCE_DATE_EPOCH + 1` ++fi ++FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCCACHE -f $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ SOURCE_DATE_EPOCH=${old_epoch} ++fi ++ ++sed "s!@FONTDIR@!$FONTDIR! ++s!@REMAPDIR@!$MYCONFIG! ++s!@CACHEDIR@!$MYCACHEDIR$MYOWNCACHEDIR!" < $TESTDIR/fonts.conf.in > my-fonts.conf ++ ++FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCLIST - family pixelsize | sort > my-out ++echo "=" >> my-out ++FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCLIST - family pixelsize | sort >> my-out ++echo "=" >> my-out ++FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCLIST - family pixelsize | sort >> my-out ++tr -d '\015' my-out.tmp; mv my-out.tmp my-out ++sed -e 's/pixelsize=6/pixelsize=8/g' $BUILDTESTDIR/$EXPECTED > my-out.expected ++ ++if cmp my-out my-out.expected > /dev/null ; then : ; else ++ echo "*** Test failed: $TEST" ++ echo "*** output is in 'my-out', expected output in 'my-out.expected'" ++ echo "Actual Result" ++ cat my-out ++ echo "Expected Result" ++ cat my-out.expected ++ exit 1 ++fi ++ ++rm -rf $MYCACHEBASEDIR $MYCONFIG my-fonts.conf my-out my-out.expected ++ + fi # if [ "x$EXEEXT" = "x" ] + + rm -rf $FONTDIR $CACHEFILE $CACHEDIR $BASEDIR $FONTCONFIG_FILE out +-- +2.24.1 + +From a45fc8a33256d9d3ea0ea7947f33c8e5e3cc7238 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 31 Oct 2019 16:15:25 +0900 +Subject: [PATCH 2/9] Fix a memory leak caused by the previous commit + +--- + src/fccache.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/fccache.c b/src/fccache.c +index 4acde22..c565560 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -397,6 +397,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + else + FcStrFree (cache_hashed); + } ++ else ++ FcStrFree (cache_hashed); + } + #ifndef _WIN32 + else if (!retried) +@@ -416,6 +418,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + break; + goto retry; + } ++ else ++ FcStrFree (cache_hashed); + } + #endif + else +-- +2.24.1 + diff --git a/fontconfig.spec b/fontconfig.spec index a6fd7eb..40fdaf9 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.92 -Release: 5%{?dist} +Release: 6%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -22,6 +22,8 @@ Patch1: %{name}-required-freetype-version.patch Patch2: %{name}-score-hint-on-match.patch Patch3: %{name}-fix-1744377.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch +Patch5: %{name}-read-latest-cache.patch +Patch6: %{name}-mt.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -162,6 +164,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jan 30 2020 Akira TAGOH - 2.13.92-6 +- Fix reading the outdated caches. +- Apply a patch to make it MT-safe more. + * Tue Jan 28 2020 Fedora Release Engineering - 2.13.92-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 3422a4a3579402aabc0a2ecd846e0d76d6b58bd5 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 30 Jan 2020 19:06:49 +0900 Subject: [PATCH 086/154] Fix some wrong behavior with sysroot option. Fix reading the outdated caches. Apply a patch to make it MT-safe more. --- fontconfig-sysroot.patch | 285 +++++++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 +- 2 files changed, 289 insertions(+), 2 deletions(-) create mode 100644 fontconfig-sysroot.patch diff --git a/fontconfig-sysroot.patch b/fontconfig-sysroot.patch new file mode 100644 index 0000000..9505f97 --- /dev/null +++ b/fontconfig-sysroot.patch @@ -0,0 +1,285 @@ +From cd51cb241aad7b362b793200ca7d42595c14f52b Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Mon, 21 Oct 2019 16:17:42 +0900 +Subject: [PATCH] Take effect sysroot functionality to the default config file + +When loading the default config file with FONTCONFIG_SYSROOT, +it fails if no /etc/fonts/fonts.conf is available, even if it is +there where is based on sysroot. + +To address this, FcConfig is required to determine the sysroot. +therefore, this change makes FcConfigFilename() deprecated, +use FcConfigGetFilename() instead. + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/181 +--- + doc/fcconfig.fncs | 11 +++++++ + fontconfig/fontconfig.h | 4 +++ + src/fccfg.c | 67 ++++++++++++++++++++++++++++------------- + src/fcxml.c | 24 ++++++++++++--- + 4 files changed, 81 insertions(+), 25 deletions(-) + +diff --git a/doc/fcconfig.fncs b/doc/fcconfig.fncs +index 5f1ef43..82769d5 100644 +--- a/doc/fcconfig.fncs ++++ b/doc/fcconfig.fncs +@@ -344,6 +344,15 @@ to be up to date, and used. + @TYPE1@ const FcChar8 * @ARG1@ name + @PURPOSE@ Find a config file + @DESC@ ++This function is deprecated and is replaced by FcConfigGetFilename. ++@@ ++ ++@RET@ FcChar8 * ++@FUNC@ FcConfigGetFilename ++@TYPE1@ FcConfig * @ARG1@ config ++@TYPE2@ const FcChar8 * @ARG2@ name ++@PURPOSE@ Find a config file ++@DESC@ + Given the specified external entity name, return the associated filename. + This provides applications a way to convert various configuration file + references into filename form. +@@ -355,6 +364,8 @@ refers to a file in the current users home directory. Otherwise if the name + doesn't start with '/', it refers to a file in the default configuration + directory; the built-in default directory can be overridden with the + FONTCONFIG_PATH environment variable. ++ ++The result of this function is affected by the FONTCONFIG_SYSROOT environment variable or equivalent functionality. + @@ + + @RET@ FcBool +diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h +index 9586616..2f0e8cf 100644 +--- a/fontconfig/fontconfig.h ++++ b/fontconfig/fontconfig.h +@@ -393,6 +393,10 @@ FcConfigHome (void); + FcPublic FcBool + FcConfigEnableHome (FcBool enable); + ++FcPublic FcChar8 * ++FcConfigGetFilename (FcConfig *config, ++ const FcChar8 *url); ++ + FcPublic FcChar8 * + FcConfigFilename (const FcChar8 *url); + +diff --git a/src/fccfg.c b/src/fccfg.c +index e81eeba..21ccd25 100644 +--- a/src/fccfg.c ++++ b/src/fccfg.c +@@ -686,7 +686,7 @@ FcConfigAddConfigFile (FcConfig *config, + const FcChar8 *f) + { + FcBool ret; +- FcChar8 *file = FcConfigFilename (f); ++ FcChar8 *file = FcConfigGetFilename (config, f); + + if (!file) + return FcFalse; +@@ -2284,10 +2284,19 @@ FcConfigEnableHome (FcBool enable) + } + + FcChar8 * +-FcConfigFilename (const FcChar8 *url) ++FcConfigGetFilename (FcConfig *config, ++ const FcChar8 *url) + { + FcChar8 *file, *dir, **path, **p; ++ const FcChar8 *sysroot; + ++ if (!config) ++ { ++ config = FcConfigGetCurrent (); ++ if (!config) ++ return NULL; ++ } ++ sysroot = FcConfigGetSysRoot (config); + if (!url || !*url) + { + url = (FcChar8 *) getenv ("FONTCONFIG_FILE"); +@@ -2297,13 +2306,23 @@ FcConfigFilename (const FcChar8 *url) + file = 0; + + if (FcStrIsAbsoluteFilename(url)) +- return FcConfigFileExists (0, url); ++ return FcConfigFileExists (sysroot, url); + + if (*url == '~') + { + dir = FcConfigHome (); + if (dir) +- file = FcConfigFileExists (dir, url + 1); ++ { ++ FcChar8 *s; ++ ++ if (sysroot) ++ s = FcStrBuildFilename (sysroot, dir, NULL); ++ else ++ s = dir; ++ file = FcConfigFileExists (s, url + 1); ++ if (sysroot) ++ FcStrFree (s); ++ } + else + file = 0; + } +@@ -2314,7 +2333,15 @@ FcConfigFilename (const FcChar8 *url) + return NULL; + for (p = path; *p; p++) + { +- file = FcConfigFileExists (*p, url); ++ FcChar8 *s; ++ ++ if (sysroot) ++ s = FcStrBuildFilename (sysroot, *p, NULL); ++ else ++ s = *p; ++ file = FcConfigFileExists (s, url); ++ if (sysroot) ++ FcStrFree (s); + if (file) + break; + } +@@ -2323,33 +2350,31 @@ FcConfigFilename (const FcChar8 *url) + return file; + } + ++FcChar8 * ++FcConfigFilename (const FcChar8 *url) ++{ ++ return FcConfigGetFilename (NULL, url); ++} ++ + FcChar8 * + FcConfigRealFilename (FcConfig *config, + const FcChar8 *url) + { +- const FcChar8 *sysroot = FcConfigGetSysRoot (config); +- FcChar8 *n = FcConfigFilename (url); +- FcChar8 *nn = NULL; ++ FcChar8 *n = FcConfigGetFilename (config, url); + + if (n) + { + FcChar8 buf[FC_PATH_MAX]; + ssize_t len; + +- if (sysroot) +- nn = FcStrBuildFilename (sysroot, n, NULL); +- else +- nn = FcStrdup (n); +- FcStrFree (n); +- +- if ((len = FcReadLink (nn, buf, sizeof (buf) - 1)) != -1) ++ if ((len = FcReadLink (n, buf, sizeof (buf) - 1)) != -1) + { + buf[len] = 0; + + if (!FcStrIsAbsoluteFilename (buf)) + { +- FcChar8 *dirname = FcStrDirname (nn); +- FcStrFree (nn); ++ FcChar8 *dirname = FcStrDirname (n); ++ FcStrFree (n); + if (!dirname) + return NULL; + +@@ -2358,18 +2383,18 @@ FcConfigRealFilename (FcConfig *config, + if (!path) + return NULL; + +- nn = FcStrCanonFilename (path); ++ n = FcStrCanonFilename (path); + FcStrFree (path); + } + else + { +- FcStrFree (nn); +- nn = FcStrdup (buf); ++ FcStrFree (n); ++ n = FcStrdup (buf); + } + } + } + +- return nn; ++ return n; + } + + /* +diff --git a/src/fcxml.c b/src/fcxml.c +index d9a67f6..a366644 100644 +--- a/src/fcxml.c ++++ b/src/fcxml.c +@@ -2541,7 +2541,7 @@ FcParseInclude (FcConfigParse *parse) + FcChar8 *filename; + static FcBool warn_conf = FcFalse, warn_confd = FcFalse; + +- filename = FcConfigFilename(s); ++ filename = FcConfigGetFilename(parse->config, s); + if (deprecated == FcTrue && + filename != NULL && + userdir != NULL && +@@ -3532,7 +3532,9 @@ _FcConfigParse (FcConfig *config, + FcStrBuf sbuf; + char buf[BUFSIZ]; + FcBool ret = FcFalse, complain_again = complain; ++ FcStrBuf reason; + ++ FcStrBufInit (&reason, NULL, 0); + #ifdef _WIN32 + if (!pGetSystemWindowsDirectory) + { +@@ -3549,12 +3551,20 @@ _FcConfigParse (FcConfig *config, + } + #endif + +- filename = FcConfigFilename (name); ++ filename = FcConfigGetFilename (config, name); + if (!filename) ++ { ++ FcStrBufString (&reason, (FcChar8 *)"No such file: "); ++ FcStrBufString (&reason, name ? name : (FcChar8 *)"(null)"); + goto bail0; ++ } + realfilename = FcConfigRealFilename (config, name); + if (!realfilename) ++ { ++ FcStrBufString (&reason, (FcChar8 *)"No such realfile: "); ++ FcStrBufString (&reason, name ? name : (FcChar8 *)"(null)"); + goto bail0; ++ } + if (FcStrSetMember (config->availConfigFiles, realfilename)) + { + FcStrFree (filename); +@@ -3582,7 +3592,11 @@ _FcConfigParse (FcConfig *config, + + fd = FcOpen ((char *) realfilename, O_RDONLY); + if (fd == -1) ++ { ++ FcStrBufString (&reason, (FcChar8 *)"Unable to open "); ++ FcStrBufString (&reason, realfilename); + goto bail1; ++ } + + do { + len = read (fd, buf, BUFSIZ); +@@ -3623,11 +3637,13 @@ bail0: + if (!ret && complain_again) + { + if (name) +- FcConfigMessage (0, FcSevereError, "Cannot %s config file \"%s\"", load ? "load" : "scan", name); ++ FcConfigMessage (0, FcSevereError, "Cannot %s config file \"%s\": %s", load ? "load" : "scan", name, FcStrBufDoneStatic (&reason)); + else +- FcConfigMessage (0, FcSevereError, "Cannot %s default config file", load ? "load" : "scan"); ++ FcConfigMessage (0, FcSevereError, "Cannot %s default config file: %s", load ? "load" : "scan", FcStrBufDoneStatic (&reason)); ++ FcStrBufDestroy (&reason); + return FcFalse; + } ++ FcStrBufDestroy (&reason); + return ret; + } + +-- +2.24.1 + diff --git a/fontconfig.spec b/fontconfig.spec index 40fdaf9..498e1d7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -22,8 +22,9 @@ Patch1: %{name}-required-freetype-version.patch Patch2: %{name}-score-hint-on-match.patch Patch3: %{name}-fix-1744377.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch -Patch5: %{name}-read-latest-cache.patch -Patch6: %{name}-mt.patch +Patch5: %{name}-sysroot.patch +Patch6: %{name}-read-latest-cache.patch +Patch7: %{name}-mt.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -165,6 +166,7 @@ HOME=/root /usr/bin/fc-cache -s %changelog * Thu Jan 30 2020 Akira TAGOH - 2.13.92-6 +- Fix some wrong behavior with sysroot option. - Fix reading the outdated caches. - Apply a patch to make it MT-safe more. From 95493a2f701298659a7f589b6518986669e9b62e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 30 Jan 2020 20:03:59 +0900 Subject: [PATCH 087/154] Fix some wrong behavior with sysroot option. Fix reading the outdated caches. Apply a patch to make it MT-safe more. --- FcConfigGetFilename.3 | 25 +++++++++++++++++++++++++ fontconfig.spec | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 FcConfigGetFilename.3 diff --git a/FcConfigGetFilename.3 b/FcConfigGetFilename.3 new file mode 100644 index 0000000..9450199 --- /dev/null +++ b/FcConfigGetFilename.3 @@ -0,0 +1,25 @@ +.\" auto-generated by docbook2man-spec from docbook-utils package +.TH "FcConfigGetFilename" "3" "27 1月 2020" "Fontconfig 2.13.91" "" +.SH NAME +FcConfigGetFilename \- Find a config file +.SH SYNOPSIS +.nf +\fB#include +.sp +FcChar8 * FcConfigGetFilename (FcConfig *\fIconfig\fB, const FcChar8 *\fIname\fB); +.fi\fR +.SH "DESCRIPTION" +.PP +Given the specified external entity name, return the associated filename. +This provides applications a way to convert various configuration file +references into filename form. +.PP +A null or empty \fIname\fR indicates that the default configuration file should +be used; which file this references can be overridden with the +FONTCONFIG_FILE environment variable. Next, if the name starts with \fI~\fR, it +refers to a file in the current users home directory. Otherwise if the name +doesn't start with '/', it refers to a file in the default configuration +directory; the built-in default directory can be overridden with the +FONTCONFIG_PATH environment variable. +.PP +The result of this function is affected by the FONTCONFIG_SYSROOT environment variable or equivalent functionality. diff --git a/fontconfig.spec b/fontconfig.spec index 498e1d7..c4435f7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -15,6 +15,7 @@ Source: http://fontconfig.org/release/%{name}-%{version}.tar.xz URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf Source2: fc-cache +Source3: FcConfigGetFilename.3 # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch @@ -68,6 +69,7 @@ which is useful for developing applications that uses fontconfig. %prep %autosetup -p1 +cp %{SOURCE3} $RPM_BUILD_DIR/%{name}-%{version}/doc %build # We don't want to rebuild the docs, but we want to install the included ones. From 8c0db7dc0ef9b3bddb2cb0b3b534ae595939e4b5 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 30 Jan 2020 20:12:32 +0900 Subject: [PATCH 088/154] Fix some wrong behavior with sysroot option. Fix reading the outdated caches. Apply a patch to make it MT-safe more. --- fontconfig-fix-test-without-bwrap.patch | 29 +++++++++++++++++++++++++ fontconfig.spec | 1 + 2 files changed, 30 insertions(+) create mode 100644 fontconfig-fix-test-without-bwrap.patch diff --git a/fontconfig-fix-test-without-bwrap.patch b/fontconfig-fix-test-without-bwrap.patch new file mode 100644 index 0000000..53c6bb1 --- /dev/null +++ b/fontconfig-fix-test-without-bwrap.patch @@ -0,0 +1,29 @@ +From 8bddcb113779178e5b5ed711db08d9bfbff924cc Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 5 Dec 2019 19:55:06 +0900 +Subject: [PATCH] Fix a test fail when no bwrap was available + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/201 +--- + test/run-test.sh | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/test/run-test.sh b/test/run-test.sh +index e1ee6d00..9b2e54bb 100644 +--- a/test/run-test.sh ++++ b/test/run-test.sh +@@ -40,9 +40,8 @@ ECHO=true + FCLIST="$LOG_COMPILER ../fc-list/fc-list$EXEEXT" + FCCACHE="$LOG_COMPILER ../fc-cache/fc-cache$EXEEXT" + +-which bwrap > /dev/null 2>&1 +-if [ $? -eq 0 ]; then +- BWRAP=`which bwrap` ++if [ -x "$(command -v bwrap)" ]; then ++ BWRAP="$(command -v bwrap)" + fi + + FONT1=$TESTDIR/4x6.pcf +-- +2.25.0 + diff --git a/fontconfig.spec b/fontconfig.spec index c4435f7..d13fe7a 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -26,6 +26,7 @@ Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-sysroot.patch Patch6: %{name}-read-latest-cache.patch Patch7: %{name}-mt.patch +Patch8: %{name}-fix-test-without-bwrap.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} From 9b91cf401dd8ef4e71d9fc3fa57227b4cc9e9429 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 30 Jan 2020 20:27:49 +0900 Subject: [PATCH 089/154] Fix some wrong behavior with sysroot option. Fix reading the outdated caches. Apply a patch to make it MT-safe more. --- fontconfig-fix-test-without-bwrap.patch | 29 ------------------------- fontconfig-fix-test.patch | 12 ++++++++++ fontconfig.spec | 2 +- 3 files changed, 13 insertions(+), 30 deletions(-) delete mode 100644 fontconfig-fix-test-without-bwrap.patch create mode 100644 fontconfig-fix-test.patch diff --git a/fontconfig-fix-test-without-bwrap.patch b/fontconfig-fix-test-without-bwrap.patch deleted file mode 100644 index 53c6bb1..0000000 --- a/fontconfig-fix-test-without-bwrap.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8bddcb113779178e5b5ed711db08d9bfbff924cc Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Thu, 5 Dec 2019 19:55:06 +0900 -Subject: [PATCH] Fix a test fail when no bwrap was available - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/201 ---- - test/run-test.sh | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/test/run-test.sh b/test/run-test.sh -index e1ee6d00..9b2e54bb 100644 ---- a/test/run-test.sh -+++ b/test/run-test.sh -@@ -40,9 +40,8 @@ ECHO=true - FCLIST="$LOG_COMPILER ../fc-list/fc-list$EXEEXT" - FCCACHE="$LOG_COMPILER ../fc-cache/fc-cache$EXEEXT" - --which bwrap > /dev/null 2>&1 --if [ $? -eq 0 ]; then -- BWRAP=`which bwrap` -+if [ -x "$(command -v bwrap)" ]; then -+ BWRAP="$(command -v bwrap)" - fi - - FONT1=$TESTDIR/4x6.pcf --- -2.25.0 - diff --git a/fontconfig-fix-test.patch b/fontconfig-fix-test.patch new file mode 100644 index 0000000..9def0e3 --- /dev/null +++ b/fontconfig-fix-test.patch @@ -0,0 +1,12 @@ +diff -pruN fontconfig-2.13.92.orig/test/run-test.sh fontconfig-2.13.92/test/run-test.sh +--- fontconfig-2.13.92.orig/test/run-test.sh 2020-01-30 20:19:55.148680493 +0900 ++++ fontconfig-2.13.92/test/run-test.sh 2020-01-30 20:25:48.604550017 +0900 +@@ -409,7 +409,7 @@ rm -rf $MYCACHEBASEDIR $MYCONFIG my-font + + fi # if [ "x$EXEEXT" = "x" ] + +-if [ -x $BUILDTESTDIR/test-crbug1004254 ]; then ++if [ -x $BUILDTESTDIR/test-crbug1004254 -a -x /usr/bin/curl ]; then + dotest "MT-safe global config" + prep + curl -s -o $FONTDIR/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip diff --git a/fontconfig.spec b/fontconfig.spec index d13fe7a..d047042 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -26,7 +26,7 @@ Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-sysroot.patch Patch6: %{name}-read-latest-cache.patch Patch7: %{name}-mt.patch -Patch8: %{name}-fix-test-without-bwrap.patch +Patch8: %{name}-fix-test.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} From 35da5274e91682f2714c9b4cbf1074d74478958f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 30 Jan 2020 21:38:54 +0900 Subject: [PATCH 090/154] Fix some wrong behavior with sysroot option. Fix reading the outdated caches. Apply a patch to make it MT-safe more. --- fontconfig-fix-test.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/fontconfig-fix-test.patch b/fontconfig-fix-test.patch index 9def0e3..01d2735 100644 --- a/fontconfig-fix-test.patch +++ b/fontconfig-fix-test.patch @@ -10,3 +10,32 @@ diff -pruN fontconfig-2.13.92.orig/test/run-test.sh fontconfig-2.13.92/test/run- dotest "MT-safe global config" prep curl -s -o $FONTDIR/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip +From 8bddcb113779178e5b5ed711db08d9bfbff924cc Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 5 Dec 2019 19:55:06 +0900 +Subject: [PATCH] Fix a test fail when no bwrap was available + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/201 +--- + test/run-test.sh | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/test/run-test.sh b/test/run-test.sh +index e1ee6d0..9b2e54b 100644 +--- a/test/run-test.sh ++++ b/test/run-test.sh +@@ -40,9 +40,8 @@ ECHO=true + FCLIST="$LOG_COMPILER ../fc-list/fc-list$EXEEXT" + FCCACHE="$LOG_COMPILER ../fc-cache/fc-cache$EXEEXT" + +-which bwrap > /dev/null 2>&1 +-if [ $? -eq 0 ]; then +- BWRAP=`which bwrap` ++if [ -x "$(command -v bwrap)" ]; then ++ BWRAP="$(command -v bwrap)" + fi + + FONT1=$TESTDIR/4x6.pcf +-- +2.24.1 + From 1bacf0fb4436ce5fea7e5db2de0ebb823c1f2471 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 31 Jan 2020 13:57:33 +0900 Subject: [PATCH 091/154] Fix some wrong behavior with sysroot option. Fix reading the outdated caches. Apply a patch to make it MT-safe more. --- fontconfig-fix-test.patch | 2 +- fontconfig.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fontconfig-fix-test.patch b/fontconfig-fix-test.patch index 01d2735..5ccaaba 100644 --- a/fontconfig-fix-test.patch +++ b/fontconfig-fix-test.patch @@ -6,7 +6,7 @@ diff -pruN fontconfig-2.13.92.orig/test/run-test.sh fontconfig-2.13.92/test/run- fi # if [ "x$EXEEXT" = "x" ] -if [ -x $BUILDTESTDIR/test-crbug1004254 ]; then -+if [ -x $BUILDTESTDIR/test-crbug1004254 -a -x /usr/bin/curl ]; then ++if [ -x $BUILDTESTDIR/test-crbug1004254 ] && [ 0 -eq 1 ]; then dotest "MT-safe global config" prep curl -s -o $FONTDIR/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip diff --git a/fontconfig.spec b/fontconfig.spec index d047042..e42c49b 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -108,7 +108,7 @@ install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache cat %{name}-conf.lang >> %{name}.lang %check -make check +VERBOSE=1 make check %post umask 0022 From 5258a48f40fb8c25f358c6e1cf5c274931319fac Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 26 Feb 2020 15:53:45 +0900 Subject: [PATCH 092/154] Fix assertion in FcCacheFini(). --- fontconfig-fix-assertion.patch | 72 ++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 ++- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-assertion.patch diff --git a/fontconfig-fix-assertion.patch b/fontconfig-fix-assertion.patch new file mode 100644 index 0000000..6bdb379 --- /dev/null +++ b/fontconfig-fix-assertion.patch @@ -0,0 +1,72 @@ +From fbc05949ef52c8a8d69233eed77f6636dffec280 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 26 Feb 2020 15:42:21 +0900 +Subject: [PATCH] Fix assertion in FcFini() + +Due to the unproper initialization of `latest_mtime', the duplicate caches +was still in fcCacheChains with no references. which means no one frees +them. thus, the memory leak was happened. + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/227 +--- + src/fccache.c | 9 +++++---- + src/fcinit.c | 4 ++-- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/fccache.c b/src/fccache.c +index 4744a84..035458e 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -365,7 +365,6 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + struct stat file_stat, dir_stat; + FcBool ret = FcFalse; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); +- struct timeval latest_mtime = (struct timeval){ 0 }; + + if (sysroot) + d = FcStrBuildFilename (sysroot, dir, NULL); +@@ -390,6 +389,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + #ifndef _WIN32 + FcBool retried = FcFalse; + #endif ++ struct timeval latest_mtime = (struct timeval){ 0 }; ++ + if (sysroot) + cache_hashed = FcStrBuildFilename (sysroot, cache_dir, cache_base, NULL); + else +@@ -1081,12 +1082,12 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat) + + if (!file_stat) + file_stat = &my_file_stat; +- fd = FcDirCacheOpenFile (cache_file, file_stat); +- if (fd < 0) +- return NULL; + config = FcConfigReference (NULL); + if (!config) + return NULL; ++ fd = FcDirCacheOpenFile (cache_file, file_stat); ++ if (fd < 0) ++ return NULL; + cache = FcDirCacheMapFd (config, fd, file_stat, NULL); + FcConfigDestroy (config); + close (fd); +diff --git a/src/fcinit.c b/src/fcinit.c +index 6f82ebd..0e1421e 100644 +--- a/src/fcinit.c ++++ b/src/fcinit.c +@@ -199,10 +199,10 @@ void + FcFini (void) + { + FcConfigFini (); +- FcCacheFini (); ++ FcConfigPathFini (); + FcDefaultFini (); + FcObjectFini (); +- FcConfigPathFini (); ++ FcCacheFini (); + } + + /* +-- +2.24.1 + diff --git a/fontconfig.spec b/fontconfig.spec index e42c49b..ea61268 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.92 -Release: 6%{?dist} +Release: 7%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -27,6 +27,7 @@ Patch5: %{name}-sysroot.patch Patch6: %{name}-read-latest-cache.patch Patch7: %{name}-mt.patch Patch8: %{name}-fix-test.patch +Patch9: %{name}-fix-assertion.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -168,6 +169,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Feb 26 2020 Akira TAGOH - 2.13.92-7 +- Fix assertion in FcCacheFini(). + * Thu Jan 30 2020 Akira TAGOH - 2.13.92-6 - Fix some wrong behavior with sysroot option. - Fix reading the outdated caches. From 728bab0a1e8010ec5055ac3bdf3dc5a9f4736ae0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 23 Mar 2020 14:23:41 +0900 Subject: [PATCH 093/154] Fix assertion in FcCacheFini() again. Resolves: rhbz#1815684 --- fontconfig-fix-assertion.patch | 72 ++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 ++- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/fontconfig-fix-assertion.patch b/fontconfig-fix-assertion.patch index 6bdb379..2e33736 100644 --- a/fontconfig-fix-assertion.patch +++ b/fontconfig-fix-assertion.patch @@ -70,3 +70,75 @@ index 6f82ebd..0e1421e 100644 -- 2.24.1 +From 6f6b39780215714386606ca1c5457a7106639ff4 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Mon, 23 Mar 2020 14:03:47 +0900 +Subject: [PATCH] Fix assertion in FcCacheFini() again + +The previous fix in fbc05949ef52c8a8d69233eed77f6636dffec280 was wrong. reverting. + +When reading older caches, FcDirCacheMapHelper() returns FcFalse and +it became the return value from FcDirCacheProcess() too, which is wrong. +Actually one of calls for FcDirCacheMapHelper() should be successfully +finished and closure should have a valid pointer for cache. + +Due to this, the proper finalization process wasn't running against +cache in closure. + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/227 +--- + src/fccache.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/src/fccache.c b/src/fccache.c +index 035458e..2d398c7 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -365,6 +365,7 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + struct stat file_stat, dir_stat; + FcBool ret = FcFalse; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); ++ struct timeval latest_mtime = (struct timeval){ 0 }; + + if (sysroot) + d = FcStrBuildFilename (sysroot, dir, NULL); +@@ -389,7 +390,6 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + #ifndef _WIN32 + FcBool retried = FcFalse; + #endif +- struct timeval latest_mtime = (struct timeval){ 0 }; + + if (sysroot) + cache_hashed = FcStrBuildFilename (sysroot, cache_dir, cache_base, NULL); +@@ -445,6 +445,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, + } + FcStrListDone (list); + ++ if (closure) ++ return !!(*((FcCache **)closure) != NULL); + return ret; + } + +@@ -792,7 +794,18 @@ FcCacheFini (void) + int i; + + for (i = 0; i < FC_CACHE_MAX_LEVEL; i++) +- assert (fcCacheChains[i] == NULL); ++ { ++ if (FcDebug() & FC_DBG_CACHE) ++ { ++ if (fcCacheChains[i] != NULL) ++ { ++ FcCacheSkip *s = fcCacheChains[i]; ++ printf("Fontconfig error: not freed %p (dir: %s, refcount %d)\n", s->cache, FcCacheDir(s->cache), s->ref.count); ++ } ++ } ++ else ++ assert (fcCacheChains[i] == NULL); ++ } + assert (fcCacheMaxLevel == 0); + + free_lock (); +-- +2.24.1 + diff --git a/fontconfig.spec b/fontconfig.spec index ea61268..3dfc0af 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.92 -Release: 7%{?dist} +Release: 8%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -169,6 +169,10 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Mar 23 2020 Akira TAGOH - 2.13.92-8 +- Fix assertion in FcCacheFini() again. + Resolves: rhbz#1815684 + * Wed Feb 26 2020 Akira TAGOH - 2.13.92-7 - Fix assertion in FcCacheFini(). From 212a960242c2818a9320f824125af003ce71e64a Mon Sep 17 00:00:00 2001 From: Nicolas Mailhot Date: Sat, 28 Mar 2020 22:50:40 +0100 Subject: [PATCH 094/154] fix DTD ID & registration to make xmllint --loaddtd --valid --nonet work by default --- fontconfig-fix-dtd-id.patch | 490 ++++++++++++++++++++++++++++++++++++ fontconfig-fix-dtd.patch | 26 ++ fontconfig.spec | 27 +- 3 files changed, 541 insertions(+), 2 deletions(-) create mode 100644 fontconfig-fix-dtd-id.patch create mode 100644 fontconfig-fix-dtd.patch diff --git a/fontconfig-fix-dtd-id.patch b/fontconfig-fix-dtd-id.patch new file mode 100644 index 0000000..9045fc0 --- /dev/null +++ b/fontconfig-fix-dtd-id.patch @@ -0,0 +1,490 @@ +diff -uNr fontconfig-2.13.92.orig/conf.d/05-reset-dirs-sample.conf fontconfig-2.13.92/conf.d/05-reset-dirs-sample.conf +--- fontconfig-2.13.92.orig/conf.d/05-reset-dirs-sample.conf 2019-05-08 10:22:25.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/05-reset-dirs-sample.conf 2020-03-28 15:53:41.792757065 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + Re-define fonts dirs sample + +diff -uNr fontconfig-2.13.92.orig/conf.d/09-autohint-if-no-hinting.conf fontconfig-2.13.92/conf.d/09-autohint-if-no-hinting.conf +--- fontconfig-2.13.92.orig/conf.d/09-autohint-if-no-hinting.conf 2019-07-30 13:03:27.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/09-autohint-if-no-hinting.conf 2020-03-28 15:53:41.764757635 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-autohint.conf fontconfig-2.13.92/conf.d/10-autohint.conf +--- fontconfig-2.13.92.orig/conf.d/10-autohint.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-autohint.conf 2020-03-28 15:53:41.829756312 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-hinting-full.conf fontconfig-2.13.92/conf.d/10-hinting-full.conf +--- fontconfig-2.13.92.orig/conf.d/10-hinting-full.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-hinting-full.conf 2020-03-28 15:53:41.714758653 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-hinting-medium.conf fontconfig-2.13.92/conf.d/10-hinting-medium.conf +--- fontconfig-2.13.92.orig/conf.d/10-hinting-medium.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-hinting-medium.conf 2020-03-28 15:53:41.809756719 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-hinting-none.conf fontconfig-2.13.92/conf.d/10-hinting-none.conf +--- fontconfig-2.13.92.orig/conf.d/10-hinting-none.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-hinting-none.conf 2020-03-28 15:53:41.796756984 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-hinting-slight.conf fontconfig-2.13.92/conf.d/10-hinting-slight.conf +--- fontconfig-2.13.92.orig/conf.d/10-hinting-slight.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-hinting-slight.conf 2020-03-28 15:53:41.760757717 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-no-sub-pixel.conf fontconfig-2.13.92/conf.d/10-no-sub-pixel.conf +--- fontconfig-2.13.92.orig/conf.d/10-no-sub-pixel.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-no-sub-pixel.conf 2020-03-28 15:53:41.743758063 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-scale-bitmap-fonts.conf fontconfig-2.13.92/conf.d/10-scale-bitmap-fonts.conf +--- fontconfig-2.13.92.orig/conf.d/10-scale-bitmap-fonts.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-scale-bitmap-fonts.conf 2020-03-28 15:53:41.727758389 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-sub-pixel-bgr.conf fontconfig-2.13.92/conf.d/10-sub-pixel-bgr.conf +--- fontconfig-2.13.92.orig/conf.d/10-sub-pixel-bgr.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-sub-pixel-bgr.conf 2020-03-28 15:53:41.841756068 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-sub-pixel-rgb.conf fontconfig-2.13.92/conf.d/10-sub-pixel-rgb.conf +--- fontconfig-2.13.92.orig/conf.d/10-sub-pixel-rgb.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-sub-pixel-rgb.conf 2020-03-28 15:53:41.723758470 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-sub-pixel-vbgr.conf fontconfig-2.13.92/conf.d/10-sub-pixel-vbgr.conf +--- fontconfig-2.13.92.orig/conf.d/10-sub-pixel-vbgr.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-sub-pixel-vbgr.conf 2020-03-28 15:53:41.772757472 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-sub-pixel-vrgb.conf fontconfig-2.13.92/conf.d/10-sub-pixel-vrgb.conf +--- fontconfig-2.13.92.orig/conf.d/10-sub-pixel-vrgb.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-sub-pixel-vrgb.conf 2020-03-28 15:53:41.706758816 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/10-unhinted.conf fontconfig-2.13.92/conf.d/10-unhinted.conf +--- fontconfig-2.13.92.orig/conf.d/10-unhinted.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/10-unhinted.conf 2020-03-28 15:53:41.739758145 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/11-lcdfilter-default.conf fontconfig-2.13.92/conf.d/11-lcdfilter-default.conf +--- fontconfig-2.13.92.orig/conf.d/11-lcdfilter-default.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/11-lcdfilter-default.conf 2020-03-28 15:53:41.731758307 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/11-lcdfilter-legacy.conf fontconfig-2.13.92/conf.d/11-lcdfilter-legacy.conf +--- fontconfig-2.13.92.orig/conf.d/11-lcdfilter-legacy.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/11-lcdfilter-legacy.conf 2020-03-28 15:53:41.837756149 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/11-lcdfilter-light.conf fontconfig-2.13.92/conf.d/11-lcdfilter-light.conf +--- fontconfig-2.13.92.orig/conf.d/11-lcdfilter-light.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/11-lcdfilter-light.conf 2020-03-28 15:53:41.768757554 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/20-unhint-small-vera.conf fontconfig-2.13.92/conf.d/20-unhint-small-vera.conf +--- fontconfig-2.13.92.orig/conf.d/20-unhint-small-vera.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/20-unhint-small-vera.conf 2020-03-28 15:53:41.784757228 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/25-unhint-nonlatin.conf fontconfig-2.13.92/conf.d/25-unhint-nonlatin.conf +--- fontconfig-2.13.92.orig/conf.d/25-unhint-nonlatin.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/25-unhint-nonlatin.conf 2020-03-28 15:53:41.817756556 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/30-metric-aliases.conf fontconfig-2.13.92/conf.d/30-metric-aliases.conf +--- fontconfig-2.13.92.orig/conf.d/30-metric-aliases.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/30-metric-aliases.conf 2020-03-28 15:53:41.718758572 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/40-nonlatin.conf fontconfig-2.13.92/conf.d/40-nonlatin.conf +--- fontconfig-2.13.92.orig/conf.d/40-nonlatin.conf 2019-05-08 10:22:25.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/40-nonlatin.conf 2020-03-28 15:53:41.735758226 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/45-generic.conf fontconfig-2.13.92/conf.d/45-generic.conf +--- fontconfig-2.13.92.orig/conf.d/45-generic.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/45-generic.conf 2020-03-28 15:53:41.833756231 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/45-latin.conf fontconfig-2.13.92/conf.d/45-latin.conf +--- fontconfig-2.13.92.orig/conf.d/45-latin.conf 2019-05-08 10:22:25.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/45-latin.conf 2020-03-28 15:53:41.756757798 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/49-sansserif.conf fontconfig-2.13.92/conf.d/49-sansserif.conf +--- fontconfig-2.13.92.orig/conf.d/49-sansserif.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/49-sansserif.conf 2020-03-28 15:53:41.845755987 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/50-user.conf fontconfig-2.13.92/conf.d/50-user.conf +--- fontconfig-2.13.92.orig/conf.d/50-user.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/50-user.conf 2020-03-28 15:53:41.710758735 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/51-local.conf fontconfig-2.13.92/conf.d/51-local.conf +--- fontconfig-2.13.92.orig/conf.d/51-local.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/51-local.conf 2020-03-28 15:53:41.805756801 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/60-generic.conf fontconfig-2.13.92/conf.d/60-generic.conf +--- fontconfig-2.13.92.orig/conf.d/60-generic.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/60-generic.conf 2020-03-28 15:53:41.702758898 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/60-latin.conf fontconfig-2.13.92/conf.d/60-latin.conf +--- fontconfig-2.13.92.orig/conf.d/60-latin.conf 2019-05-08 10:22:25.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/60-latin.conf 2020-03-28 15:53:41.752757880 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + +diff -uNr fontconfig-2.13.92.orig/conf.d/65-fonts-persian.conf fontconfig-2.13.92/conf.d/65-fonts-persian.conf +--- fontconfig-2.13.92.orig/conf.d/65-fonts-persian.conf 2018-06-05 12:36:38.000000000 +0200 ++++ fontconfig-2.13.92/conf.d/65-fonts-persian.conf 2020-03-28 15:53:41.748757961 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + + + +diff -uNr fontconfig-2.13.92.orig/doc/fonts-conf.5 fontconfig-2.13.92/doc/fonts-conf.5 +--- fontconfig-2.13.92.orig/doc/fonts-conf.5 2019-08-09 13:12:20.000000000 +0200 ++++ fontconfig-2.13.92/doc/fonts-conf.5 2020-03-28 15:53:41.685759244 +0100 +@@ -264,7 +264,7 @@ + .sp + .nf + +- ++ + + \&... + +@@ -554,7 +554,7 @@ + .sp + .nf + +- ++ + + + + + +diff -uNr fontconfig-2.13.92.orig/fonts.conf.in fontconfig-2.13.92/fonts.conf.in +--- fontconfig-2.13.92.orig/fonts.conf.in 2019-05-08 10:22:25.000000000 +0200 ++++ fontconfig-2.13.92/fonts.conf.in 2020-03-28 15:53:41.698758979 +0100 +@@ -1,5 +1,5 @@ + +- ++ + + + diff --git a/fontconfig-fix-dtd.patch b/fontconfig-fix-dtd.patch new file mode 100644 index 0000000..5165589 --- /dev/null +++ b/fontconfig-fix-dtd.patch @@ -0,0 +1,26 @@ +From a4aa66a858f1ecd375c5efe5916398281f73f794 Mon Sep 17 00:00:00 2001 +From: Jan Tojnar +Date: Wed, 20 Nov 2019 02:13:58 +0000 +Subject: [PATCH] Correct reset-dirs in DTD + +Empty elements need to be declared as such in well-formed DTDs. +--- + fonts.dtd | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fonts.dtd b/fonts.dtd +index f8c9f2c..40ecb4e 100644 +--- a/fonts.dtd ++++ b/fonts.dtd +@@ -124,7 +124,7 @@ + +- ++ + + - - - - -diff -uNr fontconfig-2.13.92.orig/doc/fonts-conf.5 fontconfig-2.13.92/doc/fonts-conf.5 ---- fontconfig-2.13.92.orig/doc/fonts-conf.5 2019-08-09 13:12:20.000000000 +0200 -+++ fontconfig-2.13.92/doc/fonts-conf.5 2020-03-28 15:53:41.685759244 +0100 -@@ -264,7 +264,7 @@ - .sp - .nf - -- -+ - - \&... - -@@ -554,7 +554,7 @@ - .sp - .nf - -- -+ - - - - - -diff -uNr fontconfig-2.13.92.orig/fonts.conf.in fontconfig-2.13.92/fonts.conf.in ---- fontconfig-2.13.92.orig/fonts.conf.in 2019-05-08 10:22:25.000000000 +0200 -+++ fontconfig-2.13.92/fonts.conf.in 2020-03-28 15:53:41.698758979 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - diff --git a/fontconfig-fix-dtd.patch b/fontconfig-fix-dtd.patch deleted file mode 100644 index 5165589..0000000 --- a/fontconfig-fix-dtd.patch +++ /dev/null @@ -1,26 +0,0 @@ -From a4aa66a858f1ecd375c5efe5916398281f73f794 Mon Sep 17 00:00:00 2001 -From: Jan Tojnar -Date: Wed, 20 Nov 2019 02:13:58 +0000 -Subject: [PATCH] Correct reset-dirs in DTD - -Empty elements need to be declared as such in well-formed DTDs. ---- - fonts.dtd | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fonts.dtd b/fonts.dtd -index f8c9f2c..40ecb4e 100644 ---- a/fonts.dtd -+++ b/fonts.dtd -@@ -124,7 +124,7 @@ - -- -+ - - + + + + KDE + + rgb + + From 3d26dfea36a1436d57de7fa613ea6b6c0974498e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 03:43:11 +0000 Subject: [PATCH 122/154] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 008bd62..b15dee1 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.1 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -193,6 +193,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 2.14.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Nov 26 2022 Akira TAGOH - 2.14.1-2 - Enable RGB stripes layout for sub-pixel rendering on KDE only. Resolves: rhbz#2137825 From 03bbd6991df3f8b6c0dabd2e79c6d2b33b517df9 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 27 Jan 2023 18:01:51 +0900 Subject: [PATCH 123/154] New upstream release. --- .gitignore | 1 + fontconfig-desktop-property.patch | 337 ------------------------------ fontconfig.spec | 8 +- sources | 2 +- 4 files changed, 7 insertions(+), 341 deletions(-) delete mode 100644 fontconfig-desktop-property.patch diff --git a/.gitignore b/.gitignore index bc18404..95fbd70 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.13.96.tar.xz /fontconfig-2.14.0.tar.xz /fontconfig-2.14.1.tar.xz +/fontconfig-2.14.2.tar.xz diff --git a/fontconfig-desktop-property.patch b/fontconfig-desktop-property.patch deleted file mode 100644 index c7a81a3..0000000 --- a/fontconfig-desktop-property.patch +++ /dev/null @@ -1,337 +0,0 @@ -From 6715a14f138df01c11110488b7edbf514e4076b4 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Fri, 25 Nov 2022 21:15:32 +0900 -Subject: [PATCH] Add FC_DESKTOP_NAME property - -To allow users to have desktop-specific matching rule. ---- - fontconfig/fontconfig.h | 27 ++++++++++--------- - src/fcdefault.c | 58 ++++++++++++++++++++++++++++++++++++++--- - src/fcint.h | 7 +++-- - src/fcobjs.h | 1 + - src/fcxml.c | 14 +++++----- - 5 files changed, 82 insertions(+), 25 deletions(-) - -diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h -index 09292a3..ac5a0b0 100644 ---- a/fontconfig/fontconfig.h -+++ b/fontconfig/fontconfig.h -@@ -128,6 +128,7 @@ typedef int FcBool; - #define FC_POSTSCRIPT_NAME "postscriptname" /* String */ - #define FC_FONT_HAS_HINT "fonthashint" /* Bool - true if font has hinting */ - #define FC_ORDER "order" /* Integer */ -+#define FC_DESKTOP_NAME "desktop" /* String */ - - #define FC_CACHE_SUFFIX ".cache-" FC_CACHE_VERSION - #define FC_DIR_CACHE_FILE "fonts.cache-" FC_CACHE_VERSION -@@ -285,7 +286,7 @@ typedef struct _FcObjectSet { - int sobject; - const char **objects; - } FcObjectSet; -- -+ - typedef enum _FcMatchKind { - FcMatchPattern, FcMatchFont, FcMatchScan, - FcMatchKindEnd, -@@ -400,7 +401,7 @@ FcConfigGetFilename (FcConfig *config, - - FcPublic FcChar8 * - FcConfigFilename (const FcChar8 *url); -- -+ - FcPublic FcConfig * - FcConfigCreate (void); - -@@ -418,7 +419,7 @@ FcConfigGetCurrent (void); - - FcPublic FcBool - FcConfigUptoDate (FcConfig *config); -- -+ - FcPublic FcBool - FcConfigBuildFonts (FcConfig *config); - -@@ -548,12 +549,12 @@ FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b); - #define FC_CHARSET_DONE ((FcChar32) -1) - - FcPublic FcChar32 --FcCharSetFirstPage (const FcCharSet *a, -+FcCharSetFirstPage (const FcCharSet *a, - FcChar32 map[FC_CHARSET_MAP_SIZE], - FcChar32 *next); - - FcPublic FcChar32 --FcCharSetNextPage (const FcCharSet *a, -+FcCharSetNextPage (const FcCharSet *a, - FcChar32 map[FC_CHARSET_MAP_SIZE], - FcChar32 *next); - -@@ -609,7 +610,7 @@ FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file); - - FcPublic FcCache * - FcDirCacheRescan (const FcChar8 *dir, FcConfig *config); -- -+ - FcPublic FcCache * - FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config); - -@@ -772,7 +773,7 @@ FcFontSetMatch (FcConfig *config, - - FcPublic FcPattern * - FcFontMatch (FcConfig *config, -- FcPattern *p, -+ FcPattern *p, - FcResult *result); - - FcPublic FcPattern * -@@ -890,10 +891,10 @@ FcPatternHash (const FcPattern *p); - - FcPublic FcBool - FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append); -- -+ - FcPublic FcBool - FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append); -- -+ - FcPublic FcResult - FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v); - -@@ -956,7 +957,7 @@ FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r); - - FcPublic FcPattern * - FcPatternVaBuild (FcPattern *p, va_list va); -- -+ - FcPublic FcPattern * - FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0); - -@@ -1025,10 +1026,10 @@ FcStrCopy (const FcChar8 *s); - - FcPublic FcChar8 * - FcStrCopyFilename (const FcChar8 *s); -- -+ - FcPublic FcChar8 * - FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); -- -+ - FcPublic void - FcStrFree (FcChar8 *s); - -@@ -1145,7 +1146,7 @@ _FCFUNCPROTOEND - * Deprecated functions are placed here to help users fix their code without - * digging through documentation - */ -- -+ - #define FcConfigGetRescanInverval FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval - #define FcConfigSetRescanInverval FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval - -diff --git a/src/fcdefault.c b/src/fcdefault.c -index a9a3b72..6995216 100644 ---- a/src/fcdefault.c -+++ b/src/fcdefault.c -@@ -211,28 +211,73 @@ retry: - return prgname; - } - -+static FcChar8 *default_desktop_name; -+ -+FcChar8 * -+FcGetDesktopName (void) -+{ -+ FcChar8 *desktop_name; -+retry: -+ desktop_name = fc_atomic_ptr_get (&default_desktop_name); -+ if (!desktop_name) -+ { -+ char *s = getenv ("XDG_CURRENT_DESKTOP"); -+ -+ if (!s) -+ desktop_name = FcStrdup (""); -+ else -+ desktop_name = FcStrdup (s); -+ if (!desktop_name) -+ { -+ fprintf (stderr, "Fontconfig error: out of memory in %s\n", -+ __FUNCTION__); -+ return NULL; -+ } -+ -+ if (!fc_atomic_ptr_cmpexch(&default_desktop_name, NULL, desktop_name)) -+ { -+ free (desktop_name); -+ goto retry; -+ } -+ } -+ if (desktop_name && !desktop_name[0]) -+ return NULL; -+ -+ return desktop_name; -+} -+ - void - FcDefaultFini (void) - { - FcChar8 *lang; - FcStrSet *langs; - FcChar8 *prgname; -+ FcChar8 *desktop; - - lang = fc_atomic_ptr_get (&default_lang); -- if (lang && fc_atomic_ptr_cmpexch (&default_lang, lang, NULL)) { -+ if (lang && fc_atomic_ptr_cmpexch (&default_lang, lang, NULL)) -+ { - free (lang); - } - - langs = fc_atomic_ptr_get (&default_langs); -- if (langs && fc_atomic_ptr_cmpexch (&default_langs, langs, NULL)) { -+ if (langs && fc_atomic_ptr_cmpexch (&default_langs, langs, NULL)) -+ { - FcRefInit (&langs->ref, 1); - FcStrSetDestroy (langs); - } - - prgname = fc_atomic_ptr_get (&default_prgname); -- if (prgname && fc_atomic_ptr_cmpexch (&default_prgname, prgname, NULL)) { -+ if (prgname && fc_atomic_ptr_cmpexch (&default_prgname, prgname, NULL)) -+ { - free (prgname); - } -+ -+ desktop = fc_atomic_ptr_get (&default_desktop_name); -+ if (desktop && fc_atomic_ptr_cmpexch(&default_desktop_name, desktop, NULL)) -+ { -+ free (desktop); -+ } - } - - void -@@ -336,6 +381,13 @@ FcDefaultSubstitute (FcPattern *pattern) - FcPatternObjectAddString (pattern, FC_PRGNAME_OBJECT, prgname); - } - -+ if (FcPatternObjectGet (pattern, FC_DESKTOP_NAME_OBJECT, 0, &v) == FcResultNoMatch) -+ { -+ FcChar8 *desktop = FcGetDesktopName (); -+ if (desktop) -+ FcPatternObjectAddString (pattern, FC_DESKTOP_NAME_OBJECT, desktop); -+ } -+ - if (!FcPatternFindObjectIter (pattern, &iter, FC_ORDER_OBJECT)) - FcPatternObjectAddInteger (pattern, FC_ORDER_OBJECT, 0); - } -diff --git a/src/fcint.h b/src/fcint.h -index c615b66..78cee54 100644 ---- a/src/fcint.h -+++ b/src/fcint.h -@@ -199,7 +199,7 @@ typedef struct _FcValueList { - } FcValueList; - - #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList) -- -+ - typedef int FcObject; - - /* The 1024 is to leave some room for future added internal objects, such -@@ -238,7 +238,7 @@ struct _FcPattern { - FcFontSetFonts(fs)[i], \ - FcPattern) : \ - fs->fonts[i]) -- -+ - typedef enum _FcOp { - FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet, - FcOpNil, -@@ -909,6 +909,9 @@ FcGetDefaultLang (void); - FcPrivate FcChar8 * - FcGetPrgname (void); - -+FcPrivate FcChar8 * -+FcGetDesktopName (void); -+ - FcPrivate void - FcDefaultFini (void); - -diff --git a/src/fcobjs.h b/src/fcobjs.h -index acc0471..1cd8ed3 100644 ---- a/src/fcobjs.h -+++ b/src/fcobjs.h -@@ -74,4 +74,5 @@ FC_OBJECT (FONT_VARIATIONS, FcTypeString, NULL) - FC_OBJECT (VARIABLE, FcTypeBool, FcCompareBool) - FC_OBJECT (FONT_HAS_HINT, FcTypeBool, FcCompareBool) - FC_OBJECT (ORDER, FcTypeInteger, FcCompareNumber) -+FC_OBJECT (DESKTOP_NAME, FcTypeString, NULL) - /* ^-------------- Add new objects here. */ -diff --git a/src/fcxml.c b/src/fcxml.c -index 82a46f2..74c892d 100644 ---- a/src/fcxml.c -+++ b/src/fcxml.c -@@ -367,7 +367,7 @@ typedef enum _FcElement { - FcElementDescription, - FcElementRemapDir, - FcElementResetDirs, -- -+ - FcElementRescan, - - FcElementPrefer, -@@ -731,7 +731,7 @@ FcTypecheckExpr (FcConfigParse *parse, FcExpr *expr, FcType type) - if (o) - FcTypecheckValue (parse, o->type, type); - } -- else -+ else - FcConfigMessage (parse, FcSevereWarning, - "invalid constant used : %s", - expr->u.constant); -@@ -794,7 +794,7 @@ FcTestCreate (FcConfigParse *parse, - if (test) - { - const FcObjectType *o; -- -+ - test->kind = kind; - test->qual = qual; - test->object = FcObjectFromName ((const char *) field); -@@ -1533,7 +1533,7 @@ FcStrtod (char *s, char **end) - { - char buf[128]; - int slen = strlen (s); -- -+ - if (slen + dlen > (int) sizeof (buf)) - { - if (end) -@@ -3101,7 +3101,7 @@ FcParsePattern (FcConfigParse *parse) - FcConfigMessage (parse, FcSevereError, "out of memory"); - return; - } -- -+ - while ((vstack = FcVStackPeek (parse))) - { - switch ((int) vstack->tag) { -@@ -3176,7 +3176,7 @@ FcEndElement(void *userData, const XML_Char *name FC_UNUSED) - case FcElementRescan: - FcParseRescan (parse); - break; -- -+ - case FcElementPrefer: - FcParseFamilies (parse, FcVStackPrefer); - break; -@@ -3512,7 +3512,7 @@ FcConfigParseAndLoadFromMemoryInternal (FcConfig *config, - XML_SetDoctypeDeclHandler (p, FcStartDoctypeDecl, FcEndDoctypeDecl); - XML_SetElementHandler (p, FcStartElement, FcEndElement); - XML_SetCharacterDataHandler (p, FcCharacterData); -- -+ - #endif /* ENABLE_LIBXML2 */ - - #ifndef ENABLE_LIBXML2 --- -2.38.1 - diff --git a/fontconfig.spec b/fontconfig.spec index b15dee1..28999b7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.14.1 -Release: 3%{?dist} +Version: 2.14.2 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -21,7 +21,6 @@ Source3: 10-sub-pixel-rgb-for-kde.conf Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch -Patch6: %{name}-desktop-property.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -193,6 +192,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jan 27 2023 Akira TAGOH - 2.14.2-1 +- New upstream release. + * Thu Jan 19 2023 Fedora Release Engineering - 2.14.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 51a9e53..9884c80 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.14.1.tar.xz) = ba42e6f90ec92914895d2157c872c373adfc17be791b92253bcc40e85674a84e43c08ab2b37c3ae85b53b2e7bd2a7847abb479043f303b732c08eeac3ee733db +SHA512 (fontconfig-2.14.2.tar.xz) = 23483e0ae6aa7589fd37f9949a4cf951c5bff981739dbb446881e4cea86a208c0ab31e2358666eac724af1dc6a689a42733a7ce91cd3e76d8d91eacedb318085 From a71d8d0d33254c437ab10b88110a57fb8a78346b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 4 Apr 2023 14:54:59 +0900 Subject: [PATCH 124/154] Migrated license tag to SPDX. --- fontconfig.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 28999b7..537ac60 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,12 +5,13 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.2 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code +## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 # fc-case/CaseFolding.txt is in the UCD # otherwise MIT -License: MIT and Public Domain and UCD +License: HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016 Source: http://fontconfig.org/release/%{name}-%{version}.tar.xz URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf @@ -192,6 +193,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Tue Apr 4 2023 Akira TAGOH - 2.14.2-2 +- Migrated license tag to SPDX. + * Fri Jan 27 2023 Akira TAGOH - 2.14.2-1 - New upstream release. From b1ee7ffdbdf3d8ab16b9259507d8218be4ad94ca Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 16 Jun 2023 18:14:18 +0900 Subject: [PATCH 125/154] Drop 10-sub-pixel-rgb-for-kde.conf Resolves: rhbz#2212512 --- fontconfig.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 537ac60..3dc1f61 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.2 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -16,7 +16,6 @@ Source: http://fontconfig.org/release/%{name}-%{version}.tar.xz URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf Source2: fc-cache -Source3: 10-sub-pixel-rgb-for-kde.conf # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch @@ -94,9 +93,8 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ -# Use conditional conf instead +# Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf -install -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d # move installed doc files back to build directory to package them # in the right place @@ -193,6 +191,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jun 16 2023 Akira TAGOH - 2.14.2-3 +- Drop 10-sub-pixel-rgb-for-kde.conf + Resolves: rhbz#2212512 + * Tue Apr 4 2023 Akira TAGOH - 2.14.2-2 - Migrated license tag to SPDX. From 7450f4c8e92c46a74eeff0ef876d106ae4443a44 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 20:01:44 +0000 Subject: [PATCH 126/154] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 3dc1f61..f5d7668 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.2 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -191,6 +191,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 2.14.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jun 16 2023 Akira TAGOH - 2.14.2-3 - Drop 10-sub-pixel-rgb-for-kde.conf Resolves: rhbz#2212512 From 353020918ca14302545b32dc36d76bf21a6b2960 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 17 Aug 2023 17:25:57 +0900 Subject: [PATCH 127/154] Update 65-nonlatin.conf to 69-nonlatin.conf This basically provides substitutes for certain languages and is helpful to determine default behavior though, we have per-package config for similar purpose. Since 65 is mostly used for default fonts and this config prevents some behavior for packages named something coming later than "nonlatin" in the alphabetical order. So moving this to the safer priority. This would fixes an issue, particularly Lohit Marathi vs Lohit Devanagari after updating their priorities from 65 to 66. --- fontconfig-lower-nonlatin-conf.patch | 485 +++++++++++++++++++++++++++ fontconfig.spec | 11 + 2 files changed, 496 insertions(+) create mode 100644 fontconfig-lower-nonlatin-conf.patch diff --git a/fontconfig-lower-nonlatin-conf.patch b/fontconfig-lower-nonlatin-conf.patch new file mode 100644 index 0000000..6139992 --- /dev/null +++ b/fontconfig-lower-nonlatin-conf.patch @@ -0,0 +1,485 @@ +diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf.d/65-nonlatin.conf +--- fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf 2020-12-03 20:45:00.000000000 +0900 ++++ fontconfig-2.14.2/conf.d/65-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,228 +0,0 @@ +- +- +- +- Set preferable fonts for non-Latin +- +- serif +- +- Artsounk +- BPG UTF8 M +- Kinnari +- Norasi +- Frank Ruehl +- Dror +- JG LaoTimes +- Saysettha Unicode +- Pigiarniq +- B Davat +- B Compset +- Kacst-Qr +- Urdu Nastaliq Unicode +- Raghindi +- Mukti Narrow +- malayalam +- Sampige +- padmaa +- Hapax Berbère +- MS Mincho +- SimSun +- PMingLiu +- WenQuanYi Zen Hei +- WenQuanYi Bitmap Song +- AR PL ShanHeiSun Uni +- AR PL New Sung +- ZYSong18030 +- HanyiSong +- MgOpen Canonica +- Sazanami Mincho +- IPAMonaMincho +- IPAMincho +- Kochi Mincho +- AR PL SungtiL GB +- AR PL Mingti2L Big5 +- AR PL Zenkai Uni +- MS 明朝 +- ZYSong18030 +- NanumMyeongjo +- UnBatang +- Baekmuk Batang +- KacstQura +- Frank Ruehl CLM +- Lohit Bengali +- Lohit Gujarati +- Lohit Hindi +- Lohit Marathi +- Lohit Maithili +- Lohit Kashmiri +- Lohit Konkani +- Lohit Nepali +- Lohit Sindhi +- Lohit Punjabi +- Lohit Tamil +- Rachana +- Lohit Malayalam +- Lohit Kannada +- Lohit Telugu +- Lohit Oriya +- LKLUG +- +- +- +- sans-serif +- +- Nachlieli +- Lucida Sans Unicode +- Yudit Unicode +- Kerkis +- ArmNet Helvetica +- Artsounk +- BPG UTF8 M +- Waree +- Loma +- Garuda +- Umpush +- Saysettha Unicode +- JG Lao Old Arial +- GF Zemen Unicode +- Pigiarniq +- B Davat +- B Compset +- Kacst-Qr +- Urdu Nastaliq Unicode +- Raghindi +- Mukti Narrow +- malayalam +- Sampige +- padmaa +- Hapax Berbère +- MS Gothic +- UmePlus P Gothic +- Microsoft YaHei +- Microsoft JhengHei +- WenQuanYi Zen Hei +- WenQuanYi Bitmap Song +- AR PL ShanHeiSun Uni +- AR PL New Sung +- MgOpen Modata +- VL Gothic +- IPAMonaGothic +- IPAGothic +- Sazanami Gothic +- Kochi Gothic +- AR PL KaitiM GB +- AR PL KaitiM Big5 +- AR PL ShanHeiSun Uni +- AR PL SungtiL GB +- AR PL Mingti2L Big5 +- MS ゴシック +- ZYSong18030 +- TSCu_Paranar +- NanumGothic +- UnDotum +- Baekmuk Dotum +- Baekmuk Gulim +- KacstQura +- Lohit Bengali +- Lohit Gujarati +- Lohit Hindi +- Lohit Marathi +- Lohit Maithili +- Lohit Kashmiri +- Lohit Konkani +- Lohit Nepali +- Lohit Sindhi +- Lohit Punjabi +- Lohit Tamil +- Meera +- Lohit Malayalam +- Lohit Kannada +- Lohit Telugu +- Lohit Oriya +- LKLUG +- +- +- +- monospace +- +- Miriam Mono +- VL Gothic +- IPAMonaGothic +- IPAGothic +- Sazanami Gothic +- Kochi Gothic +- AR PL KaitiM GB +- MS Gothic +- UmePlus Gothic +- NSimSun +- MingLiu +- AR PL ShanHeiSun Uni +- AR PL New Sung Mono +- HanyiSong +- AR PL SungtiL GB +- AR PL Mingti2L Big5 +- ZYSong18030 +- NanumGothicCoding +- NanumGothic +- UnDotum +- Baekmuk Dotum +- Baekmuk Gulim +- TlwgTypo +- TlwgTypist +- TlwgTypewriter +- TlwgMono +- Hasida +- GF Zemen Unicode +- Hapax Berbère +- Lohit Bengali +- Lohit Gujarati +- Lohit Hindi +- Lohit Marathi +- Lohit Maithili +- Lohit Kashmiri +- Lohit Konkani +- Lohit Nepali +- Lohit Sindhi +- Lohit Punjabi +- Lohit Tamil +- Meera +- Lohit Malayalam +- Lohit Kannada +- Lohit Telugu +- Lohit Oriya +- LKLUG +- +- +- +- +- system-ui +- +- Noto Sans Arabic UI +- Noto Sans Bengali UI +- Noto Sans Devanagari UI +- Noto Sans Gujarati UI +- Noto Sans Gurmukhi UI +- Noto Sans Kannada UI +- Noto Sans Khmer UI +- Noto Sans Lao UI +- Noto Sans Malayalam UI +- Noto Sans Myanmar UI +- Noto Sans Oriya UI +- Noto Sans Sinhala UI +- Noto Sans Tamil UI +- Noto Sans Telugu UI +- Noto Sans Thai UI +- Leelawadee UI +- Nirmala UI +- Yu Gothic UI +- Meiryo UI +- MS UI Gothic +- Khmer UI +- Lao UI +- Microsoft YaHei UI +- Microsoft JhengHei UI +- +- +- +- +diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf.d/69-nonlatin.conf +--- fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 ++++ fontconfig-2.14.2/conf.d/69-nonlatin.conf 2020-12-03 20:45:00.000000000 +0900 +@@ -0,0 +1,228 @@ ++ ++ ++ ++ Set preferable fonts for non-Latin ++ ++ serif ++ ++ Artsounk ++ BPG UTF8 M ++ Kinnari ++ Norasi ++ Frank Ruehl ++ Dror ++ JG LaoTimes ++ Saysettha Unicode ++ Pigiarniq ++ B Davat ++ B Compset ++ Kacst-Qr ++ Urdu Nastaliq Unicode ++ Raghindi ++ Mukti Narrow ++ malayalam ++ Sampige ++ padmaa ++ Hapax Berbère ++ MS Mincho ++ SimSun ++ PMingLiu ++ WenQuanYi Zen Hei ++ WenQuanYi Bitmap Song ++ AR PL ShanHeiSun Uni ++ AR PL New Sung ++ ZYSong18030 ++ HanyiSong ++ MgOpen Canonica ++ Sazanami Mincho ++ IPAMonaMincho ++ IPAMincho ++ Kochi Mincho ++ AR PL SungtiL GB ++ AR PL Mingti2L Big5 ++ AR PL Zenkai Uni ++ MS 明朝 ++ ZYSong18030 ++ NanumMyeongjo ++ UnBatang ++ Baekmuk Batang ++ KacstQura ++ Frank Ruehl CLM ++ Lohit Bengali ++ Lohit Gujarati ++ Lohit Hindi ++ Lohit Marathi ++ Lohit Maithili ++ Lohit Kashmiri ++ Lohit Konkani ++ Lohit Nepali ++ Lohit Sindhi ++ Lohit Punjabi ++ Lohit Tamil ++ Rachana ++ Lohit Malayalam ++ Lohit Kannada ++ Lohit Telugu ++ Lohit Oriya ++ LKLUG ++ ++ ++ ++ sans-serif ++ ++ Nachlieli ++ Lucida Sans Unicode ++ Yudit Unicode ++ Kerkis ++ ArmNet Helvetica ++ Artsounk ++ BPG UTF8 M ++ Waree ++ Loma ++ Garuda ++ Umpush ++ Saysettha Unicode ++ JG Lao Old Arial ++ GF Zemen Unicode ++ Pigiarniq ++ B Davat ++ B Compset ++ Kacst-Qr ++ Urdu Nastaliq Unicode ++ Raghindi ++ Mukti Narrow ++ malayalam ++ Sampige ++ padmaa ++ Hapax Berbère ++ MS Gothic ++ UmePlus P Gothic ++ Microsoft YaHei ++ Microsoft JhengHei ++ WenQuanYi Zen Hei ++ WenQuanYi Bitmap Song ++ AR PL ShanHeiSun Uni ++ AR PL New Sung ++ MgOpen Modata ++ VL Gothic ++ IPAMonaGothic ++ IPAGothic ++ Sazanami Gothic ++ Kochi Gothic ++ AR PL KaitiM GB ++ AR PL KaitiM Big5 ++ AR PL ShanHeiSun Uni ++ AR PL SungtiL GB ++ AR PL Mingti2L Big5 ++ MS ゴシック ++ ZYSong18030 ++ TSCu_Paranar ++ NanumGothic ++ UnDotum ++ Baekmuk Dotum ++ Baekmuk Gulim ++ KacstQura ++ Lohit Bengali ++ Lohit Gujarati ++ Lohit Hindi ++ Lohit Marathi ++ Lohit Maithili ++ Lohit Kashmiri ++ Lohit Konkani ++ Lohit Nepali ++ Lohit Sindhi ++ Lohit Punjabi ++ Lohit Tamil ++ Meera ++ Lohit Malayalam ++ Lohit Kannada ++ Lohit Telugu ++ Lohit Oriya ++ LKLUG ++ ++ ++ ++ monospace ++ ++ Miriam Mono ++ VL Gothic ++ IPAMonaGothic ++ IPAGothic ++ Sazanami Gothic ++ Kochi Gothic ++ AR PL KaitiM GB ++ MS Gothic ++ UmePlus Gothic ++ NSimSun ++ MingLiu ++ AR PL ShanHeiSun Uni ++ AR PL New Sung Mono ++ HanyiSong ++ AR PL SungtiL GB ++ AR PL Mingti2L Big5 ++ ZYSong18030 ++ NanumGothicCoding ++ NanumGothic ++ UnDotum ++ Baekmuk Dotum ++ Baekmuk Gulim ++ TlwgTypo ++ TlwgTypist ++ TlwgTypewriter ++ TlwgMono ++ Hasida ++ GF Zemen Unicode ++ Hapax Berbère ++ Lohit Bengali ++ Lohit Gujarati ++ Lohit Hindi ++ Lohit Marathi ++ Lohit Maithili ++ Lohit Kashmiri ++ Lohit Konkani ++ Lohit Nepali ++ Lohit Sindhi ++ Lohit Punjabi ++ Lohit Tamil ++ Meera ++ Lohit Malayalam ++ Lohit Kannada ++ Lohit Telugu ++ Lohit Oriya ++ LKLUG ++ ++ ++ ++ ++ system-ui ++ ++ Noto Sans Arabic UI ++ Noto Sans Bengali UI ++ Noto Sans Devanagari UI ++ Noto Sans Gujarati UI ++ Noto Sans Gurmukhi UI ++ Noto Sans Kannada UI ++ Noto Sans Khmer UI ++ Noto Sans Lao UI ++ Noto Sans Malayalam UI ++ Noto Sans Myanmar UI ++ Noto Sans Oriya UI ++ Noto Sans Sinhala UI ++ Noto Sans Tamil UI ++ Noto Sans Telugu UI ++ Noto Sans Thai UI ++ Leelawadee UI ++ Nirmala UI ++ Yu Gothic UI ++ Meiryo UI ++ MS UI Gothic ++ Khmer UI ++ Lao UI ++ Microsoft YaHei UI ++ Microsoft JhengHei UI ++ ++ ++ ++ +diff -pruN fontconfig-2.14.2.orig/conf.d/Makefile.am fontconfig-2.14.2/conf.d/Makefile.am +--- fontconfig-2.14.2.orig/conf.d/Makefile.am 2022-11-28 18:17:51.000000000 +0900 ++++ fontconfig-2.14.2/conf.d/Makefile.am 2023-08-17 16:56:24.358848001 +0900 +@@ -47,7 +47,7 @@ CONF_LINKS = \ + 60-generic.conf \ + 60-latin.conf \ + 65-fonts-persian.conf \ +- 65-nonlatin.conf \ ++ 69-nonlatin.conf \ + 69-unifont.conf \ + 80-delicious.conf \ + 90-synthetic.conf +@@ -94,7 +94,7 @@ template_DATA = \ + 60-latin.conf \ + 65-fonts-persian.conf \ + 65-khmer.conf \ +- 65-nonlatin.conf \ ++ 69-nonlatin.conf \ + 69-unifont.conf \ + 70-no-bitmaps.conf \ + 70-yes-bitmaps.conf \ diff --git a/fontconfig.spec b/fontconfig.spec index f5d7668..4ae40d6 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -21,6 +21,7 @@ Source2: fc-cache Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch +Patch6: %{name}-lower-nonlatin-conf.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -191,6 +192,16 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Aug 17 2023 Akira TAGOH - 2.14.2-5 +- Update 65-nonlatin.conf to 69-nonlatin.conf + This basically provides substitutes for certain languages and is helpful + to determine default behavior though, we have per-package config for similar purpose. + Since 65 is mostly used for default fonts and this config prevents some behavior for + packages named something coming later than "nonlatin" in the alphabetical order. + So moving this to the safer priority. + This would fixes an issue, particularly Lohit Marathi vs Lohit Devanagari after + updating their priorities from 65 to 66. + * Wed Jul 19 2023 Fedora Release Engineering - 2.14.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 1b1dff013739b4acf986e080ffb2ed5157bcf896 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 17 Aug 2023 17:43:37 +0900 Subject: [PATCH 128/154] Bump a release --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 4ae40d6..d52502d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.2 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 From d72678cc75d7591c03a69a97a55f6452eb32fcfb Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 22 Dec 2023 23:12:42 +0900 Subject: [PATCH 129/154] New upstream release. Resolves: rhbz#2255623 --- .gitignore | 1 + fontconfig-lower-nonlatin-conf.patch | 48 +++++++++++++++++++++------- fontconfig.spec | 10 ++++-- sources | 1 + 4 files changed, 45 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 95fbd70..fab771d 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.14.0.tar.xz /fontconfig-2.14.1.tar.xz /fontconfig-2.14.2.tar.xz +/fontconfig-2.15.0.tar.xz diff --git a/fontconfig-lower-nonlatin-conf.patch b/fontconfig-lower-nonlatin-conf.patch index 6139992..2be984f 100644 --- a/fontconfig-lower-nonlatin-conf.patch +++ b/fontconfig-lower-nonlatin-conf.patch @@ -1,7 +1,7 @@ -diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf.d/65-nonlatin.conf ---- fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf 2020-12-03 20:45:00.000000000 +0900 -+++ fontconfig-2.14.2/conf.d/65-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 -@@ -1,228 +0,0 @@ +diff -pruN fontconfig-2.15.0.orig/conf.d/65-nonlatin.conf fontconfig-2.15.0/conf.d/65-nonlatin.conf +--- fontconfig-2.15.0.orig/conf.d/65-nonlatin.conf 2023-03-22 20:36:46.000000000 +0900 ++++ fontconfig-2.15.0/conf.d/65-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,240 +0,0 @@ - - - @@ -37,6 +37,10 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - AR PL New Sung - ZYSong18030 - HanyiSong +- Hiragino Mincho ProN +- Songti SC +- Songti TC +- SimSong - MgOpen Canonica - Sazanami Mincho - IPAMonaMincho @@ -50,6 +54,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - NanumMyeongjo - UnBatang - Baekmuk Batang +- AppleMyungjo - KacstQura - Frank Ruehl CLM - Lohit Bengali @@ -107,6 +112,12 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - WenQuanYi Bitmap Song - AR PL ShanHeiSun Uni - AR PL New Sung +- Hiragino Sans +- PingFang SC +- PingFang TC +- PingFang HK +- Hiragino Sans CNS +- Hiragino Sans GB - MgOpen Modata - VL Gothic - IPAMonaGothic @@ -125,6 +136,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - UnDotum - Baekmuk Dotum - Baekmuk Gulim +- Apple SD Gothic Neo - KacstQura - Lohit Bengali - Lohit Gujarati @@ -230,10 +242,10 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - - - -diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf.d/69-nonlatin.conf ---- fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 -+++ fontconfig-2.14.2/conf.d/69-nonlatin.conf 2020-12-03 20:45:00.000000000 +0900 -@@ -0,0 +1,228 @@ +diff -pruN fontconfig-2.15.0.orig/conf.d/69-nonlatin.conf fontconfig-2.15.0/conf.d/69-nonlatin.conf +--- fontconfig-2.15.0.orig/conf.d/69-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 ++++ fontconfig-2.15.0/conf.d/69-nonlatin.conf 2023-03-22 20:36:46.000000000 +0900 +@@ -0,0 +1,240 @@ + + + @@ -269,6 +281,10 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + AR PL New Sung + ZYSong18030 + HanyiSong ++ Hiragino Mincho ProN ++ Songti SC ++ Songti TC ++ SimSong + MgOpen Canonica + Sazanami Mincho + IPAMonaMincho @@ -282,6 +298,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + NanumMyeongjo + UnBatang + Baekmuk Batang ++ AppleMyungjo + KacstQura + Frank Ruehl CLM + Lohit Bengali @@ -339,6 +356,12 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + WenQuanYi Bitmap Song + AR PL ShanHeiSun Uni + AR PL New Sung ++ Hiragino Sans ++ PingFang SC ++ PingFang TC ++ PingFang HK ++ Hiragino Sans CNS ++ Hiragino Sans GB + MgOpen Modata + VL Gothic + IPAMonaGothic @@ -357,6 +380,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + UnDotum + Baekmuk Dotum + Baekmuk Gulim ++ Apple SD Gothic Neo + KacstQura + Lohit Bengali + Lohit Gujarati @@ -462,9 +486,9 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + + + -diff -pruN fontconfig-2.14.2.orig/conf.d/Makefile.am fontconfig-2.14.2/conf.d/Makefile.am ---- fontconfig-2.14.2.orig/conf.d/Makefile.am 2022-11-28 18:17:51.000000000 +0900 -+++ fontconfig-2.14.2/conf.d/Makefile.am 2023-08-17 16:56:24.358848001 +0900 +diff -pruN fontconfig-2.15.0.orig/conf.d/Makefile.am fontconfig-2.15.0/conf.d/Makefile.am +--- fontconfig-2.15.0.orig/conf.d/Makefile.am 2023-08-24 14:14:15.000000000 +0900 ++++ fontconfig-2.15.0/conf.d/Makefile.am 2023-12-22 23:08:05.514969924 +0900 @@ -47,7 +47,7 @@ CONF_LINKS = \ 60-generic.conf \ 60-latin.conf \ @@ -474,7 +498,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/Makefile.am fontconfig-2.14.2/conf.d/Ma 69-unifont.conf \ 80-delicious.conf \ 90-synthetic.conf -@@ -94,7 +94,7 @@ template_DATA = \ +@@ -95,7 +95,7 @@ template_DATA = \ 60-latin.conf \ 65-fonts-persian.conf \ 65-khmer.conf \ diff --git a/fontconfig.spec b/fontconfig.spec index d52502d..e5bd5b5 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.14.2 -Release: 5%{?dist} +Version: 2.15.0 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -156,7 +156,7 @@ if [ $1 == 0 ] && [ -e %{_sysconfdir}/xml/catalog ]; then fi %files -f %{name}.lang -%doc README AUTHORS +%doc README.md AUTHORS %doc fontconfig-user.txt fontconfig-user.html %doc %{_fontconfig_confdir}/README %license COPYING @@ -192,6 +192,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Dec 22 2023 Akira TAGOH - 2.15.0-1 +- New upstream release. + Resolves: rhbz#2255623 + * Thu Aug 17 2023 Akira TAGOH - 2.14.2-5 - Update 65-nonlatin.conf to 69-nonlatin.conf This basically provides substitutes for certain languages and is helpful diff --git a/sources b/sources index 9884c80..10b4abe 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (fontconfig-2.14.2.tar.xz) = 23483e0ae6aa7589fd37f9949a4cf951c5bff981739dbb446881e4cea86a208c0ab31e2358666eac724af1dc6a689a42733a7ce91cd3e76d8d91eacedb318085 +SHA512 (fontconfig-2.15.0.tar.xz) = 754cd5fffa198fc07a39cf7df683e9adfa7f54ab41fdff8c0eacc078fd35d3e01069ba343f2b045e0b40df88d9f1fc1ee0f7565799f9cb194a59cf95b64c4417 From bfd9218620b7da2315d310df2d9fcc35aab207bf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 19:36:21 +0000 Subject: [PATCH 130/154] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index e5bd5b5..0d6e0c5 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -192,6 +192,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 2.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Dec 22 2023 Akira TAGOH - 2.15.0-1 - New upstream release. Resolves: rhbz#2255623 From 50326b480810be2507507c99322995cc75663c98 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 11:51:39 +0000 Subject: [PATCH 131/154] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 0d6e0c5..a1d6e29 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -192,6 +192,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 2.15.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 2.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e200ccfc726f40f54e5695afbeb37efe2209f7e2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 10 Feb 2024 02:28:59 +0900 Subject: [PATCH 132/154] Delete .uuid with fc-cache -f. Resolves: rhbz#1761885 --- fontconfig-remove-uuid.patch | 67 ++++++++++++++++++++++++++++++++++++ fontconfig.spec | 7 +++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 fontconfig-remove-uuid.patch diff --git a/fontconfig-remove-uuid.patch b/fontconfig-remove-uuid.patch new file mode 100644 index 0000000..16c0d04 --- /dev/null +++ b/fontconfig-remove-uuid.patch @@ -0,0 +1,67 @@ +From c22908828fb2dbfdf38733d119adc1cf5fe00173 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Sat, 10 Feb 2024 00:20:54 +0900 +Subject: [PATCH 1/2] Clean up .uuid files with fc-cache -f too + +.uuid file was obsoleted >5 years ago and it was supposed to +be cleaned up by fc-cache -r but not -f. +This change tries to clean it up by fc-cache -f. + +https://bugzilla.redhat.com/show_bug.cgi?id=1761885 +--- + src/fcdir.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/fcdir.c b/src/fcdir.c +index 6f7b3835..2e4fdc69 100644 +--- a/src/fcdir.c ++++ b/src/fcdir.c +@@ -234,7 +234,7 @@ FcDirScanConfig (FcFontSet *set, + + if (FcDebug () & FC_DBG_SCAN) + printf ("\tScanning dir %s\n", s_dir); +- ++ + d = opendir ((char *) s_dir); + if (!d) + { +@@ -459,7 +459,10 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) + + /* Not using existing cache file, construct new cache */ + if (!cache) ++ { ++ FcDirCacheDeleteUUID (dir, config); + cache = FcDirCacheScan (dir, config); ++ } + FcConfigDestroy (config); + + return cache; +-- +2.43.0 + +From a76b95105ca26c600279b2daf4bd43b37a918823 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Sat, 10 Feb 2024 02:15:45 +0900 +Subject: [PATCH 2/2] Fix undesired unref of FcConfig on Win32 + +--- + src/fccache.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fccache.c b/src/fccache.c +index cebbb810..54f76ac1 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -106,8 +106,8 @@ FcDirCacheDeleteUUID (const FcChar8 *dir, + FcStrFree (target); + bail: + FcStrFree (d); +-#endif + FcConfigDestroy (config); ++#endif + + return ret; + } +-- +2.43.0 + diff --git a/fontconfig.spec b/fontconfig.spec index a1d6e29..6390590 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -22,6 +22,7 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch +Patch7: %{name}-remove-uuid.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -192,6 +193,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Sat Feb 10 2024 Akira TAGOH - 2.15.0-4 +- Delete .uuid with fc-cache -f. + Resolves: rhbz#1761885 + * Wed Jan 24 2024 Fedora Release Engineering - 2.15.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From be5b48f736a36bec35e6c112c0a646c6fbd29a82 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 30 Apr 2024 01:22:24 +0200 Subject: [PATCH 133/154] Fix emoji fonts being disabled when bitmap fonts were disabled --- fontconfig-fix-emojis.patch | 109 ++++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 +- 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-emojis.patch diff --git a/fontconfig-fix-emojis.patch b/fontconfig-fix-emojis.patch new file mode 100644 index 0000000..ef4738b --- /dev/null +++ b/fontconfig-fix-emojis.patch @@ -0,0 +1,109 @@ +From 810a300398dc93b7becca4a7f286e8999adc09a5 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Fri, 8 Mar 2024 01:55:14 +0900 +Subject: [PATCH] Sort out bitmap related config files + +70-no-bitmaps-and-emoji.conf: reject bitmap fonts including bitmap emoji fonts. +70-no-bitmaps-except-emoji.conf: reject bitmap fonts except bitmap emoji fonts. +70-no-bitmaps.conf: same to 70-no-bitmaps-except-emoji.conf for backward compatibility +but deprecated. This will be dropped in the future. + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/409 +--- + conf.d/70-no-bitmaps-and-emoji.conf | 13 +++++++++++++ + conf.d/70-no-bitmaps-except-emoji.conf | 14 ++++++++++++++ + conf.d/70-no-bitmaps.conf | 11 ++--------- + conf.d/Makefile.am | 2 ++ + conf.d/meson.build | 2 ++ + 5 files changed, 33 insertions(+), 9 deletions(-) + create mode 100644 conf.d/70-no-bitmaps-and-emoji.conf + create mode 100644 conf.d/70-no-bitmaps-except-emoji.conf + +diff --git a/conf.d/70-no-bitmaps-and-emoji.conf b/conf.d/70-no-bitmaps-and-emoji.conf +new file mode 100644 +index 00000000..3e18a4cf +--- /dev/null ++++ b/conf.d/70-no-bitmaps-and-emoji.conf +@@ -0,0 +1,13 @@ ++ ++ ++ ++ Reject bitmap fonts, including bitmap emoji fonts ++ ++ ++ ++ ++ false ++ ++ ++ ++ +diff --git a/conf.d/70-no-bitmaps-except-emoji.conf b/conf.d/70-no-bitmaps-except-emoji.conf +new file mode 100644 +index 00000000..3170cd6f +--- /dev/null ++++ b/conf.d/70-no-bitmaps-except-emoji.conf +@@ -0,0 +1,14 @@ ++ ++ ++ ++ Reject bitmap fonts except bitmap emoji fonts ++ ++ ++ ++ ++ false ++ false ++ ++ ++ ++ +diff --git a/conf.d/70-no-bitmaps.conf b/conf.d/70-no-bitmaps.conf +index 10203acb..767e4115 100644 +--- a/conf.d/70-no-bitmaps.conf ++++ b/conf.d/70-no-bitmaps.conf +@@ -1,13 +1,6 @@ + + + +- Reject bitmap fonts +- +- +- +- +- false +- +- +- ++ Reject bitmap fonts except bitmap emoji fonts (deprecated; use 70-no-bitmaps-except-emoji.conf) ++ 70-no-bitmaps-except-emoji.conf + +diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am +index fd858348..737b4fb2 100644 +--- a/conf.d/Makefile.am ++++ b/conf.d/Makefile.am +@@ -98,6 +98,8 @@ template_DATA = \ + 69-nonlatin.conf \ + 69-unifont.conf \ + 70-no-bitmaps.conf \ ++ 70-no-bitmaps-and-emoji.conf \ ++ 70-no-bitmaps-except-emoji.conf \ + 70-yes-bitmaps.conf \ + 80-delicious.conf \ + 90-synthetic.conf +diff --git a/conf.d/meson.build b/conf.d/meson.build +index 8e896118..b6d07ee0 100644 +--- a/conf.d/meson.build ++++ b/conf.d/meson.build +@@ -36,6 +36,8 @@ conf_files = [ + '65-nonlatin.conf', + '69-unifont.conf', + '70-no-bitmaps.conf', ++ '70-no-bitmaps-and-emoji.conf', ++ '70-no-bitmaps-except-emoji.conf', + '70-yes-bitmaps.conf', + '80-delicious.conf', + '90-synthetic.conf', +-- +GitLab + diff --git a/fontconfig.spec b/fontconfig.spec index 6390590..85991f1 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -23,6 +23,7 @@ Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch Patch7: %{name}-remove-uuid.patch +Patch8: %{name}-fix-emojis.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -193,6 +194,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Apr 29 2024 Michael Kuhn - 2.15.0-5 +- Fix emoji fonts being disabled when bitmap fonts were disabled + * Sat Feb 10 2024 Akira TAGOH - 2.15.0-4 - Delete .uuid with fc-cache -f. Resolves: rhbz#1761885 From 354394f0f41a6de0997c59d806ec524ab17e1cc3 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 7 Jun 2024 23:03:12 +0900 Subject: [PATCH 134/154] Own /usr/lib/fontconfig Resolves: rhbz#2284076 --- fontconfig.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 85991f1..856f352 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 5%{?dist} +Release: 6%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -178,6 +178,7 @@ fi # If you want to do so, you should use local.conf instead. %config %{_fontconfig_masterdir}/fonts.conf %config(noreplace) %{_fontconfig_confdir}/*.conf +%dir /usr/lib/fontconfig %dir /usr/lib/fontconfig/cache %{_mandir}/man1/* %{_mandir}/man5/* @@ -194,6 +195,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jun 7 2024 Akira TAGOH - 2.15.0-6 +- Own /usr/lib/fontconfig + Resolves: rhbz#2284076 + * Mon Apr 29 2024 Michael Kuhn - 2.15.0-5 - Fix emoji fonts being disabled when bitmap fonts were disabled From 067f5c6f8e55b7238501bf1470e792cfbb120ff6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 23:26:13 +0000 Subject: [PATCH 135/154] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 856f352..bfdb782 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 6%{?dist} +Release: 7%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -195,6 +195,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 2.15.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 7 2024 Akira TAGOH - 2.15.0-6 - Own /usr/lib/fontconfig Resolves: rhbz#2284076 From d3f982b32de573dd5d557e75fa0792e4a87fc25a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 18 Jul 2024 19:37:02 +0900 Subject: [PATCH 136/154] ci: Use tmt based test cases --- .fmf/version | 1 + tests/basic/main.fmf | 3 +++ tests/basic/test.sh | 22 ++++++++++++++++++++++ tests/tests.yml | 14 -------------- 4 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 .fmf/version create mode 100644 tests/basic/main.fmf create mode 100755 tests/basic/test.sh delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/basic/main.fmf b/tests/basic/main.fmf new file mode 100644 index 0000000..d6c06ec --- /dev/null +++ b/tests/basic/main.fmf @@ -0,0 +1,3 @@ +summary: Concise summary describing what the test does +test: ./test.sh +framework: beakerlib diff --git a/tests/basic/test.sh b/tests/basic/test.sh new file mode 100755 index 0000000..10de1b4 --- /dev/null +++ b/tests/basic/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "set -o pipefail" + rlPhaseEnd + + rlPhaseStartTest + rlRun "fc-match" 0 "Check fc-match" + rlRun "fc-list" 0 "Check fc-list" + rlRun "fc-scan /usr/share/fonts" 0 "Check fc-scan" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index d3fa1ed..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,14 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required_packages: - - fontconfig - tests: - - fcmatch_test: - dir: . - run: fc-match - - fclist_test: - dir: . - run: fc-list From c400e27282f14ea8e6102529bf176cdcba501655 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 19 Jul 2024 20:09:47 +0900 Subject: [PATCH 137/154] ci: Add fmf plan file --- plans/basic.fmf | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 plans/basic.fmf diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt From c6712606928e77b5a59599e704cbf302296c03fe Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 1 Aug 2024 12:45:32 +0900 Subject: [PATCH 138/154] Fix a memory leak and potentially uninitialized values. --- fontconfig-fix-SAST.patch | 54 +++++++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 ++++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-SAST.patch diff --git a/fontconfig-fix-SAST.patch b/fontconfig-fix-SAST.patch new file mode 100644 index 0000000..6ef1b07 --- /dev/null +++ b/fontconfig-fix-SAST.patch @@ -0,0 +1,54 @@ +From eaa335e7c4686c622f31e691f8a41fdf30ea42b3 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 31 Jul 2024 17:31:36 +0900 +Subject: [PATCH 1/2] Fix a memory leak in _get_real_paths_from_prefix + +--- + src/fcxml.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/fcxml.c b/src/fcxml.c +index 9fe0674..083fc1f 100644 +--- a/src/fcxml.c ++++ b/src/fcxml.c +@@ -1327,11 +1327,9 @@ _get_real_paths_from_prefix(FcConfigParse *parse, const FcChar8 *path, const FcC + if (!p) + return NULL; + parent = FcStrDirname (p); ++ FcStrFree (p); + if (!parent) +- { +- free (p); + return NULL; +- } + } + } + #ifndef _WIN32 +-- +2.45.2 + +From ab765827101787d49c0a66b23addc1f68f99a455 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 31 Jul 2024 17:37:53 +0900 +Subject: [PATCH 2/2] Set FcTypeVoid if no valid types to convert + +--- + src/fcname.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/fcname.c b/src/fcname.c +index 566f0ef..b152bd9 100644 +--- a/src/fcname.c ++++ b/src/fcname.c +@@ -406,6 +406,8 @@ FcNameConvert (FcType type, const char *object, FcChar8 *string) + v.u.r = FcRangeCreateDouble (b, e); + break; + default: ++ /* No valid type to convert */ ++ v.type = FcTypeVoid; + break; + } + return v; +-- +2.45.2 + diff --git a/fontconfig.spec b/fontconfig.spec index bfdb782..8f32181 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 7%{?dist} +Release: 8%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -24,6 +24,7 @@ Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch Patch7: %{name}-remove-uuid.patch Patch8: %{name}-fix-emojis.patch +Patch9: %{name}-fix-SAST.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -195,6 +196,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Aug 1 2024 Akira TAGOH - 2.15.0-8 +- Fix a memory leak and potentially uninitialized values. + * Wed Jul 17 2024 Fedora Release Engineering - 2.15.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From e2bb04c6dbe8cda0add21fda01a23f0770bdd404 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 18:36:18 +0000 Subject: [PATCH 139/154] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 8f32181..c4a9476 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 8%{?dist} +Release: 9%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -196,6 +196,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Aug 1 2024 Akira TAGOH - 2.15.0-8 - Fix a memory leak and potentially uninitialized values. From 39a7075dc3bf71fdb013926f31a29acc1324edc2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 18 Jan 2025 01:36:49 +0900 Subject: [PATCH 140/154] New upstream release. Use meson instead of autotools to build. --- .gitignore | 1 + ...config-disable-network-required-test.patch | 43 +- fontconfig-lower-nonlatin-conf.patch | 517 +----------------- fontconfig.spec | 63 ++- sources | 3 +- 5 files changed, 99 insertions(+), 528 deletions(-) diff --git a/.gitignore b/.gitignore index fab771d..b63773a 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.14.1.tar.xz /fontconfig-2.14.2.tar.xz /fontconfig-2.15.0.tar.xz +/fontconfig-2.16.0.tar.xz diff --git a/fontconfig-disable-network-required-test.patch b/fontconfig-disable-network-required-test.patch index 8481f39..b276aa5 100644 --- a/fontconfig-disable-network-required-test.patch +++ b/fontconfig-disable-network-required-test.patch @@ -1,7 +1,38 @@ -diff -pruN fontconfig-2.13.93.orig/test/run-test.sh fontconfig-2.13.93/test/run-test.sh ---- fontconfig-2.13.93.orig/test/run-test.sh 2020-11-28 10:56:42.000000000 +0900 -+++ fontconfig-2.13.93/test/run-test.sh 2020-11-28 12:39:57.345644527 +0900 -@@ -421,18 +421,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" my- +diff -pruN fontconfig-2.16.0.orig/test/meson.build fontconfig-2.16.0/test/meson.build +--- fontconfig-2.16.0.orig/test/meson.build 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/test/meson.build 2025-01-18 01:07:12.893480441 +0900 +@@ -15,7 +15,7 @@ if host_machine.system() != 'windows' + ['test-bz106632.c', {'c_args': ['-DFONTFILE="@0@"'.format(join_paths(meson.current_source_dir(), '4x6.pcf'))]}], + ['test-issue107.c'], # FIXME: fails on mingw + # FIXME: this needs NotoSans-hinted.zip font downloaded and unpacked into test build directory! see run-test.sh +- ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread ++ #['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread + ] + + if get_option('default_library') == 'static' +@@ -62,12 +62,12 @@ if host_machine.system() != 'windows' + + test('run_test_sh', find_program('run-test.sh'), timeout: 600, env: ['srcdir=@0@'.format(meson.current_source_dir()), 'builddir=@0@'.format(meson.current_build_dir()), 'EXEEXT=@0@'.format(conf.get('EXEEXT')), 'VERBOSE=1']) + +- if pytest.found() +- test('pytest', pytest, args: ['--tap'], +- workdir: meson.current_source_dir(), +- env: ['builddir=@0@'.format(meson.current_build_dir())], +- protocol: 'tap') +- endif ++# if pytest.found() ++# test('pytest', pytest, args: ['--tap'], ++# workdir: meson.current_source_dir(), ++# env: ['builddir=@0@'.format(meson.current_build_dir())], ++# protocol: 'tap') ++# endif + endif + + if jsonc_dep.found() +diff -pruN fontconfig-2.16.0.orig/test/run-test.sh fontconfig-2.16.0/test/run-test.sh +--- fontconfig-2.16.0.orig/test/run-test.sh 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/test/run-test.sh 2025-01-18 01:06:54.310144693 +0900 +@@ -499,18 +499,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B fi # if [ "x$EXEEXT" = "x" ] @@ -11,7 +42,7 @@ diff -pruN fontconfig-2.13.93.orig/test/run-test.sh fontconfig-2.13.93/test/run- - curl -s -o "$FONTDIR"/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip - (cd "$FONTDIR"; unzip noto.zip) - if [ -n "${SOURCE_DATE_EPOCH:-}" ] && [ ${#SOURCE_DATE_EPOCH} -gt 0 ]; then -- touch -m -t "$(date -d @"${SOURCE_DATE_EPOCH}" +%y%m%d%H%M.%S)" "$FONTDIR" +- touch -m -t "$(fdate ${SOURCE_DATE_EPOCH})" "$FONTDIR" - fi - "$BUILDTESTDIR"/test-crbug1004254 -else @@ -21,7 +52,7 @@ diff -pruN fontconfig-2.13.93.orig/test/run-test.sh fontconfig-2.13.93/test/run- +# curl -s -o "$FONTDIR"/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip +# (cd "$FONTDIR"; unzip noto.zip) +# if [ -n "${SOURCE_DATE_EPOCH:-}" ] && [ ${#SOURCE_DATE_EPOCH} -gt 0 ]; then -+# touch -m -t "$(date -d @"${SOURCE_DATE_EPOCH}" +%y%m%d%H%M.%S)" "$FONTDIR" ++# touch -m -t "$(fdate ${SOURCE_DATE_EPOCH})" "$FONTDIR" +# fi +# "$BUILDTESTDIR"/test-crbug1004254 +#else diff --git a/fontconfig-lower-nonlatin-conf.patch b/fontconfig-lower-nonlatin-conf.patch index 2be984f..3ff373a 100644 --- a/fontconfig-lower-nonlatin-conf.patch +++ b/fontconfig-lower-nonlatin-conf.patch @@ -1,494 +1,6 @@ -diff -pruN fontconfig-2.15.0.orig/conf.d/65-nonlatin.conf fontconfig-2.15.0/conf.d/65-nonlatin.conf ---- fontconfig-2.15.0.orig/conf.d/65-nonlatin.conf 2023-03-22 20:36:46.000000000 +0900 -+++ fontconfig-2.15.0/conf.d/65-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 -@@ -1,240 +0,0 @@ -- -- -- -- Set preferable fonts for non-Latin -- -- serif -- -- Artsounk -- BPG UTF8 M -- Kinnari -- Norasi -- Frank Ruehl -- Dror -- JG LaoTimes -- Saysettha Unicode -- Pigiarniq -- B Davat -- B Compset -- Kacst-Qr -- Urdu Nastaliq Unicode -- Raghindi -- Mukti Narrow -- malayalam -- Sampige -- padmaa -- Hapax Berbère -- MS Mincho -- SimSun -- PMingLiu -- WenQuanYi Zen Hei -- WenQuanYi Bitmap Song -- AR PL ShanHeiSun Uni -- AR PL New Sung -- ZYSong18030 -- HanyiSong -- Hiragino Mincho ProN -- Songti SC -- Songti TC -- SimSong -- MgOpen Canonica -- Sazanami Mincho -- IPAMonaMincho -- IPAMincho -- Kochi Mincho -- AR PL SungtiL GB -- AR PL Mingti2L Big5 -- AR PL Zenkai Uni -- MS 明朝 -- ZYSong18030 -- NanumMyeongjo -- UnBatang -- Baekmuk Batang -- AppleMyungjo -- KacstQura -- Frank Ruehl CLM -- Lohit Bengali -- Lohit Gujarati -- Lohit Hindi -- Lohit Marathi -- Lohit Maithili -- Lohit Kashmiri -- Lohit Konkani -- Lohit Nepali -- Lohit Sindhi -- Lohit Punjabi -- Lohit Tamil -- Rachana -- Lohit Malayalam -- Lohit Kannada -- Lohit Telugu -- Lohit Oriya -- LKLUG -- -- -- -- sans-serif -- -- Nachlieli -- Lucida Sans Unicode -- Yudit Unicode -- Kerkis -- ArmNet Helvetica -- Artsounk -- BPG UTF8 M -- Waree -- Loma -- Garuda -- Umpush -- Saysettha Unicode -- JG Lao Old Arial -- GF Zemen Unicode -- Pigiarniq -- B Davat -- B Compset -- Kacst-Qr -- Urdu Nastaliq Unicode -- Raghindi -- Mukti Narrow -- malayalam -- Sampige -- padmaa -- Hapax Berbère -- MS Gothic -- UmePlus P Gothic -- Microsoft YaHei -- Microsoft JhengHei -- WenQuanYi Zen Hei -- WenQuanYi Bitmap Song -- AR PL ShanHeiSun Uni -- AR PL New Sung -- Hiragino Sans -- PingFang SC -- PingFang TC -- PingFang HK -- Hiragino Sans CNS -- Hiragino Sans GB -- MgOpen Modata -- VL Gothic -- IPAMonaGothic -- IPAGothic -- Sazanami Gothic -- Kochi Gothic -- AR PL KaitiM GB -- AR PL KaitiM Big5 -- AR PL ShanHeiSun Uni -- AR PL SungtiL GB -- AR PL Mingti2L Big5 -- MS ゴシック -- ZYSong18030 -- TSCu_Paranar -- NanumGothic -- UnDotum -- Baekmuk Dotum -- Baekmuk Gulim -- Apple SD Gothic Neo -- KacstQura -- Lohit Bengali -- Lohit Gujarati -- Lohit Hindi -- Lohit Marathi -- Lohit Maithili -- Lohit Kashmiri -- Lohit Konkani -- Lohit Nepali -- Lohit Sindhi -- Lohit Punjabi -- Lohit Tamil -- Meera -- Lohit Malayalam -- Lohit Kannada -- Lohit Telugu -- Lohit Oriya -- LKLUG -- -- -- -- monospace -- -- Miriam Mono -- VL Gothic -- IPAMonaGothic -- IPAGothic -- Sazanami Gothic -- Kochi Gothic -- AR PL KaitiM GB -- MS Gothic -- UmePlus Gothic -- NSimSun -- MingLiu -- AR PL ShanHeiSun Uni -- AR PL New Sung Mono -- HanyiSong -- AR PL SungtiL GB -- AR PL Mingti2L Big5 -- ZYSong18030 -- NanumGothicCoding -- NanumGothic -- UnDotum -- Baekmuk Dotum -- Baekmuk Gulim -- TlwgTypo -- TlwgTypist -- TlwgTypewriter -- TlwgMono -- Hasida -- GF Zemen Unicode -- Hapax Berbère -- Lohit Bengali -- Lohit Gujarati -- Lohit Hindi -- Lohit Marathi -- Lohit Maithili -- Lohit Kashmiri -- Lohit Konkani -- Lohit Nepali -- Lohit Sindhi -- Lohit Punjabi -- Lohit Tamil -- Meera -- Lohit Malayalam -- Lohit Kannada -- Lohit Telugu -- Lohit Oriya -- LKLUG -- -- -- -- -- system-ui -- -- Noto Sans Arabic UI -- Noto Sans Bengali UI -- Noto Sans Devanagari UI -- Noto Sans Gujarati UI -- Noto Sans Gurmukhi UI -- Noto Sans Kannada UI -- Noto Sans Khmer UI -- Noto Sans Lao UI -- Noto Sans Malayalam UI -- Noto Sans Myanmar UI -- Noto Sans Oriya UI -- Noto Sans Sinhala UI -- Noto Sans Tamil UI -- Noto Sans Telugu UI -- Noto Sans Thai UI -- Leelawadee UI -- Nirmala UI -- Yu Gothic UI -- Meiryo UI -- MS UI Gothic -- Khmer UI -- Lao UI -- Microsoft YaHei UI -- Microsoft JhengHei UI -- -- -- -- -diff -pruN fontconfig-2.15.0.orig/conf.d/69-nonlatin.conf fontconfig-2.15.0/conf.d/69-nonlatin.conf ---- fontconfig-2.15.0.orig/conf.d/69-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 -+++ fontconfig-2.15.0/conf.d/69-nonlatin.conf 2023-03-22 20:36:46.000000000 +0900 -@@ -0,0 +1,240 @@ -+ -+ -+ -+ Set preferable fonts for non-Latin -+ -+ serif -+ -+ Artsounk -+ BPG UTF8 M -+ Kinnari -+ Norasi -+ Frank Ruehl -+ Dror -+ JG LaoTimes -+ Saysettha Unicode -+ Pigiarniq -+ B Davat -+ B Compset -+ Kacst-Qr -+ Urdu Nastaliq Unicode -+ Raghindi -+ Mukti Narrow -+ malayalam -+ Sampige -+ padmaa -+ Hapax Berbère -+ MS Mincho -+ SimSun -+ PMingLiu -+ WenQuanYi Zen Hei -+ WenQuanYi Bitmap Song -+ AR PL ShanHeiSun Uni -+ AR PL New Sung -+ ZYSong18030 -+ HanyiSong -+ Hiragino Mincho ProN -+ Songti SC -+ Songti TC -+ SimSong -+ MgOpen Canonica -+ Sazanami Mincho -+ IPAMonaMincho -+ IPAMincho -+ Kochi Mincho -+ AR PL SungtiL GB -+ AR PL Mingti2L Big5 -+ AR PL Zenkai Uni -+ MS 明朝 -+ ZYSong18030 -+ NanumMyeongjo -+ UnBatang -+ Baekmuk Batang -+ AppleMyungjo -+ KacstQura -+ Frank Ruehl CLM -+ Lohit Bengali -+ Lohit Gujarati -+ Lohit Hindi -+ Lohit Marathi -+ Lohit Maithili -+ Lohit Kashmiri -+ Lohit Konkani -+ Lohit Nepali -+ Lohit Sindhi -+ Lohit Punjabi -+ Lohit Tamil -+ Rachana -+ Lohit Malayalam -+ Lohit Kannada -+ Lohit Telugu -+ Lohit Oriya -+ LKLUG -+ -+ -+ -+ sans-serif -+ -+ Nachlieli -+ Lucida Sans Unicode -+ Yudit Unicode -+ Kerkis -+ ArmNet Helvetica -+ Artsounk -+ BPG UTF8 M -+ Waree -+ Loma -+ Garuda -+ Umpush -+ Saysettha Unicode -+ JG Lao Old Arial -+ GF Zemen Unicode -+ Pigiarniq -+ B Davat -+ B Compset -+ Kacst-Qr -+ Urdu Nastaliq Unicode -+ Raghindi -+ Mukti Narrow -+ malayalam -+ Sampige -+ padmaa -+ Hapax Berbère -+ MS Gothic -+ UmePlus P Gothic -+ Microsoft YaHei -+ Microsoft JhengHei -+ WenQuanYi Zen Hei -+ WenQuanYi Bitmap Song -+ AR PL ShanHeiSun Uni -+ AR PL New Sung -+ Hiragino Sans -+ PingFang SC -+ PingFang TC -+ PingFang HK -+ Hiragino Sans CNS -+ Hiragino Sans GB -+ MgOpen Modata -+ VL Gothic -+ IPAMonaGothic -+ IPAGothic -+ Sazanami Gothic -+ Kochi Gothic -+ AR PL KaitiM GB -+ AR PL KaitiM Big5 -+ AR PL ShanHeiSun Uni -+ AR PL SungtiL GB -+ AR PL Mingti2L Big5 -+ MS ゴシック -+ ZYSong18030 -+ TSCu_Paranar -+ NanumGothic -+ UnDotum -+ Baekmuk Dotum -+ Baekmuk Gulim -+ Apple SD Gothic Neo -+ KacstQura -+ Lohit Bengali -+ Lohit Gujarati -+ Lohit Hindi -+ Lohit Marathi -+ Lohit Maithili -+ Lohit Kashmiri -+ Lohit Konkani -+ Lohit Nepali -+ Lohit Sindhi -+ Lohit Punjabi -+ Lohit Tamil -+ Meera -+ Lohit Malayalam -+ Lohit Kannada -+ Lohit Telugu -+ Lohit Oriya -+ LKLUG -+ -+ -+ -+ monospace -+ -+ Miriam Mono -+ VL Gothic -+ IPAMonaGothic -+ IPAGothic -+ Sazanami Gothic -+ Kochi Gothic -+ AR PL KaitiM GB -+ MS Gothic -+ UmePlus Gothic -+ NSimSun -+ MingLiu -+ AR PL ShanHeiSun Uni -+ AR PL New Sung Mono -+ HanyiSong -+ AR PL SungtiL GB -+ AR PL Mingti2L Big5 -+ ZYSong18030 -+ NanumGothicCoding -+ NanumGothic -+ UnDotum -+ Baekmuk Dotum -+ Baekmuk Gulim -+ TlwgTypo -+ TlwgTypist -+ TlwgTypewriter -+ TlwgMono -+ Hasida -+ GF Zemen Unicode -+ Hapax Berbère -+ Lohit Bengali -+ Lohit Gujarati -+ Lohit Hindi -+ Lohit Marathi -+ Lohit Maithili -+ Lohit Kashmiri -+ Lohit Konkani -+ Lohit Nepali -+ Lohit Sindhi -+ Lohit Punjabi -+ Lohit Tamil -+ Meera -+ Lohit Malayalam -+ Lohit Kannada -+ Lohit Telugu -+ Lohit Oriya -+ LKLUG -+ -+ -+ -+ -+ system-ui -+ -+ Noto Sans Arabic UI -+ Noto Sans Bengali UI -+ Noto Sans Devanagari UI -+ Noto Sans Gujarati UI -+ Noto Sans Gurmukhi UI -+ Noto Sans Kannada UI -+ Noto Sans Khmer UI -+ Noto Sans Lao UI -+ Noto Sans Malayalam UI -+ Noto Sans Myanmar UI -+ Noto Sans Oriya UI -+ Noto Sans Sinhala UI -+ Noto Sans Tamil UI -+ Noto Sans Telugu UI -+ Noto Sans Thai UI -+ Leelawadee UI -+ Nirmala UI -+ Yu Gothic UI -+ Meiryo UI -+ MS UI Gothic -+ Khmer UI -+ Lao UI -+ Microsoft YaHei UI -+ Microsoft JhengHei UI -+ -+ -+ -+ -diff -pruN fontconfig-2.15.0.orig/conf.d/Makefile.am fontconfig-2.15.0/conf.d/Makefile.am ---- fontconfig-2.15.0.orig/conf.d/Makefile.am 2023-08-24 14:14:15.000000000 +0900 -+++ fontconfig-2.15.0/conf.d/Makefile.am 2023-12-22 23:08:05.514969924 +0900 +diff -pruN fontconfig-2.16.0.orig/conf.d/Makefile.am fontconfig-2.16.0/conf.d/Makefile.am +--- fontconfig-2.16.0.orig/conf.d/Makefile.am 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/conf.d/Makefile.am 2025-01-18 00:38:32.245398277 +0900 @@ -47,7 +47,7 @@ CONF_LINKS = \ 60-generic.conf \ 60-latin.conf \ @@ -506,4 +18,25 @@ diff -pruN fontconfig-2.15.0.orig/conf.d/Makefile.am fontconfig-2.15.0/conf.d/Ma + 69-nonlatin.conf \ 69-unifont.conf \ 70-no-bitmaps.conf \ - 70-yes-bitmaps.conf \ + 70-no-bitmaps-and-emoji.conf \ +diff -pruN fontconfig-2.16.0.orig/conf.d/meson.build fontconfig-2.16.0/conf.d/meson.build +--- fontconfig-2.16.0.orig/conf.d/meson.build 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/conf.d/meson.build 2025-01-18 00:38:43.243595743 +0900 +@@ -33,7 +33,7 @@ conf_files = [ + '60-latin.conf', + '65-fonts-persian.conf', + '65-khmer.conf', +- '65-nonlatin.conf', ++ '69-nonlatin.conf', + '69-unifont.conf', + '70-no-bitmaps.conf', + '70-no-bitmaps-and-emoji.conf', +@@ -64,7 +64,7 @@ conf_links = [ + '60-generic.conf', + '60-latin.conf', + '65-fonts-persian.conf', +- '65-nonlatin.conf', ++ '69-nonlatin.conf', + '69-unifont.conf', + '80-delicious.conf', + '90-synthetic.conf', diff --git a/fontconfig.spec b/fontconfig.spec index c4a9476..77d4737 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.15.0 -Release: 9%{?dist} +Version: 2.16.0 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -22,17 +22,14 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch -Patch7: %{name}-remove-uuid.patch -Patch8: %{name}-fix-emojis.patch -Patch9: %{name}-fix-SAST.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel -BuildRequires: autoconf automake libtool gettext +BuildRequires: gettext BuildRequires: gperf BuildRequires: docbook-utils docbook-utils-pdf -BuildRequires: make +BuildRequires: meson ninja-build Requires: fonts-filesystem freetype # Register DTD system-wide to make validation work by default @@ -74,36 +71,42 @@ which is useful for developing applications that uses fontconfig. %prep %autosetup -p1 +# To reduce a maintenance cost of fontconfig-lower-nonlatin-conf.patch +mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf %build -# We don't want to rebuild the docs, but we want to install the included ones. -export HASDOCBOOK=no - -for i in doc/*.fncs; do - touch -r $i ${i//.fncs/.sgml} -done -autoreconf -%configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ - --enable-libxml2 \ - --disable-static --with-cache-dir=/usr/lib/fontconfig/cache - -make %{?_smp_mflags} +%meson -Ddoc=disabled -Dcache-build=disabled -Dxml-backend=libxml2 \ + -Dadditional-fonts-dirs=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ + -Dcache-dir=/usr/lib/fontconfig/cache \ + --default-library=shared +%meson_build %install -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" - -find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +%meson_install +install -d $RPM_BUILD_ROOT/usr/lib/fontconfig/cache install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ # Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf -# move installed doc files back to build directory to package them -# in the right place -mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* . -rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/ +# Install docs manually +install -d $RPM_BUILD_ROOT%{_mandir}/man1 +install -d $RPM_BUILD_ROOT%{_mandir}/man3 +install -d $RPM_BUILD_ROOT%{_mandir}/man5 +for f in doc/*.1; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man1 +done +for f in doc/*.3; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man3 +done +for f in doc/*.5; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man5 +done +for f in doc/*.txt doc/*.pdf doc/*.html; do + install -p -m 0644 $f . +done # adjust the timestamp to avoid conflicts for multilib touch -r doc/fontconfig-user.sgml fontconfig-user.txt @@ -122,7 +125,7 @@ install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache cat %{name}-conf.lang >> %{name}.lang %check -VERBOSE=1 make check +%meson_test %post umask 0022 @@ -193,9 +196,13 @@ fi %{_datadir}/gettext/its/fontconfig.loc %files devel-doc -%doc fontconfig-devel.txt fontconfig-devel +%doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Sat Jan 18 2025 Akira TAGOH - 2.16.0-1 +- New upstream release. +- Use meson instead of autotools to build. + * Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 10b4abe..5a758f7 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (fontconfig-2.14.2.tar.xz) = 23483e0ae6aa7589fd37f9949a4cf951c5bff981739dbb446881e4cea86a208c0ab31e2358666eac724af1dc6a689a42733a7ce91cd3e76d8d91eacedb318085 -SHA512 (fontconfig-2.15.0.tar.xz) = 754cd5fffa198fc07a39cf7df683e9adfa7f54ab41fdff8c0eacc078fd35d3e01069ba343f2b045e0b40df88d9f1fc1ee0f7565799f9cb194a59cf95b64c4417 +SHA512 (fontconfig-2.16.0.tar.xz) = 90b5c39e5eadc56a9fbddd69b2a6eaa6bf9ee5cda003091b0896e66f87f3c1be8ab4442f54d20fca7232d72f60d9578f5e5ba3f376e39b64b8a2aa7b8f13b062 From 4c49ef27c3036afc005493f796e9d6c48b0da19f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 18 Jan 2025 01:39:40 +0900 Subject: [PATCH 141/154] clean up patches --- 10-sub-pixel-rgb-for-kde.conf | 18 ------ fontconfig-fix-SAST.patch | 54 ----------------- fontconfig-fix-emojis.patch | 109 ---------------------------------- fontconfig-fix-remap.patch | 81 ------------------------- fontconfig-remove-uuid.patch | 67 --------------------- 5 files changed, 329 deletions(-) delete mode 100644 10-sub-pixel-rgb-for-kde.conf delete mode 100644 fontconfig-fix-SAST.patch delete mode 100644 fontconfig-fix-emojis.patch delete mode 100644 fontconfig-fix-remap.patch delete mode 100644 fontconfig-remove-uuid.patch diff --git a/10-sub-pixel-rgb-for-kde.conf b/10-sub-pixel-rgb-for-kde.conf deleted file mode 100644 index 63fd752..0000000 --- a/10-sub-pixel-rgb-for-kde.conf +++ /dev/null @@ -1,18 +0,0 @@ - - - - Enable sub-pixel rendering with the RGB stripes layout for KDE only - - - - - KDE - - rgb - - diff --git a/fontconfig-fix-SAST.patch b/fontconfig-fix-SAST.patch deleted file mode 100644 index 6ef1b07..0000000 --- a/fontconfig-fix-SAST.patch +++ /dev/null @@ -1,54 +0,0 @@ -From eaa335e7c4686c622f31e691f8a41fdf30ea42b3 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 31 Jul 2024 17:31:36 +0900 -Subject: [PATCH 1/2] Fix a memory leak in _get_real_paths_from_prefix - ---- - src/fcxml.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/fcxml.c b/src/fcxml.c -index 9fe0674..083fc1f 100644 ---- a/src/fcxml.c -+++ b/src/fcxml.c -@@ -1327,11 +1327,9 @@ _get_real_paths_from_prefix(FcConfigParse *parse, const FcChar8 *path, const FcC - if (!p) - return NULL; - parent = FcStrDirname (p); -+ FcStrFree (p); - if (!parent) -- { -- free (p); - return NULL; -- } - } - } - #ifndef _WIN32 --- -2.45.2 - -From ab765827101787d49c0a66b23addc1f68f99a455 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 31 Jul 2024 17:37:53 +0900 -Subject: [PATCH 2/2] Set FcTypeVoid if no valid types to convert - ---- - src/fcname.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/fcname.c b/src/fcname.c -index 566f0ef..b152bd9 100644 ---- a/src/fcname.c -+++ b/src/fcname.c -@@ -406,6 +406,8 @@ FcNameConvert (FcType type, const char *object, FcChar8 *string) - v.u.r = FcRangeCreateDouble (b, e); - break; - default: -+ /* No valid type to convert */ -+ v.type = FcTypeVoid; - break; - } - return v; --- -2.45.2 - diff --git a/fontconfig-fix-emojis.patch b/fontconfig-fix-emojis.patch deleted file mode 100644 index ef4738b..0000000 --- a/fontconfig-fix-emojis.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 810a300398dc93b7becca4a7f286e8999adc09a5 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Fri, 8 Mar 2024 01:55:14 +0900 -Subject: [PATCH] Sort out bitmap related config files - -70-no-bitmaps-and-emoji.conf: reject bitmap fonts including bitmap emoji fonts. -70-no-bitmaps-except-emoji.conf: reject bitmap fonts except bitmap emoji fonts. -70-no-bitmaps.conf: same to 70-no-bitmaps-except-emoji.conf for backward compatibility -but deprecated. This will be dropped in the future. - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/409 ---- - conf.d/70-no-bitmaps-and-emoji.conf | 13 +++++++++++++ - conf.d/70-no-bitmaps-except-emoji.conf | 14 ++++++++++++++ - conf.d/70-no-bitmaps.conf | 11 ++--------- - conf.d/Makefile.am | 2 ++ - conf.d/meson.build | 2 ++ - 5 files changed, 33 insertions(+), 9 deletions(-) - create mode 100644 conf.d/70-no-bitmaps-and-emoji.conf - create mode 100644 conf.d/70-no-bitmaps-except-emoji.conf - -diff --git a/conf.d/70-no-bitmaps-and-emoji.conf b/conf.d/70-no-bitmaps-and-emoji.conf -new file mode 100644 -index 00000000..3e18a4cf ---- /dev/null -+++ b/conf.d/70-no-bitmaps-and-emoji.conf -@@ -0,0 +1,13 @@ -+ -+ -+ -+ Reject bitmap fonts, including bitmap emoji fonts -+ -+ -+ -+ -+ false -+ -+ -+ -+ -diff --git a/conf.d/70-no-bitmaps-except-emoji.conf b/conf.d/70-no-bitmaps-except-emoji.conf -new file mode 100644 -index 00000000..3170cd6f ---- /dev/null -+++ b/conf.d/70-no-bitmaps-except-emoji.conf -@@ -0,0 +1,14 @@ -+ -+ -+ -+ Reject bitmap fonts except bitmap emoji fonts -+ -+ -+ -+ -+ false -+ false -+ -+ -+ -+ -diff --git a/conf.d/70-no-bitmaps.conf b/conf.d/70-no-bitmaps.conf -index 10203acb..767e4115 100644 ---- a/conf.d/70-no-bitmaps.conf -+++ b/conf.d/70-no-bitmaps.conf -@@ -1,13 +1,6 @@ - - - -- Reject bitmap fonts -- -- -- -- -- false -- -- -- -+ Reject bitmap fonts except bitmap emoji fonts (deprecated; use 70-no-bitmaps-except-emoji.conf) -+ 70-no-bitmaps-except-emoji.conf - -diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am -index fd858348..737b4fb2 100644 ---- a/conf.d/Makefile.am -+++ b/conf.d/Makefile.am -@@ -98,6 +98,8 @@ template_DATA = \ - 69-nonlatin.conf \ - 69-unifont.conf \ - 70-no-bitmaps.conf \ -+ 70-no-bitmaps-and-emoji.conf \ -+ 70-no-bitmaps-except-emoji.conf \ - 70-yes-bitmaps.conf \ - 80-delicious.conf \ - 90-synthetic.conf -diff --git a/conf.d/meson.build b/conf.d/meson.build -index 8e896118..b6d07ee0 100644 ---- a/conf.d/meson.build -+++ b/conf.d/meson.build -@@ -36,6 +36,8 @@ conf_files = [ - '65-nonlatin.conf', - '69-unifont.conf', - '70-no-bitmaps.conf', -+ '70-no-bitmaps-and-emoji.conf', -+ '70-no-bitmaps-except-emoji.conf', - '70-yes-bitmaps.conf', - '80-delicious.conf', - '90-synthetic.conf', --- -GitLab - diff --git a/fontconfig-fix-remap.patch b/fontconfig-fix-remap.patch deleted file mode 100644 index 5809a0b..0000000 --- a/fontconfig-fix-remap.patch +++ /dev/null @@ -1,81 +0,0 @@ -From fc0e9a78d2fe3b26f0b93c2a99b160e75e2a9f89 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 28 Sep 2022 21:39:09 +0900 -Subject: [PATCH 1/3] Real fix of 91114d18c - -The change in 91114d18c broke remapping font paths. - -Patch from Mattias Clasen - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/331 ---- - src/fcstr.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/src/fcstr.c b/src/fcstr.c -index 3fe518f..5ce65da 100644 ---- a/src/fcstr.c -+++ b/src/fcstr.c -@@ -1467,7 +1467,6 @@ FcStrSetAddFilenamePairWithSalt (FcStrSet *set, const FcChar8 *a, const FcChar8 - { - FcChar8 *new_a = NULL; - FcChar8 *new_b = NULL; -- FcChar8 *rs = NULL; - FcBool ret; - - if (a) -@@ -1487,10 +1486,7 @@ FcStrSetAddFilenamePairWithSalt (FcStrSet *set, const FcChar8 *a, const FcChar8 - } - } - /* Override maps with new one if exists */ -- if (FcStrSetMemberAB (set, new_a, new_b, &rs)) -- { -- FcStrSetDel (set, rs); -- } -+ FcStrSetDel (set, new_a); - ret = FcStrSetAddTriple (set, new_a, new_b, salt); - if (new_a) - FcStrFree (new_a); --- -2.37.3 - -From a10d07682a09ce5effbd121920b119618f4b7775 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 28 Sep 2022 23:30:06 +0900 -Subject: [PATCH 2/3] Fix test cases for wrong use of remap-dir - ---- - test/run-test.sh | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/test/run-test.sh b/test/run-test.sh -index 1cedb8d..2b8a412 100644 ---- a/test/run-test.sh -+++ b/test/run-test.sh -@@ -177,7 +177,10 @@ $FCCACHE "$FONTDIR" - sleep 1 - ls -l "$CACHEDIR" > out1 - TESTTMPDIR=$(mktemp -d "$TMPDIR"/fontconfig.XXXXXXXX) --sed "s!@FONTDIR@!$TESTTMPDIR/fonts! -+# Once font dir is remapped, we could use $FONTDIR as different one in theory. -+# but we don't use it here and to avoid duplicate entries, set the non-existing -+# directory here. -+sed "s!@FONTDIR@!$FONTDIR/a! - s!@REMAPDIR@!$TESTTMPDIR/fonts! - s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < "$TESTDIR"/fonts.conf.in > bind-fonts.conf - echo "$BWRAP --bind / / --bind \"$CACHEDIR\" \"$TESTTMPDIR\"/cache.dir --bind \"$FONTDIR\" \"$TESTTMPDIR\"/fonts --bind .. \"$TESTTMPDIR\"/build --dev-bind /dev /dev --setenv FONTCONFIG_FILE \"$TESTTMPDIR\"/build/test/bind-fonts.conf \"$TESTTMPDIR\"/build/fc-match/fc-match\"$EXEEXT\" -f \"%{file}\n\" \":foundry=Misc\" > xxx" -@@ -273,7 +276,10 @@ sleep 1 - (cd "$CACHEDIR"; ls -1 --color=no ./*cache*) > out1 - TESTTMPDIR=$(mktemp -d "$TMPDIR"/fontconfig.XXXXXXXX) - mkdir -p "$TESTTMPDIR"/cache.dir --sed "s!@FONTDIR@!$TESTTMPDIR/fonts! -+# Once font dir is remapped, we could use $FONTDIR as different one in theory. -+# but we don't use it here and to avoid duplicate entries, set the non-existing -+# directory here. -+sed "s!@FONTDIR@!$FONTDIR/a! - s!@REMAPDIR@!$TESTTMPDIR/fonts! - s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < "$TESTDIR"/fonts.conf.in > bind-fonts.conf - $BWRAP --bind / / --bind "$FONTDIR" "$TESTTMPDIR"/fonts --bind .. "$TESTTMPDIR"/build --dev-bind /dev /dev --setenv FONTCONFIG_FILE "$TESTTMPDIR"/build/test/bind-fonts.conf "$TESTTMPDIR"/build/fc-cache/fc-cache"$EXEEXT" "$TESTTMPDIR"/fonts --- -2.37.3 - diff --git a/fontconfig-remove-uuid.patch b/fontconfig-remove-uuid.patch deleted file mode 100644 index 16c0d04..0000000 --- a/fontconfig-remove-uuid.patch +++ /dev/null @@ -1,67 +0,0 @@ -From c22908828fb2dbfdf38733d119adc1cf5fe00173 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Sat, 10 Feb 2024 00:20:54 +0900 -Subject: [PATCH 1/2] Clean up .uuid files with fc-cache -f too - -.uuid file was obsoleted >5 years ago and it was supposed to -be cleaned up by fc-cache -r but not -f. -This change tries to clean it up by fc-cache -f. - -https://bugzilla.redhat.com/show_bug.cgi?id=1761885 ---- - src/fcdir.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/fcdir.c b/src/fcdir.c -index 6f7b3835..2e4fdc69 100644 ---- a/src/fcdir.c -+++ b/src/fcdir.c -@@ -234,7 +234,7 @@ FcDirScanConfig (FcFontSet *set, - - if (FcDebug () & FC_DBG_SCAN) - printf ("\tScanning dir %s\n", s_dir); -- -+ - d = opendir ((char *) s_dir); - if (!d) - { -@@ -459,7 +459,10 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) - - /* Not using existing cache file, construct new cache */ - if (!cache) -+ { -+ FcDirCacheDeleteUUID (dir, config); - cache = FcDirCacheScan (dir, config); -+ } - FcConfigDestroy (config); - - return cache; --- -2.43.0 - -From a76b95105ca26c600279b2daf4bd43b37a918823 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Sat, 10 Feb 2024 02:15:45 +0900 -Subject: [PATCH 2/2] Fix undesired unref of FcConfig on Win32 - ---- - src/fccache.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/fccache.c b/src/fccache.c -index cebbb810..54f76ac1 100644 ---- a/src/fccache.c -+++ b/src/fccache.c -@@ -106,8 +106,8 @@ FcDirCacheDeleteUUID (const FcChar8 *dir, - FcStrFree (target); - bail: - FcStrFree (d); --#endif - FcConfigDestroy (config); -+#endif - - return ret; - } --- -2.43.0 - From cab4ae8a7abc7f2ffaf75c85df04da5c1f039130 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 18 Jan 2025 01:40:36 +0900 Subject: [PATCH 142/154] Add a reference to bz --- fontconfig.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fontconfig.spec b/fontconfig.spec index 77d4737..3ae94db 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -201,6 +201,7 @@ fi %changelog * Sat Jan 18 2025 Akira TAGOH - 2.16.0-1 - New upstream release. + Resolves: rhbz#2338618 - Use meson instead of autotools to build. * Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 From 54b18701644f67c1ef6be4e400358e276c690374 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 20 Jan 2025 16:43:04 +0900 Subject: [PATCH 143/154] Patch meson.build instead of creating a cache dir --- fontconfig-meson-cachedir.patch | 29 +++++++++++++++++++++++++++++ fontconfig.spec | 4 +++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 fontconfig-meson-cachedir.patch diff --git a/fontconfig-meson-cachedir.patch b/fontconfig-meson-cachedir.patch new file mode 100644 index 0000000..e1313c9 --- /dev/null +++ b/fontconfig-meson-cachedir.patch @@ -0,0 +1,29 @@ +From 9b864e8ceb480c31cd76ce3fe1d6215f8655ec55 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Mon, 20 Jan 2025 12:08:36 +0900 +Subject: [PATCH] meson: create fc_cachedir at the installation time + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/445 +--- + meson.build | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/meson.build b/meson.build +index 4439758..85968b2 100644 +--- a/meson.build ++++ b/meson.build +@@ -550,6 +550,11 @@ if not meson.is_subproject() + meson.add_dist_script('build-aux/meson-dist-autotools.py') + endif + ++if host_machine.system() != 'windows' ++ install_emptydir(fc_cachedir, ++ install_tag: 'runtime') ++endif ++ + # Summary + doc_targets = get_variable('doc_targets', []) + +-- +2.48.1 + diff --git a/fontconfig.spec b/fontconfig.spec index 3ae94db..4aa9a9f 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -22,6 +22,7 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch +Patch7: %{name}-meson-cachedir.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -84,7 +85,6 @@ mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf %install %meson_install -install -d $RPM_BUILD_ROOT/usr/lib/fontconfig/cache install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ @@ -111,6 +111,8 @@ done # adjust the timestamp to avoid conflicts for multilib touch -r doc/fontconfig-user.sgml fontconfig-user.txt touch -r doc/fontconfig-user.sgml fontconfig-user.html +touch -r doc/fontconfig-devel.sgml fontconfig-devel.txt +touch -r doc/fontconfig-devel.sgml fontconfig-devel.html # rename fc-cache binary mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits} From d1acb38e3bebda20cd1c0d6e3e4a1b68cdaf9def Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Jan 2025 22:44:43 +0900 Subject: [PATCH 144/154] Add gcc to BR --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 4aa9a9f..7ca4d3e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -30,7 +30,7 @@ BuildRequires: fontpackages-devel BuildRequires: gettext BuildRequires: gperf BuildRequires: docbook-utils docbook-utils-pdf -BuildRequires: meson ninja-build +BuildRequires: meson ninja-build gcc Requires: fonts-filesystem freetype # Register DTD system-wide to make validation work by default From 64359ad1d0b91eaa9444791a7fc531677848c0d6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Jan 2025 23:32:46 +0900 Subject: [PATCH 145/154] Disable meson test on s390x temporarily --- fontconfig.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fontconfig.spec b/fontconfig.spec index 7ca4d3e..fe79d5e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -127,7 +127,10 @@ install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache cat %{name}-conf.lang >> %{name}.lang %check +# rhbz#2341757: md5 calculation seems wrong on s390x. unable to finish testcases properly +%ifnarch s390x %meson_test +%endif %post umask 0022 @@ -205,6 +208,7 @@ fi - New upstream release. Resolves: rhbz#2338618 - Use meson instead of autotools to build. +- Disable meson test on s390x temporarily. * Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 7ee5fe699075534ca734e18039d8fdfd7ff83a82 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 27 Jan 2025 11:20:30 +0900 Subject: [PATCH 146/154] Fix endian detection. Resolves: rhbz#2341757 --- fontconfig-meson-endianness.patch | 25 +++++++++++++++++++++++++ fontconfig.spec | 8 +++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 fontconfig-meson-endianness.patch diff --git a/fontconfig-meson-endianness.patch b/fontconfig-meson-endianness.patch new file mode 100644 index 0000000..d880c4d --- /dev/null +++ b/fontconfig-meson-endianness.patch @@ -0,0 +1,25 @@ +diff --git a/meson.build b/meson.build +index 85968b29..b9501dfc 100644 +--- a/meson.build ++++ b/meson.build +@@ -181,6 +181,7 @@ conf.set_quoted('PACKAGE_VERSION', meson.project_version()) + conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version())) + conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new') + conf.set_quoted('PACKAGE_URL', '') ++conf.set('WORDS_BIGENDIAN', (host_machine.endian() == 'big').to_int()) + + if host_machine.system() == 'windows' + conf.set('EXEEXT', '.exe') +diff --git a/src/fcmd5.h b/src/fcmd5.h +index 7e8a6e1e..bf507285 100644 +--- a/src/fcmd5.h ++++ b/src/fcmd5.h +@@ -27,7 +27,7 @@ static void MD5Update(struct MD5Context *ctx, const unsigned char *buf, unsigned + static void MD5Final(unsigned char digest[16], struct MD5Context *ctx); + static void MD5Transform(FcChar32 buf[4], FcChar32 in[16]); + +-#ifndef WORDS_BIGENDIAN ++#if !defined(WORDS_BIGENDIAN) || !WORDS_BIGENDIAN + #define byteReverse(buf, len) /* Nothing */ + #else + /* diff --git a/fontconfig.spec b/fontconfig.spec index fe79d5e..93ea1dd 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -23,6 +23,7 @@ Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch Patch7: %{name}-meson-cachedir.patch +Patch8: %{name}-meson-endianness.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -127,10 +128,7 @@ install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache cat %{name}-conf.lang >> %{name}.lang %check -# rhbz#2341757: md5 calculation seems wrong on s390x. unable to finish testcases properly -%ifnarch s390x %meson_test -%endif %post umask 0022 @@ -204,6 +202,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Mon Jan 27 2025 Akira TAGOH - 2.16.0-2 +- Fix endian detection. + Resolves: rhbz#2341757 + * Sat Jan 18 2025 Akira TAGOH - 2.16.0-1 - New upstream release. Resolves: rhbz#2338618 From 702de2a7ad716ed043810107d59855470691761a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 27 Jan 2025 11:46:26 +0900 Subject: [PATCH 147/154] Bump the release --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 93ea1dd..10096f7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.16.0 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 From 97f5c4867adcb8c26ae2434f9a9d29cbbd09ca0e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 13 Mar 2025 20:46:19 +0900 Subject: [PATCH 148/154] New upstream release. --- .gitignore | 1 + fontconfig-drop-lang-from-pkgkit-format.patch | 20 +++++++++---------- fontconfig.spec | 11 ++++++---- sources | 1 + 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index b63773a..866d60a 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.14.2.tar.xz /fontconfig-2.15.0.tar.xz /fontconfig-2.16.0.tar.xz +/fontconfig-2.16.1.tar.xz diff --git a/fontconfig-drop-lang-from-pkgkit-format.patch b/fontconfig-drop-lang-from-pkgkit-format.patch index 8b77308..abece6d 100644 --- a/fontconfig-drop-lang-from-pkgkit-format.patch +++ b/fontconfig-drop-lang-from-pkgkit-format.patch @@ -1,12 +1,12 @@ -diff -pruN fontconfig-2.13.92.orig/src/fcformat.c fontconfig-2.13.92/src/fcformat.c ---- fontconfig-2.13.92.orig/src/fcformat.c 2018-07-19 12:14:39.000000000 +0900 -+++ fontconfig-2.13.92/src/fcformat.c 2020-01-20 13:05:33.626227767 +0900 -@@ -78,7 +78,7 @@ - #define FCCAT_FORMAT "\"%{file|basename|cescape}\" %{index} \"%{-file{%{=unparse|cescape}}}\"" - #define FCMATCH_FORMAT "%{file:-|basename}: \"%{family[0]:-}\" \"%{style[0]:-}\"" - #define FCLIST_FORMAT "%{?file{%{file}: }}%{-file{%{=unparse}}}" --#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}%{[]lang{font(:lang=%{lang|downcase|translate(_,-)})\n}}" -+#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}" - +diff -pruN fontconfig-2.16.1.orig/src/fcformat.c fontconfig-2.16.1/src/fcformat.c +--- fontconfig-2.16.1.orig/src/fcformat.c 2025-03-13 20:16:47.000000000 +0900 ++++ fontconfig-2.16.1/src/fcformat.c 2025-03-13 20:42:03.633324643 +0900 +@@ -77,7 +77,7 @@ + #define FCCAT_FORMAT "\"%{file|basename|cescape}\" %{index} \"%{-file{%{=unparse|cescape}}}\"" + #define FCMATCH_FORMAT "%{file:-|basename}: \"%{family[0]:-}\" \"%{style[0]:-}\"" + #define FCLIST_FORMAT "%{?file{%{file}: }}%{-file{%{=unparse}}}" +-#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}%{[]lang{font(:lang=%{lang|downcase|translate(_,-)})\n}}" ++#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}" static void + message (const char *fmt, ...) diff --git a/fontconfig.spec b/fontconfig.spec index 10096f7..0502868 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.16.0 -Release: 2%{?dist} +Version: 2.16.1 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -22,8 +22,6 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch -Patch7: %{name}-meson-cachedir.patch -Patch8: %{name}-meson-endianness.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -89,6 +87,8 @@ mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ +rm $RPM_BUILD_ROOT/%{_libdir}/libfontconfig.a + # Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf @@ -202,6 +202,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Thu Mar 13 2025 Akira TAGOH - 2.16.1-1 +- New upstream release. + * Mon Jan 27 2025 Akira TAGOH - 2.16.0-2 - Fix endian detection. Resolves: rhbz#2341757 diff --git a/sources b/sources index 5a758f7..2efbd1f 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (fontconfig-2.16.0.tar.xz) = 90b5c39e5eadc56a9fbddd69b2a6eaa6bf9ee5cda003091b0896e66f87f3c1be8ab4442f54d20fca7232d72f60d9578f5e5ba3f376e39b64b8a2aa7b8f13b062 +SHA512 (fontconfig-2.16.1.tar.xz) = 50901593e7d3ae1727a9ae3861f2d4074e1f031f8a5ac0cb5ab8db90e35c2a12bd14e9f40185187035887a26c3aca054a751fcf97f5cff63484091aa386fec8b From 3a435a53cb482bd8c33827561775197548adcf3a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 11 Apr 2025 16:57:07 +0900 Subject: [PATCH 149/154] New upstream release. --- .gitignore | 1 + fontconfig.spec | 5 ++++- sources | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 866d60a..ef7450e 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.15.0.tar.xz /fontconfig-2.16.0.tar.xz /fontconfig-2.16.1.tar.xz +/fontconfig-2.16.2.tar.xz diff --git a/fontconfig.spec b/fontconfig.spec index 0502868..7e5818d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,7 +4,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.16.1 +Version: 2.16.2 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -202,6 +202,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Fri Apr 11 2025 Akira TAGOH - 2.16.2-1 +- New upstream release. + * Thu Mar 13 2025 Akira TAGOH - 2.16.1-1 - New upstream release. diff --git a/sources b/sources index 2efbd1f..f17bc64 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (fontconfig-2.16.0.tar.xz) = 90b5c39e5eadc56a9fbddd69b2a6eaa6bf9ee5cda003091b0896e66f87f3c1be8ab4442f54d20fca7232d72f60d9578f5e5ba3f376e39b64b8a2aa7b8f13b062 -SHA512 (fontconfig-2.16.1.tar.xz) = 50901593e7d3ae1727a9ae3861f2d4074e1f031f8a5ac0cb5ab8db90e35c2a12bd14e9f40185187035887a26c3aca054a751fcf97f5cff63484091aa386fec8b +SHA512 (fontconfig-2.16.2.tar.xz) = b51ac822f00b41026d74b73aabcdb5ec766b68c478fdb0a50d5ec20c5ad4661ba38417aac088ee86ef097bd1ecda708f818636389acb34502444298a08701c12 From 518fc318a28bc4058a74a82a38c06112748f440e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 11 Apr 2025 17:14:41 +0900 Subject: [PATCH 150/154] Adjust patches and cleanup --- ...config-disable-network-required-test.patch | 26 +++++++++-------- fontconfig-meson-cachedir.patch | 29 ------------------- fontconfig-meson-endianness.patch | 25 ---------------- 3 files changed, 14 insertions(+), 66 deletions(-) delete mode 100644 fontconfig-meson-cachedir.patch delete mode 100644 fontconfig-meson-endianness.patch diff --git a/fontconfig-disable-network-required-test.patch b/fontconfig-disable-network-required-test.patch index b276aa5..d73f26a 100644 --- a/fontconfig-disable-network-required-test.patch +++ b/fontconfig-disable-network-required-test.patch @@ -1,16 +1,16 @@ -diff -pruN fontconfig-2.16.0.orig/test/meson.build fontconfig-2.16.0/test/meson.build ---- fontconfig-2.16.0.orig/test/meson.build 2025-01-18 00:15:05.000000000 +0900 -+++ fontconfig-2.16.0/test/meson.build 2025-01-18 01:07:12.893480441 +0900 -@@ -15,7 +15,7 @@ if host_machine.system() != 'windows' - ['test-bz106632.c', {'c_args': ['-DFONTFILE="@0@"'.format(join_paths(meson.current_source_dir(), '4x6.pcf'))]}], - ['test-issue107.c'], # FIXME: fails on mingw +diff -pruN fontconfig-2.16.2.orig/test/meson.build fontconfig-2.16.2/test/meson.build +--- fontconfig-2.16.2.orig/test/meson.build 2025-04-11 15:47:01.000000000 +0900 ++++ fontconfig-2.16.2/test/meson.build 2025-04-11 17:09:10.556195744 +0900 +@@ -18,7 +18,7 @@ if host_machine.system() != 'windows' + ] + tests_not_parallel += [ # FIXME: this needs NotoSans-hinted.zip font downloaded and unpacked into test build directory! see run-test.sh - ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread + #['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread ] if get_option('default_library') == 'static' -@@ -62,12 +62,12 @@ if host_machine.system() != 'windows' +@@ -70,13 +70,13 @@ if host_machine.system() != 'windows' test('run_test_sh', find_program('run-test.sh'), timeout: 600, env: ['srcdir=@0@'.format(meson.current_source_dir()), 'builddir=@0@'.format(meson.current_build_dir()), 'EXEEXT=@0@'.format(conf.get('EXEEXT')), 'VERBOSE=1']) @@ -18,20 +18,22 @@ diff -pruN fontconfig-2.16.0.orig/test/meson.build fontconfig-2.16.0/test/meson. - test('pytest', pytest, args: ['--tap'], - workdir: meson.current_source_dir(), - env: ['builddir=@0@'.format(meson.current_build_dir())], -- protocol: 'tap') +- protocol: 'tap', +- timeout: 600) - endif +# if pytest.found() +# test('pytest', pytest, args: ['--tap'], +# workdir: meson.current_source_dir(), +# env: ['builddir=@0@'.format(meson.current_build_dir())], -+# protocol: 'tap') ++# protocol: 'tap', ++# timeout: 600) +# endif endif if jsonc_dep.found() -diff -pruN fontconfig-2.16.0.orig/test/run-test.sh fontconfig-2.16.0/test/run-test.sh ---- fontconfig-2.16.0.orig/test/run-test.sh 2025-01-18 00:15:05.000000000 +0900 -+++ fontconfig-2.16.0/test/run-test.sh 2025-01-18 01:06:54.310144693 +0900 +diff -pruN fontconfig-2.16.2.orig/test/run-test.sh fontconfig-2.16.2/test/run-test.sh +--- fontconfig-2.16.2.orig/test/run-test.sh 2025-04-11 15:47:01.000000000 +0900 ++++ fontconfig-2.16.2/test/run-test.sh 2025-04-11 17:08:18.741839058 +0900 @@ -499,18 +499,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B fi # if [ "x$EXEEXT" = "x" ] diff --git a/fontconfig-meson-cachedir.patch b/fontconfig-meson-cachedir.patch deleted file mode 100644 index e1313c9..0000000 --- a/fontconfig-meson-cachedir.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 9b864e8ceb480c31cd76ce3fe1d6215f8655ec55 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Mon, 20 Jan 2025 12:08:36 +0900 -Subject: [PATCH] meson: create fc_cachedir at the installation time - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/445 ---- - meson.build | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/meson.build b/meson.build -index 4439758..85968b2 100644 ---- a/meson.build -+++ b/meson.build -@@ -550,6 +550,11 @@ if not meson.is_subproject() - meson.add_dist_script('build-aux/meson-dist-autotools.py') - endif - -+if host_machine.system() != 'windows' -+ install_emptydir(fc_cachedir, -+ install_tag: 'runtime') -+endif -+ - # Summary - doc_targets = get_variable('doc_targets', []) - --- -2.48.1 - diff --git a/fontconfig-meson-endianness.patch b/fontconfig-meson-endianness.patch deleted file mode 100644 index d880c4d..0000000 --- a/fontconfig-meson-endianness.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/meson.build b/meson.build -index 85968b29..b9501dfc 100644 ---- a/meson.build -+++ b/meson.build -@@ -181,6 +181,7 @@ conf.set_quoted('PACKAGE_VERSION', meson.project_version()) - conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version())) - conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new') - conf.set_quoted('PACKAGE_URL', '') -+conf.set('WORDS_BIGENDIAN', (host_machine.endian() == 'big').to_int()) - - if host_machine.system() == 'windows' - conf.set('EXEEXT', '.exe') -diff --git a/src/fcmd5.h b/src/fcmd5.h -index 7e8a6e1e..bf507285 100644 ---- a/src/fcmd5.h -+++ b/src/fcmd5.h -@@ -27,7 +27,7 @@ static void MD5Update(struct MD5Context *ctx, const unsigned char *buf, unsigned - static void MD5Final(unsigned char digest[16], struct MD5Context *ctx); - static void MD5Transform(FcChar32 buf[4], FcChar32 in[16]); - --#ifndef WORDS_BIGENDIAN -+#if !defined(WORDS_BIGENDIAN) || !WORDS_BIGENDIAN - #define byteReverse(buf, len) /* Nothing */ - #else - /* From 9a1e8029b08ec413091ea00d11801700b8cd64bd Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 27 Jun 2025 14:48:43 +0900 Subject: [PATCH 151/154] New upstream release. Resolves: rhbz#2375126 --- .gitignore | 1 + ...config-disable-network-required-test.patch | 77 +++++++++++++++---- fontconfig.spec | 8 +- sources | 2 +- 4 files changed, 69 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index ef7450e..8ea9665 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.16.0.tar.xz /fontconfig-2.16.1.tar.xz /fontconfig-2.16.2.tar.xz +/fontconfig-2.17.0.tar.xz diff --git a/fontconfig-disable-network-required-test.patch b/fontconfig-disable-network-required-test.patch index d73f26a..e048b49 100644 --- a/fontconfig-disable-network-required-test.patch +++ b/fontconfig-disable-network-required-test.patch @@ -1,40 +1,87 @@ -diff -pruN fontconfig-2.16.2.orig/test/meson.build fontconfig-2.16.2/test/meson.build ---- fontconfig-2.16.2.orig/test/meson.build 2025-04-11 15:47:01.000000000 +0900 -+++ fontconfig-2.16.2/test/meson.build 2025-04-11 17:09:10.556195744 +0900 -@@ -18,7 +18,7 @@ if host_machine.system() != 'windows' +diff -pruN fontconfig-2.17.0.orig/test/meson.build fontconfig-2.17.0/test/meson.build +--- fontconfig-2.17.0.orig/test/meson.build 2025-06-27 12:12:04.000000000 +0900 ++++ fontconfig-2.17.0/test/meson.build 2025-06-27 14:41:08.843726446 +0900 +@@ -1,16 +1,16 @@ +-fetch_test_fonts = custom_target( +- 'fetch_test_fonts', +- output: 'testfonts', +- command: [ +- python3, +- join_paths(meson.project_source_root(), 'build-aux', 'fetch-testfonts.py'), +- '--target-dir', +- '@BUILD_ROOT@/testfonts', +- '--try-symlink', +- ], +- build_by_default: false, +- build_always_stale: true, +-) ++#fetch_test_fonts = custom_target( ++# 'fetch_test_fonts', ++# output: 'testfonts', ++# command: [ ++# python3, ++# join_paths(meson.project_source_root(), 'build-aux', 'fetch-testfonts.py'), ++# '--target-dir', ++# '@BUILD_ROOT@/testfonts', ++# '--try-symlink', ++# ], ++# build_by_default: false, ++# build_always_stale: true, ++#) + + tests = [ + ['test-bz89617.c', {'c_args': ['-DSRCDIR="@0@"'.format(meson.current_source_dir())]}], +@@ -33,7 +33,7 @@ if host_machine.system() != 'windows' ] tests_not_parallel += [ # FIXME: this needs NotoSans-hinted.zip font downloaded and unpacked into test build directory! see run-test.sh - ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread -+ #['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread ++ # ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread + ['test-mt-fccfg.c', {'include_directories': include_directories('../src'), 'dependencies': dependency('threads')}], ] - if get_option('default_library') == 'static' -@@ -70,13 +70,13 @@ if host_machine.system() != 'windows' +@@ -74,10 +74,10 @@ foreach test_data : tests + tests_not_pa + endforeach + + +-if get_option('fontations').enabled() +- rust = import('rust') +- rust.test('fc_fontations_rust_tests', fc_fontations, link_with: [libfontconfig_internal], depends: fetch_test_fonts, env: ['builddir=@0@'.format(meson.project_build_root())],) +-endif ++#if get_option('fontations').enabled() ++# rust = import('rust') ++# rust.test('fc_fontations_rust_tests', fc_fontations, link_with: [libfontconfig_internal], depends: fetch_test_fonts, env: ['builddir=@0@'.format(meson.project_build_root())],) ++#endif + + fs = import('fs') + +@@ -92,14 +92,14 @@ if host_machine.system() != 'windows' test('run_test_sh', find_program('run-test.sh'), timeout: 600, env: ['srcdir=@0@'.format(meson.current_source_dir()), 'builddir=@0@'.format(meson.current_build_dir()), 'EXEEXT=@0@'.format(conf.get('EXEEXT')), 'VERBOSE=1']) - if pytest.found() - test('pytest', pytest, args: ['--tap'], - workdir: meson.current_source_dir(), -- env: ['builddir=@0@'.format(meson.current_build_dir())], +- env: ['builddir=@0@'.format(meson.project_build_root())], - protocol: 'tap', -- timeout: 600) +- timeout: 600, +- depends: fetch_test_fonts) - endif +# if pytest.found() +# test('pytest', pytest, args: ['--tap'], +# workdir: meson.current_source_dir(), -+# env: ['builddir=@0@'.format(meson.current_build_dir())], ++# env: ['builddir=@0@'.format(meson.project_build_root())], +# protocol: 'tap', -+# timeout: 600) ++# timeout: 600, ++# depends: fetch_test_fonts) +# endif endif if jsonc_dep.found() -diff -pruN fontconfig-2.16.2.orig/test/run-test.sh fontconfig-2.16.2/test/run-test.sh ---- fontconfig-2.16.2.orig/test/run-test.sh 2025-04-11 15:47:01.000000000 +0900 -+++ fontconfig-2.16.2/test/run-test.sh 2025-04-11 17:08:18.741839058 +0900 -@@ -499,18 +499,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B +diff -pruN fontconfig-2.17.0.orig/test/run-test.sh fontconfig-2.17.0/test/run-test.sh +--- fontconfig-2.17.0.orig/test/run-test.sh 2025-06-27 12:12:04.000000000 +0900 ++++ fontconfig-2.17.0/test/run-test.sh 2025-06-27 14:39:19.098581228 +0900 +@@ -521,18 +521,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B fi # if [ "x$EXEEXT" = "x" ] diff --git a/fontconfig.spec b/fontconfig.spec index 7e5818d..0c5b455 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,7 +4,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.16.2 +Version: 2.17.0 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -87,8 +87,6 @@ mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ -rm $RPM_BUILD_ROOT/%{_libdir}/libfontconfig.a - # Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf @@ -202,6 +200,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Fri Jun 27 2025 Akira TAGOH - 2.17.0-1 +- New upstream release. + Resolves: rhbz#2375126 + * Fri Apr 11 2025 Akira TAGOH - 2.16.2-1 - New upstream release. diff --git a/sources b/sources index f17bc64..9a3bb99 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.16.2.tar.xz) = b51ac822f00b41026d74b73aabcdb5ec766b68c478fdb0a50d5ec20c5ad4661ba38417aac088ee86ef097bd1ecda708f818636389acb34502444298a08701c12 +SHA512 (fontconfig-2.17.0.tar.xz) = dd64905c3e0e5c5881df505b8f0bea594bbac5ce145f57aedcd7130978cd285491497198d8f2d6ed26f7b2abb31268dc3ff97aa75ce998b8e57f2d5c75b240b4 From 8bca22ae6843289d280f9d03098bcede86764255 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 30 Jun 2025 16:50:15 +0900 Subject: [PATCH 152/154] Backport a patch to fix a crash with Graphite fonts Drop 70-*bitmaps*.conf from /etc/fonts/conf.d so far. Resolves: rhbz#2375426 --- fontconfig-fix-crash.patch | 28 ++++++++++++++++++++++++++++ fontconfig.spec | 9 +++++++++ 2 files changed, 37 insertions(+) create mode 100644 fontconfig-fix-crash.patch diff --git a/fontconfig-fix-crash.patch b/fontconfig-fix-crash.patch new file mode 100644 index 0000000..c52b33d --- /dev/null +++ b/fontconfig-fix-crash.patch @@ -0,0 +1,28 @@ +From b9bec06d73340f1b5727302d13ac3df307b7febc Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +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; +-- +2.50.0 + diff --git a/fontconfig.spec b/fontconfig.spec index 0c5b455..ebc311e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -22,6 +22,7 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch +Patch7: %{name}-fix-crash.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -90,6 +91,9 @@ ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontc # Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf +# Do not enable bitmap-related conf +rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/70-*bitmaps*.conf + # Install docs manually install -d $RPM_BUILD_ROOT%{_mandir}/man1 install -d $RPM_BUILD_ROOT%{_mandir}/man3 @@ -200,6 +204,11 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Mon Jun 30 2025 Akira TAGOH - 2.17.0-2 +- Backport a patch to fix a crash with Graphite fonts +- Drop 70-*bitmaps*.conf from /etc/fonts/conf.d so far. + Resolves: rhbz#2375426 + * Fri Jun 27 2025 Akira TAGOH - 2.17.0-1 - New upstream release. Resolves: rhbz#2375126 From b06b4f8a9146a7e2fa129af061d270d44f16977e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 30 Jun 2025 16:51:15 +0900 Subject: [PATCH 153/154] bump a release --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index ebc311e..e4c4b0d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.17.0 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 From 90ff975dce8834d53778e793405bb55abf7d6980 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 20:41:05 +0000 Subject: [PATCH 154/154] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index e4c4b0d..1bc63c7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.17.0 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -204,6 +204,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 2.17.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jun 30 2025 Akira TAGOH - 2.17.0-2 - Backport a patch to fix a crash with Graphite fonts - Drop 70-*bitmaps*.conf from /etc/fonts/conf.d so far.