diff options
author | delphij <delphij@FreeBSD.org> | 2014-07-08 06:54:06 +0800 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-07-08 06:54:06 +0800 |
commit | a3c69ea2bc2ba792753f80105cfb864999c1254c (patch) | |
tree | 2d28fb3da1d9e5ef4d5b34ec7edad485f580480d /chinese/pyzy | |
parent | 98b0f80d19197a560786c6de6dd3c629688b8ecb (diff) | |
download | freebsd-ports-gnome-a3c69ea2bc2ba792753f80105cfb864999c1254c.tar.gz freebsd-ports-gnome-a3c69ea2bc2ba792753f80105cfb864999c1254c.tar.zst freebsd-ports-gnome-a3c69ea2bc2ba792753f80105cfb864999c1254c.zip |
New port: The Chinese PinYin and Bopomofo conversion library.
PR: ports/187797
Submitted by: Henry Hu <henry hu sh gmail com>
Diffstat (limited to 'chinese/pyzy')
-rw-r--r-- | chinese/pyzy/Makefile | 75 | ||||
-rw-r--r-- | chinese/pyzy/distinfo | 4 | ||||
-rw-r--r-- | chinese/pyzy/pkg-descr | 6 | ||||
-rw-r--r-- | chinese/pyzy/pkg-plist | 15 |
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%% |