aboutsummaryrefslogtreecommitdiffstats
path: root/chinese
diff options
context:
space:
mode:
authorscheidell <scheidell@FreeBSD.org>2012-05-01 20:12:53 +0800
committerscheidell <scheidell@FreeBSD.org>2012-05-01 20:12:53 +0800
commit7cc7e807f8b54f0a822dcbb35ee4ffc200e07500 (patch)
treeeb810a373ac57d6955dd0edf3b3208b4a965ddf3 /chinese
parent563153532ef104db011a3db627e8889e10b65a86 (diff)
downloadfreebsd-ports-gnome-7cc7e807f8b54f0a822dcbb35ee4ffc200e07500.tar.gz
freebsd-ports-gnome-7cc7e807f8b54f0a822dcbb35ee4ffc200e07500.tar.zst
freebsd-ports-gnome-7cc7e807f8b54f0a822dcbb35ee4ffc200e07500.zip
Add port chinese/libpinyin: The libpinyin project aims to provide the algorithms core for intelligent
sentence-based Chinese pinyin input methods. WWW: https://github.com/libpinyin/libpinyin PR: ports/166716 Submitted by: Zhihao Yuan <lichray@gmail.com> (maintainer)
Diffstat (limited to 'chinese')
-rw-r--r--chinese/Makefile1
-rw-r--r--chinese/libpinyin/Makefile37
-rw-r--r--chinese/libpinyin/distinfo2
-rw-r--r--chinese/libpinyin/files/patch-configure16
-rw-r--r--chinese/libpinyin/files/patch-src_pinyin_internal.h10
-rw-r--r--chinese/libpinyin/pkg-descr4
-rw-r--r--chinese/libpinyin/pkg-plist22
7 files changed, 92 insertions, 0 deletions
diff --git a/chinese/Makefile b/chinese/Makefile
index 339d5924fbd0..82987b245602 100644
--- a/chinese/Makefile
+++ b/chinese/Makefile
@@ -73,6 +73,7 @@
SUBDIR += kon2
SUBDIR += libchewing
SUBDIR += libgooglepinyin
+ SUBDIR += libpinyin
SUBDIR += libreoffice-zh_CN
SUBDIR += libreoffice-zh_TW
SUBDIR += libtabe
diff --git a/chinese/libpinyin/Makefile b/chinese/libpinyin/Makefile
new file mode 100644
index 000000000000..0f38ca8cfa2a
--- /dev/null
+++ b/chinese/libpinyin/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: libpinyin
+# Date created: 6 Feb 2012
+# Whom: Zhihao Yuan <lichray@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libpinyin
+PORTVERSION= 0.5.92
+CATEGORIES= chinese textproc
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}
+
+MAINTAINER= lichray@gmail.com
+COMMENT= Library to deal with pinyin
+
+MAN1= libpinyin.1 gen_binary_files.1 gen_unigram.1 \
+ import_interpolation.1
+
+USE_BDB= yes
+USE_GNOME= glib20 gnomehack pkgconfig
+USE_GETTEXT= yes
+GNU_CONFIGURE= yes
+USE_AUTOTOOLS= libtool
+USE_GMAKE= yes
+USE_LDCONFIG= yes
+
+CONFIGURE_ARGS+=CPPFLAGS="-I${LOCALBASE}/include \
+ -I${BDB_INCLUDE_DIR} -D_WITH_GETLINE" \
+ LDFLAGS="-L${LOCALBASE}/lib -l${BDB_LIB_NAME}"
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 800107
+IGNORE= does not compile on FreeBSD 7.X
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/chinese/libpinyin/distinfo b/chinese/libpinyin/distinfo
new file mode 100644
index 000000000000..842d972c50b6
--- /dev/null
+++ b/chinese/libpinyin/distinfo
@@ -0,0 +1,2 @@
+SHA256 (libpinyin-0.5.92.tar.gz) = aae733f7f0d3292b3e1f3dcdf183c496d90251064d9d2eae45b3d71738f3a838
+SIZE (libpinyin-0.5.92.tar.gz) = 10477392
diff --git a/chinese/libpinyin/files/patch-configure b/chinese/libpinyin/files/patch-configure
new file mode 100644
index 000000000000..451b55be1a8e
--- /dev/null
+++ b/chinese/libpinyin/files/patch-configure
@@ -0,0 +1,16 @@
+--- configure~ 2012-02-06 09:07:32.410719322 -0600
++++ configure 2012-02-06 09:26:16.354737313 -0600
+@@ -17515,11 +17515,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char db_create ();
++#include <db.h>
+ int
+ main ()
+ {
+-return db_create ();
++return db_create (0,0,0);
+ ;
+ return 0;
+ }
diff --git a/chinese/libpinyin/files/patch-src_pinyin_internal.h b/chinese/libpinyin/files/patch-src_pinyin_internal.h
new file mode 100644
index 000000000000..a837647d52ca
--- /dev/null
+++ b/chinese/libpinyin/files/patch-src_pinyin_internal.h
@@ -0,0 +1,10 @@
+--- src/pinyin_internal.h.orig 2011-12-19 23:45:40.000000000 -0600
++++ src/pinyin_internal.h 2012-02-06 09:53:12.804569766 -0600
+@@ -47,6 +47,7 @@
+ #include "flexible_ngram.h"
+
+ using namespace pinyin;
++#define ENODATA ENOENT
+
+
+ #endif
diff --git a/chinese/libpinyin/pkg-descr b/chinese/libpinyin/pkg-descr
new file mode 100644
index 000000000000..e0fffc72dfc8
--- /dev/null
+++ b/chinese/libpinyin/pkg-descr
@@ -0,0 +1,4 @@
+The libpinyin project aims to provide the algorithms core for intelligent
+sentence-based Chinese pinyin input methods.
+
+WWW: https://github.com/libpinyin/libpinyin
diff --git a/chinese/libpinyin/pkg-plist b/chinese/libpinyin/pkg-plist
new file mode 100644
index 000000000000..8bdf48fe8e2a
--- /dev/null
+++ b/chinese/libpinyin/pkg-plist
@@ -0,0 +1,22 @@
+bin/gen_binary_files
+bin/gen_unigram
+bin/import_interpolation
+include/libpinyin-0.3/chewing_enum.h
+include/libpinyin-0.3/chewing_key.h
+include/libpinyin-0.3/novel_types.h
+include/libpinyin-0.3/pinyin.h
+include/libpinyin-0.3/pinyin_custom2.h
+include/libpinyin-0.3/pinyin_parser2.h
+lib/libpinyin.a
+lib/libpinyin.la
+lib/libpinyin.so
+lib/libpinyin.so.0
+libdata/pkgconfig/libpinyin.pc
+%%DATADIR%%/data/bigram.db
+%%DATADIR%%/data/gb_char.bin
+%%DATADIR%%/data/gbk_char.bin
+%%DATADIR%%/data/phrase_index.bin
+%%DATADIR%%/data/pinyin_index.bin
+@dirrm %%DATADIR%%/data
+@dirrm %%DATADIR%%
+@dirrm include/libpinyin-0.3