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
|
# New ports collection makefile for: gcin
# Date created: Feb 18 2004
# Whom: Shen Chuan-Hsing
#
# $FreeBSD$
#
PORTNAME= gcin
PORTVERSION= 1.2.8
PORTREVISION= 3
CATEGORIES= chinese textproc gnome
MASTER_SITES= http://www.csie.nctu.edu.tw/~cp76/gcin/download/:main \
LOCAL/chinsan:main \
http://yilan.twbbs.org/chinsan/gcin/:main
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:main
EXTRACT_ONLY= gcin-${PORTVERSION}.tar.bz2
MAINTAINER= chinsan@FreeBSD.org
COMMENT= A traditional chinese input utility in X
USE_BZIP2= YES
GNU_CONFIGURE= YES
USE_GNOME= gtk20
USE_GMAKE= YES
USE_GCC= 3.4+
INSTALLS_ICONS= YES
USE_LDCONFIG= YES
OPTIONS= BOSHIAMY "enable Boshiamy Input Method" off
CONFIGURE_ENV+= "--new_gtk_im=Y"
MAN1= gcin.1 gcin2tab.1
.include <bsd.port.pre.mk>
.if defined(WITH_BOSHIAMY)
MASTER_SITES+= http://edt1023.sayya.org/misc/:boshiamy
DISTFILES+= noseeing-6.tar.gz:boshiamy
post-extract:
@${TAR} -C ${WRKSRC}/data/ -zxf ${DISTDIR}/noseeing-6.tar.gz \
noseeing.cin
@${REINPLACE_CMD} -e 's,cj.gtab,cj.gtab noseeing.gtab,' \
${WRKSRC}/data/Makefile
.endif
pre-patch:
@${REINPLACE_CMD} -e 's/&//; s/bash/sh/; \
s/QT_IM_DIR=\/usr/QT_IM_DIR=$$prefix/; \
s/mandir=$$datadir/mandir=$$prefix/; \
s/\/usr\/share/$$prefix\/share/; 151 s,/gcin,,; \
123,124 s/control-center-2\.0/gnome\/control-center-2\.0/g; \
s/gcc/$$CC/; s/gcin-$$GCIN_VERSION/gcin/' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's,\/usr\/share,$$(prefix)\/share,' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's,qsort,mergesort,' ${WRKSRC}/gcin2tab.c
@${REINPLACE_CMD} -e 's|/usr/local|/usr|g' \
${WRKSRC}/gtk-im/Makefile ${WRKSRC}/menu/Makefile
@${REINPLACE_CMD} -e 's,/usr/lib,${LOCALBASE}/lib,' ${WRKSRC}/qt-im/Makefile
@${REINPLACE_CMD} -e 's/modify-XIM //; 8,10 d' ${WRKSRC}/scripts/Makefile
@${REINPLACE_CMD} -e 's/bash/sh/; s/&//; s,/opt/gnome,${X11BASE},;' \
${WRKSRC}/scripts/utf8-edit ${WRKSRC}/scripts/gcin-user-setup
@${REINPLACE_CMD} -e 's,wget,fetch,' ${WRKSRC}/scripts/noseeing-inst
@${REINPLACE_CMD} -e 's,gcin-im-client.h,im-client/gcin-im-client.h,' \
${WRKSRC}/gtk-im/gtkimcontextgcin.c
@${REINPLACE_CMD} -e 's,/usr/X11R6,${X11BASE},' \
${WRKSRC}/IMdkit/lib/Makefile \
${WRKSRC}/IMdkit/Xi18n_sample/Makefile ${WRKSRC}/Makefile \
${WRKSRC}/qt-im/Makefile ${WRKSRC}/scripts/modify-XIM \
${WRKSRC}/scripts/utf8-edit
.if defined(WITH_BOSHIAMY)
post-patch:
PLIST_SUB+= BOSHIAMY=""
.else
PLIST_SUB+= BOSHIAMY="@comment "
.endif
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for file in Changelog README
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif
@gtk-query-immodules-2.0 > ${PREFIX}/etc/gtk-2.0/gtk.immodules
@${CAT} ${PKGMESSAGE}
@${ECHO} To display this message again, type \`pkg_info -D ${PKGNAME}\'
.include <bsd.port.post.mk>
|