[PATCH V2 misc-ethiopic] install: Make fonttypes to be installed configurable

Egbert Eich eich at freedesktop.org
Tue Jul 30 01:17:45 PDT 2013


This package contains two font versions: TrueType and OpenType.
One may want to install only one of them and (re)generate font.scale
for this introduce two new config options:
  --disable-opentype-install and --disable-truetype-install.

Signed-off-by: Egbert Eich <eich at freedesktop.org>
---
v2: Instead of relying on an empty '--with-<fonttype>-fontdir=' introduce
    explicite --disable-<fonttype>-install. Suggested by Alan Coopersmith.

 Makefile.am  |  4 ++++
 configure.ac | 11 +++++++++++
 2 files changed, 15 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 1903423..b9705a7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,14 +33,18 @@ EXTRA_DIST = $(ttffont_DATA) $(otffont_DATA) license.txt
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
 install-data-hook:
+if INSTALL_TTF
 	@rm -f $(DESTDIR)$(ttffontdir)/fonts.scale
 	$(MKFONTSCALE) $(DESTDIR)$(ttffontdir)
 	@rm -f $(DESTDIR)$(ttffontdir)/font.dir
 	$(MKFONTDIR) $(DESTDIR)$(ttffontdir)
+endif
+if INSTALL_OTF
 	@rm -f $(DESTDIR)$(otffontdir)/fonts.scale
 	$(MKFONTSCALE) $(DESTDIR)$(otffontdir)
 	@rm -f $(DESTDIR)$(otffontdir)/font.dir
 	$(MKFONTDIR) $(DESTDIR)$(otffontdir)
+endif
 	@RUN_FCCACHE@
 
 distuninstallcheck:
diff --git a/configure.ac b/configure.ac
index bc57d12..b78fe98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,17 @@ m4_ifndef([XORG_MACROS_VERSION],
 XORG_MACROS_VERSION(1.3)
 XORG_DEFAULT_OPTIONS
 
+AC_ARG_ENABLE(truetype-install, 
+		AS_HELP_STRING([--disable-truetype-install],
+		[Disable install of truetype fonts (default: enabled)]),
+		[install_ttf=$enableval], [install_ttf=yes])
+AM_CONDITIONAL(INSTALL_TTF, [test "x$install_ttf" = xyes])
+AC_ARG_ENABLE(opentype-install, 
+		AS_HELP_STRING([--disable-opentype-install],
+		[Disable install of opentype fonts (default: enabled)]),
+		[install_otf=$enableval], [install_otf=yes])
+AM_CONDITIONAL(INSTALL_OTF, [test "x$install_otf" = xyes])
+
 AC_PROG_INSTALL
 
 # Require X.Org's font util macros 1.2 or later
-- 
1.8.1.4



More information about the xorg-devel mailing list