[xorg-commit-diffs] xc/lib/fontconfig config-subst, NONE, 1.1.6.1 Imakefile, 1.1.4.3, 1.1.4.4

Egbert Eich xorg-commit at pdx.freedesktop.org
Thu Apr 15 03:15:16 PDT 2004


Committed by: eich

Update of /cvs/xorg/xc/lib/fontconfig
In directory pdx:/home/eich/tstbuild/xc/lib/fontconfig

Modified Files:
      Tag: XORG-CURRENT
	Imakefile 
Added Files:
      Tag: XORG-CURRENT
	config-subst 
Log Message:
2004-04-15  Egbert Eich  <eich at freedesktop.org>
        Merged changes from RELEASE-1 branch
	


--- NEW FILE: config-subst ---
#!/bin/sh
script=config-subst.$$
trap "rm $script" 0
rm -f $script
for i in ${1+"$@"}; do
	var="`echo "$i" | sed 's/=.*$//'`"
	val="`echo "$i" | sed 's/^[^=]*=//'`"
	echo "s;@$var@;$val;" >> $script
done
sed -f $script

Index: Imakefile
===================================================================
RCS file: /cvs/xorg/xc/lib/fontconfig/Imakefile,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -d -r1.1.4.3 -r1.1.4.4
--- a/Imakefile	5 Mar 2004 13:39:42 -0000	1.1.4.3
+++ b/Imakefile	15 Apr 2004 10:15:10 -0000	1.1.4.4
@@ -9,22 +9,27 @@
 #define HasSharedData YES
 #define LibName fontconfig
 #define SoRev SOFONTCONFIGREV
+#define LibInstall InstallFontconfigLibrary
+#define LibHeaders InstallFontconfigLibrary
 
 #define IncSubdir fontconfig
 
 HEADERS=fcfreetype.h fcprivate.h fontconfig.h
 
 BuildIncludes($(HEADERS),IncSubdir,..)
+#if InstallFontconfigLibrary
 InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir,$(INSTINCFLAGS))
+#endif
 
 #include <Threads.tmpl>
 
 FONTCONFIGSRC=$(TOP)/extras/fontconfig
 
-INCLUDES=$(EXPATINCLUDES) $(FREETYPE2INCLUDES) -I$(FONTCONFIGSRC)/src \
-	-I$(XBUILDINCDIR)
+INCLUDES= $(EXPATINCLUDES) $(FREETYPE2INCLUDES) -I$(FONTCONFIGSRC)/src \
+	-I$(FONTCONFIGSRC) -I$(XBUILDINCDIR)
 
-DEFINES=-DFC_DEFAULT_FONTS='"$(FC_DEFAULT_FONTS)"' -DHAVE_EXPAT -DXFREE86_FT2
+DEFINES=-DFC_DEFAULT_FONTS='"$(FC_DEFAULT_FONTS)"' -DHAVE_EXPAT -DXFREE86_FT2 \
+	-DFONTCONFIG_PATH='"$(FONTCONFIGFONTSCONFDIR)"'
 
 REQUIREDLIBS=$(LDPRELIBS) $(FREETYPE2LIB) $(EXPATLIB)
 
@@ -42,11 +47,16 @@
 SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF))
 #endif
 
+#if 0
 MANSUFFIX = $(LIBMANSUFFIX)
+#if InstallFontconfigLibrary
 InstallManPage(fontconfig,$(LIBMANDIR))
+#endif
+#endif
+
 DependTarget()
 
-FONTCONFIG_VERSION=2.1.0
+FONTCONFIG_VERSION=2.2.2
 
 #ifndef FontconfigFontsConfDir
 #if NothingOutsideProjectRoot
@@ -66,7 +76,8 @@
 #if NothingOutsideProjectRoot
 FONTDIRS=$(FONTDIR)
 #else
-FONTDIRS=/usr/share/fonts $(FONTDIR) $(MACFONTDIRS)
+DEFAULTFONTDIRS=/usr/share/fonts
+FONTDIRS=$(FONTDIR) $(MACFONTDIRS)
 #endif
 
 RPATH_CFLAG = HardCodeLibdirFlag
@@ -76,52 +87,80 @@
           libdir=$(USRLIBDIR) \
 	  hardcode_libdir_flag_spec=$(RPATH_CFLAG) \
           includedir=$(INCROOT) \
-          PACKAGE_VERSION=$(FONTCONFIG_VERSION)
+          VERSION=$(FONTCONFIG_VERSION)
 
-CONFIG_SUBST_PROG=sh $(FONTCONFIGSRC)/config/config-subst
+CONFIG_SUBST_PROG=sh ./config-subst
 
-#ifndef InstallNamedTargetBackup
-#define InstallNamedTargetBackup(step,srcname,flags,dest,dstname)	@@\
+#if (defined(SunArchitecture) && defined(SVR4Architecture)) && !(HasGnuMake)
+XCOMM Required for the config-subst rules to work with Solaris make
+SHELL=/bin/ksh
+#endif
+
+#if InstallFontconfigLibrary
+# ifndef InstallNamedTargetBackup
+#  define InstallNamedTargetBackup(step,srcname,flags,dest,dstname)	@@\
 step:: srcname								@@\
 	MakeDir($(DESTDIR)dest)						@@\
 	MoveToBakFile($(DESTDIR)dest/dstname)				@@\
 	$(INSTALL) $(INSTALLFLAGS) flags srcname $(DESTDIR)dest/dstname
-#endif /* InstallNamedTargetBackup */
+# endif /* InstallNamedTargetBackup */
 
-#ifndef InstallNonExecFileBackup
-#define InstallNonExecFileBackup(file,dest)				@@\
+# ifndef InstallNonExecFileBackup
+#  define InstallNonExecFileBackup(file,dest)				@@\
 InstallNamedTargetBackup(install,file,$(INSTDATFLAGS),dest,file)
-#endif /* InstallNonExecFileBackup */
+# endif /* InstallNonExecFileBackup */
 
 InstallNonExecFileBackup(fonts.conf,$(FONTCONFIGFONTSCONFDIR))
 InstallNonExecFile(fonts.dtd,$(FONTCONFIGFONTSCONFDIR))
+#endif
 
 all:: fonts.conf
 
-fonts.conf: fonts.conf.in setfontdirs findfonts
+fonts.conf: fonts.conf.in
 	RemoveFile($@)
-	sh ./setfontdirs $(FONTDIRS)
+	DEFAULTFONTDIR=FC_DEFAULT_FONTS=$(DEFAULTFONTDIRS); \
+	FONTDIR=FC_FONTPATH=`for i in  $(FONTDIRS); \
+		do echo -n '<dir>'$$i'</dir> '; done;`; \
+	FONTDIRDATE=FC_FONTDATE=`date;`;\
+	$(CONFIG_SUBST_PROG) "$$DEFAULTFONTDIR" "$$FONTDIR" "$$FONTDIRDATE" \
+		< fonts.conf.in > $@;
 
 clean::
 	RemoveFile(fonts.conf)
 
+#if SharedLibFontconfig
+all:: fontconfig-def.cpp 
+
+fontconfig-def.cpp: fontconfig.def.in
+	RemoveFile($@)
+	MAJ=`expr "$(SOFONTCONFIGREV)" : "\([^\.]*\)\..*"`; \
+	MIN=`expr "$(SOFONTCONFIGREV)" : "[^\.]*\.\([^\.]*\)\.*.*"` || true;\
+	TEEN=`expr "$(SOFONTCONFIGREV)" : "[^\.]*\.[^\.]*\.*\(.*\)"` || true;\
+	CUR=LT_CURRENT=`expr $$MAJ + $$MIN`;\
+	REV=LT_REVISION=$$TEEN;\
+	$(CONFIG_SUBST_PROG) $$CUR $$REV < fontconfig.def.in > $@
+
+clean::
+	RemoveFile(fontconfig-def.cpp)
+#endif
+
 all:: fontconfig.pc
 
 fontconfig.pc: fontconfig.pc.in
 	RemoveFile($@)
 	$(CONFIG_SUBST_PROG) $(SUBSTVARS) < fontconfig.pc.in > $@
 
+#if InstallFontconfigLibrary
 InstallNonExecFile(fontconfig.pc,$(USRLIBDIR)/pkgconfig)
+#endif
 
 clean::
 	RemoveFile(fontconfig.pc)
 
 /* config stuff */
-LinkSourceFile(findfonts,$(FONTCONFIGSRC))
 LinkSourceFile(fontconfig.pc.in,$(FONTCONFIGSRC))
 LinkSourceFile(fonts.conf.in,$(FONTCONFIGSRC))
 LinkSourceFile(fonts.dtd,$(FONTCONFIGSRC))
-LinkSourceFile(setfontdirs,$(FONTCONFIGSRC))
 
 /* Source */
 LinkSourceFile(fcatomic.c,$(FONTCONFIGSRC)/src)
@@ -143,8 +182,8 @@
 LinkSourceFile(fcpat.c,$(FONTCONFIGSRC)/src)
 LinkSourceFile(fcstr.c,$(FONTCONFIGSRC)/src)
 LinkSourceFile(fcxml.c,$(FONTCONFIGSRC)/src)
-LinkSourceFile(fontconfig-def.cpp,$(FONTCONFIGSRC)/src)
-LinkSourceFile(fontconfig.man,$(FONTCONFIGSRC)/src)
+LinkSourceFile(fontconfig.def.in,$(FONTCONFIGSRC)/src)
+/*LinkSourceFile(fontconfig.man,$(FONTCONFIGSRC)/src)*/
 
 /* Public headers */
 LinkSourceFile(fcfreetype.h,$(FONTCONFIGSRC)/fontconfig)




More information about the xorg-commit-diffs mailing list