From 55ad24f775c07bed7ef653d4ead279c8b61fbf20 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 19 Jan 2011 10:58:44 +0000 Subject: Added makefiles for fontconfig libXft and libXrender Added libxml2 include files and library Added iconf.h Enabled XRENDER in xclock --- fontconfig/src/fcatomic.c | 1 + fontconfig/src/fccache.c | 4 +-- fontconfig/src/fcxml.c | 4 --- fontconfig/src/makealias.py | 36 +++++++++++++++++++++++++++ fontconfig/src/makefile | 60 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 fontconfig/src/makealias.py create mode 100644 fontconfig/src/makefile (limited to 'fontconfig/src') diff --git a/fontconfig/src/fcatomic.c b/fontconfig/src/fcatomic.c index 89cae6183..d6121305a 100644 --- a/fontconfig/src/fcatomic.c +++ b/fontconfig/src/fcatomic.c @@ -56,6 +56,7 @@ #include #ifdef _WIN32 +#undef mkdir #define mkdir(path,mode) _mkdir(path) #endif diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c index 69e1a6b82..d62b19346 100644 --- a/fontconfig/src/fccache.c +++ b/fontconfig/src/fccache.c @@ -32,9 +32,6 @@ #if defined(HAVE_MMAP) || defined(__CYGWIN__) # include # include -#elif defined(_WIN32) -# define _WIN32_WINNT 0x0500 -# include #endif #ifndef O_BINARY @@ -809,6 +806,7 @@ bail1: #ifdef _WIN32 +#undef mkdir #define mkdir(path,mode) _mkdir(path) #endif diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c index 9428468a4..74b6c8143 100644 --- a/fontconfig/src/fcxml.c +++ b/fontconfig/src/fcxml.c @@ -53,10 +53,6 @@ #endif /* ENABLE_LIBXML2 */ #ifdef _WIN32 -#define _WIN32_WINNT 0x0500 -#define STRICT -#include -#undef STRICT #include #endif diff --git a/fontconfig/src/makealias.py b/fontconfig/src/makealias.py new file mode 100644 index 000000000..6afca0901 --- /dev/null +++ b/fontconfig/src/makealias.py @@ -0,0 +1,36 @@ +import sys,os,re,glob + +SRCDIR=sys.argv[1] +HEAD=open(sys.argv[2],"w") +TAIL=open(sys.argv[3],"w") + +#rm -f $HEAD $TAIL +TAIL.write("#if HAVE_GNUC_ATTRIBUTE\n") + +InputFiles=sys.argv[4:] +Names=[] +for Input in InputFiles: + buffer=open(Input,"r").read() + Names.extend(re.findall(r'\n(Fc[^ ]*) *\(',buffer)) + +def SearchCFiles(Name): + Files=glob.glob(os.path.join(SRCDIR,"*.c") ) + for File in Files: + buffer=open(File,"r").read() + res = re.findall(r'\n%s[ \(].*'%Name,buffer) + if res: + File=re.sub(r'^.*[\\/]','',File) + return "__"+re.sub(r'\.c','__',File) + +for Name in Names: + if Name=="FcCacheDir" or Name=="FcCacheSubdir": + continue + + alias="IA__"+Name + HEAD.write("extern __typeof (%s) %s;\n"%(Name,alias)) + HEAD.write("#define %s %s\n"%(Name,alias)) + TAIL.write("#ifdef "+SearchCFiles(Name)+"\n") + TAIL.write("#undef %s\n"%Name) + TAIL.write("extern __typeof (%s) %s;\n"%(Name,Name)) + TAIL.write("#endif\n") +TAIL.write("#endif\n") diff --git a/fontconfig/src/makefile b/fontconfig/src/makefile new file mode 100644 index 000000000..4a9ac4dc1 --- /dev/null +++ b/fontconfig/src/makefile @@ -0,0 +1,60 @@ + +#INCLUDES = \ +# -I$(top_srcdir) \ +# -I$(top_srcdir)/src \ +# $(FREETYPE_CFLAGS) \ +# $(LIBXML2_CFLAGS) \ +# $(EXPAT_CFLAGS) \ +# $(WARN_CFLAGS) \ +# -DFC_CACHEDIR='"$(FC_CACHEDIR)"' \ +# -DFONTCONFIG_PATH='"$(CONFDIR)"' + +load_makefile DEBUG=0 ..\fc-arch\makefile +load_makefile DEBUG=0 ..\fc-case\makefile +load_makefile DEBUG=0 ..\fc-glyphname\makefile +load_makefile DEBUG=0 ..\fc-lang\makefile + +CSRCS = \ + fcatomic.c \ + fcblanks.c \ + fccache.c \ + fccfg.c \ + fccharset.c \ + fcdbg.c \ + fcdefault.c \ + fcdir.c \ + fcformat.c \ + fcfreetype.c \ + fcfs.c \ + fcinit.c \ + fclang.c \ + fclist.c \ + fcmatch.c \ + fcmatrix.c \ + fcname.c \ + fcpat.c \ + fcserialize.c \ + fcstr.c \ + fcxml.c \ + \ + ftglue.c + +LIBRARY = libfontconfig + +PUBLIC_FILES = \ + ..\fontconfig\fontconfig.h \ + fcdeprecate.h \ + ..\fontconfig\fcprivate.h + +PUBLIC_FT_FILES = \ + ..\fontconfig\fcfreetype.h + +DEFINES += FC_CACHEDIR="""getenv(\"""TEMP\""")""" FC_DEFAULT_FONTS="""WINDOWSFONTDIR""" +INCLUDES := .. $(INCLUDES) $(MHMAKECONF)\freetype\include $(MHMAKECONF)\libxml2\include $(MHMAKECONF)\iconv\include + +fcalias.h fcaliastail.h: makealias.py $(PUBLIC_FILES) + python makealias.py . fcalias.h fcaliastail.h $(PUBLIC_FILES) + +fcftalias.h fcftaliastail.h: makealias.py $(PUBLIC_FT_FILES) + python makealias.py . fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES) + -- cgit v1.2.3