summaryrefslogtreecommitdiff
path: root/Mk/Uses/fonts.mk
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2019-12-30 00:11:05 +0000
committerHiroki Sato <hrs@FreeBSD.org>2019-12-30 00:11:05 +0000
commit3593478fdebc7468797b3117350ed5f57e386b4a (patch)
treed27bca6ed0f82250b685654a401b5b20f9c43da8 /Mk/Uses/fonts.mk
parent- Update to 1.24 Update3 (diff)
Add etc/X11/fontpath.d as a catalogue fontpath by default.
This allows a port/package to install a symlink pointing the real font directory managed by core XLFD (aka fonts.dir). Adding a new entry of "FontPath" into the system-wide xorg.conf or "xset fp" by users manually is no longer needed. When both USES=fonts and ${FONTPATHSPEC} are defined, the post-install target will install ${FONTPATHSPEC} into ${FONTPATHD} directory as a symlink to ${FONTSDIR}. The symlink name has the following syntax: <identifier>:[attribute:]pri=<priority> Details can be found in xorg.conf(5). A typical example for a bitmap font is as follows: FONTPATHSPEC= ${PORTNAME}:unscaled:pri=60 No objection on: x11
Notes
Notes: svn path=/head/; revision=521430
Diffstat (limited to 'Mk/Uses/fonts.mk')
-rw-r--r--Mk/Uses/fonts.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/Mk/Uses/fonts.mk b/Mk/Uses/fonts.mk
index 104ad0c4eae8..30b2eb152d5d 100644
--- a/Mk/Uses/fonts.mk
+++ b/Mk/Uses/fonts.mk
@@ -62,6 +62,15 @@ FONTSDIR?= ${PREFIX}/share/fonts/${FONTNAME}
.if !empty(fonts_ARGS:Nnone)
PLIST_FILES+= "@${fonts_ARGS} ${FONTSDIR}"
.endif
+.if defined(FONTPATHSPEC) && !empty(FONTPATHSPEC)
+FONTPATHD?= ${LOCALBASE}/etc/X11/fontpath.d
+PLIST_FILES+= "${FONTPATHD}/${FONTPATHSPEC}"
+post-install-fontpathd:
+ @${MKDIR} ${STAGEDIR}${FONTPATHD}
+ ${LN} -s -f ../../../${FONTSDIR:S,^${PREFIX}/,,} \
+ ${STAGEDIR}${FONTPATHD}/${FONTPATHSPEC}
+post-install: post-install-fontpathd
+.endif
SUB_LIST+= FONTSDIR="${FONTSDIR}"
PLIST_SUB+= FONTSDIR="${FONTSDIR:S,^${PREFIX}/,,}"
.endif