summaryrefslogtreecommitdiff
path: root/inputmethod
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-06-01 13:30:35 +0000
committerobache <obache@pkgsrc.org>2014-06-01 13:30:35 +0000
commit82a4a6c74fa31fbf2b8a5cfbfd7860b088be4385 (patch)
treea891c62619580c54aef767996691b2fee3974d67 /inputmethod
parent476ca99ad088671fe01c9952c127f536ae4b4885 (diff)
downloadpkgsrc-82a4a6c74fa31fbf2b8a5cfbfd7860b088be4385.tar.gz
Import ibus-libpinyin-1.6.92 as inputmethod/ibus-libpinyin.
This package includes a Chinese Pinyin input method and a Chinese ZhuYin (Bopomofo) input method based on libpinyin for IBus.
Diffstat (limited to 'inputmethod')
-rw-r--r--inputmethod/ibus-libpinyin/DESCR2
-rw-r--r--inputmethod/ibus-libpinyin/Makefile39
-rw-r--r--inputmethod/ibus-libpinyin/PLIST36
-rw-r--r--inputmethod/ibus-libpinyin/distinfo8
-rw-r--r--inputmethod/ibus-libpinyin/options.mk20
-rw-r--r--inputmethod/ibus-libpinyin/patches/patch-lua_lmyoslib.c20
-rw-r--r--inputmethod/ibus-libpinyin/patches/patch-lua_lua-plugin.h27
-rw-r--r--inputmethod/ibus-libpinyin/patches/patch-setup_ibus-setup-libpinyin.in13
8 files changed, 165 insertions, 0 deletions
diff --git a/inputmethod/ibus-libpinyin/DESCR b/inputmethod/ibus-libpinyin/DESCR
new file mode 100644
index 00000000000..28c3c3a5a95
--- /dev/null
+++ b/inputmethod/ibus-libpinyin/DESCR
@@ -0,0 +1,2 @@
+This package includes a Chinese Pinyin input method and a Chinese ZhuYin
+(Bopomofo) input method based on libpinyin for IBus.
diff --git a/inputmethod/ibus-libpinyin/Makefile b/inputmethod/ibus-libpinyin/Makefile
new file mode 100644
index 00000000000..5bb2da4d251
--- /dev/null
+++ b/inputmethod/ibus-libpinyin/Makefile
@@ -0,0 +1,39 @@
+# $NetBSD: Makefile,v 1.1 2014/06/01 13:30:35 obache Exp $
+
+DISTNAME= ibus-libpinyin-1.6.92
+CATEGORIES= inputmethod chinese
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpinyin/}
+
+MAINTAINER= obache@NetBSD.org
+HOMEPAGE= https://github.com/libpinyin/ibus-libpinyin/
+COMMENT= Intelligent Pinyin engine based on libpinyin for IBus
+LICENSE= gnu-gpl-v2
+
+GNU_CONFIGURE= yes
+USE_TOOLS+= gmake intltool msgfmt pkg-config
+USE_LANGUAGES= c c++
+USE_LIBTOOL= yes
+
+.include "options.mk"
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/compiler.mk"
+
+.if ${OPSYS} == "Linux" || ${OPSYS} == "SunOS"
+. include "../../devel/libuuid/buildlink3.mk"
+.endif
+
+.if (!empty(PKGSRC_COMPILER:Mgcc) && !empty(CC_VERSION:Mgcc-4.[4-9]*)) || !empty(PKGSRC_COMPILER:Mclang)
+CONFIGURE_ARGS+= --disable-boost
+.else
+CONFIGURE_ARGS+= --enable-boost
+CONFIGURE_ARGS+= --with-boost=${BUILDLINK_PREFIX.boost-headers}
+.include "../../devel/boost-headers/buildlink3.mk"
+.endif
+
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../inputmethod/ibus/buildlink3.mk"
+.include "../../textproc/libpinyin/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/ibus-libpinyin/PLIST b/inputmethod/ibus-libpinyin/PLIST
new file mode 100644
index 00000000000..ddb82a06615
--- /dev/null
+++ b/inputmethod/ibus-libpinyin/PLIST
@@ -0,0 +1,36 @@
+@comment $NetBSD: PLIST,v 1.1 2014/06/01 13:30:35 obache Exp $
+libexec/ibus-engine-libpinyin
+libexec/ibus-setup-libpinyin
+share/applications/ibus-setup-libbopomofo.desktop
+share/applications/ibus-setup-libpinyin.desktop
+${PLIST.lua}share/ibus-libpinyin/base.lua
+share/ibus-libpinyin/db/english.db
+share/ibus-libpinyin/db/strokes.db
+share/ibus-libpinyin/icons/chinese.svg
+share/ibus-libpinyin/icons/english.svg
+share/ibus-libpinyin/icons/full-punct.svg
+share/ibus-libpinyin/icons/full.svg
+share/ibus-libpinyin/icons/half-punct.svg
+share/ibus-libpinyin/icons/half.svg
+share/ibus-libpinyin/icons/ibus-bopomofo.svg
+share/ibus-libpinyin/icons/ibus-pinyin.svg
+share/ibus-libpinyin/icons/simp-chinese.svg
+share/ibus-libpinyin/icons/trad-chinese.svg
+share/ibus-libpinyin/phrases.txt
+share/ibus-libpinyin/setup/config.py
+share/ibus-libpinyin/setup/config.pyc
+share/ibus-libpinyin/setup/config.pyo
+share/ibus-libpinyin/setup/dicttreeview.py
+share/ibus-libpinyin/setup/dicttreeview.pyc
+share/ibus-libpinyin/setup/dicttreeview.pyo
+share/ibus-libpinyin/setup/ibus-libpinyin-preferences.ui
+share/ibus-libpinyin/setup/main2.py
+share/ibus-libpinyin/setup/main2.pyc
+share/ibus-libpinyin/setup/main2.pyo
+${PLIST.lua}share/ibus-libpinyin/user.lua
+share/ibus/component/libpinyin.xml
+share/locale/fr/LC_MESSAGES/ibus-libpinyin.mo
+share/locale/ru/LC_MESSAGES/ibus-libpinyin.mo
+share/locale/zh_CN/LC_MESSAGES/ibus-libpinyin.mo
+share/locale/zh_HK/LC_MESSAGES/ibus-libpinyin.mo
+share/locale/zh_TW/LC_MESSAGES/ibus-libpinyin.mo
diff --git a/inputmethod/ibus-libpinyin/distinfo b/inputmethod/ibus-libpinyin/distinfo
new file mode 100644
index 00000000000..b0f258dd758
--- /dev/null
+++ b/inputmethod/ibus-libpinyin/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2014/06/01 13:30:35 obache Exp $
+
+SHA1 (ibus-libpinyin-1.6.92.tar.gz) = 01561d48edf9f6c0bd361ffe10de81aa55190116
+RMD160 (ibus-libpinyin-1.6.92.tar.gz) = 1f384f118a202071e29e98f8a7ef12a9d4d0f200
+Size (ibus-libpinyin-1.6.92.tar.gz) = 1040728 bytes
+SHA1 (patch-lua_lmyoslib.c) = d0858c884f7d018c773ccac15a3cad832ffd5a7d
+SHA1 (patch-lua_lua-plugin.h) = de317e3b4de609c3a465ee8ef7992238a55e5ff1
+SHA1 (patch-setup_ibus-setup-libpinyin.in) = 29d8ceda1be5b8ef86f0751592bcec2b019ea765
diff --git a/inputmethod/ibus-libpinyin/options.mk b/inputmethod/ibus-libpinyin/options.mk
new file mode 100644
index 00000000000..27b048e39b1
--- /dev/null
+++ b/inputmethod/ibus-libpinyin/options.mk
@@ -0,0 +1,20 @@
+# $NetBSD: options.mk,v 1.1 2014/06/01 13:30:35 obache Exp $
+#
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.ibus-libpinyin
+PKG_SUPPORTED_OPTIONS= lua
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= lua
+
+#
+# Lua extension
+#
+.if !empty(PKG_OPTIONS:Mlua)
+.include "../../lang/lua/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-lua-extension
+PLIST.lua= yes
+.else
+CONFIGURE_ARGS+= --disable-lua-extension
+.endif
diff --git a/inputmethod/ibus-libpinyin/patches/patch-lua_lmyoslib.c b/inputmethod/ibus-libpinyin/patches/patch-lua_lmyoslib.c
new file mode 100644
index 00000000000..4260bc704e6
--- /dev/null
+++ b/inputmethod/ibus-libpinyin/patches/patch-lua_lmyoslib.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-lua_lmyoslib.c,v 1.1 2014/06/01 13:30:35 obache Exp $
+
+* for Lua 5.2 API change
+
+--- lua/lmyoslib.c.orig 2012-06-12 06:02:01.000000000 +0000
++++ lua/lmyoslib.c
+@@ -20,6 +20,13 @@
+ #include "lualib.h"
+
+
++#ifdef LUA_VERSION_NUM
++# if (LUA_VERSION_NUM >= 502)
++#undef luaL_register
++#define luaL_register(L,n,f) \
++ { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); }
++# endif
++#endif
+
+ /*
+ ** {======================================================
diff --git a/inputmethod/ibus-libpinyin/patches/patch-lua_lua-plugin.h b/inputmethod/ibus-libpinyin/patches/patch-lua_lua-plugin.h
new file mode 100644
index 00000000000..0d2e25ac6aa
--- /dev/null
+++ b/inputmethod/ibus-libpinyin/patches/patch-lua_lua-plugin.h
@@ -0,0 +1,27 @@
+$NetBSD: patch-lua_lua-plugin.h,v 1.1 2014/06/01 13:30:35 obache Exp $
+
+* for Lua-5.1 and 5.2 API change
+
+--- lua/lua-plugin.h.orig 2012-06-28 07:18:49.000000000 +0000
++++ lua/lua-plugin.h
+@@ -29,6 +29,20 @@
+
+ #include <glib-object.h>
+
++#ifdef LUA_VERSION_NUM
++# if (LUA_VERSION_NUM >= 501)
++#undef lua_open
++#define lua_open luaL_newstate
++# endif
++# if (LUA_VERSION_NUM >= 502)
++#undef lua_objlen
++#define lua_objlen lua_rawlen
++#undef luaL_register
++#define luaL_register(L,n,f) \
++ { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); }
++# endif
++#endif
++
+ #define LUA_IMELIBNAME "ime"
+ LUALIB_API int (luaopen_ime) (lua_State * L);
+ LUALIB_API int (luaopen_myos) (lua_State * L);
diff --git a/inputmethod/ibus-libpinyin/patches/patch-setup_ibus-setup-libpinyin.in b/inputmethod/ibus-libpinyin/patches/patch-setup_ibus-setup-libpinyin.in
new file mode 100644
index 00000000000..df501727fcf
--- /dev/null
+++ b/inputmethod/ibus-libpinyin/patches/patch-setup_ibus-setup-libpinyin.in
@@ -0,0 +1,13 @@
+$NetBSD: patch-setup_ibus-setup-libpinyin.in,v 1.1 2014/06/01 13:30:35 obache Exp $
+
+* Set python full path properly
+
+--- setup/ibus-setup-libpinyin.in.orig 2012-06-28 07:18:49.000000000 +0000
++++ setup/ibus-setup-libpinyin.in
+@@ -26,5 +26,5 @@ export IBUS_PREFIX=@prefix@
+ export IBUS_DATAROOTDIR=@datarootdir@
+ export IBUS_LOCALEDIR=@localedir@
+ cd @prefix@/share/@PACKAGE@/setup/
+-exec python main2.py $@
++exec @PYTHON@ main2.py $@
+