summaryrefslogtreecommitdiffstats
path: root/chinese/oxim/Makefile
blob: d85743799c727afc0d850c6ef039c5afe5ad7670 (plain)
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
# Created by: Rong-En Fan <rafan@infor.org>
# $FreeBSD$

PORTNAME=	oxim
PORTVERSION=	1.2.2
PORTREVISION=	6
CATEGORIES=	chinese textproc
MASTER_SITES=	ftp://ftp.opendesktop.org.tw/odp/OXIM/Source/ \
		ftp://140.111.128.66/odp/OXIM/Source/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Open X Input Method server

LIB_DEPENDS=	libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig
RUN_DEPENDS=	${LOCALBASE}/share/fonts/TrueType/fireflysung.ttf:${PORTSDIR}/chinese/fireflyttf

OPTIONS_DEFINE=	GTK2 CHEWING UNICODE
OPTIONS_DEFAULT=	GTK2 CHEWING UNICODE
OPTIONS_SUB=	yes
GTK2_DESC=	 GTK2 input method module
CHEWING_DESC=	 Chewing input module
UNICODE_DESC=	 Unicode input module

BROKEN=		Unfetchable
USES=		iconv libtool pkgconfig
USE_XORG=	x11 xft xpm xtst xext
WANT_GNOME=	yes

GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB} -lfontconfig -lXext
CONFIGURE_ARGS+=--disable-bimsphone-module \
		--disable-static \
		--with-conf-dir=${PREFIX}/etc/${PORTNAME} \
		--enable-setup-tool=no
# oxim requires qinputcontextplugin.h which only exists in Debian package
CONFIGURE_ARGS+=--disable-qt-immodule

GTK2_USE=		GNOME=gtk20
GTK2_CONFIGURE_ENABLE=	gtk-immodule

# make sure we have the required libchewing
CHEWING_BUILD_DEPENDS=	zh-libchewing>=0.3.2:${PORTSDIR}/chinese/libchewing
CHEWING_RUN_DEPENDS=	${CHEWING_BUILD_DEPENDS}
CHEWING_CONFIGURE_ENABLE=	chewing-module
CHEWING_CONFIGURE_ENV=	CHEWING_CFLAGS=-I${LOCALBASE}/include

UNICODE_CONFIGURE_ENABLE=	unicode-module

# TODO WITHOUT_NLS knob
#.if ${PORT_OPTIONS:MNLS}
USES+=		gettext
LDFLAGS+=	-lintl
#.else
#CONFIGURE_ARGS+=--disable-nls
#PLIST_SUB+=	NLS="@comment "
#.endif

post-patch:
	${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|' \
			${WRKSRC}/src/gtk-immodule/gtkintl.h

.include <bsd.port.mk>
OpenPOWER on IntegriCloud