Index: head/chinese/pyzy/Makefile =================================================================== --- head/chinese/pyzy/Makefile (revision 429617) +++ head/chinese/pyzy/Makefile (revision 429618) @@ -1,53 +1,38 @@ # Created by: Henry Hu # $FreeBSD$ PORTNAME= pyzy PORTVERSION= 0.1.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= chinese -MASTER_SITES= 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 +COMMENT= Chinese PinYin and Bopomofo conversion library LICENSE= LGPL21 -BROKEN= Unfetchable (google code has gone away) - LIB_DEPENDS= libsqlite3.so:databases/sqlite3 -USES= compiler:c++11-lib gettext-runtime gmake libtool pathfix pkgconfig python:build shebangfix +USE_GITHUB= yes +GH_TAGNAME= 6d9c3cd + +USES= compiler:c++11-lib gmake libtool pkgconfig python:build shebangfix autoreconf gettext-runtime pathfix SHEBANG_FILES= data/db/android/create_db.py USE_GNOME= glib20 USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-dependency-tracking --disable-boost -OPTIONS_DEFINE= ANDROID_DB OPENPHRASE_DB OPENCC -OPTIONS_DEFAULT= ANDROID_DB +OPTIONS_DEFINE= OPENCC +OPTIONS_DEFAULT= OPTIONS_SUB= yes -ANDROID_DB_DESC= Build Android DB -OPENPHRASE_DB_DESC= Build Open Phrase DB -OPENCC_DESC= Use opencc for simplified and traditional Chinese conversion +OPENCC_DESC= Use opencc for simplified and traditional Chinese conversion -ANDROID_DB_CONFIGURE_ENABLE= db-android - -OPENPHRASE_DBVER= 1.0.0 -OPENPHRASE_DBFILE= pyzy-database-${OPENPHRASE_DBVER}.tar.bz2 - -OPENPHRASE_DB_CONFIGURE_ENABLE= db-open-phrase -OPENPHRASE_DB_DISTFILES= ${OPENPHRASE_DBFILE} - OPENCC_CONFIGURE_ENABLE= opencc OPENCC_LIB_DEPENDS= libopencc.so:chinese/opencc - -post-extract-OPENPHRASE_DB-on: - @${CP} ${DISTDIR}/${OPENPHRASE_DBFILE} ${WRKSRC}/data/db/open-phrase post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-1.0.so .include Index: head/chinese/pyzy/distinfo =================================================================== --- head/chinese/pyzy/distinfo (revision 429617) +++ head/chinese/pyzy/distinfo (revision 429618) @@ -1,4 +1,3 @@ -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 +TIMESTAMP = 1480281906 +SHA256 (pyzy-pyzy-0.1.0-6d9c3cd_GH0.tar.gz) = 20c6306c3e0f507f3279a97f7117856d1733140422ea02b19aa551e113b6b859 +SIZE (pyzy-pyzy-0.1.0-6d9c3cd_GH0.tar.gz) = 1320154 Index: head/chinese/pyzy/files/patch-src_SimpTradConverter.cc =================================================================== --- head/chinese/pyzy/files/patch-src_SimpTradConverter.cc (nonexistent) +++ head/chinese/pyzy/files/patch-src_SimpTradConverter.cc (revision 429618) @@ -0,0 +1,43 @@ +--- src/SimpTradConverter.cc.orig 2012-12-17 04:00:47 UTC ++++ src/SimpTradConverter.cc +@@ -40,7 +40,6 @@ namespace PyZy { + #ifdef HAVE_OPENCC + + class opencc { +- static const int BUFFER_SIZE = 64; + public: + opencc (void) + { +@@ -55,29 +54,12 @@ public: + + void convert (const char *in, String &out) + { +- long n_char; +- unichar *in_ucs4 = g_utf8_to_ucs4_fast (in, -1, &n_char); +- +- ucs4_t *pinbuf = (ucs4_t *)in_ucs4; +- size_t inbuf_left = n_char; +- while (inbuf_left != 0) { +- ucs4_t *poutbuf = (ucs4_t *)m_buffer; +- size_t outbuf_left = BUFFER_SIZE; +- size_t retval = opencc_convert(m_od, &pinbuf, &inbuf_left, &poutbuf, &outbuf_left); +- if (retval == (size_t) -1) { +- /* append left chars in pinbuf */ +- g_warning ("opencc_convert return failed"); +- out << (unichar *) pinbuf; +- break; +- } +- *poutbuf = L'\0'; +- out << m_buffer; +- } +- g_free (in_ucs4); ++ char *converted = opencc_convert_utf8(m_od, in, -1); ++ out = converted; ++ opencc_convert_utf8_free(converted); + } + private: + opencc_t m_od; +- unichar m_buffer[BUFFER_SIZE + 1]; + }; + + void Property changes on: head/chinese/pyzy/files/patch-src_SimpTradConverter.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/chinese/pyzy/pkg-descr =================================================================== --- head/chinese/pyzy/pkg-descr (revision 429617) +++ head/chinese/pyzy/pkg-descr (revision 429618) @@ -1,6 +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 +WWW: http://github.com/pyzy/pyzy Index: head/chinese/pyzy/pkg-plist =================================================================== --- head/chinese/pyzy/pkg-plist (revision 429617) +++ head/chinese/pyzy/pkg-plist (revision 429618) @@ -1,11 +1,10 @@ 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/android.db %%DATADIR%%/db/create_index.sql %%DATADIR%%/phrases.txt