# New ports collection makefile for:	fcitx-configtool
# Date created:				09 Nov 2011
# Whom:			Zhihao Yuan <lichray@gmail.com>
#
# $FreeBSD: ports/chinese/fcitx-configtool/Makefile,v 1.3 2012/02/07 20:57:07 delphij Exp $
#

PORTNAME=	fcitx-configtool
PORTVERSION=	0.4.0
CATEGORIES=	chinese x11
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
DIST_SUBDIR=	fcitx

MAINTAINER=	lichray@gmail.com
COMMENT=	Fcitx IM configure tool

BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/iso-codes.pc:${PORTSDIR}/misc/iso-codes
LIB_DEPENDS=	fcitx-config.4:${PORTSDIR}/chinese/fcitx

USE_BZIP2=	yes
USE_GNOME=	intltool gnomehack
USE_GETTEXT=	yes
USE_CMAKE=	yes

OPTIONS=	GTK2		"Enable Gtk2 Version" on \
		GTK3		"Enable Gtk3 Version" off

.include <bsd.port.options.mk>

.if defined(WITH_GTK2)
USE_GNOME+=	gtk20
PLIST_SUB+=	GTK2=""
.else
CMAKE_ARGS+=	-DENABLE_GTK2=OFF
PLIST_SUB+=	GTK2="@comment "
.endif

.if defined(WITH_GTK3)
USE_GNOME+=	gtk30
CMAKE_ARGS+=	-DENABLE_GTK3=ON
PLIST_SUB+=	GTK3=""
.else
PLIST_SUB+=	GTK3="@comment "
.endif

.if defined(WITHOUT_GTK2) && defined(WITHOUT_GTK3)
IGNORE=		a GUI is required
.endif

PROJECTHOST=	fcitx

.include <bsd.port.mk>
