1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

New port: The Chinese PinYin and Bopomofo conversion library.

PR:		ports/187797
Submitted by:	Henry Hu <henry hu sh gmail com>
This commit is contained in:
Xin LI 2014-07-07 22:54:06 +00:00
parent ff1e150971
commit 4a141bfd4a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361145
5 changed files with 101 additions and 0 deletions

View File

@ -112,6 +112,7 @@
SUBDIR += phpbb3-tw
SUBDIR += pine4
SUBDIR += py-cconv
SUBDIR += pyzy
SUBDIR += qe
SUBDIR += qt4-codecs-cn
SUBDIR += qt4-codecs-tw

75
chinese/pyzy/Makefile Normal file
View File

@ -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>

4
chinese/pyzy/distinfo Normal file
View File

@ -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

6
chinese/pyzy/pkg-descr Normal file
View File

@ -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

15
chinese/pyzy/pkg-plist Normal file
View File

@ -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%%