pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install Allow avoiding the automatic update of the ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8d1fe97b53a3
branches:  trunk
changeset: 505042:8d1fe97b53a3
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Dec 29 14:10:01 2005 +0000

description:
Allow avoiding the automatic update of the fonts databases by setting
PKG_UPDATE_FONTS_DB=no in the environment or /etc/mk.conf.  This can
be beneficial when installing large numbers of fonts packages into
the same directories as it avoids destroying and recreating the same
database files over and over again.  This might make it possible
someday to run fc-cache, which is sometimes very time-consuming, from
the +FONTS script automatically.

diffstat:

 mk/install/bsd.pkginstall.mk |   8 +++++++-
 mk/install/fonts             |  14 +++++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diffs (65 lines):

diff -r 4b1994a40f24 -r 8d1fe97b53a3 mk/install/bsd.pkginstall.mk
--- a/mk/install/bsd.pkginstall.mk      Thu Dec 29 14:04:56 2005 +0000
+++ b/mk/install/bsd.pkginstall.mk      Thu Dec 29 14:10:01 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.32 2005/12/29 06:18:53 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.33 2005/12/29 14:10:01 jlam Exp $
 #
 # This Makefile fragment is included by mk/install/pkginstall.mk and is
 # the implemenation file for the common INSTALL/DEINSTALL scripts
@@ -639,6 +639,10 @@
 # PKG_REGISTER_SHELLS indicates whether to automatically register shells
 #      in /etc/shells.  It is either YES or NO and defaults to YES.
 #
+# PKG_UPDATE_FONTS_DB indicates whether to automatically update the fonts
+#      databases in directories where fonts have been installed or
+#      removed.  It is either YES or NO and defaults to YES.
+#
 # These values merely set the defaults for INSTALL/DEINSTALL scripts, but
 # they may be overridden by resetting them in the environment.
 #
@@ -646,10 +650,12 @@
 PKG_CONFIG?=           YES
 PKG_RCD_SCRIPTS?=      NO
 PKG_REGISTER_SHELLS?=  YES
+PKG_UPDATE_FONTS_DB?=  YES
 FILES_SUBST+=          PKG_CREATE_USERGROUP=${PKG_CREATE_USERGROUP:Q}
 FILES_SUBST+=          PKG_CONFIG=${PKG_CONFIG:Q}
 FILES_SUBST+=          PKG_RCD_SCRIPTS=${PKG_RCD_SCRIPTS:Q}
 FILES_SUBST+=          PKG_REGISTER_SHELLS=${PKG_REGISTER_SHELLS:Q}
+FILES_SUBST+=          PKG_UPDATE_FONTS_DB=${PKG_UPDATE_FONTS_DB:Q}
 
 # Substitute for various programs used in the DEINSTALL/INSTALL scripts and
 # in the rc.d scripts.
diff -r 4b1994a40f24 -r 8d1fe97b53a3 mk/install/fonts
--- a/mk/install/fonts  Thu Dec 29 14:04:56 2005 +0000
+++ b/mk/install/fonts  Thu Dec 29 14:10:01 2005 +0000
@@ -1,6 +1,6 @@
 #!@SH@
 #
-# $NetBSD: fonts,v 1.7 2005/12/29 03:44:38 jlam Exp $
+# $NetBSD: fonts,v 1.8 2005/12/29 14:10:01 jlam Exp $
 #
 # +FONTS - font database management script
 #
@@ -38,8 +38,20 @@
 : ${PKGNAME=${PKG_METADATA_DIR##*/}}
 : ${PKG_PREFIX=@PREFIX@}
 
+case "${PKG_UPDATE_FONTS_DB:-@PKG_UPDATE_FONTS_DB@}" in
+[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+       _PKG_UPDATE_FONTS_DB=yes
+       ;;
+[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
+       _PKG_UPDATE_FONTS_DB=no
+       ;;
+esac
+
 ${SED} -n "/^\# FONTS: /{s/^\# FONTS: //;p;}" ${SELF} | ${SORT} -u |
 { while read dir font_type; do
+       case ${_PKG_UPDATE_FONTS_DB} in
+       no)     continue ;;
+       esac
        case $dir in
        "")     continue ;;
        [!/]*)  dir="${PKG_PREFIX}/$dir" ;;



Home | Main Index | Thread Index | Old Index