mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-21 23:00:06 -07:00
fontconfig: include static library, fixes
This commit is contained in:
parent
d791f0db07
commit
297e34b5b1
@ -8,6 +8,7 @@ patch -p1 < fontconfig-fix-1744377.patch
|
||||
--localstatedir=/var \
|
||||
--sysconfdir=/etc \
|
||||
--with-xmldir=/etc/fonts \
|
||||
--enable-static \
|
||||
--disable-nls
|
||||
|
||||
make
|
||||
|
@ -1,2 +1,2 @@
|
||||
506e61283878c1726550bc94f2af26168f1e9f2106eac77eaaf0b2cdfad66e4e fontconfig-2.13.92.tar.xz
|
||||
986f004c6b7ad613703fcf9c241cefb331de3af0d2e87c8b502311209d781a74 fontconfig-fix-1744377.patch
|
||||
506e61283878c1726550bc94f2af26168f1e9f2106eac77eaaf0b2cdfad66e4e
|
||||
3f9400aab6d8ba2e1973ec8dec15237ffa1628b2a2dcd2ec39f3f5d1e038d4b9
|
||||
|
@ -6,12 +6,6 @@ Subject: [PATCH] Do not return FcFalse from FcConfigParseAndLoad*() if
|
||||
|
||||
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
|
||||
@ -22,12 +16,12 @@ index 2e26e77a..076fa301 100644
|
||||
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 */
|
||||
@ -45,78 +39,3 @@ index 2e26e77a..076fa301 100644
|
||||
{
|
||||
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 <fontconfig/fontconfig.h>
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ const FcChar8 *doc = ""
|
||||
+ "<fontconfig>\n"
|
||||
+ " <include ignore_missing=\"yes\">blahblahblah</include>\n"
|
||||
+ "</fontconfig>\n"
|
||||
+ "";
|
||||
+ const FcChar8 *doc2 = ""
|
||||
+ "<fontconfig>\n"
|
||||
+ " <include ignore_missing=\"no\">blahblahblah</include>\n"
|
||||
+ "</fontconfig>\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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user