aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/kon2/Makefile
blob: 7d41f1e142c06b0de5ee433683fb35ad477c94c0 (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
# Created by: Chen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
# $FreeBSD$

PORTREVISION=   3

MASTERDIR=  ${.CURDIR}/../../japanese/kon2-16dot
CATEGORIES= chinese

MAINTAINER= ports@FreeBSD.org

BUILD_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/chinese/kcfonts:patch \
        ${NONEXISTENT}:${PORTSDIR}/chinese/cce:extract

KCFONTS_WRKSRC= `cd ${PORTSDIR}/chinese/kcfonts; make -V WRKSRC`
CCE_WRKSRC= `cd ${PORTSDIR}/chinese/cce; make -V WRKSRC`

PLIST_FILES=    share/fonts/bdf/kc15f.bdf.gz \
        share/fonts/bdf/gb16fs.bdf.gz \
        share/fonts/bdf/8x16.bdf.gz

post-patch: post-patch-zhkon2
post-patch-zhkon2:
    @${REINPLACE_CMD} -e 's,/dev/vga,/dev/ttyv0,g' ${WRKSRC}/src/term.c \
        ${WRKSRC}/src/display/vga.c
    @cd ${WRKSRC} && ${PATCH} < ${.CURDIR}/files/patch-lib::coding.c
    @cd ${WRKSRC} && ${PATCH} < ${.CURDIR}/files/patch-kon.cfg.FreeBSD

post-build: post-build-zhkon2
post-build-zhkon2:
    @cd ${KCFONTS_WRKSRC} && ${MAKE} kc15f

post-install: post-install-zhkon2
post-install-zhkon2:
    @${MKDIR} ${PREFIX}/share/fonts/bdf
    cd ${KCFONTS_WRKSRC} && ./kc15f | ${GZIP_CMD} - > ${PREFIX}/share/fonts/bdf/kc15f.bdf.gz
    cd ${CCE_WRKSRC} && ${CAT} fonts/gb16fs.bdf | ${GZIP_CMD} - > ${PREFIX}/share/fonts/bdf/gb16fs.bdf.gz
    cd ${CCE_WRKSRC} && ${CAT} fonts/8x16.bdf | ${GZIP_CMD} - > ${PREFIX}/share/fonts/bdf/8x16.bdf.gz

.include "${MASTERDIR}/Makefile"