diff options
author | Daichi GOTO <daichi@FreeBSD.org> | 2005-05-24 12:37:50 +0000 |
---|---|---|
committer | Daichi GOTO <daichi@FreeBSD.org> | 2005-05-24 12:37:50 +0000 |
commit | 40a684ff1e8608bde986585a735e66d9a456e675 (patch) | |
tree | 21680bac7d4436c9b33d17b1753f63e511708512 /textproc/iiimf-gtk/files | |
parent | Update to 0.65. (diff) |
IIIMF-related ports:
- drop maintainership
- update to r12.2
- some bug fixes
PR: 81184
Submitted by: Masanori OZAWA <ozawa@ongs.co.jp>
Approved by: maintainer
Notes
Notes:
svn path=/head/; revision=136030
Diffstat (limited to 'textproc/iiimf-gtk/files')
-rw-r--r-- | textproc/iiimf-gtk/files/patch-Makefile | 60 | ||||
-rw-r--r-- | textproc/iiimf-gtk/files/patch-acfiles_check_sys.m4 | 12 | ||||
-rw-r--r-- | textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am | 27 | ||||
-rw-r--r-- | textproc/iiimf-gtk/files/patch-iiimgcf_configure.ac | 27 | ||||
-rw-r--r-- | textproc/iiimf-gtk/files/patch-iiimgcf_gtkimcontextiiim.c | 149 | ||||
-rw-r--r-- | textproc/iiimf-gtk/files/patch-iiimgcf_imaux.c | 11 |
6 files changed, 216 insertions, 70 deletions
diff --git a/textproc/iiimf-gtk/files/patch-Makefile b/textproc/iiimf-gtk/files/patch-Makefile index bcc2cb24a1c8..70065ec45e00 100644 --- a/textproc/iiimf-gtk/files/patch-Makefile +++ b/textproc/iiimf-gtk/files/patch-Makefile @@ -1,19 +1,47 @@ ---- Makefile Thu Apr 8 03:28:00 2004 -+++ Makefile Wed Feb 16 14:09:34 2005 -@@ -2,6 +2,7 @@ - AUTOMAKE = automake - AUTOHEADER = autoheader - AUTOCONF = autoconf -+LIBTOOLIZE = libtoolize +--- Makefile.orig Mon May 9 15:32:45 2005 ++++ Makefile Mon May 9 15:35:03 2005 +@@ -1,29 +1,31 @@ + ## deprecated in favour of AUTORECONF +-#ACLOCAL = aclocal +-#AUTOMAKE = automake --add-missing --copy +-#LIBTOOLIZE = libtoolize --force --copy +-#AUTOHEADER = autoheader +-#AUTOCONF = autoconf ++ACLOCAL = aclocal19 ++AUTOMAKE = automake19 --add-missing --copy ++LIBTOOLIZE = libtoolize15 --force --copy ++AUTOHEADER = autoheader259 ++AUTOCONF = autoconf259 + #CONFIG_CMD = $(ACLOCAL) -I $${acfilesdir} && \ + # $(LIBTOOLIZE) && \ + # $(AUTOHEADER) && \ + # $(AUTOMAKE) && \ + # $(AUTOCONF) - CONFIG_CMD = $(ACLOCAL) -I $${acfilesdir} && \ - $(AUTOHEADER) && \ -@@ -21,7 +22,7 @@ +-AUTORECONF = autoreconf ++AUTORECONF = autoreconf259 + BOOTSTRAP = $(AUTORECONF) --install --force + INTL_CMD = glib-gettextize -f && intltoolize --copy --force --automake - update-acfiles: - cd acfiles && \ -- $(ACLOCAL) && $(AUTOMAKE) --add-missing --copy && libtoolize --force --copy && \ -+ $(ACLOCAL) $(ACLOCAL_DIR) && $(AUTOMAKE) --add-missing --copy && $(LIBTOOLIZE) --force --copy && \ - rm -f Makefile.in aclocal.m4 +-CONFIG_FLAGS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var ++CONFIG_FLAGS = --prefix=%%PREFIX%% --sysconfdir=%%LOCALBASE%%/etc --localstatedir=/var + +-INTLDIRS = iiimgcf gnome-im-switcher ++INTLDIRS = iiimgcf + +-BUILDDIRS = lib/CSConv lib/EIMIL lib/iiimp lib/iiimcf \ +- iiimsf leif leif/sun_le_korea leif/sch_le_sun leif/tch_le_sun \ +- iiimxcf/xiiimp.so iiimxcf/htt_xbe \ +- iiimgcf gnome-im-switcher doc ++BUILDDIRS = iiimgcf ++#BUILDDIRS = lib/CSConv lib/EIMIL lib/iiimp lib/iiimcf \ ++# iiimsf leif leif/sun_le_korea leif/sch_le_sun leif/tch_le_sun \ ++# iiimxcf/xiiimp.so iiimxcf/htt_xbe \ ++# iiimgcf gnome-im-switcher doc + +-CONFIGDIRS = $(BUILDDIRS) leif/m17n_le leif/thai_le_sun ++CONFIGDIRS = $(BUILDDIRS) ++#CONFIGDIRS = $(BUILDDIRS) leif/m17n_le leif/thai_le_sun + + all: compile - config: diff --git a/textproc/iiimf-gtk/files/patch-acfiles_check_sys.m4 b/textproc/iiimf-gtk/files/patch-acfiles_check_sys.m4 index 8626eeae1fd1..44ee86c035bc 100644 --- a/textproc/iiimf-gtk/files/patch-acfiles_check_sys.m4 +++ b/textproc/iiimf-gtk/files/patch-acfiles_check_sys.m4 @@ -1,10 +1,12 @@ ---- acfiles/check_sys.m4.orig Tue Sep 14 13:31:27 2004 -+++ acfiles/check_sys.m4 Wed Mar 2 08:39:25 2005 -@@ -203,6 +203,11 @@ +--- acfiles/check_sys.m4.orig Mon May 9 15:28:20 2005 ++++ acfiles/check_sys.m4 Mon May 9 15:32:07 2005 +@@ -203,6 +203,13 @@ CXX=${CC} fi ;; + cc*:*) ++ DEBUG_CFLAGS="${DEBUG_CFLAGS} -ggdb" ++ DEBUG_CXXFLAGS="${DEBUG_CXXFLAGS} -g" + COMMON_CFLAGS="${COMMON_CFLAGS} -Wall" + SHLIBCFLAGS='-fpic' + SHLIBLDFLAGS='-shared' @@ -12,7 +14,7 @@ *) DEBUG_CXX_CFLAGS="${DEBUG_CXX_CFLAGS} -g" ;; -@@ -249,8 +254,8 @@ +@@ -249,8 +256,8 @@ COMMON_CXX_CFLAGS="${COMMON_CXX_CFLAGS} -DLinux" ;; *freebsd*) @@ -23,7 +25,7 @@ ;; esac -@@ -288,9 +293,9 @@ +@@ -288,9 +295,9 @@ THREAD_CXX_CFLAGS="-mt" HAVE_THREAD="uithread" ;; diff --git a/textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am b/textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am index 7588f7b783df..78725fc307d2 100644 --- a/textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am +++ b/textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am @@ -1,21 +1,26 @@ ---- iiimgcf/Makefile.am Thu Jan 15 10:51:58 2004 -+++ iiimgcf/Makefile.am Thu Feb 17 22:05:59 2005 -@@ -9,14 +9,13 @@ +--- iiimgcf/Makefile.am.orig Thu Apr 14 05:29:08 2005 ++++ iiimgcf/Makefile.am Tue May 17 22:33:56 2005 +@@ -5,11 +5,11 @@ + @INTLTOOL_DESKTOP_RULE@ + + AUTOMAKE_OPTIONS = foreign +-ACLOCAL_AMFLAGS = -I ../acfiles ++ACLOCAL_AMFLAGS = -I /usr/local/share/aclocal -I /usr/X11R6/share/aclocal -I ../acfiles + moduledir = $(GTK2_LIBDIR)/gtk-2.0/$(GTK2_BINARY_VERSION)/immodules -im_iiim_la_CFLAGS = $(SHLIBCFLAGS) $(THREAD_CXX_CFLAGS) $(GTK_CFLAGS) -+im_iiim_la_CFLAGS = $(SHLIBCFLAGS) $(THREAD_CXX_CFLAGS) $(GTK_CFLAGS) -DIMDIR="\"${IMDIR}\"" --im_iiim_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module -no-undefined -+im_iiim_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module -no-undefined \ -+ -liiimcf -liiimp ++im_iiim_la_CFLAGS = $(SHLIBCFLAGS) $(THREAD_CXX_CFLAGS) $(GTK_CFLAGS) -I $(CSCONV_DIR) + im_iiim_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module -no-undefined im_iiim_la_SOURCES = IIIMGdkEventKey.c IIIMGdkEventKey.h \ - gtkimcontextiiim.c gtkimcontextiiim.h \ - imiiim.c imswitcher.c imaux.c --im_iiim_la_LIBADD = $(X_LIBS) $(GTK_LIBS) \ +@@ -18,8 +18,7 @@ + imswitcher.c imswitcher.h + + im_iiim_la_LIBADD = $(X_LIBS) $(GTK_LIBS) \ - $(IM_LIBDIR)/iiimcf/libiiimcf.la \ - $(IM_LIBDIR)/iiimp/libiiimp.la -+im_iiim_la_LIBADD = $(X_LIBS) $(GTK_LIBS) ++ -liiimp -liiimcf module_LTLIBRARIES = im-iiim.la diff --git a/textproc/iiimf-gtk/files/patch-iiimgcf_configure.ac b/textproc/iiimf-gtk/files/patch-iiimgcf_configure.ac deleted file mode 100644 index 375a272d8a40..000000000000 --- a/textproc/iiimf-gtk/files/patch-iiimgcf_configure.ac +++ /dev/null @@ -1,27 +0,0 @@ ---- iiimgcf/configure.ac.orig Tue Nov 18 12:17:57 2003 -+++ iiimgcf/configure.ac Wed Mar 2 22:59:24 2005 -@@ -5,7 +5,6 @@ - AC_PREREG(2.50) - AC_INIT(im-iiim.so, 0.5, im@OpenI18N.org) - dnl common initialization --AC_CONFIG_AUX_DIR(../acfiles) - IM_INIT(..) - - AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) -@@ -63,13 +62,13 @@ - COMMON_INCLUDE='-I$(IM_INCLUDEDIR) -I$(IM_INCLUDEDIR)/iiimp' - CFLAGS="${COMMON_INCLUDE} ${COMMON_CXX_CFLAGS} ${COMMON_CFLAGS} \ - ${DEBUG_CXX_CFLAGS} ${DEBUG_CFLAGS} \ -- ${THREAD_COMMON_CXX_CFLAGS}" -+ ${THREAD_COMMON_CXX_CFLAGS} ${CFLAGS}" - - CXXFLAGS="${COMMON_INCLUDE} ${COMMON_CXX_CFLAGS} ${COMMON_CXXFLAGS} \ - ${DEBUG_CXX_CFLAGS} ${DEBUG_CXXFLAGS} \ -- ${THREAD_COMMON_CXX_CFLAGS}" -+ ${THREAD_COMMON_CXX_CFLAGS} ${CXXFLAGS}" - --LDFLAGS="${COMMON_LDFLAGS}" -+LDFLAGS="${COMMON_LDFLAGS} ${LDFLAGS}" - - dnl -------------------------------------------------------------------------------- - dnl Section 6: compilation test diff --git a/textproc/iiimf-gtk/files/patch-iiimgcf_gtkimcontextiiim.c b/textproc/iiimf-gtk/files/patch-iiimgcf_gtkimcontextiiim.c new file mode 100644 index 000000000000..7a460ff263bb --- /dev/null +++ b/textproc/iiimf-gtk/files/patch-iiimgcf_gtkimcontextiiim.c @@ -0,0 +1,149 @@ +--- iiimgcf/gtkimcontextiiim.c.orig Fri Apr 22 07:46:48 2005 ++++ iiimgcf/gtkimcontextiiim.c Tue May 17 23:33:11 2005 +@@ -39,6 +39,7 @@ + #include "imaux.h" + #include "imswitcher.h" + #include "IIIMGdkEventKey.h" ++#include "iconv.h" + + #ifdef DEBUG + #define DEBUG_DO(x) (x) +@@ -147,6 +148,8 @@ + static GdkAtom im_settings_atom = GDK_NONE; + static const char *_IM_SETTINGS = "_IM_SETTINGS"; + ++static iconv_t ic_u16_to_u8 = (iconv_t)-1; ++ + static gboolean on_status_toplevel_configure (GtkWidget *toplevel, + GdkEventConfigure *event, + StatusWindow *status_window); +@@ -305,6 +308,7 @@ + return; + } + utf8 = utf16_to_utf8 (text); ++ if (!utf8) utf8 = g_strdup(""); + + if (current_setting_enabled && + (current_setting.im_enabled == IM_OFF || +@@ -593,9 +597,12 @@ + IIIMCF_text text; + gchar *utf8 = NULL; + st = iiimcf_get_committed_text (c, &text); ++ if (st != IIIMF_STATUS_SUCCESS) break; + utf8 = utf16_to_utf8 (text); +- g_signal_emit_by_name (context_iiim, "commit", utf8); +- g_free (utf8); ++ if (utf8) { ++ g_signal_emit_by_name (context_iiim, "commit", utf8); ++ g_free (utf8); ++ } + } + break; + default: +@@ -936,7 +943,7 @@ + return; + } + +- gtk_frame_set_label(GTK_FRAME (cw->frame), title_u8); ++ gtk_frame_set_label(GTK_FRAME (cw->frame), (title_u8 ? title_u8 : "")); + + if (title_u8) + g_free (title_u8); +@@ -975,6 +982,7 @@ + if (label) + label_u8 = utf16_to_utf8 (label); + candidate_u8 = utf16_to_utf8 (candidate); ++ if (!candidate_u8) candidate_u8 = g_strdup(""); + DEBUG_DO (g_message ("candidate %s", candidate_u8)); + if (label_u8) + { +@@ -997,12 +1005,9 @@ + gtk_tree_view_get_selection (GTK_TREE_VIEW (cw->tree)); + gtk_tree_selection_select_iter (selection, &iter); + } +- if (result) +- { +- g_free (result); +- g_free (label_u8); +- } +- g_free (candidate_u8); ++ if (result) g_free(result); ++ if (candidate_u8) g_free (candidate_u8); ++ if (label_u8) g_free(label_u8); + } + gtk_widget_realize (w); + iiim_candidate_move (context_iiim, w); +@@ -1187,7 +1192,7 @@ + w->toplevel = gtk_window_new (GTK_WINDOW_POPUP); + gtk_container_set_border_width (GTK_CONTAINER (w->toplevel), 2); + +- w->frame = gtk_frame_new (title_u8); ++ w->frame = gtk_frame_new (title_u8 ? title_u8 : ""); + gtk_frame_set_shadow_type (GTK_FRAME (w->frame), GTK_SHADOW_ETCHED_OUT); + + w->tree = gtk_tree_view_new (); +@@ -1539,14 +1544,52 @@ + } + + static gchar * ++iconv_utf16_to_utf8(const gunichar2 *utf16, int length) ++{ ++ if (!utf16 || 0 >= length) return g_strdup(""); ++ ++ if ((iconv_t)-1 == ic_u16_to_u8) { ++ ic_u16_to_u8 = iconv_open("UTF-8", "UTF-16"); ++ ++ if ((iconv_t)-1 == ic_u16_to_u8) { ++ fprintf(stderr, "iiimgcf: Unable to open UTF-16 -> UTF-8 converter."); ++ return NULL; ++ } ++ } ++ ++ int inlen = length * sizeof(gunichar2); ++ int outlen = (length +1) * 4; ++ const char *inbuf = (char*)utf16; ++ char *outbuf = g_malloc0(outlen + 4); ++ gchar *utf8 = (gchar*)outbuf; ++ ++ if (!outbuf) { ++ fprintf(stderr, "iiimgcf: Out of memory error."); ++ return NULL; ++ } ++ ++ if ((size_t)-1 == iconv(ic_u16_to_u8, &inbuf, &inlen, &outbuf, &outlen)) { ++ fprintf(stderr, "iiimgcf: Unable to convert the string."); ++ g_free(utf8); ++ return NULL; ++ } ++ ++ return utf8; ++} ++ ++static gchar * + utf16_to_utf8 (IIIMCF_text text) + { + IIIMF_status st; ++ ++ int len = 0; + IIIMP_card16 *u16str = NULL; + st = iiimcf_get_text_utf16string (text, (const IIIMP_card16 **) &u16str); +- return (u16str != NULL ? +- g_utf16_to_utf8 ((const gunichar2 *) u16str, -1, NULL, NULL, NULL) : +- NULL); ++ st = iiimcf_get_text_length(text, &len); ++ ++ if (st != IIIMF_STATUS_SUCCESS) return NULL; ++ ++ return iconv_utf16_to_utf8((const gunichar2 *)u16str, len); + } + + static void +@@ -2094,7 +2137,7 @@ + goto Error; + utf8 = utf16_to_utf8 (text); + +- if (attrs) ++ if (attrs && utf8) + { + gint i; + gint j; diff --git a/textproc/iiimf-gtk/files/patch-iiimgcf_imaux.c b/textproc/iiimf-gtk/files/patch-iiimgcf_imaux.c deleted file mode 100644 index dda9b5a7c069..000000000000 --- a/textproc/iiimf-gtk/files/patch-iiimgcf_imaux.c +++ /dev/null @@ -1,11 +0,0 @@ ---- iiimgcf/imaux.c Thu Jul 29 20:44:21 2004 -+++ iiimgcf/imaux.c Wed Feb 16 20:40:51 2005 -@@ -36,7 +36,7 @@ - - static void iiim_aux_download (IIIMCF_downloaded_object obj); - --#define AUX_BASE_DIR "/usr/lib/im/" -+#define AUX_BASE_DIR IMDIR - - #define IS_SPACE(len, ptr) ((0 < (len)) && \ - (('\t' == *(p)) || (' ' == *(p)))) |