fontconfig/fc-cache.patch

51 lines
1.6 KiB
Diff

diff -ru fontconfig-2.3.93.20060210.orig/fc-cache/Makefile.am fontconfig-2.3.93.20060210.new/fc-cache/Makefile.am
--- fontconfig-2.3.93.20060210.orig/fc-cache/Makefile.am 2006-02-06 11:36:09.000000000 +0100
+++ fontconfig-2.3.93.20060210.new/fc-cache/Makefile.am 2006-02-10 19:52:36.000000000 +0100
@@ -35,7 +35,7 @@
uninstall-local:
$(RM) -rf "$(DESTDIR)$(pkgcachedir)"
-INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS)
+INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS)
bin_PROGRAMS=fc-cache
fontconfig-2.3.93.20060210.new/fc-cacheだけに発見: Makefile.am.orig
diff -ru fontconfig-2.3.93.20060210.orig/fc-cache/fc-cache.c fontconfig-2.3.93.20060210.new/fc-cache/fc-cache.c
--- fontconfig-2.3.93.20060210.orig/fc-cache/fc-cache.c 2006-02-07 16:04:03.000000000 +0100
+++ fontconfig-2.3.93.20060210.new/fc-cache/fc-cache.c 2006-02-10 19:52:53.000000000 +0100
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
@@ -45,6 +46,8 @@
#define HAVE_GETOPT_LONG 0
#endif
+#include "fcint.h"
+
#if HAVE_GETOPT_LONG
#undef _GNU_SOURCE
#define _GNU_SOURCE
@@ -315,9 +318,13 @@
}
while (argv[i])
{
- if (!FcStrSetAdd (dirs, (FcChar8 *) argv[i]))
+ char *rp;
+
+ if (!FcStrSetAdd (dirs, (FcChar8 *) argv[i]) ||
+ (rp = realpath(argv[i], NULL)) == NULL ||
+ !FcConfigAddFontDir (config, rp))
{
- fprintf (stderr, "%s: Can't add directory\n", argv[0]);
+ fprintf (stderr, "%s: Can't add directory %s\n", argv[0], argv[i]);
return 1;
}
i++;
fontconfig-2.3.93.20060210.new/fc-cacheだけに発見: fc-cache.c.orig