blob: d53b7e03478e44551ced8bc818a6bfcdcc021383 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# New ports collection makefile for: Bitstream Vera Font Family
# Date created: February 18 2003
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= bitstream-vera
PORTVERSION= 1.0
CATEGORIES= x11-fonts
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/1.0
DIST_SUBDIR= gnome2
MAINTAINER= gnome@freebsd.org
COMMENT= Bitstream Vera collection of 10 TrueType fonts
BUILD_DEPENDS= ttmkfdir:${PORTSDIR}/x11-fonts/ttmkfdir \
fc-cache:${PORTSDIR}/x11-fonts/fontconfig
USE_BZIP2= yes
USE_X_PREFIX= yes
NO_CDROM= "Restrictive license - may not distribute"
NO_PACKAGE= "Restrictive license - may not distribute"
PLIST_SUB= FONTSDIR="${FONTSDIR:S|${PREFIX}/||}"
MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
#
# Local variables
#
FONTNAME= ${PORTNAME}
FONTSDIR?= ${PREFIX}/lib/X11/fonts/${FONTNAME}
TTFONTSDIR?= ${X11BASE}/lib/X11/fonts/TrueType
TTMKFDIR_CMD?= ${X11BASE}/bin/ttmkfdir
SORT?= sort
.SILENT:
#
# Post-patch
#
post-patch:
${SED} 's|%%FONTSDIR%%|${FONTSDIR}|g' ${MSG_FILE} > ${PKGMESSAGE}
#
# Build
#
do-build: make-fonts.scale make-fonts.dir
make-fonts.scale:
${TTMKFDIR_CMD} -c -d ${WRKSRC} | ${CAT} -n | ${SED} -e ' \
s,^ 1,100000,; \
' | ${SORT} -r | ${CUT} -c 8- > ${WRKSRC}/fonts.scale
make-fonts.dir:
${CP} ${WRKSRC}/fonts.scale ${WRKSRC}/fonts.dir
#
# Install
#
do-install: install-fonts install-conf install-docs
install-fonts:
${MKDIR} ${FONTSDIR}
${INSTALL_DATA} ${WRKSRC}/*.ttf ${FONTSDIR}
${INSTALL_DATA} ${WRKSRC}/fonts.dir ${FONTSDIR}
${INSTALL_DATA} ${WRKSRC}/COPYRIGHT.TXT ${FONTSDIR}
install-conf:
${MKDIR} -p ${PREFIX}/etc/fonts
${INSTALL_DATA} ${WRKSRC}/local.conf ${PREFIX}/etc/fonts
install-docs:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/Bitstream_Vera_Fonts_README.html ${DOCSDIR}
.endif
#
# Post-install
#
post-install: run-fc-cache display-message
run-fc-cache:
${ECHO_MSG} "===> Running fc-cache"
-${X11BASE}/bin/fc-cache -f -v
display-message:
${ECHO_MSG}
${CAT} ${PKGMESSAGE}
${ECHO_MSG}
.include <bsd.port.mk>
|