aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig/src')
-rw-r--r--fontconfig/src/fcatomic.c1
-rw-r--r--fontconfig/src/fccache.c4
-rw-r--r--fontconfig/src/fcxml.c4
-rw-r--r--fontconfig/src/makealias.py36
-rw-r--r--fontconfig/src/makefile60
5 files changed, 98 insertions, 7 deletions
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 <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 69e1a6b82..d62b19346 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
@@ -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 <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..61eb00cb9
--- /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 NORELDBG=1 ..\fc-arch\makefile
+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)
+