Fix ownership of fonts.dir and font.scale files as well as

fontconfig font caches.
mkfontdir and mkfontscale are now run out of font/alias at the end
of the build or install, like fc-cache.
fc-cache is using its -y (sysroot) flag that works if used correctly.
This commit is contained in:
matthieu 2016-10-02 20:55:09 +00:00
parent 400881a786
commit 1a97432a77
2 changed files with 17 additions and 7 deletions

View File

@ -1,5 +1,5 @@
# $OpenBSD: Makefile.inc,v 1.1 2007/06/01 01:05:25 matthieu Exp $
# $OpenBSD: Makefile.inc,v 1.2 2016/10/02 20:55:09 matthieu Exp $
realinstall:
exec ${MAKE} install FCCACHE=:
exec ${MAKE} install FCCACHE=: MKFONTDIR=: MKFONTSCALE=:

View File

@ -1,12 +1,22 @@
# $OpenBSD: Makefile.bsd-wrapper,v 1.3 2012/08/18 10:38:39 espie Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2016/10/02 20:55:09 matthieu Exp $
afterinstall:
@if test -z "$(DESTDIR)"; then \
echo "running fc-cache";\
fc-cache -s -v ;\
echo "fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts";\
fc-cache -s -v ${DESTDIR}/usr/X11R6/lib/X11/fonts ;\
else \
echo "running fc-cache under $(DESTDIR)";\
fc-cache -c ${DESTDIR} -s -v ;\
echo "fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts";\
fc-cache -y ${DESTDIR} -s -v /usr/X11R6/lib/X11/fonts;\
chown root:wheel ${DESTDIR}/var/cache/fontconfig/*; \
fi
.for fdir in 100dpi 75dpi OTF TTF Type1 cyrillic misc
rm -f ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir
mkfontdir ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}
chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.dir
.endfor
.for fdir in OTF TTF Type1
mkfontscale ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}
chown ${BINOWN}:${BINGRP} ${DESTDIR}/usr/X11R6/lib/X11/fonts/${fdir}/fonts.scale
.endfor
.include <bsd.xorg.mk>