summaryrefslogtreecommitdiffstats
path: root/chinese/chinput3/Makefile
blob: fc3087d3ba87d7baf76b6f54f82dc37a4f6a8d8c (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
# Ports collection makefile for:  chinput3
# Date created:                          03/31/2002
# Whom:         Shen Chuan-Hsing <statue@freebsd.sinica.edu.tw>
#
# $FreeBSD$
#    $MCom$

PORTNAME=   chinput
PORTVERSION=    3.0.2.5
PORTREVISION=   3
CATEGORIES= chinese x11
MASTER_SITES=   ftp://freebsd.sinica.edu.tw/pub/statue/chinput3/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Chinese GB2312,BIG5 code input server

LATEST_LINK=    zh-chinput3
USE_XLIB=   yes
USE_GETTEXT=    yes
USE_GNOME=  gtk12 imlib

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

.include <bsd.port.pre.mk>

.if ${ARCH} != "i386"
BROKEN=     "Does not compile on !i386"
.endif

post-patch:
    @${REINPLACE_CMD} -e '/extern int ForwardEvent();/d' \
        ${WRKSRC}/src/Chinput-*/src/*.c
    @${FIND} ${WRKSRC} -type f | \
        ${XARGS} ${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g'

pre-build:
    @${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} \
        -e 's|-lc_r|${PTHREAD_CFLAGS} ${PTHREAD_LIBS}|; \
            s|-I/usr/include|-I${LOCALBASE}/include|; \
            s|-L/usr/lib|-L${LOCALBASE}/lib|; \
            s|-L/usr/X11R6|-L${LOCALBASE}/lib -L/usr/X11R6|'

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>