pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/pkginstall Add fonts magic for TrueType and Type1 f...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b3f8adfcc4c6
branches:  trunk
changeset: 523102:b3f8adfcc4c6
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Jan 02 11:47:26 2007 +0000

description:
Add fonts magic for TrueType and Type1 fonts.
XXX Do we want to prefer mkfontscale on other installations as well?

diffstat:

 mk/pkginstall/bsd.pkginstall.mk |  22 +++++++++++++++++++---
 mk/pkginstall/fonts             |  13 +++++++------
 2 files changed, 26 insertions(+), 9 deletions(-)

diffs (80 lines):

diff -r ddc0a7287a63 -r b3f8adfcc4c6 mk/pkginstall/bsd.pkginstall.mk
--- a/mk/pkginstall/bsd.pkginstall.mk   Tue Jan 02 11:45:30 2007 +0000
+++ b/mk/pkginstall/bsd.pkginstall.mk   Tue Jan 02 11:47:26 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.17 2006/11/05 15:10:08 joerg Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.18 2007/01/02 11:47:26 joerg Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk and implements the
 # common INSTALL/DEINSTALL scripts framework.  To use the pkginstall
@@ -686,18 +686,34 @@
 # list them as "x11" font directories as well.
 #
 .if !empty(FONTS_DIRS.ttf:M*)
+.if ${X11_TYPE} == "modular"
+USE_TOOLS+=            mkfontscale:run
+FILES_SUBST+=          TTF_INDEX_CMD=${TOOLS_PATH.mkfontscale:Q}
+.else
 USE_TOOLS+=            ttmkfdir:run
-FILES_SUBST+=          TTMKFDIR=${TOOLS_PATH.ttmkfdir:Q}
+FILES_SUBST+=          TTF_INDEX_CMD=${TOOLS_PATH.ttmkfdir:Q}
+.endif
 FONTS_DIRS.x11+=       ${FONTS_DIRS.ttf}
 .endif
 .if !empty(FONTS_DIRS.type1:M*)
+.if ${X11_TYPE} == "modular"
+USE_TOOLS+=            mkfontscale:run
+FILES_SUBST+=          TYPE1_INDEX_CMD=${TOOLS_PATH.type1inst:Q}
+FILES_SUBST+=          TYPE1_POSTINDEX_CMD=
+.else
 USE_TOOLS+=            type1inst:run
-FILES_SUBST+=          TYPE1INST=${TOOLS_PATH.type1inst:Q}
+FILES_SUBST+=          TYPE1_INDEX_CMD=${TOOLS_PATH.type1inst:Q}
+FILES_SUBST+=          TYPE1_INDEX_CMD="$${RM} type1inst.log"
+.endif
 FONTS_DIRS.x11+=       ${FONTS_DIRS.type1}
 .endif
 .if !empty(FONTS_DIRS.x11:M*)
 USE_TOOLS+=            mkfontdir:run
 FILES_SUBST+=          MKFONTDIR=${TOOLS_PATH.mkfontdir:Q}
+
+.if ${X11_TYPE} == "modular"
+DEPENDS+=              encodings-[0-9]*:../../fonts/encodings
+.endif
 .endif
 
 FILES_SUBST+=          X11_ENCODINGSDIR=${X11_ENCODINGSDIR:Q}
diff -r ddc0a7287a63 -r b3f8adfcc4c6 mk/pkginstall/fonts
--- a/mk/pkginstall/fonts       Tue Jan 02 11:45:30 2007 +0000
+++ b/mk/pkginstall/fonts       Tue Jan 02 11:47:26 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: fonts,v 1.3 2006/09/22 21:53:58 joerg Exp $
+# $NetBSD: fonts,v 1.4 2007/01/02 11:47:26 joerg Exp $
 #
 # Generate a +FONTS script that updates font databases for the package.
 #
@@ -35,8 +35,9 @@
 SORT="@SORT@"
 TEST="@TEST@"
 TRUE="@TRUE@"
-TTMKFDIR="@TTMKFDIR@"
-TYPE1INST="@TYPE1INST@"
+TTF_INDEX_CMD="@TTF_INDEX_CMD@"
+TYPE1_INDEX_CMD="@TYPE1_INDEX_CMD@"
+TYPE1_POSTINDEX_CMD="@TYPE1_POSTINDEX_CMD@"
 X11_ENCODINGSDIR="@X11_ENCODINGSDIR@"
 
 SELF=$0
@@ -78,9 +79,9 @@
          update_args=
          post_update_cmd=
          case $font_type in
-         [tT][tT][fF])         update_cmd="${TTMKFDIR}" ;;
-         [tT][yY][pP][eE]1)    update_cmd="${TYPE1INST}"
-                               post_update_cmd="${RM} type1inst.log" ;;
+         [tT][tT][fF])         update_cmd="${TTF_INDEX_CMD}" ;;
+         [tT][yY][pP][eE]1)    update_cmd="${TYPE1_INDEX_CMD}"
+                               post_update_cmd="${TYPE1_POSTINDEX_CMD}" ;;
          [xX]11)               update_cmd="${MKFONTDIR}"
                                [ ! -z "${X11_ENCODINGSDIR}" ] && update_args="-e ${X11_ENCODINGSDIR}" ;;
          esac



Home | Main Index | Thread Index | Old Index