diff options
Diffstat (limited to 'fontconfig/src')
-rw-r--r-- | fontconfig/src/.gitignore | 4 | ||||
-rw-r--r-- | fontconfig/src/fcatomic.c | 3 | ||||
-rw-r--r-- | fontconfig/src/fccache.c | 4 | ||||
-rw-r--r-- | fontconfig/src/fcxml.c | 4 | ||||
-rw-r--r-- | fontconfig/src/makealias.py | 36 | ||||
-rw-r--r-- | fontconfig/src/makefile | 59 |
6 files changed, 102 insertions, 8 deletions
diff --git a/fontconfig/src/.gitignore b/fontconfig/src/.gitignore new file mode 100644 index 000000000..baffcee29 --- /dev/null +++ b/fontconfig/src/.gitignore @@ -0,0 +1,4 @@ +fcalias.h
+fcaliastail.h
+fcftalias.h
+fcftaliastail.h
\ No newline at end of file diff --git a/fontconfig/src/fcatomic.c b/fontconfig/src/fcatomic.c index 33c1cc628..b5f3d5aaa 100644 --- a/fontconfig/src/fcatomic.c +++ b/fontconfig/src/fcatomic.c @@ -7,7 +7,7 @@ * 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 + * 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 @@ -56,6 +56,7 @@ #include <time.h> #ifdef _WIN32 +#undef mkdir #define mkdir(path,mode) _mkdir(path) #endif diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c index c38a7050e..054371445 100644 --- a/fontconfig/src/fccache.c +++ b/fontconfig/src/fccache.c @@ -32,9 +32,6 @@ #if defined(HAVE_MMAP) || defined(__CYGWIN__) # include <unistd.h> # include <sys/mman.h> -#elif defined(_WIN32) -# define _WIN32_WINNT 0x0500 -# include <windows.h> #endif #ifndef O_BINARY @@ -817,6 +814,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 ff30b7bbd..e0bb72874 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 <windows.h> -#undef STRICT #include <mbstring.h> #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..f27d62fa5 --- /dev/null +++ b/fontconfig/src/makefile @@ -0,0 +1,59 @@ + +#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 NORELDBG=1 ..\fc-case\makefile +load_makefile NORELDBG=1 ..\fc-glyphname\makefile +load_makefile NORELDBG=1 ..\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) + |