aboutsummaryrefslogtreecommitdiffstats
path: root/x11-fonts/code2000/Makefile
blob: 2f38519f767c8feeda2260b58c6aa8b3c5dc7506 (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
# New ports collection makefile for:    Code2000
# Date created:     6 Dec 2003
# Whom:         Thierry Thomas <thierry@pompo.net>
#
# $FreeBSD$
#

PORTNAME=   code2000
PORTVERSION=    1.171
CATEGORIES= x11-fonts
MASTER_SITES=   http://code2000.net/    \
        ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= thierry/${DIST_SUBDIR}
DISTFILES=  ${PORTNAME:U}${EXTRACT_SUFX:U}
DIST_SUBDIR=    ${PORTNAME}-${PORTVERSION}

MAINTAINER= thierry@FreeBSD.org
COMMENT=    Shareware demo Unicode TrueType font

BUILD_DEPENDS=  mkfontscale:${PORTSDIR}/x11-fonts/mkfontscale   \
        mkfontdir:${PORTSDIR}/x11-fonts/mkfontdir   \
        fc-cache:${PORTSDIR}/x11-fonts/fontconfig

USE_ZIP=    yes

PLIST_SUB=  FONTSDIR="${FONTSDIR:S|${PREFIX}/||}"

SUB_FILES=  pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_LIST=   FONTSDIR=${FONTSDIR}

FONTNAME=   ${PORTNAME}
FONTSDIR?=  ${PREFIX}/lib/X11/fonts/${FONTNAME}

MKFONTSCL_CMD=  ${LOCALBASE}/bin/mkfontscale
MKFONTDIR_CMD=  ${LOCALBASE}/bin/mkfontdir
FCCACHE_CMD=    ${LOCALBASE}/bin/fc-cache -f -v

post-extract: move-fonts rename-license

move-fonts:
    ${MKDIR} ${WRKSRC}
    ${MV} ${WRKDIR}/CODE2000.TTF ${WRKSRC}/${FONTNAME}.ttf

rename-license:
    ${MV} ${WRKDIR}/CODE2000.HTM ${WRKSRC}/${FONTNAME}.html

do-build:
    cd ${WRKSRC} && ${MKFONTSCL_CMD}
    cd ${WRKSRC} && ${MKFONTDIR_CMD}

do-install:
    ${MKDIR} ${FONTSDIR}
    ${INSTALL_DATA} ${WRKSRC}/* ${FONTSDIR}

post-install:
    @${ECHO_MSG} "===> Running fc-cache"
    -${FCCACHE_CMD} ${FONTSDIR}
    @${ECHO_MSG}
    @${CAT} ${PKGMESSAGE}
    @${ECHO_MSG}

.include <bsd.port.mk>