Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Akira TAGOH
e244dce014 Fix failing on write cache. 2019-09-06 19:41:30 +09:00
Akira TAGOH
80cbffaa79 Oops, wrongly removed patch 2019-06-12 06:32:03 +00:00
Akira TAGOH
ed04a2382b Fix return code issue in fc-validate. (#1707734) 2019-06-12 05:58:00 +00:00
Akira TAGOH
62ed5e9b00 Fix return code issue in fc-validate. (#1707734) 2019-06-12 05:57:14 +00:00
Akira TAGOH
1f8db3180b Backport flatpak support rework patches. 2019-06-11 10:22:18 +00:00
6 changed files with 3068 additions and 153 deletions

16
FcStrBuildFilename.3 Normal file
View file

@ -0,0 +1,16 @@
.\" auto-generated by docbook2man-spec from docbook-utils package
.TH "FcStrBuildFilename" "3" "07 June 2019" "Fontconfig 2.13.1" ""
.SH NAME
FcStrBuildFilename \- Concatenate strings as a file path
.SH SYNOPSIS
.nf
\fB#include <fontconfig/fontconfig.h>
.sp
FcChar8 * FcStrBuildFilename (const FcChar8 *\fIpath\fB, \&...\fI\fB);
.fi\fR
.SH "DESCRIPTION"
.PP
Creates a filename from the given elements of strings as file paths
and concatenate them with the appropriate file separator.
Arguments must be null-terminated.
This returns a newly-allocated memory which should be freed when no longer needed.

View file

@ -0,0 +1,26 @@
From c336b8471877371f0190ba06f7547c54e2b890ba Mon Sep 17 00:00:00 2001
From: Akira TAGOH <akira@tagoh.org>
Date: Thu, 9 May 2019 07:10:11 +0000
Subject: [PATCH 1/5] fc-validate: returns an error code when missing some
glyphs
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/154
---
fc-validate/fc-validate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fc-validate/fc-validate.c b/fc-validate/fc-validate.c
index 2ceee20..327ae63 100644
--- a/fc-validate/fc-validate.c
+++ b/fc-validate/fc-validate.c
@@ -197,6 +197,7 @@ main (int argc, char **argv)
{
FcChar32 ucs4, pos, map[FC_CHARSET_MAP_SIZE];
+ err = 1;
printf (_("%s:%d Missing %d glyph(s) to satisfy the coverage for %s language\n"),
argv[i], index, count, lang);
--
2.22.0.rc3

3009
fontconfig-flatpak.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,93 +0,0 @@
From 5f12f564f8748deaa603adb7a4b8f616b6390ad4 Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@keithp.com>
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 <keithp@keithp.com>
---
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 <akira@tagoh.org>
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

View file

@ -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;

View file

@ -5,7 +5,7 @@
Summary: Font configuration and customization library
Name: fontconfig
Version: 2.13.1
Release: 6%{?dist}
Release: 9%{?dist}
# src/ftglue.[ch] is in Public Domain
# src/fccache.c contains Public Domain code
# fc-case/CaseFolding.txt is in the UCD
@ -15,18 +15,20 @@ Source: http://fontconfig.org/release/%{name}-%{version}.tar.bz2
URL: http://fontconfig.org
Source1: 25-no-bitmap-fedora.conf
Source2: fc-cache
# Adding manpage because doc rebuild has been disabled.
Source3: FcStrBuildFilename.3
# 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
# https://gitlab.freedesktop.org/tagoh/fontconfig/commits/2.13.1-flatpak-lts
Patch5: %{name}-flatpak.patch
Patch6: %{name}-fcvalidate.patch
BuildRequires: expat-devel
BuildRequires: freetype-devel >= %{freetype_version}
BuildRequires: fontpackages-devel
BuildRequires: libuuid-devel
BuildRequires: autoconf automake libtool gettext
BuildRequires: gperf
@ -76,6 +78,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
install -p -m 0644 %{SOURCE3} doc/
make %{?_smp_mflags}
%install
@ -168,6 +172,15 @@ HOME=/root /usr/bin/fc-cache -s
%doc fontconfig-devel.txt fontconfig-devel
%changelog
* Fri Sep 6 2019 Akira TAGOH <tagoh@redhat.com> - 2.13.1-9
- Fix failing on write cache.
* Wed Jun 12 2019 Akira TAGOH <tagoh@redhat.com> - 2.13.1-8
- Fix return code issue in fc-validate. (#1707734)
* Tue Jun 11 2019 Akira TAGOH <tagoh@redhat.com> - 2.13.1-7
- Backport flatpak support rework patches.
* Fri Feb 22 2019 Akira TAGOH <tagoh@redhat.com> - 2.13.1-6
- Update freetype version for runtime dependency to ensure
they have FT_Done_MM_Var symbol certainly. (#1679619)