From 8d729fbc5aec05d7e4e27111451b29b4be2a223b Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 5 Dec 2020 10:48:09 +0100 Subject: [PATCH] fontconfig: Update to 2.13.93 --- .../0002-fix-mkdir.mingw.patch | 14 +- .../0008-fix-font-search.patch | 122 ------------------ mingw-w64-fontconfig/PKGBUILD | 12 +- 3 files changed, 11 insertions(+), 137 deletions(-) delete mode 100644 mingw-w64-fontconfig/0008-fix-font-search.patch diff --git a/mingw-w64-fontconfig/0002-fix-mkdir.mingw.patch b/mingw-w64-fontconfig/0002-fix-mkdir.mingw.patch index 62682ffb1a..86b2f8dd47 100644 --- a/mingw-w64-fontconfig/0002-fix-mkdir.mingw.patch +++ b/mingw-w64-fontconfig/0002-fix-mkdir.mingw.patch @@ -1,12 +1,12 @@ ---- fontconfig-2.11.0/test/test-migration.c.orig 2013-10-11 03:10:18.000000000 +0000 -+++ fontconfig-2.11.0/test/test-migration.c 2014-02-06 12:20:57.859195300 +0000 -@@ -4,6 +4,9 @@ - #include +--- fontconfig-2.13.93/test/test-migration.c.orig 2020-12-05 10:40:30.302459200 +0100 ++++ fontconfig-2.13.93/test/test-migration.c 2020-12-05 10:42:21.727935600 +0100 +@@ -30,6 +30,9 @@ + #include #include #include +#ifdef _WIN32 +#define mkdir(path,mode) _mkdir(path) +#endif - #ifndef HAVE_STRUCT_DIRENT_D_TYPE - #include - #include + #ifdef HAVE_UNISTD_H + #include + #endif diff --git a/mingw-w64-fontconfig/0008-fix-font-search.patch b/mingw-w64-fontconfig/0008-fix-font-search.patch deleted file mode 100644 index 893a38c611..0000000000 --- a/mingw-w64-fontconfig/0008-fix-font-search.patch +++ /dev/null @@ -1,122 +0,0 @@ -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; -+} --- -GitLab - diff --git a/mingw-w64-fontconfig/PKGBUILD b/mingw-w64-fontconfig/PKGBUILD index 42499f6ee1..57bb4b1dbc 100644 --- a/mingw-w64-fontconfig/PKGBUILD +++ b/mingw-w64-fontconfig/PKGBUILD @@ -4,8 +4,8 @@ _realname=fontconfig pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.13.92 -pkgrel=3 +pkgver=2.13.93 +pkgrel=1 pkgdesc="A library for configuring and customizing font access (mingw-w64)" arch=('any') url="https://wiki.freedesktop.org/www/Software/fontconfig/" @@ -27,15 +27,13 @@ source=("https://www.freedesktop.org/software/fontconfig/release/fontconfig-${pk 0004-fix-mkdtemp.mingw.patch 0005-fix-setenv.mingw.patch 0007-pkgconfig.mingw.patch - 0008-fix-font-search.patch fontconfig.hook.in) -sha256sums=('506e61283878c1726550bc94f2af26168f1e9f2106eac77eaaf0b2cdfad66e4e' +sha256sums=('ea968631eadc5739bc7c8856cef5c77da812d1f67b763f5e51b57b8026c1a0a0' '1266d4bbd8270f013fee2401c890f0251babf50a175a69d681d3a6af5003c899' - '0d950eb8a19858bff1f0b26e4a560f589e79e7eb7f22f723267748dfe55e0b63' + '9e5700b9c555e60cd8116fdc2e24cf0a01de01e83373dbbe78cef1e32b91da3b' '57ff8420dbf62873b6fcb38b52fb7b37e0e278425a9125e15dccba54668c8ab9' '552b54010f9fe4097f332cf2397bbd3e78489542d3bbf07792ed1cfe9381796e' 'af373531873da46d0356305da5444c1ec74f443cd2635ea2db6b7dadd1561f5b' - '557bfa2c83746da9d3d2be956c3c6906e80625c324d64eb7504d8c5164c2eca3' 'ce98f763643f8f859b40c703b8dbe9d203978e4947318eddd583dab9f36a3b3f') prepare() { @@ -46,8 +44,6 @@ prepare() { patch -p1 -i ${srcdir}/0004-fix-mkdtemp.mingw.patch patch -p1 -i ${srcdir}/0005-fix-setenv.mingw.patch patch -p1 -i ${srcdir}/0007-pkgconfig.mingw.patch - # https://github.com/msys2/MINGW-packages/issues/6661#issuecomment-674536893 - patch -p1 -i ${srcdir}/0008-fix-font-search.patch autoreconf -fiv }