diff --git a/INSTALL b/INSTALL index 6798b36..2b61417 100644 --- a/INSTALL +++ b/INSTALL @@ -1,3 +1,14 @@ -The configuration files (fonts.conf, fonts.dtd) go in a new directory -/etc/fonts, the install step doesn't current create this directory or copy -the config files. +You can build fontconfig with either autoconf or imake. + +For autoconf: + + $ sh cvscompile.sh --sysconfdir=/etc --prefix=/usr + +For imake: + $ xmkmf -a + +These should both generate valid Makefiles, in either case: + + $ make + $ make install + diff --git a/Imakefile b/Imakefile index d6d6c5b..a1fe947 100644 --- a/Imakefile +++ b/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86$ +XCOMM $XFree86: xc/lib/fontconfig/Imakefile,v 1.3 2002/05/21 17:08:41 keithp Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -7,12 +7,20 @@ LINTSUBDIRS=src fc-cache fc-list SUBDIRS=fontconfig $(LINTSUBDIRS) +FONTCONFIG_REVISION=1 + #ifndef FontconfigDir #define FontconfigDir /etc/fonts #endif FONTCONFIGDIR=FontconfigDir +SUBSTVARS=prefix=$(PROJECTROOT) \ + exec_prefix=$(BINDIR) \ + libdir=$(USRLIBDIR) \ + includedir=$(INCROOT) \ + PACKAGE_VERSION=$(SOFONTCONFIGREV).$(FONTCONFIG_REVISION) + MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) MakeLintLibSubdirs($(LINTSUBDIRS)) @@ -29,3 +37,26 @@ fonts.conf: fonts.conf.in clean:: RemoveFile(fonts.conf) + +all:: fontconfig-config.script + +fontconfig-config.script: fontconfig-config.in + RemoveFile($@) + sh config/config-subst $(SUBSTVARS) < $< > $@ + +InstallScript(fontconfig-config,$(BINDIR)) + +clean:: + RemoveFile(fontconfig-config.script) + +all:: fontconfig.pc + +fontconfig.pc: fontconfig.pc.in + RemoveFile($@) + sh config/config-subst $(SUBSTVARS) < $< > $@ + +InstallNonExecFile(fontconfig.pc,$(USRLIBDIR)/pkgconfig) + +clean:: + RemoveFile(fontconfig.pc) + diff --git a/Makefile.in b/Makefile.in index 3d7d8cd..f97c753 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # -# $XFree86$ +# $XFree86: xc/lib/fontconfig/Makefile.in,v 1.2 2002/05/21 17:48:15 keithp Exp $ # # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. # @@ -22,7 +22,9 @@ # PERFORMANCE OF THIS SOFTWARE. # -DEPTH = . +TOPDIR = . + +include $(TOPDIR)/config/Makedefs DIRS = src fc-cache fc-list fontconfig @@ -50,3 +52,15 @@ $(CONFDIR)/fonts.dtd:: fonts.dtd clean:: rm -f fonts.conf +install:: $(BINDIR)/fontconfig-config + +$(BINDIR)/fontconfig-config: fontconfig-config + $(INSTALL_SCRIPT) $< $(BINDIR) + +install:: $(LIBDIR)/pkgconfig $(LIBDIR)/pkgconfig/fontconfig.pc + +$(LIBDIR)/pkgconfig: + mkdir -p $@ + +$(LIBDIR)/pkgconfig/fontconfig.pc: fontconfig.pc + $(INSTALL_DATA) $< $(LIBDIR)/pkgconfig diff --git a/README b/README index 98f0fca..41410c0 100644 --- a/README +++ b/README @@ -1,2 +1,15 @@ Fontconfig Font configuration and customization library + Version 1.0.1 + 2002-5-23 + +This is the first public release of fontconfig, a font configuration and +customization library. Fontconfig is designed to locate fonts within the +system and select them according to requirements specified by applications. + +Fontconfig is not a rasterization library, nor does it impose a particular +rasterization library on the application. The X-specific library +'Xft' uses fontconfig along with freetype to specify and rasterize fonts. + +Keith Packard +keithp@keithp.com diff --git a/config/config-subst b/config/config-subst new file mode 100644 index 0000000..c3436e7 --- /dev/null +++ b/config/config-subst @@ -0,0 +1,8 @@ +#!/bin/sh +exprs="" +for i in ${1+"$@"}; do + var="`echo $i | sed 's/=.*$//'`" + val="`echo $i | sed 's/^[^=]*=//'`" + exprs="$exprs -e s;@$var@;$val;" +done +sed $exprs diff --git a/configure.in b/configure.in index 4cd437b..c98fff9 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl -dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.2 2002/05/21 17:08:42 keithp Exp $ +dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.3 2002/05/21 17:48:15 keithp Exp $ dnl dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. dnl @@ -50,6 +50,7 @@ PACKAGE_VERSION=1.0.1 PACKAGE_MAJOR=`echo $PACKAGE_VERSION | awk -F . '{ print $1 }'` PACKAGE_MINOR=`echo $PACKAGE_VERSION | awk -F . '{ print $2 }'` PACKAGE_REVISION=`echo $PACKAGE_VERSION | awk -F . '{ print $3 }'` +AC_SUBST(PACKAGE_VERSION) AC_SUBST(PACKAGE_MAJOR) AC_SUBST(PACKAGE_MINOR) AC_SUBST(PACKAGE_REVISION) @@ -119,20 +120,20 @@ esac case "$freetype_includes" in no) - freetype_includes="" + FREETYPE_CFLAGS="" ;; yes) case "$ft_config" in no) - freetype_includes="" + FREETYPE_CFLAGS="" ;; *) - freetype_includes="`$ft_config --cflags`" + FREETYPE_CFLAGS="`$ft_config --cflags`" ;; esac ;; *) - freetype_includes="-I$freetype_includes" + FREETYPE_CFLAGS="-I$freetype_includes" ;; esac @@ -158,7 +159,7 @@ esac saved_LIBS="$LIBS" LIBS="$LIBS $freetype_lib" saved_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $freetype_includes" +CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" AC_CHECK_HEADERS(freetype/freetype.h) case "$ac_cv_header_freetype_freetype_h" in @@ -175,6 +176,7 @@ yes) ;; yes) AC_DEFINE(HAVE_FREETYPE) + AC_SUBST(FREETYPE_CFLAGS) ;; esac ;; @@ -373,5 +375,7 @@ AC_OUTPUT([Makefile src/Makefile fc-cache/Makefile fc-list/Makefile - fontconfig/Makefile]) + fontconfig/Makefile + fontconfig.pc + fontconfig-config]) diff --git a/fontconfig-config.in b/fontconfig-config.in new file mode 100644 index 0000000..f2a113e --- /dev/null +++ b/fontconfig-config.in @@ -0,0 +1,94 @@ +#! /bin/sh + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +version=@PACKAGE_VERSION@ + +usage() +{ + cat <&2 +fi + +while test $# -gt 0 ; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + local_prefix=yes + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + local_prefix=yes + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --version) + echo $version + exit 0 + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +if test "$local_prefix" = "yes" ; then + if test "$exec_prefix_set" != "yes" ; then + exec_prefix=$prefix + fi +fi + +if test "$echo_prefix" = "yes" ; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes" ; then + echo $exec_prefix +fi + +if test "$echo_cflags" = "yes" ; then + cflags="-I${includedir}" + echo $cflags +fi + +if test "$echo_libs" = "yes" ; then + libs="-lfontconfig" + if test "${libdir}" != "/usr/lib" ; then + echo -L${libdir} $libs + else + echo $libs + fi +fi + +# EOF diff --git a/fontconfig.pc.in b/fontconfig.pc.in new file mode 100644 index 0000000..a84b5f4 --- /dev/null +++ b/fontconfig.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Fontconfig +Description: Font configuration and customization library +Version: @PACKAGE_VERSION@ +Requires: freetype2 +Libs: -L${libdir} -lfontconfig +Cflags: -I${includedir}