]> git.wh0rd.org - fontconfig.git/commitdiff
Add pkgconfig control file and fontconfig-config script
authorKeith Packard <keithp@keithp.com>
Thu, 23 May 2002 17:06:46 +0000 (17:06 +0000)
committerKeith Packard <keithp@keithp.com>
Thu, 23 May 2002 17:06:46 +0000 (17:06 +0000)
INSTALL
Imakefile
Makefile.in
README
config/config-subst [new file with mode: 0644]
configure.in
fontconfig-config.in [new file with mode: 0644]
fontconfig.pc.in [new file with mode: 0644]

diff --git a/INSTALL b/INSTALL
index 6798b365b6dd7e5d87b8a3e5f1668b27ed21f0c0..2b61417e620818ad06f3cac39b592942c9e5459e 100644 (file)
--- 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
+
index d6d6c5b6bb5cb07a62e2fe3a7791578dd219fcba..a1fe947bba6cacb227a02e60bc90257cc487f7e5 100644 (file)
--- 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)
+
index 3d7d8cdc5a27adada674ff3208cec50c3e3c5f11..f97c7533c5d56ae35a7392ff7309c00dd6aba2d4 100644 (file)
@@ -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 98f0fcaf51b9bdf98840b7473a07a015787f2964..41410c0c53b9ec0994db0ec3d721e4e24ac33e23 100644 (file)
--- 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 (file)
index 0000000..c3436e7
--- /dev/null
@@ -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
index 4cd437b75ddbfaed99d1abdcf4cbb0643b74c968..c98fff9f3e1628bb136bab973cb44e4194386b95 100644 (file)
@@ -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 (file)
index 0000000..f2a113e
--- /dev/null
@@ -0,0 +1,94 @@
+#! /bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+version=@PACKAGE_VERSION@
+
+usage()
+{
+  cat <<EOF
+Usage: fontconfig-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+EOF
+  exit $1
+}
+
+if test $# -eq 0 ; then
+  usage 1 1>&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 (file)
index 0000000..a84b5f4
--- /dev/null
@@ -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}