Bug 179965 - x11-fonts/dejavu: fonts.dir and fonts.scale not generated by port
Summary: x11-fonts/dejavu: fonts.dir and fonts.scale not generated by port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sunpoet Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-25 14:50 UTC by Dmitry Afanasiev
Modified: 2014-02-12 16:35 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Afanasiev 2013-06-25 14:50:00 UTC
fonts.dir is necessary to add to Xorg's FontPath:
# xset fp+ /usr/local/lib/X11/fonts/dejavu                 
xset:  bad font path element (#18), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax

fonts.dir can be generated by using x11-fonts/ttmkfdir:
ttmkfdir -o fonts.dir

How-To-Repeat: cd /usr/ports/x11-fonts/dejavu && make install clean
xset fp+ /usr/local/lib/X11/fonts/dejavu
Comment 1 Edwin Groothuis freebsd_committer 2013-06-25 14:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sunpoet

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Rostislav Krasny 2013-11-04 16:26:07 UTC
I experienced the same problem in 10.0-BETA2.
I fixed it manually by running following commands as root within the
dejavu fonts directory:

fc-cache -fs
mkfontscale
mkfontdir

The fc-cache probably not necessary. I just copied those commands from
some web page found by Google.

Unlike ttmkfdir all those commands don't need any additional package
to be installed. At least in my case. They are part of other packages
that are installed as dependencies of Xorg.
Comment 3 dfilter service freebsd_committer 2014-02-12 15:47:17 UTC
Author: sunpoet
Date: Wed Feb 12 15:47:09 2014
New Revision: 343931
URL: http://svnweb.freebsd.org/changeset/ports/343931
QAT: https://qat.redports.org/buildarchive/r343931/

Log:
  - Generate and install fonts.dir and fonts.scale
  - Bump PORTREVISION for package change
  
  PR:		ports/179965
  Submitted by:	Dmitry Afanasiev <KOT@MATPOCKuH.Ru>

Modified:
  head/x11-fonts/dejavu/Makefile
  head/x11-fonts/dejavu/pkg-plist

Modified: head/x11-fonts/dejavu/Makefile
==============================================================================
--- head/x11-fonts/dejavu/Makefile	Wed Feb 12 15:25:20 2014	(r343930)
+++ head/x11-fonts/dejavu/Makefile	Wed Feb 12 15:47:09 2014	(r343931)
@@ -3,6 +3,7 @@
 
 PORTNAME=	dejavu
 PORTVERSION=	2.34
+PORTREVISION=	1
 CATEGORIES=	x11-fonts
 MASTER_SITES=	SF
 DISTNAME=	${PORTNAME}-fonts-ttf-${PORTVERSION}
@@ -10,13 +11,14 @@ DISTNAME=	${PORTNAME}-fonts-ttf-${PORTVE
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Bitstream Vera Fonts clone with a wider range of characters
 
-BUILD_DEPENDS=	fc-cache:${PORTSDIR}/x11-fonts/fontconfig
-RUN_DEPENDS:=	${BUILD_DEPENDS}
+BUILD_DEPENDS=	${LOCALBASE}/bin/fc-cache:${PORTSDIR}/x11-fonts/fontconfig \
+		${LOCALBASE}/bin/mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir \
+		${LOCALBASE}/bin/mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale
+RUN_DEPENDS=	${LOCALBASE}/bin/fc-cache:${PORTSDIR}/x11-fonts/fontconfig
 
 OPTIONS_DEFINE=	DOCS LINKS
 LINKS_DESC=	Install links of configuration files in conf.d
 
-NO_BUILD=	yes
 USE_BZIP2=	yes
 
 FCDIR=		${PREFIX}/${FCDIR_REL}
@@ -37,10 +39,14 @@ PLIST_SUB+=	FCDIR_LINKS="${FCDIR_LINKS}"
 PLIST_SUB+=	FCDIR_LINKS="@comment "
 .endif
 
+do-build:
+	@cd ${WRKSRC}/ && ${LOCALBASE}/bin/mkfontscale
+	@cd ${WRKSRC}/ && ${LOCALBASE}/bin/mkfontdir
+
 do-install:
 	${MKDIR} ${STAGEDIR}${FCDIR}/ ${STAGEDIR}${PREFIX}/${FCDIR_LINKS}/ ${STAGEDIR}${FONTSDIR}/
 	${INSTALL_DATA} ${WRKSRC}/fontconfig/*.conf ${STAGEDIR}${FCDIR}/
-	${INSTALL_DATA} ${WRKSRC}/ttf/*.ttf ${STAGEDIR}${FONTSDIR}/
+	${INSTALL_DATA} ${WRKSRC}/fonts.* ${WRKSRC}/ttf/*.ttf ${STAGEDIR}${FONTSDIR}/
 .if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${STAGEDIR}${DOCSDIR}/
 	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/

Modified: head/x11-fonts/dejavu/pkg-plist
==============================================================================
--- head/x11-fonts/dejavu/pkg-plist	Wed Feb 12 15:25:20 2014	(r343930)
+++ head/x11-fonts/dejavu/pkg-plist	Wed Feb 12 15:47:09 2014	(r343931)
@@ -31,4 +31,6 @@
 %%FONTSDIR_REL%%/DejaVuSerifCondensed-BoldItalic.ttf
 %%FONTSDIR_REL%%/DejaVuSerifCondensed-Italic.ttf
 %%FONTSDIR_REL%%/DejaVuSerifCondensed.ttf
+%%FONTSDIR_REL%%/fonts.dir
+%%FONTSDIR_REL%%/fonts.scale
 @dirrm %%FONTSDIR_REL%%
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Sunpoet Po-Chuan Hsieh freebsd_committer 2014-02-12 16:35:12 UTC
State Changed
From-To: open->closed

Committed. Thanks!