aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/xcin/Makefile
blob: 57999bda62809e2561e31b7bdddde17621235fef (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
# New ports collection makefile for:    xcin
# Date created:     18 Oct 1999
# Whom:         Keith Jang <keith@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   xcin
PORTVERSION=    2.5.3.p2
PORTREVISION=   7
CATEGORIES= chinese x11
MASTER_SITES=   ftp://ftp.linux.org.tw/pub/xcin/xcin/ \
        ftp://ftp.linux.org.tw/pub/xcin/xcin/devel/ \
        LOCAL/rafan
DISTNAME=   ${PORTNAME}-${PORTVERSION:S/p/pre/}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} chewing-2002Jan07-snapshot.tar.gz

MAINTAINER= ports@FreeBSD.org
COMMENT=    Chinese input method server under X

LIB_DEPENDS=    tabe.3:${PORTSDIR}/chinese/libtabe
RUN_DEPENDS=    ${X11BASE}/lib/X11/fonts/local/kc15f.pcf.gz:${PORTSDIR}/chinese/kcfonts

WRKSRC=     ${WRKDIR}/xcin
USE_BDB=    yes
OBSOLETE_BDB_VAR=   USE_DB2
USE_GETTEXT=    yes
USE_ICONV=  yes
USE_XLIB=   yes
GNU_CONFIGURE=  yes
INSTALLS_SHLIB= yes
CONFIGURE_ARGS= --prefix=${PREFIX} \
        --x-libraries=${X11BASE}/lib \
        --with-xcin-dir=${PREFIX}/lib/xcin \
        --with-db-name=${BDB_LIB_NAME} \
        --with-db-inc=${BDB_INCLUDE_DIR} \
        --with-db-lib=${BDB_LIB_DIR} \
        --with-tabe-inc=${LOCALBASE}/include/tabe \
        --with-tabe-lib=${LOCALBASE}/lib \
        --with-intl-inc=${LOCALBASE}/include \
        --with-intl-lib=${LOCALBASE}/lib \
        --with-iconv-inc=${LOCALBASE}/include \
        --with-iconv-lib=${LOCALBASE}/lib

MAN1=       xcin.1

.include <bsd.port.pre.mk>

pre-everything::
.if defined(WITH_BDB_VER)
    @${ECHO_CMD} ""
    @${ECHO_CMD} "WARNING:"
    @${ECHO_CMD} "  You have defined WITH_BDB_VER. Make sure you use the same"
    @${ECHO_CMD} "  db version that libtabe uses. Otherwise, this port may"
    @${ECHO_CMD} "  not work correctly."
    @${ECHO_CMD} ""
.endif

post-extract:
    ${MV} ${WRKDIR}/chewing ${WRKSRC}/src/Cinput

post-patch:
    @cd ${WRKSRC}/src/Cinput/chewing; ${SH} ./patch_chewing
    ${REINPLACE_CMD} -e "s,@euc,@euccn,g" \
        -e "s,@gb2312,@euccn,g" \
        ${WRKSRC}/etc/xcinrc.FREEBSD
    ${REINPLACE_CMD} -e "s,euc ,euccn ,g" \
        ${WRKSRC}/cin/gb/Makefile.in

post-install:
    ${LN} -fs ${PREFIX}/bin/xcin2.5 ${PREFIX}/bin/xcin
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for DOC in Bugs COPYING CREDITS Changes Cin CopyRight FAQ README \
        SETUP Todo Usage UserGuide
    ${INSTALL_DATA} ${WRKSRC}/doc/${DOC} ${DOCSDIR}
.endfor
    ${MKDIR} ${DOCSDIR}/En
    ${MKDIR} ${DOCSDIR}/En/internal
.for En in README.En SETUP.En Usage.En UserGuide.En
    ${INSTALL_DATA} ${WRKSRC}/doc/En/${En} ${DOCSDIR}/En
.endfor
.for Eninternal in module.En structer.En
    ${INSTALL_DATA} ${WRKSRC}/doc/En/internal/${Eninternal} ${DOCSDIR}/En/internal
.endfor
    ${MKDIR} ${DOCSDIR}/history
    ${INSTALL_DATA} ${WRKSRC}/doc/history/Changes-19991011 \
        ${DOCSDIR}/history
    ${MKDIR} ${DOCSDIR}/internal
.for INTERNAL in IMdkit gen_inp gui_request module structer
    ${INSTALL_DATA} ${WRKSRC}/doc/internal/${INTERNAL} \
        ${DOCSDIR}/internal
.endfor
    ${MKDIR} ${DOCSDIR}/modules
.for MODULES in bimsphone gen_inp im_comm zh_hex
    ${INSTALL_DATA} ${WRKSRC}/doc/modules/${MODULES} \
        ${DOCSDIR}/modules
.endfor
.endif

.include <bsd.port.post.mk>