Index: head/Keywords/fc.ucl =================================================================== --- head/Keywords/fc.ucl (nonexistent) +++ head/Keywords/fc.ucl (revision 396872) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# MAINTAINER: x11@FreeBSD.org + +actions: [dir] +post-install: </dev/null || true +EOD +post-deinstall: </dev/null || true +EOD Property changes on: head/Keywords/fc.ucl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/Keywords/fontsdir.ucl =================================================================== --- head/Keywords/fontsdir.ucl (nonexistent) +++ head/Keywords/fontsdir.ucl (revision 396872) @@ -0,0 +1,27 @@ +# $FreeBSD$ +# +# MAINTAINER: x11@FreeBSD.org + +actions: [dir] +post-install: </dev/null || true + mkfontdir ${fontsdir} 2>/dev/null || true +EOD +post-deinstall: </dev/null || true + if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then + rm ${fontsdir}/fonts.scale + fi + mkfontdir ${fontsdir} 2>/dev/null || true + if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then + rm ${fontsdir}/fonts.dir + fi +EOD Property changes on: head/Keywords/fontsdir.ucl ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/Mk/Uses/fonts.mk =================================================================== --- head/Mk/Uses/fonts.mk (revision 396871) +++ head/Mk/Uses/fonts.mk (revision 396872) @@ -1,24 +1,40 @@ # $FreeBSD$ # # handle fonts # Feature: fonts # Usage: USES=fonts +# Valid ARGS: fc, fontsdir, fcfontsdir, none (empty means fcfontsdir) +# fc Add @fc ${FONTSDIR} to PLIST_FILES +# fontsdir Add @fontsdir ${FONTSDIR} to PLIST_FILES +# fcfontsdir Add @fcfontsdir ${FONTSDIR} to PLIST_FILES +# none No special handling of ${FONTSDIR} in PLIST_FILES + .if !defined(_INCLUDE_USES_FONTS_MK) _INCLUDE_USES_FONTS_MK= yes -.if !empty(fonts_ARGS) -IGNORE= USES=fonts - expecting no arguments +.if empty(fonts_ARGS) +fonts_ARGS= fcfontsdir .endif -RUN_DEPENDS+= fc-cache:${PORTSDIR}/x11-fonts/fontconfig \ - mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \ +.if !empty(fonts_ARGS:Nfc:Nfontsdir:Nfcfontsdir:Nnone) +IGNORE= USES=fonts - invalid ARGS (${fonts_ARGS) +.endif + +.if !empty(fonts_ARGS:Mfc) || !empty(fonts_ARGS:Mfcfontsdir) +RUN_DEPENDS+= fc-cache:${PORTSDIR}/x11-fonts/fontconfig +.endif +.if !empty(fonts_ARGS:Mfontsdir) || !empty(fonts_ARGS:Mfcfontsdir) +RUN_DEPENDS+= mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \ mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale +.endif FONTNAME?= ${PORTNAME} FONTSDIR?= ${PREFIX}/share/fonts/${FONTNAME} -PLIST_FILES+= "@fcfontsdir ${FONTSDIR}" +.if !empty(fonts_ARGS:Nnone) +PLIST_FILES+= "@${fonts_ARGS} ${FONTSDIR}" +.endif SUB_LIST+= FONTSDIR="${FONTSDIR}" PLIST_SUB+= FONTSDIR="${FONTSDIR}" .endif