Commit 4b1c0509 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Contribs: remove XML dependency from Fontconfig.

This removes around 1.1MB on both libass dll and freetype dll (on 2.8MB), which are 4th and 5th dll in size for Windows
(qt4, avcodec, avformat are bigger).
We DON'T use the fonts.conf anyway on Windows, therefore, why having such a dependency, just for parsing a configure file that we don't ship?
I still don't get what is wrong with an .ini/.conf format, but that is not my business, I guess.
parent a077fb25
......@@ -474,15 +474,16 @@ fontconfig: fontconfig-$(FONTCONFIG_VERSION).tar.gz Patches/fontconfig.patch
patch -p0 < Patches/fontconfig-nodocs.patch
ifdef HAVE_WIN32
patch -p0 < Patches/fontconfig.patch
patch -p0 < Patches/fontconfig-noxml2.patch
endif
(cd $@; autoreconf -ivf)
.fontconfig: fontconfig .xml .freetype
ifdef HAVE_WIN32
ifdef HAVE_CYGWIN
(cd $<; LIBXML2_CFLAGS=`$(PREFIX)/bin/xml2-config --cflags` ./configure --target=$(HOST) --disable-pic --disable-shared --disable-docs --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 && make && make install)
(cd $<; ./configure --target=$(HOST) --disable-pic --disable-shared --disable-docs --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 && make && make install)
else
(cd $<; $(HOSTCC) LIBXML2_CFLAGS=`$(PREFIX)/bin/xml2-config --cflags` ./configure $(HOSTCONF) --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 --disable-docs && make && make install)
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --disable-libxml2 --disable-docs && make && make install)
endif
else
ifdef HAVE_DARWIN_OS
......
diff -ruN fontconfig.new/src/fcinit.c fontconfig/src/fcinit.c
--- fontconfig.new/src/fcinit.c 2009-07-25 21:55:10.000000000 +0200
+++ fontconfig/src/fcinit.c 2009-07-25 21:58:05.000000000 +0200
@@ -68,7 +68,8 @@
if (!config)
return FcFalse;
- if (!FcConfigParseAndLoad (config, 0, FcTrue))
+// if (!FcConfigParseAndLoad (config, 0, FcTrue))
+ if (1)
{
FcConfigDestroy (config);
return FcInitFallbackConfig ();
diff -ruN fontconfig.new/src/fcxml.c fontconfig/src/fcxml.c
--- fontconfig.new/src/fcxml.c 2009-07-25 21:55:10.000000000 +0200
+++ fontconfig/src/fcxml.c 2009-07-25 21:56:37.000000000 +0200
@@ -23,6 +23,8 @@
*/
#include "fcint.h"
+
+#if 0
#include <fcntl.h>
#include <stdarg.h>
#include <dirent.h>
@@ -58,6 +60,8 @@
#undef STRICT
#endif
+#endif
+
static void
FcExprDestroy (FcExpr *e);
@@ -71,6 +75,7 @@
free (test);
}
+#if 0
static FcExpr *
FcExprCreateInteger (FcConfig *config, int i)
{
@@ -179,7 +184,7 @@
}
return e;
}
-
+#endif
static void
FcExprDestroy (FcExpr *e)
{
@@ -255,6 +260,7 @@
free (e);
}
+#if 0
typedef enum _FcElement {
FcElementNone,
FcElementFontconfig,
@@ -2589,3 +2595,4 @@
#define __fcxml__
#include "fcaliastail.h"
#undef __fcxml__
+#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment