diff options
author | marha <marha@users.sourceforge.net> | 2011-01-19 10:58:44 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-19 10:58:44 +0000 |
commit | 55ad24f775c07bed7ef653d4ead279c8b61fbf20 (patch) | |
tree | e5eae61fb3f59ab63739bf7906b4dbad65dde28d /fontconfig/src/makealias.py | |
parent | 35f18739481b50589e62e5bc6c77956cd590d745 (diff) | |
download | vcxsrv-55ad24f775c07bed7ef653d4ead279c8b61fbf20.tar.gz vcxsrv-55ad24f775c07bed7ef653d4ead279c8b61fbf20.tar.bz2 vcxsrv-55ad24f775c07bed7ef653d4ead279c8b61fbf20.zip |
Added makefiles for fontconfig libXft and libXrender
Added libxml2 include files and library
Added iconf.h
Enabled XRENDER in xclock
Diffstat (limited to 'fontconfig/src/makealias.py')
-rw-r--r-- | fontconfig/src/makealias.py | 36 |
1 files changed, 36 insertions, 0 deletions
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") |