aboutsummaryrefslogtreecommitdiff
path: root/chinese/pyzy
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-07-07 22:54:06 +0000
committerXin LI <delphij@FreeBSD.org>2014-07-07 22:54:06 +0000
commit4a141bfd4af98280d249d2602dfcf05af8a3b51d (patch)
tree2d28fb3da1d9e5ef4d5b34ec7edad485f580480d /chinese/pyzy
parentff1e15097132b3aea2ee7e61c64ce9f31eda1897 (diff)
downloadports-4a141bfd4af98280d249d2602dfcf05af8a3b51d.tar.gz
ports-4a141bfd4af98280d249d2602dfcf05af8a3b51d.zip
Notes
Diffstat (limited to 'chinese/pyzy')
-rw-r--r--chinese/pyzy/Makefile75
-rw-r--r--chinese/pyzy/distinfo4
-rw-r--r--chinese/pyzy/pkg-descr6
-rw-r--r--chinese/pyzy/pkg-plist15
4 files changed, 100 insertions, 0 deletions
diff --git a/chinese/pyzy/Makefile b/chinese/pyzy/Makefile
new file mode 100644
index 000000000000..38cfa8cf502b
--- /dev/null
+++ b/chinese/pyzy/Makefile
@@ -0,0 +1,75 @@
+# Created by: Henry Hu <henry.hu.sh@gmail.com>
+# $FreeBSD$
+
+PORTNAME= pyzy
+PORTVERSION= 0.1.0
+CATEGORIES= chinese
+MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= henry.hu.sh@gmail.com
+COMMENT= The Chinese PinYin and Bopomofo conversion library
+
+LICENSE= LGPL21
+
+BUILD_DEPENDS= python:${PORTSDIR}/lang/python
+LIB_DEPENDS= libsqlite3.so:${PORTSDIR}/databases/sqlite3
+
+USES= pkgconfig gmake libtool compiler:c++11-lib
+USE_GNOME= glib20
+USE_LDCONFIG= yes
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --disable-dependency-tracking --disable-boost
+NEED_ROOT= yes
+
+OPTIONS_DEFINE= ANDROID_DB OPENPHRASE_DB OPENCC
+OPTIONS_DEFAULT= ANDROID_DB
+ANDROID_DB_DESC= Build Android DB
+OPENPHRASE_DB_DESC= Build Open Phrase DB
+OPENCC_DESC= Use opencc for simplified and traditional Chinese conversion
+
+.include <bsd.port.options.mk>
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MANDROID_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.0.0
+OPENPHRASE_DBFILE= pyzy-database-${OPENPHRASE_DBVER}.tar.bz2
+
+.if ${PORT_OPTIONS:MOPENPHRASE_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 ${PORT_OPTIONS:MOPENCC}
+CONFIGURE_ARGS+= --enable-opencc
+LIB_DEPENDS+= libopencc.so:${PORTSDIR}/chinese/opencc
+.else
+CONFIGURE_ARGS+= --disable-opencc
+.endif
+
+post-extract:
+.if ${PORT_OPTIONS:MOPENPHRASE_DB}
+ @${CP} ${DISTDIR}/${OPENPHRASE_DBFILE} ${WRKSRC}/data/db/open-phrase
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|' ${WRKSRC}/Makefile.in
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-1.0.so
+
+.include <bsd.port.post.mk>
diff --git a/chinese/pyzy/distinfo b/chinese/pyzy/distinfo
new file mode 100644
index 000000000000..803c4ba5ad33
--- /dev/null
+++ b/chinese/pyzy/distinfo
@@ -0,0 +1,4 @@
+SHA256 (pyzy-0.1.0.tar.gz) = fe468a4372473d85a56f05d55b14f0e0201fde6f9336a1a2322cf79421c84d9a
+SIZE (pyzy-0.1.0.tar.gz) = 1571946
+SHA256 (pyzy-database-1.0.0.tar.bz2) = 32c7d07b9f41e1dfc0f9008f54eca8e6cb367e7f2b19ac94c49754442694c321
+SIZE (pyzy-database-1.0.0.tar.bz2) = 9977983
diff --git a/chinese/pyzy/pkg-descr b/chinese/pyzy/pkg-descr
new file mode 100644
index 000000000000..2d8cc1b69d32
--- /dev/null
+++ b/chinese/pyzy/pkg-descr
@@ -0,0 +1,6 @@
+The Chinese PinYin and Bopomofo conversion library
+
+This is the Chinese PinYin / Bopomofo conversion library.
+You can easily write an application which handles the Chinese with it.
+
+WWW: http://code.google.com/p/pyzy
diff --git a/chinese/pyzy/pkg-plist b/chinese/pyzy/pkg-plist
new file mode 100644
index 000000000000..fdf55e1cc2fc
--- /dev/null
+++ b/chinese/pyzy/pkg-plist
@@ -0,0 +1,15 @@
+include/pyzy-1.0/PyZy/Const.h
+include/pyzy-1.0/PyZy/InputContext.h
+include/pyzy-1.0/PyZy/Variant.h
+lib/libpyzy-1.0.so
+lib/libpyzy-1.0.so.0
+lib/libpyzy-1.0.so.0.100.0
+libdata/pkgconfig/pyzy-1.0.pc
+%%ANDROID_DB%%%%DATADIR%%/db/android.db
+%%OPENPHRASE_DB%%%%DATADIR%%/db/open-phrase.db
+%%DATADIR%%/db/create_index.sql
+%%DATADIR%%/phrases.txt
+@dirrm include/pyzy-1.0/PyZy
+@dirrm include/pyzy-1.0
+@dirrm %%DATADIR%%/db
+@dirrm %%DATADIR%%