diff options
author | obache <obache@pkgsrc.org> | 2009-11-24 11:46:01 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2009-11-24 11:46:01 +0000 |
commit | 95fce62873bdadcb80a51bfa0a46bf3e7cfa506b (patch) | |
tree | e326d2620ae5c4d937dae2ef86a93ce17bf2fbf4 /inputmethod | |
parent | f2da2e4df09fc1c9536b2aef412e423a01abe12c (diff) | |
download | pkgsrc-95fce62873bdadcb80a51bfa0a46bf3e7cfa506b.tar.gz |
Import scim-1.4.9 as inputmethod/scim.
Currently the SCIM project has a wide range of input methods (some may need
other libraries), covering more than 30 languages, including
(Simplified/Traditional) Chinese, Japanese, Korean and many European languages.
What's more, Composing/Dead key support is one of the built-in features.
In addition, several projects have been established to design IMEngines for
SCIM and others supply their own SCIM plugins.
Diffstat (limited to 'inputmethod')
-rw-r--r-- | inputmethod/scim/DESCR | 6 | ||||
-rw-r--r-- | inputmethod/scim/Makefile | 50 | ||||
-rw-r--r-- | inputmethod/scim/PLIST | 120 | ||||
-rw-r--r-- | inputmethod/scim/buildlink3.mk | 19 | ||||
-rw-r--r-- | inputmethod/scim/distinfo | 16 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-ab | 171 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-ac | 13 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-ad | 13 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-ae | 13 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-af | 13 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-ag | 13 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-ah | 156 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-bb | 54 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-bc | 20 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-bd | 12 | ||||
-rw-r--r-- | inputmethod/scim/patches/patch-be | 14 |
16 files changed, 703 insertions, 0 deletions
diff --git a/inputmethod/scim/DESCR b/inputmethod/scim/DESCR new file mode 100644 index 00000000000..a6a1f53cc2f --- /dev/null +++ b/inputmethod/scim/DESCR @@ -0,0 +1,6 @@ +Currently the SCIM project has a wide range of input methods (some may need +other libraries), covering more than 30 languages, including +(Simplified/Traditional) Chinese, Japanese, Korean and many European languages. +What's more, Composing/Dead key support is one of the built-in features. +In addition, several projects have been established to design IMEngines for +SCIM and others supply their own SCIM plugins. diff --git a/inputmethod/scim/Makefile b/inputmethod/scim/Makefile new file mode 100644 index 00000000000..897b2be10ad --- /dev/null +++ b/inputmethod/scim/Makefile @@ -0,0 +1,50 @@ +# $NetBSD: Makefile,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ +# + +DISTNAME= scim-1.4.9 +CATEGORIES= inputmethod +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=scim/} + +MAINTAINER= obache@NetBSD.org +HOMEPAGE= http://www.scim-im.org/ +COMMENT= Smart Common Input Method +LICENSE= gnu-lgpl-v2.1 + +PKG_DESTDIR_SUPPORT= user-destdir + +PKG_SYSCONFSUBDIR= scim + +USE_PKGLOCALEDIR= yes +USE_LANGUAGES= c c++ +USE_LIBTOOL= yes +USE_TOOLS+= msgfmt pkg-config +USE_TOOLS+= gmake # make scim-setup.desktop +USE_TOOLS+= perl intltool + +PKGCONFIG_OVERRIDE= scim-gtkutils.pc.in +PKGCONFIG_OVERRIDE+= scim-x11utils.pc.in +PKGCONFIG_OVERRIDE+= scim.pc.in + +GNU_CONFIGURE= yes + +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} +# dlopen c++ so module from c gtk2 apps cause some troubles. +CONFIGURE_ARGS+= --disable-gtk2-immodule + +EGDIR= ${PREFIX}/share/examples/scim +CONF_FILES= ${EGDIR}/config ${PKG_SYSCONFDIR}/config +CONF_FILES+= ${EGDIR}/global ${PKG_SYSCONFDIR}/global + +INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples + +# for DLOPEN_REQUIRE_PTHREADS +PTHREAD_AUTO_VARS= yes + +.include "../../devel/gettext-lib/buildlink3.mk" +.include "../../sysutils/desktop-file-utils/desktopdb.mk" +.include "../../x11/gtk2/buildlink3.mk" +.include "../../x11/libICE/buildlink3.mk" +BUILDLINK_DEPMETHOD.libXt= build +.include "../../x11/libXt/buildlink3.mk" +.include "../../mk/dlopen.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/inputmethod/scim/PLIST b/inputmethod/scim/PLIST new file mode 100644 index 00000000000..29becc9f7cd --- /dev/null +++ b/inputmethod/scim/PLIST @@ -0,0 +1,120 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ +bin/scim +bin/scim-config-agent +bin/scim-setup +include/scim-1.0/gtk/scimkeyselection.h +include/scim-1.0/gtk/scimstringview.h +include/scim-1.0/gtk/scimtrayicon.h +include/scim-1.0/scim.h +include/scim-1.0/scim_attribute.h +include/scim-1.0/scim_backend.h +include/scim-1.0/scim_bind.h +include/scim-1.0/scim_compose_key.h +include/scim-1.0/scim_config_base.h +include/scim-1.0/scim_config_module.h +include/scim-1.0/scim_config_path.h +include/scim-1.0/scim_connection.h +include/scim-1.0/scim_debug.h +include/scim-1.0/scim_event.h +include/scim-1.0/scim_exception.h +include/scim-1.0/scim_filter.h +include/scim-1.0/scim_filter_manager.h +include/scim-1.0/scim_filter_module.h +include/scim-1.0/scim_frontend.h +include/scim-1.0/scim_frontend_module.h +include/scim-1.0/scim_global_config.h +include/scim-1.0/scim_helper.h +include/scim-1.0/scim_helper_manager.h +include/scim-1.0/scim_helper_module.h +include/scim-1.0/scim_hotkey.h +include/scim-1.0/scim_iconv.h +include/scim-1.0/scim_imengine.h +include/scim-1.0/scim_imengine_module.h +include/scim-1.0/scim_lookup_table.h +include/scim-1.0/scim_module.h +include/scim-1.0/scim_object.h +include/scim-1.0/scim_panel_agent.h +include/scim-1.0/scim_panel_client.h +include/scim-1.0/scim_panel_common.h +include/scim-1.0/scim_pointer.h +include/scim-1.0/scim_property.h +include/scim-1.0/scim_signals.h +include/scim-1.0/scim_slot.h +include/scim-1.0/scim_socket.h +include/scim-1.0/scim_trans_commands.h +include/scim-1.0/scim_transaction.h +include/scim-1.0/scim_types.h +include/scim-1.0/scim_utility.h +include/scim-1.0/x11/scim_x11_utils.h +lib/libscim-1.0.la +lib/libscim-gtkutils-1.0.la +lib/libscim-x11utils-1.0.la +lib/pkgconfig/scim-gtkutils.pc +lib/pkgconfig/scim-x11utils.pc +lib/pkgconfig/scim.pc +lib/scim-1.0/1.4.0/Config/simple.la +lib/scim-1.0/1.4.0/Config/socket.la +lib/scim-1.0/1.4.0/Filter/sctc.la +lib/scim-1.0/1.4.0/FrontEnd/socket.la +lib/scim-1.0/1.4.0/FrontEnd/x11.la +lib/scim-1.0/1.4.0/Helper/setup.la +lib/scim-1.0/1.4.0/IMEngine/rawcode.la +lib/scim-1.0/1.4.0/IMEngine/socket.la +lib/scim-1.0/1.4.0/SetupUI/aaa-frontend-setup.la +lib/scim-1.0/1.4.0/SetupUI/aaa-imengine-setup.la +lib/scim-1.0/1.4.0/SetupUI/panel-gtk-setup.la +lib/scim-1.0/scim-helper-launcher +lib/scim-1.0/scim-helper-manager +lib/scim-1.0/scim-launcher +lib/scim-1.0/scim-panel-gtk +share/applications/scim-setup.desktop +share/control-center-2.0/capplets/scim-setup.desktop +share/examples/scim/config +share/examples/scim/global +share/locale/as/LC_MESSAGES/scim.mo +share/locale/bn_IN/LC_MESSAGES/scim.mo +share/locale/ca/LC_MESSAGES/scim.mo +share/locale/cs/LC_MESSAGES/scim.mo +share/locale/de/LC_MESSAGES/scim.mo +share/locale/es/LC_MESSAGES/scim.mo +share/locale/fi/LC_MESSAGES/scim.mo +share/locale/fr/LC_MESSAGES/scim.mo +share/locale/gu/LC_MESSAGES/scim.mo +share/locale/hi/LC_MESSAGES/scim.mo +share/locale/it/LC_MESSAGES/scim.mo +share/locale/ja/LC_MESSAGES/scim.mo +share/locale/kn/LC_MESSAGES/scim.mo +share/locale/ko/LC_MESSAGES/scim.mo +share/locale/ml/LC_MESSAGES/scim.mo +share/locale/mr/LC_MESSAGES/scim.mo +share/locale/nl/LC_MESSAGES/scim.mo +share/locale/pa/LC_MESSAGES/scim.mo +share/locale/pt_BR/LC_MESSAGES/scim.mo +share/locale/ru/LC_MESSAGES/scim.mo +share/locale/sk/LC_MESSAGES/scim.mo +share/locale/sv/LC_MESSAGES/scim.mo +share/locale/ta/LC_MESSAGES/scim.mo +share/locale/te/LC_MESSAGES/scim.mo +share/locale/vi/LC_MESSAGES/scim.mo +share/locale/zh_CN/LC_MESSAGES/scim.mo +share/locale/zh_TW/LC_MESSAGES/scim.mo +share/pixmaps/scim-setup.png +share/scim/icons/down.png +share/scim/icons/full-letter.png +share/scim/icons/full-punct.png +share/scim/icons/half-letter.png +share/scim/icons/half-punct.png +share/scim/icons/help.png +share/scim/icons/keyboard.png +share/scim/icons/left.png +share/scim/icons/menu.png +share/scim/icons/pin-down.png +share/scim/icons/pin-up.png +share/scim/icons/rawcode.png +share/scim/icons/right.png +share/scim/icons/sctc-sc-to-tc.png +share/scim/icons/sctc-tc-to-sc.png +share/scim/icons/sctc.png +share/scim/icons/setup.png +share/scim/icons/trademark.png +share/scim/icons/up.png diff --git a/inputmethod/scim/buildlink3.mk b/inputmethod/scim/buildlink3.mk new file mode 100644 index 00000000000..e95942acdac --- /dev/null +++ b/inputmethod/scim/buildlink3.mk @@ -0,0 +1,19 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +BUILDLINK_TREE+= scim + +.if !defined(SCIM_BUILDLINK3_MK) +SCIM_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.scim+= scim>=1.4.7 +BUILDLINK_PKGSRCDIR.scim?= ../../inputmethod/scim + +.include "../../devel/gettext-lib/buildlink3.mk" + +.if defined(USE_SCIM_GTKUTILS) && !empty(USE_SCIM_GTKUTILS:M[Yy][Ee][Ss]) +. include "../../x11/gtk2/buildlink3.mk" +.endif + +.endif # SCIM_BUILDLINK3_MK + +BUILDLINK_TREE+= -scim diff --git a/inputmethod/scim/distinfo b/inputmethod/scim/distinfo new file mode 100644 index 00000000000..52ff9734580 --- /dev/null +++ b/inputmethod/scim/distinfo @@ -0,0 +1,16 @@ +$NetBSD: distinfo,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +SHA1 (scim-1.4.9.tar.gz) = 7717339575fdbf909309a78882e30c60cce9f8eb +RMD160 (scim-1.4.9.tar.gz) = f84d51aad96fe8c2b32ef1b922ebfe9499f70c90 +Size (scim-1.4.9.tar.gz) = 2928091 bytes +SHA1 (patch-ab) = c5220c83ec8125f75b1e5d7b41f4438ec73becbf +SHA1 (patch-ac) = ad168f68be04c7865890fe83c56e51b5b539383d +SHA1 (patch-ad) = 2812ded533f29bd69bad180c33c81fd49e6213e6 +SHA1 (patch-ae) = 61909935f6226d2126392d0990f81243dc2bb933 +SHA1 (patch-af) = 010d4f31d684b8163672d2521ebff74230591d66 +SHA1 (patch-ag) = 2f97e1d9c9a96096524903c43ba4f7626956450d +SHA1 (patch-ah) = abb315ac44a36e99d8c456b1cb3af9290a29be12 +SHA1 (patch-bb) = 978220761e766fed801c9d5fc89ed6c1c562af92 +SHA1 (patch-bc) = 3e4c7aa2afd8bb64bfe7fbc46a3e739d59b0e133 +SHA1 (patch-bd) = 9912d596f5e54f59dfc0bd01c22a457f056c84e1 +SHA1 (patch-be) = 85a98134d77038d20544241410ec8130df2ea94c diff --git a/inputmethod/scim/patches/patch-ab b/inputmethod/scim/patches/patch-ab new file mode 100644 index 00000000000..905f46cc381 --- /dev/null +++ b/inputmethod/scim/patches/patch-ab @@ -0,0 +1,171 @@ +$NetBSD: patch-ab,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- src/scim_chartraits.cpp.orig 2008-11-02 06:42:37.000000000 +0000 ++++ src/scim_chartraits.cpp +@@ -26,4 +26,5 @@ + */ + ++#if 0 + #include <string> + #include "scim_types.h" +@@ -41,27 +42,33 @@ namespace std + + template<> +-void +-char_traits<ucs4_t>::assign(char_type& __c1, const char_type& __c2) ++struct char_traits<ucs4_t> ++{ ++ ++typedef ucs4_t char_type; ++typedef ucs4_t int_type; ++typedef streampos pos_type; ++typedef streamoff off_type; ++typedef mbstate_t state_type; ++ ++static void ++assign(char_type& __c1, const char_type& __c2) + { + __c1 = __c2; + } + +-template<> +-bool +-char_traits<ucs4_t>::eq(const char_type& __c1, const char_type& __c2) ++static bool ++eq(const char_type& __c1, const char_type& __c2) + { + return __c1 == __c2; + } + +-template<> +-bool +-char_traits<ucs4_t>::lt(const char_type& __c1, const char_type& __c2) ++static bool ++lt(const char_type& __c1, const char_type& __c2) + { + return __c1 < __c2; + } + +-template<> +-char_traits<ucs4_t>::char_type* +-char_traits<ucs4_t>::assign(char_type* __s, size_t __n, char_type __a) ++static char_type* ++assign(char_type* __s, size_t __n, char_type __a) + { + char_type* dest = __s; +@@ -71,7 +78,6 @@ char_traits<ucs4_t>::assign(char_type* _ + } + +-template<> +-char_traits<ucs4_t>::char_type* +-char_traits<ucs4_t>::copy(char_type* __s1, const char_type* __s2, size_t __n) ++static char_type* ++copy(char_type* __s1, const char_type* __s2, size_t __n) + { + char_type* dest = __s1; +@@ -82,13 +88,12 @@ char_traits<ucs4_t>::copy(char_type* __s + } + +-template<> +-char_traits<ucs4_t>::char_type* +-char_traits<ucs4_t>::move(char_type* __s1, const char_type* __s2, size_t __n) ++static char_type* ++move(char_type* __s1, const char_type* __s2, size_t __n) + { +- if (__s1 + __n > __s2) { ++ if (__s1 > __s2) { + char_type* dest = __s1 + __n - 1; +- const char_type* from = __s2; ++ const char_type* from = __s2 + __n - 1; + while (__n-- > 0) +- *(dest--) = *(from++); ++ *(dest--) = *(from--); + return __s1; + } else { +@@ -97,7 +102,6 @@ char_traits<ucs4_t>::move(char_type* __s + } + +-template<> +-size_t +-char_traits<ucs4_t>::length(const char_type* __s) ++static size_t ++length(const char_type* __s) + { + size_t __result = 0; +@@ -107,7 +111,6 @@ char_traits<ucs4_t>::length(const char_t + } + +-template<> +-int +-char_traits<ucs4_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) ++static int ++compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + while ( (*__s1 == *__s2++) && __n-- > 0 ) +@@ -118,7 +121,6 @@ char_traits<ucs4_t>::compare(const char_ + } + +-template<> +-const char_traits<ucs4_t>::char_type* +-char_traits<ucs4_t>::find(const char_type* __s, size_t __n, const char_type& __a) ++static const char_type* ++find(const char_type* __s, size_t __n, const char_type& __a) + { + while (__n-- > 0) { +@@ -130,40 +132,38 @@ char_traits<ucs4_t>::find(const char_typ + } + +-template<> +-char_traits<ucs4_t>::char_type +-char_traits<ucs4_t>::to_char_type (const int_type& __c) ++static char_type ++to_char_type(const int_type& __c) + { + return static_cast<char_type>(__c); + } + +-template<> +-char_traits<ucs4_t>::int_type +-char_traits<ucs4_t>::to_int_type (const char_type& __c) ++static int_type ++to_int_type(const char_type& __c) + { + return static_cast<int_type>(__c); + } + +-template<> +-bool +-char_traits<ucs4_t>::eq_int_type(const int_type& __c1, const int_type& __c2) ++static bool ++eq_int_type(const int_type& __c1, const int_type& __c2) + { + return __c1 == __c2; + } + +-template<> +-char_traits<ucs4_t>::int_type +-char_traits<ucs4_t>::eof () ++static int_type ++eof() + { +- return static_cast<int_type>(EOF); ++ return static_cast<int_type>(-1); + } + +-template<> +-char_traits<ucs4_t>::int_type +-char_traits<ucs4_t>::not_eof (const int_type& __c) ++static int_type ++not_eof(const int_type& __c) + { +- return (__c == eof()) ? 0 : __c; ++ return eq_int_type(__c, eof()) ? static_cast<int_type>(0) : __c; + } + +-} ++}; //struct char_traits<ucs4_t> ++ ++} //namespace std ++#endif + #endif + diff --git a/inputmethod/scim/patches/patch-ac b/inputmethod/scim/patches/patch-ac new file mode 100644 index 00000000000..28b1c24b65d --- /dev/null +++ b/inputmethod/scim/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- extras/panel/scim_panel_gtk.cpp.orig 2008-11-02 06:43:13.000000000 +0000 ++++ extras/panel/scim_panel_gtk.cpp +@@ -464,7 +464,7 @@ static GdkColor _active_bg; + static GdkColor _active_text; + + static ConfigModule *_config_module = 0; +-static ConfigPointer _config; ++static ConfigPointer _config = ConfigPointer(0); + + static guint _check_exit_timeout = 0; + diff --git a/inputmethod/scim/patches/patch-ad b/inputmethod/scim/patches/patch-ad new file mode 100644 index 00000000000..bbe1275d316 --- /dev/null +++ b/inputmethod/scim/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- modules/FrontEnd/scim_socket_frontend.cpp.orig 2008-11-02 06:42:11.000000000 +0000 ++++ modules/FrontEnd/scim_socket_frontend.cpp +@@ -51,7 +51,7 @@ + + using namespace scim; + +-static Pointer <SocketFrontEnd> _scim_frontend (0); ++static Pointer <SocketFrontEnd> _scim_frontend = Pointer<SocketFrontEnd>(0); + + static int _argc; + static char **_argv; diff --git a/inputmethod/scim/patches/patch-ae b/inputmethod/scim/patches/patch-ae new file mode 100644 index 00000000000..50f55a07dcc --- /dev/null +++ b/inputmethod/scim/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- modules/FrontEnd/scim_x11_frontend.cpp.orig 2008-11-02 06:42:11.000000000 +0000 ++++ modules/FrontEnd/scim_x11_frontend.cpp +@@ -71,7 +71,7 @@ + using namespace scim; + + //Local static data +-static Pointer <X11FrontEnd> _scim_frontend (0); ++static Pointer <X11FrontEnd> _scim_frontend = Pointer<X11FrontEnd>(0); + + //Module Interface + extern "C" { diff --git a/inputmethod/scim/patches/patch-af b/inputmethod/scim/patches/patch-af new file mode 100644 index 00000000000..2752a04ac8d --- /dev/null +++ b/inputmethod/scim/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- modules/IMEngine/scim_rawcode_imengine.cpp.orig 2008-11-02 06:42:21.000000000 +0000 ++++ modules/IMEngine/scim_rawcode_imengine.cpp +@@ -48,7 +48,7 @@ + + using namespace scim; + +-static Pointer <RawCodeFactory> __rawcode_factory; ++static Pointer <RawCodeFactory> __rawcode_factory = Pointer<RawCodeFactory>(0); + + static String __rawcode_locales; + diff --git a/inputmethod/scim/patches/patch-ag b/inputmethod/scim/patches/patch-ag new file mode 100644 index 00000000000..b9ad9561d64 --- /dev/null +++ b/inputmethod/scim/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- src/scim_config_base.cpp.orig 2008-11-02 06:42:34.000000000 +0000 ++++ src/scim_config_base.cpp +@@ -30,7 +30,7 @@ + + namespace scim { + +-ConfigPointer _scim_default_config (0); ++ConfigPointer _scim_default_config = ConfigPointer(0); + ConfigModule _scim_default_config_module; + + static ConfigPointer diff --git a/inputmethod/scim/patches/patch-ah b/inputmethod/scim/patches/patch-ah new file mode 100644 index 00000000000..9202ec37947 --- /dev/null +++ b/inputmethod/scim/patches/patch-ah @@ -0,0 +1,156 @@ +$NetBSD: patch-ah,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- src/scim_types.h.in.orig 2008-11-02 06:42:37.000000000 +0000 ++++ src/scim_types.h.in +@@ -31,13 +31,7 @@ + #define __SCIM_TYPES_H + + @INCLUDE_STDINT@ +- +-#ifdef __FreeBSD__ +-# include <osreldate.h> +-# if __FreeBSD_version > 500035 +-# define __STDC_ISO_10646__ +-# endif +-#endif ++#include <string> + + namespace scim { + +@@ -51,6 +45,136 @@ typedef @UINT64@ uint64; + typedef uint32 ucs4_t; + #endif + ++} // namespace scim ++ ++#ifndef __STDC_ISO_10646__ ++#include <cstring> ++ ++namespace std ++{ ++ ++template<> ++struct char_traits<scim::ucs4_t> ++{ ++ ++typedef scim::ucs4_t char_type; ++typedef scim::ucs4_t int_type; ++typedef streampos pos_type; ++typedef streamoff off_type; ++typedef mbstate_t state_type; ++ ++static void ++assign(char_type& __c1, const char_type& __c2) ++{ ++ __c1 = __c2; ++} ++ ++static bool ++eq(const char_type& __c1, const char_type& __c2) ++{ ++ return __c1 == __c2; ++} ++ ++static bool ++lt(const char_type& __c1, const char_type& __c2) ++{ ++ return __c1 < __c2; ++} ++ ++static char_type* ++assign(char_type* __s, size_t __n, char_type __a) ++{ ++ while (__n-- > 0) ++ assign(__s[__n], __a); ++ return __s; ++} ++ ++static char_type* ++copy(char_type* __s1, const char_type* __s2, size_t __n) ++{ ++ return static_cast<char_type *> ++ (memcpy(__s1, __s2, __n * sizeof(char_type))); ++} ++ ++static char_type* ++move(char_type* __s1, const char_type* __s2, size_t __n) ++{ ++ return static_cast<char_type *> ++ (memmove(__s1, __s2, __n * sizeof(char_type))); ++} ++ ++static size_t ++length(const char_type* __s) ++{ ++ const char_type *__p; ++ ++ __p = __s; ++ while (eq(*__p, static_cast<int_type>(0))) ++ ++__p; ++ return static_cast<size_t>(__p - __s); ++} ++ ++static int ++compare(const char_type* __s1, const char_type* __s2, size_t __n) ++{ ++ size_t __i; ++ ++ for (__i = 0; __i < __n; ++__i) ++ if (!eq(__s1[__i], __s2[__i])) ++ return lt(__s1[__i], __s2[__i]) ? -1 : 1; ++ return 0; ++} ++ ++static const char_type* ++find(const char_type* __s, size_t __n, const char_type& __a) ++{ ++ while (__n-- > 0) { ++ if (eq(*__s, __a)) ++ return __s; ++ ++__s; ++ } ++ return 0; ++} ++ ++static bool ++eq_int_type(const int_type& __c1, const int_type& __c2) ++{ ++ return __c1 == __c2; ++} ++ ++static char_type ++to_char_type(const int_type& __c) ++{ ++ return static_cast<char_type>(__c); ++} ++ ++static int_type ++to_int_type(const char_type& __c) ++{ ++ return static_cast<int_type>(__c); ++} ++ ++static int_type ++eof() ++{ ++ return static_cast<int_type>(-1); ++} ++ ++static int_type ++not_eof(const int_type& __c) ++{ ++ return eq_int_type(__c, eof()) ++ ? static_cast<int_type>(0) : __c; ++} ++ ++}; // struct char_traits<scim::ucs4_t> ++ ++} // namespace std ++ ++#endif //!__STDC_ISO_10646__ ++ ++namespace scim { ++ + typedef std::basic_string<char> String; + typedef std::basic_string<ucs4_t> WideString; + diff --git a/inputmethod/scim/patches/patch-bb b/inputmethod/scim/patches/patch-bb new file mode 100644 index 00000000000..c6300a1261f --- /dev/null +++ b/inputmethod/scim/patches/patch-bb @@ -0,0 +1,54 @@ +$NetBSD: patch-bb,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- extras/gtk2_immodule/gtkimcontextscim.cpp.orig 2008-11-02 06:43:15.000000000 +0000 ++++ extras/gtk2_immodule/gtkimcontextscim.cpp +@@ -274,11 +274,11 @@ static int + static FrontEndHotkeyMatcher _frontend_hotkey_matcher; + static IMEngineHotkeyMatcher _imengine_hotkey_matcher; + +-static IMEngineInstancePointer _default_instance; ++static IMEngineInstancePointer _default_instance = IMEngineInstancePointer(0); + + static ConfigModule *_config_module = 0; +-static ConfigPointer _config; +-static BackEndPointer _backend; ++static ConfigPointer _config = ConfigPointer(0); ++static BackEndPointer _backend = BackEndPointer(0); + + static GtkIMContextSCIM *_focused_ic = 0; + static GtkWidget *_focused_widget = 0; +@@ -296,8 +296,8 @@ static bool + static int _instance_count = 0; + static int _context_count = 0; + +-static IMEngineFactoryPointer _fallback_factory; +-static IMEngineInstancePointer _fallback_instance; ++static IMEngineFactoryPointer _fallback_factory = IMEngineFactoryPointer(0); ++static IMEngineInstancePointer _fallback_instance = IMEngineInstancePointer(0); + + static PanelClient _panel_client; + +@@ -310,6 +310,7 @@ static bool + static bool _shared_input_method = false; + static bool _use_key_snooper = true; + ++#if 0 + // A hack to shutdown the immodule cleanly even if im_module_exit () is not called when exiting. + class FinalizeHandler + { +@@ -324,6 +325,7 @@ public: + }; + + static FinalizeHandler _finalize_handler; ++#endif + + /* Function Implementations */ + +@@ -436,6 +438,7 @@ gtk_im_context_scim_register_type (GType + sizeof (GtkIMContextSCIM), + 0, + (GtkObjectInitFunc) gtk_im_context_scim_init, ++ 0 + }; + + SCIM_DEBUG_FRONTEND(1) << "gtk_im_context_scim_register_type...\n"; diff --git a/inputmethod/scim/patches/patch-bc b/inputmethod/scim/patches/patch-bc new file mode 100644 index 00000000000..f3fc31f4266 --- /dev/null +++ b/inputmethod/scim/patches/patch-bc @@ -0,0 +1,20 @@ +$NetBSD: patch-bc,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- utils/scimkeyselection.cpp.orig 2008-11-02 06:42:49.000000000 +0000 ++++ utils/scimkeyselection.cpp +@@ -79,6 +79,7 @@ scim_key_selection_register_type (GTypeM + sizeof (ScimKeySelection), + 0, + (GInstanceInitFunc) scim_key_selection_init, ++ 0 + }; + + if (!key_selection_type) { +@@ -608,6 +609,7 @@ scim_key_selection_dialog_register_type + sizeof (ScimKeySelectionDialog), + 0, + (GInstanceInitFunc) scim_key_selection_dialog_init, ++ 0 + }; + + if (!key_selection_dialog_type) { diff --git a/inputmethod/scim/patches/patch-bd b/inputmethod/scim/patches/patch-bd new file mode 100644 index 00000000000..253e2cbcb94 --- /dev/null +++ b/inputmethod/scim/patches/patch-bd @@ -0,0 +1,12 @@ +$NetBSD: patch-bd,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- utils/scimstringview.c.orig 2008-11-02 06:42:49.000000000 +0000 ++++ utils/scimstringview.c +@@ -134,6 +134,7 @@ scim_string_view_register_type (GTypeMod + sizeof (ScimStringView), + 0, + (GInstanceInitFunc) scim_string_view_init, ++ 0 + }; + + if (!string_view_type) diff --git a/inputmethod/scim/patches/patch-be b/inputmethod/scim/patches/patch-be new file mode 100644 index 00000000000..e11a0897012 --- /dev/null +++ b/inputmethod/scim/patches/patch-be @@ -0,0 +1,14 @@ +$NetBSD: patch-be,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $ + +--- utils/scimtrayicon.c.orig 2008-11-02 06:42:49.000000000 +0000 ++++ utils/scimtrayicon.c +@@ -72,7 +72,8 @@ scim_tray_icon_get_type (void) + NULL, /* class_data */ + sizeof (ScimTrayIcon), + 0, /* n_preallocs */ +- (GInstanceInitFunc) scim_tray_icon_init ++ (GInstanceInitFunc) scim_tray_icon_init, ++ 0 + }; + our_type = g_type_register_static (GTK_TYPE_PLUG, "ScimTrayIcon", &our_info, 0); + } |