aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/zhcon/Makefile
blob: 62c655c2bace98298acd70efca28d9befc4706cb (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
# New ports collection makefile for:    Zhcon
# Date created:             Sun Sep 9, 2001
# Whom:         Shen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
#
# $FreeBSD$
#

PORTNAME=   zhcon
PORTVERSION=    0.2.6
PORTREVISION=   2
CATEGORIES= chinese
MASTER_SITES=   SF
DISTNAME=   ${PORTNAME}-0.2.5

PATCH_SITES=    ${MASTER_SITES}
PATCHFILES= ${DISTNAME}-to-${PORTVERSION}.diff.gz
PATCH_DIST_STRIP=   -p1

MAINTAINER= ports@FreeBSD.org
COMMENT=    A fast CJK (Chinese/Japanese/Korean) virtual console

LICENSE=    GPLv2

GNU_CONFIGURE=  yes
ONLY_FOR_ARCHS= i386
USE_ICONV=  yes
# Don't bother to add ".if !defined(WITHOUT_NLS)", zhcon requires libintl
USE_GETTEXT=    yes
CONFIGURE_ARGS= --with-libintl-prefix=${LOCALBASE}
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

SUB_FILES=  pkg-message
MAN1=       zhcon.1
PORTDOCS=   *

OPTIONS_DEFINE= BIG5 DOCS
BIG5_DESC=  Use Big5 by default (Taiwan, Hong Kong, Macau)

.include <bsd.port.options.mk>

post-patch:
    @${REINPLACE_CMD} -e 's,/etc,${PREFIX}&, ; s,doc/,${DOCSDIR},' \
        ${WRKSRC}/doc/zhcon.1.in
    @${REINPLACE_CMD} -e 's,/dev/vga,/dev/ttyv0,' \
        ${WRKSRC}/src/display/fbdev.cpp
    @${REINPLACE_CMD} -e 's,endian,sys/endian,' \
        ${WRKSRC}/src/display/fblinear*.cpp
    @${REINPLACE_CMD} -e '/zhconpath/s,#,, ; s,/usr/lib,${PREFIX}/lib,' \
        ${WRKSRC}/src/zhcon.conf
    @${REINPLACE_CMD} -e 's,$$enable_debug = ,x&x,' \
        ${WRKSRC}/configure
.if ${PORT_OPTIONS:MBIG5}
    @${REINPLACE_CMD} -e '/defaultencode =/s,gb2312,big5,' \
        ${WRKSRC}/src/zhcon.conf
.endif

post-install:
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/README.html ${WRKSRC}/doc/bpsf.txt \
        ${WRKSRC}/doc/poem.* ${WRKSRC}/ChangeLog ${WRKSRC}/NEWS \
        ${WRKSRC}/README ${WRKSRC}/README.utf8 ${WRKSRC}/THANKS \
        ${WRKSRC}/TODO ${DOCSDIR}
    ${TAR} xf ${WRKSRC}/doc/html.tar.gz -C ${DOCSDIR}
.endif
    @${ECHO_MSG}
    @${CAT} ${PKGMESSAGE}
    @${ECHO_MSG}

.include <bsd.port.mk>