aboutsummaryrefslogtreecommitdiff
path: root/chinese/ibus-pinyin/Makefile
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2012-01-10 21:47:44 +0000
committerXin LI <delphij@FreeBSD.org>2012-01-10 21:47:44 +0000
commit2e971ff4455092d4cf3713c3515690345b9cc799 (patch)
treee141173de65967f7b88c97033592b2eee2e5dd96 /chinese/ibus-pinyin/Makefile
parent4f726aa204750d28068fd65cefcf483ecdaa1721 (diff)
downloadports-2e971ff4455092d4cf3713c3515690345b9cc799.tar.gz
ports-2e971ff4455092d4cf3713c3515690345b9cc799.zip
Notes
Diffstat (limited to 'chinese/ibus-pinyin/Makefile')
-rw-r--r--chinese/ibus-pinyin/Makefile54
1 files changed, 47 insertions, 7 deletions
diff --git a/chinese/ibus-pinyin/Makefile b/chinese/ibus-pinyin/Makefile
index a201d2376398..ad76a5f6c9f1 100644
--- a/chinese/ibus-pinyin/Makefile
+++ b/chinese/ibus-pinyin/Makefile
@@ -6,28 +6,63 @@
#
PORTNAME= ibus-pinyin
-PORTVERSION= 1.3.11
+PORTVERSION= 1.4.0
CATEGORIES= chinese
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DBTAR}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= henry.hu.sh@gmail.com
COMMENT= PinYin engine for IBus
BUILD_DEPENDS= ibus-daemon:${PORTSDIR}/textproc/ibus \
- ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \
- ${LOCALBASE}/include/boost/accumulators/accumulators.hpp:${PORTSDIR}/devel/boost-libs
-RUN_DEPENDS= ${BUILD_DEPENDS}
+ ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
+RUN_DEPENDS= ibus-daemon:${PORTSDIR}/textproc/ibus \
+ ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
USE_PYTHON= yes
USE_GNOME= pygtk2
+USE_GCC= 4.4+
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --disable-dependency-tracking
+CONFIGURE_ARGS= --disable-dependency-tracking --disable-lua-extension
PROJECTHOST= ibus
+OPTIONS= ANDROID_DB "Build Android DB" on \
+ OPENPHRASE_DB "Build Open Phrase DB" off \
+ OPENCC "Use opencc" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_ANDROID_DB)
+CONFIGURE_ARGS+= --enable-db-android
+PLIST_SUB+= ANDROID_DB=""
+.else
+CONFIGURE_ARGS+= --disable-db-android
+PLIST_SUB+= ANDROID_DB="@comment "
+.endif
+
+OPENPHRASE_DBVER= 1.2.99
+OPENPHRASE_DBFILE= pinyin-database-${OPENPHRASE_DBVER}.tar.bz2
+
+.if defined(WITH_OPENPHRASE_DB)
+CONFIGURE_ARGS+= --enable-db-open-phrase
+DISTFILES+= ${OPENPHRASE_DBFILE}
+PLIST_SUB+= OPENPHRASE_DB=""
+.else
+CONFIGURE_ARGS+= --disable-db-open-phrase
+PLIST_SUB+= OPENPHRASE_DB="@comment "
+.endif
+
+.if defined(WITH_OPENCC)
+CONFIGURE_ARGS+= --enable-opencc
+LIB_DEPENDS+= opencc.1:${PORTSDIR}/chinese/opencc
+.else
+CONFIGURE_ARGS+= --disable-opencc
+.endif
+
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
PLIST_SUB+= NLS=""
@@ -36,7 +71,12 @@ CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.endif
+post-extract:
+.if defined(WITH_OPENPHRASE_DB)
+ @${CP} ${DISTDIR}/${OPENPHRASE_DBFILE} ${WRKSRC}/data/db/open-phrase
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|DATADIRNAME=lib|DATADIRNAME=share|' ${WRKSRC}/configure
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>