summaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authormezz <mezz@df743ca5-7f9a-e211-a948-0013205c9059>2006-08-01 13:14:21 +0800
committermezz <mezz@df743ca5-7f9a-e211-a948-0013205c9059>2006-08-01 13:14:21 +0800
commit0498f266b25d0a46842901cb0f18836089919efa (patch)
tree1de361dd8a069e814506cbeb6ba4828ed3cee950 /textproc
parent64746be81f4b29b299031c00b6f738aceddf97b6 (diff)
downloadmarcuscom-ports-0498f266b25d0a46842901cb0f18836089919efa.tar
marcuscom-ports-0498f266b25d0a46842901cb0f18836089919efa.tar.gz
marcuscom-ports-0498f266b25d0a46842901cb0f18836089919efa.tar.bz2
marcuscom-ports-0498f266b25d0a46842901cb0f18836089919efa.tar.lz
marcuscom-ports-0498f266b25d0a46842901cb0f18836089919efa.tar.xz
marcuscom-ports-0498f266b25d0a46842901cb0f18836089919efa.tar.zst
marcuscom-ports-0498f266b25d0a46842901cb0f18836089919efa.zip
X11BASE -> LOCALBASE, gtk-query-immodules-2.0 lives in LOCALBASE. Bump the
PORTREVISION. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6920 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'textproc')
-rw-r--r--textproc/iiimf-gtk/Makefile65
-rw-r--r--textproc/iiimf-gtk/distinfo3
-rw-r--r--textproc/iiimf-gtk/files/patch-Makefile42
-rw-r--r--textproc/iiimf-gtk/files/patch-acfiles_check_sys.m440
-rw-r--r--textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am26
-rw-r--r--textproc/iiimf-gtk/files/patch-iiimgcf_gtkimcontextiiim.c149
-rw-r--r--textproc/iiimf-gtk/pkg-descr21
-rw-r--r--textproc/iiimf-gtk/pkg-plist12
8 files changed, 358 insertions, 0 deletions
diff --git a/textproc/iiimf-gtk/Makefile b/textproc/iiimf-gtk/Makefile
new file mode 100644
index 000000000..c07773650
--- /dev/null
+++ b/textproc/iiimf-gtk/Makefile
@@ -0,0 +1,65 @@
+# New ports collection makefile for: iiimf-gtk
+# Date created: 6 Dec 2003
+# Whom: Kuang-che Wu <kcwu@csie.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= gtk
+PORTVERSION= 12.2
+PORTREVISION= 4
+CATEGORIES= textproc
+MASTER_SITES= http://www.openi18n.org/download/im-sdk/src/
+PKGNAMEPREFIX= iiimf-
+DISTNAME= iiimf-src-${PORTVERSION}
+
+MAINTAINER= ozawa@ongs.co.jp
+COMMENT= Internet/Intranet Input Method Server Framework
+
+LIB_DEPENDS= iiimp.1:${PORTSDIR}/textproc/iiimf-protocol-lib \
+ iiimcf.3:${PORTSDIR}/textproc/iiimf-client-lib
+
+ONLY_FOR_ARCHS= i386
+
+USE_X_PREFIX= yes
+
+USE_BZIP2= yes
+USE_ICONV= yes
+USE_GETTEXT= yes
+USE_GMAKE= yes
+USE_GNOME= intltool gtk20
+USE_AUTOTOOLS= automake:19:env autoconf:259:env libtool:15:env
+WANT_AUTOHEADER_VER= 259
+
+WRKSRC= ${WRKDIR}/${DISTNAME:S/src-//}
+BUILDDIR= ${WRKSRC}/iiimgcf
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 503000
+IGNORE= is supported on FreeBSD 5.3 and later only
+.endif
+
+.if defined(WITH_DEBUG)
+CFLAGS+= -DDEBUG
+.endif
+
+CFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include ${PTHREAD_CFLAGS}
+LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib -liconv -lintl ${PTHREAD_LIBS}
+CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+
+post-patch:
+ ${REINPLACE_CMD} \
+ -e "s,%%LOCALBASE%%,${LOCALBASE},g" \
+ -e "s,%%PREFIX%%,${PREFIX},g" \
+ ${WRKSRC}/Makefile ${BUILDDIR}/Makefile.am
+
+do-configure:
+ @cd ${WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${GMAKE} bootstrap
+ @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${GMAKE} config
+
+post-install:
+ ${LOCALBASE}/bin/gtk-query-immodules-2.0 > \
+ ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
+
+.include <bsd.port.post.mk>
diff --git a/textproc/iiimf-gtk/distinfo b/textproc/iiimf-gtk/distinfo
new file mode 100644
index 000000000..ad441e71a
--- /dev/null
+++ b/textproc/iiimf-gtk/distinfo
@@ -0,0 +1,3 @@
+MD5 (iiimf-src-12.2.tar.bz2) = 70dbf257fe64ddf8611dfa6449da537c
+SHA256 (iiimf-src-12.2.tar.bz2) = 16fc96abe6bdf7118868a51806bbe9c53e5396700398ec305f3de415fae12357
+SIZE (iiimf-src-12.2.tar.bz2) = 11452670
diff --git a/textproc/iiimf-gtk/files/patch-Makefile b/textproc/iiimf-gtk/files/patch-Makefile
new file mode 100644
index 000000000..4942c07fa
--- /dev/null
+++ b/textproc/iiimf-gtk/files/patch-Makefile
@@ -0,0 +1,42 @@
+--- Makefile.orig Tue Apr 19 15:38:18 2005
++++ Makefile Fri Feb 3 20:09:51 2006
+@@ -1,7 +1,7 @@
+ ## 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 = libtoolize --force --copy
++AUTOHEADER = autoheader259
++AUTOCONF = autoconf259
+ #CONFIG_CMD = $(ACLOCAL) -I $${acfilesdir} && \
+@@ -12,3 +12,3 @@
+
+-AUTORECONF = autoreconf
++AUTORECONF = autoreconf259
+ BOOTSTRAP = $(AUTORECONF) --install --force
+@@ -16,12 +16,14 @@
+
+-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
+
diff --git a/textproc/iiimf-gtk/files/patch-acfiles_check_sys.m4 b/textproc/iiimf-gtk/files/patch-acfiles_check_sys.m4
new file mode 100644
index 000000000..44ee86c03
--- /dev/null
+++ b/textproc/iiimf-gtk/files/patch-acfiles_check_sys.m4
@@ -0,0 +1,40 @@
+--- 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'
++ ;;
+ *)
+ DEBUG_CXX_CFLAGS="${DEBUG_CXX_CFLAGS} -g"
+ ;;
+@@ -249,8 +256,8 @@
+ COMMON_CXX_CFLAGS="${COMMON_CXX_CFLAGS} -DLinux"
+ ;;
+ *freebsd*)
+- THREAD_LDFLAGS="-pthread"
+- PTHREAD_LIBS=""
++ THREAD_LDFLAGS=""
++ PTHREAD_LIBS="${PTHREAD_LIBS}"
+ ;;
+ esac
+
+@@ -288,9 +295,9 @@
+ THREAD_CXX_CFLAGS="-mt"
+ HAVE_THREAD="uithread"
+ ;;
+- *freebsd*@gcc:*)
+- THREAD_LDFLAGS="-pthread"
+- THREAD_LIBS=""
++ *freebsd*@cc:*|*freebsd*@gcc:*)
++ THREAD_LDFLAGS=""
++ THREAD_LIBS="${PTHREAD_LIBS}"
+ HAVE_THREAD="freebsd-pthread"
+ ;;
+ *linux*)
diff --git a/textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am b/textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am
new file mode 100644
index 000000000..47a39e893
--- /dev/null
+++ b/textproc/iiimf-gtk/files/patch-iiimgcf_Makefile.am
@@ -0,0 +1,26 @@
+--- 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 %%LOCALBASE%%/share/aclocal -I %%PREFIX%%/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) -I $(CSCONV_DIR)
+ im_iiim_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module -no-undefined
+
+ im_iiim_la_SOURCES = IIIMGdkEventKey.c IIIMGdkEventKey.h \
+@@ -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
++ -liiimp -liiimcf
+
+ module_LTLIBRARIES = im-iiim.la
+
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 000000000..7a460ff26
--- /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/pkg-descr b/textproc/iiimf-gtk/pkg-descr
new file mode 100644
index 000000000..ac72b20e8
--- /dev/null
+++ b/textproc/iiimf-gtk/pkg-descr
@@ -0,0 +1,21 @@
+IIIMF stands for Internet/Intranet Input Method Framework.
+IIIMF is designed to be the next generation of input method framework
+which provides the following capabilities;
+
+* Multiplatform, platform independent.
+* Multlingual and Full UNICODE support, but satisfactory for native speakers.
+* Windowing System Independent.
+* Multiple language engines concurrently run.
+* Multiuser.
+* Distributed, lightweight clients and scalable server.
+* Extensible in multiple means.
+* Input method protocol efficient enough to be used over low-speed modem
+ connection.
+* Easy input method engine development with plugin API.
+* Easy input method enabling with libiiimcf, even on console apps.
+* Small core part to start from.
+
+WWW: http://www.openi18n.org/subgroups/im/IIIMF/
+
+- Kuang-che Wu
+ kcwu@csie.org
diff --git a/textproc/iiimf-gtk/pkg-plist b/textproc/iiimf-gtk/pkg-plist
new file mode 100644
index 000000000..34ee650d9
--- /dev/null
+++ b/textproc/iiimf-gtk/pkg-plist
@@ -0,0 +1,12 @@
+lib/gtk-2.0/2.4.0/immodules/im-iiim.a
+lib/gtk-2.0/2.4.0/immodules/im-iiim.la
+lib/gtk-2.0/2.4.0/immodules/im-iiim.so
+@exec %D/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@unexec %D/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+share/locale/ja/LC_MESSAGES/iiimgcf.mo
+share/locale/ko/LC_MESSAGES/iiimgcf.mo
+share/locale/zh_CN/LC_MESSAGES/iiimgcf.mo
+share/locale/zh_TW/LC_MESSAGES/iiimgcf.mo
+share/locale/zh_HK/LC_MESSAGES/iiimgcf.mo
+@dirrmtry share/locale/zh_HK/LC_MESSAGES
+@dirrmtry share/locale/zh_HK