diff options
author | joerg <joerg@pkgsrc.org> | 2007-01-02 11:47:26 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-01-02 11:47:26 +0000 |
commit | f3ec0636be74904fda693406c158e6d8801401cb (patch) | |
tree | 5d06227d7baabae744b922a046bda18ea8c8aa14 /mk | |
parent | a4a48fd24b15def8b860dbea618b0ec6788582c8 (diff) | |
download | pkgsrc-f3ec0636be74904fda693406c158e6d8801401cb.tar.gz |
Add fonts magic for TrueType and Type1 fonts.
XXX Do we want to prefer mkfontscale on other installations as well?
Diffstat (limited to 'mk')
-rw-r--r-- | mk/pkginstall/bsd.pkginstall.mk | 22 | ||||
-rw-r--r-- | mk/pkginstall/fonts | 13 |
2 files changed, 26 insertions, 9 deletions
diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk index fd96f135442..c4f74d67c74 100644 --- a/mk/pkginstall/bsd.pkginstall.mk +++ b/mk/pkginstall/bsd.pkginstall.mk @@ -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 @@ _INSTALL_DATA_TMPL+= ${_INSTALL_FONTS_DATAFILE} # 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 --git a/mk/pkginstall/fonts b/mk/pkginstall/fonts index e57a316c126..f205a68808d 100644 --- a/mk/pkginstall/fonts +++ b/mk/pkginstall/fonts @@ -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 @@ SED="@SED@" 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 @@ ${SED} -n "/^\# FONTS: /{s/^\# FONTS: //;p;}" ${SELF} | ${SORT} -u | 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 |