aboutsummaryrefslogtreecommitdiff
path: root/textproc/iiimf-le-unit
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2005-03-04 11:38:18 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2005-03-04 11:38:18 +0000
commitc164ad94cfabcd5f8a4856763b207057ffd3659b (patch)
tree83be4b2b81a8c09fc64de4c8093119b5c54a7862 /textproc/iiimf-le-unit
parentdfe4984ca786bf71a10a04b833ccf6fa4ca2e1ac (diff)
downloadports-c164ad94cfabcd5f8a4856763b207057ffd3659b.tar.gz
ports-c164ad94cfabcd5f8a4856763b207057ffd3659b.zip
IIIMF-related ports some changes:
- support CFLAGS of /etc/make.conf - replace absolute path with ${LOCALBASE}, ${PREFIX} and others - replace -pthread flags with ${THREAD*} - m17n fixed of gnome-im-swither - fixed vid krisbot Submitted by: Masanori OZAWA <ozawa@ongs.co.jp>
Notes
Notes: svn path=/head/; revision=130348
Diffstat (limited to 'textproc/iiimf-le-unit')
-rw-r--r--textproc/iiimf-le-unit/Makefile55
-rw-r--r--textproc/iiimf-le-unit/files/patch-Makefile2
-rw-r--r--textproc/iiimf-le-unit/files/patch-acfiles_check_sys.m438
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_autogen.sh93
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_configure.ac6
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja3_sampleja3.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_csconv.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_xaux_ext_common.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_motif_sampleja3_xaux_so.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_conv.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_help.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_so_sampleja4.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja_sampleja.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sampleja_xaux_aux_so.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_KeyboardConfig.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_LookupImpl.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_OptionMessage.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_SelectMessage.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_UtilityConfig.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_common_include_hzinput.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_common_leif_qjbj_punct.c4
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxobj_xaux_so.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxwin_gtk_keyboard_config.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_korea_hanja_dic.h4
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_koinput.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_le-options.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_korea_leif_qjbj_punct.c4
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_korea_lookupbuf.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_th_auxobj_xaux_so.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_OptionMessage.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_UtilityConfig.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_th_leif_thai_le.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxobj_xaux_so.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxwin_gtk_UtilityConfig.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_newpy_NewPY.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_auxobj_xaux_so.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_input_methods_newzy_CikuOper.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_auxobj_xaux_so.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_config.c11
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_im.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_newzy_CikuOper.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_config.c11
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_im.c2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_unit_include_unit_input.h2
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_unit_phonetic_im_mapfile_Makefile.am31
-rw-r--r--textproc/iiimf-le-unit/files/patch-leif_unit_xaux_common_Makefile.am8
-rw-r--r--textproc/iiimf-le-unit/files/patch-lib_EIMIL_autogen.sh72
47 files changed, 121 insertions, 286 deletions
diff --git a/textproc/iiimf-le-unit/Makefile b/textproc/iiimf-le-unit/Makefile
index 1be2521c681a..85b805b9251f 100644
--- a/textproc/iiimf-le-unit/Makefile
+++ b/textproc/iiimf-le-unit/Makefile
@@ -7,6 +7,7 @@
PORTNAME= le-unit
PORTVERSION= ${IIIMF_VER:S/_/./g:C/-.*//}
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= http://www.openi18n.org/download/im-sdk/src/
PKGNAMEPREFIX= iiimf-
@@ -16,7 +17,6 @@ EXTRACT_SUFX= .tar.bz2
MAINTAINER= kcwu@csie.org
COMMENT= IIIMF UNIcode Table based generic composition engine
-BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed
RUN_DEPENDS= ${LOCALBASE}/lib/im/htt:${PORTSDIR}/textproc/iiimf-server
IIIMF_VER= r12_1-svn2002
@@ -24,12 +24,14 @@ USE_BZIP2= yes
USE_ICONV= yes
USE_REINPLACE= yes
USE_GMAKE= yes
-USE_GNOME= intltool
USE_XLIB= yes
-WANT_AUTOCONF_VER=253
-WANT_AUTOHEADER_VER=253
-WANT_AUTOMAKE_VER=15
-WANT_LIBTOOL_VER=15
+USE_AUTOCONF_VER= 259
+USE_AUTOHEADER_VER= 259
+USE_AUTOMAKE_VER= 19
+WANT_LIBTOOL_VER= 15
+
+AUTOMAKE_ARGS+= --add-missing
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
WRKSRC= ${WRKDIR}/${DISTNAME:S/src-//}/leif
PATCH_WRKSRC= ${WRKDIR}/${DISTNAME:S/src-//}
@@ -44,10 +46,14 @@ IGNORE= "It is supported on FreeBSD 5.3 and later"
IGNORE= "${ARCH} is not support."
.endif
-MAKE_ARGS+= LIBTOOL="${LIBTOOL} --tag=CXX" SED=gsed
+CFLAGS+= -I${LOCALBASE}/include -I${X11BASE}/include ${PTHREAD_CFLAGS} \
+ -DIMDIR="\\\"\$${IMDIR}\\\""
+LDFLAGS+= -L${LOCALBASE}/lib -L${X11BASE}/lib -liconv ${PTHREAD_LIBS}
+CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
UPDATE_ARGS+= ACLOCAL=${ACLOCAL} AUTOMAKE=${AUTOMAKE} \
AUTOHEADER=${AUTOHEADER} AUTOCONF=${AUTOCONF} \
- LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE}
+ LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} \
+ ACLOCAL_DIR="-I ${LOCALBASE}/share/aclocal -I ${ACLOCAL_DIR}"
post-patch:
${REINPLACE_CMD} -e "s,/usr/lib/im,${PREFIX}/lib/im,g" \
@@ -55,15 +61,32 @@ post-patch:
${WRKSRC}/../lib/CSConv/csconv.h
pre-configure:
- (cd ${WRKSRC}/.. && ${GMAKE} ${UPDATE_ARGS} update-acfiles)
- (cd ${WRKSRC}/../acfiles/ && ${TOUCH} ltconfig)
- (cd ${WRKSRC} && ${TOUCH} ltconfig)
-
-do-configure:
- (cd ${WRKSRC}/../lib/EIMIL && ./autogen.sh)
- (cd ${WRKSRC} && ./autogen.sh --prefix=${PREFIX})
+ @cd ${WRKSRC}/.. && ${GMAKE} ${UPDATE_ARGS} update-acfiles
+ @cd ${WRKSRC}/../lib/EIMIL && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \
+ -I ../../acfiles -I ${LOCALBASE}/share/aclocal -I ${ACLOCAL_DIR}
+ @cd ${WRKSRC}/../lib/EIMIL && ${REINPLACE_CMD} \
+ -e "s^\$$ac_aux_dir/ltconfig^${LTCONFIG}^g" \
+ -e "/^ltmain=/!s^\$$ac_aux_dir/ltmain.sh^${LIBTOOLFLAGS} ${LTMAIN}^g" \
+ -e '/^LIBTOOL=/s^\$$(top_builddir)/libtool^${LIBTOOL}^g' \
+ ${LIBTOOLFILES}
+ @cd ${WRKSRC}/../lib/EIMIL && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER}
+ @cd ${WRKSRC}/../lib/EIMIL && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOMAKE}
+ @cd ${WRKSRC}/../lib/EIMIL && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF}
+ @cd ${WRKSRC}/../lib/EIMIL && ${SETENV} CC="${CC}" CXX="${CXX}" \
+ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" ${CONFIGURE_ENV} \
+ ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
+ @cd ${WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${LIBTOOLIZE} --force --copy
+ @cd ${WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \
+ -I ../acfiles -I ${LOCALBASE}/share/aclocal -I ${ACLOCAL_DIR}
+ @cd ${WRKSRC} && ${REINPLACE_CMD} \
+ -e "s^\$$ac_aux_dir/ltconfig^${LTCONFIG}^g" \
+ -e "/^ltmain=/!s^\$$ac_aux_dir/ltmain.sh^${LIBTOOLFLAGS} ${LTMAIN}^g" \
+ -e '/^LIBTOOL=/s^\$$(top_builddir)/libtool^${LIBTOOL}^g' \
+ ${LIBTOOLFILES}
+ @cd ${WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER}
pre-build:
- (cd ${WRKSRC}/../lib/EIMIL && ${GMAKE} ${MAKE_ARGS})
+ @cd ${WRKSRC}/../lib/EIMIL && \
+ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
.include <bsd.port.post.mk>
diff --git a/textproc/iiimf-le-unit/files/patch-Makefile b/textproc/iiimf-le-unit/files/patch-Makefile
index 85df0e345035..bcc2cb24a1c8 100644
--- a/textproc/iiimf-le-unit/files/patch-Makefile
+++ b/textproc/iiimf-le-unit/files/patch-Makefile
@@ -13,7 +13,7 @@
update-acfiles:
cd acfiles && \
- $(ACLOCAL) && $(AUTOMAKE) --add-missing --copy && libtoolize --force --copy && \
-+ $(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:
diff --git a/textproc/iiimf-le-unit/files/patch-acfiles_check_sys.m4 b/textproc/iiimf-le-unit/files/patch-acfiles_check_sys.m4
new file mode 100644
index 000000000000..8626eeae1fd1
--- /dev/null
+++ b/textproc/iiimf-le-unit/files/patch-acfiles_check_sys.m4
@@ -0,0 +1,38 @@
+--- 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 @@
+ CXX=${CC}
+ fi
+ ;;
++ cc*:*)
++ COMMON_CFLAGS="${COMMON_CFLAGS} -Wall"
++ SHLIBCFLAGS='-fpic'
++ SHLIBLDFLAGS='-shared'
++ ;;
+ *)
+ DEBUG_CXX_CFLAGS="${DEBUG_CXX_CFLAGS} -g"
+ ;;
+@@ -249,8 +254,8 @@
+ COMMON_CXX_CFLAGS="${COMMON_CXX_CFLAGS} -DLinux"
+ ;;
+ *freebsd*)
+- THREAD_LDFLAGS="-pthread"
+- PTHREAD_LIBS=""
++ THREAD_LDFLAGS=""
++ PTHREAD_LIBS="${PTHREAD_LIBS}"
+ ;;
+ esac
+
+@@ -288,9 +293,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-le-unit/files/patch-leif_autogen.sh b/textproc/iiimf-le-unit/files/patch-leif_autogen.sh
deleted file mode 100644
index d38d31e628c7..000000000000
--- a/textproc/iiimf-le-unit/files/patch-leif_autogen.sh
+++ /dev/null
@@ -1,93 +0,0 @@
---- leif/autogen.sh Thu Dec 11 15:29:55 2003
-+++ leif/autogen.sh Wed Feb 16 16:53:53 2005
-@@ -6,6 +6,14 @@
-
- DIE=0
-
-+LIBTOOL=libtool15
-+INTLTOOLIZE=intltoolize
-+LIBTOOLIZE=libtoolize15
-+ACLOCAL=aclocal15
-+AUTOHEADER=autoheader253
-+AUTOMAKE=automake15
-+AUTOCONF=autoconf253
-+
- ACLOCAL_FLAGS="-I ../acfiles $ACLOCAL_FLAGS"
-
- if [ -n "$GNOME2_DIR" ]; then
-@@ -22,7 +30,7 @@
- exit 1
- }
-
--(autoconf --version) < /dev/null > /dev/null 2>&1 || {
-+(${AUTOCONF} --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`autoconf' installed."
- echo "Download the appropriate package for your distribution,"
-@@ -31,7 +39,7 @@
- }
-
- (grep "^AC_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
-- (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
-+ (${INTLTOOLIZE} --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`intltool' installed."
- echo "You can get it from:"
-@@ -41,7 +49,7 @@
- }
-
- (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
-- (libtool --version) < /dev/null > /dev/null 2>&1 || {
-+ (${LIBTOOL} --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`libtool' installed."
- echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
-@@ -59,7 +67,7 @@
- }
- }
-
--(automake --version) < /dev/null > /dev/null 2>&1 || {
-+(${AUTOMAKE} --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`automake' installed."
- echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
-@@ -69,7 +77,7 @@
-
-
- # if no automake, don't bother testing for aclocal
--test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
-+test -n "$NO_AUTOMAKE" || (${ACLOCAL} --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: Missing \`aclocal'. The version of \`automake'"
- echo "installed doesn't appear recent enough."
-@@ -114,24 +122,24 @@
- fi
- if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
- echo "Running intltoolize..."
-- intltoolize --copy --force --automake
-+ ${INTLTOOLIZE} --copy --force --automake
- fi
- if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
- if test -z "$NO_LIBTOOLIZE" ; then
- echo "Running libtoolize..."
-- libtoolize --force --copy
-+ ${LIBTOOLIZE} --force --copy
- fi
- fi
- echo "Running aclocal $aclocalinclude ..."
-- aclocal $aclocalinclude
-+ ${ACLOCAL} $aclocalinclude
- if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
- echo "Running autoheader..."
-- autoheader
-+ ${AUTOHEADER}
- fi
- echo "Running automake --gnu $am_opt ..."
-- automake --add-missing --copy --gnu $am_opt
-+ ${AUTOMAKE} --add-missing --copy --gnu $am_opt
- echo "Running autoconf ..."
-- autoconf
-+ ${AUTOCONF}
- )
- fi
- done
diff --git a/textproc/iiimf-le-unit/files/patch-leif_configure.ac b/textproc/iiimf-le-unit/files/patch-leif_configure.ac
index 8e401d47deef..068b07dde541 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_configure.ac
+++ b/textproc/iiimf-le-unit/files/patch-leif_configure.ac
@@ -7,15 +7,15 @@
CFLAGS="${COMMON_CXX_CFLAGS} ${COMMON_CFLAGS} \
${DEBUG_CXX_CFLAGS} ${DEBUG_CFLAGS} \
- ${THREAD_COMMON_CXX_CFLAGS}"
-+ ${THREAD_COMMON_CXX_CFLAGS} -I/usr/local/include -I/usr/X11R6/include"
++ ${THREAD_COMMON_CXX_CFLAGS} ${CFLAGS}"
CXXFLAGS="${COMMON_CXX_CFLAGS} ${COMMON_CXXFLAGS} \
${DEBUG_CXX_CFLAGS} ${DEBUG_CXXFLAGS} \
- ${THREAD_COMMON_CXX_CFLAGS}"
-+ ${THREAD_COMMON_CXX_CFLAGS} -I/usr/local/include -I/usr/X11R6/include"
++ ${THREAD_COMMON_CXX_CFLAGS} ${CXXFLAGS}"
-LDFLAGS="${COMMON_LDFLAGS} ${THREAD_LDFLAGS}"
-+LDFLAGS="${COMMON_LDFLAGS} ${THREAD_LDFLAGS} -L/usr/local/lib -L/usr/X11R6/lib"
++LDFLAGS="${COMMON_LDFLAGS} ${THREAD_LDFLAGS} ${LDFLAGS}"
-LE_TARGETS="default template sampleja sampleja2 sampleja3 newpy testEIMIL unit hangul chewing"
+LE_TARGETS="default template sampleja sampleja2 sampleja3 testEIMIL unit"
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja3_sampleja3.c b/textproc/iiimf-le-unit/files/patch-leif_sampleja3_sampleja3.c
index e0e203a88c8c..9d0ba2089572 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja3_sampleja3.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja3_sampleja3.c
@@ -5,7 +5,7 @@
objects[obj_id].domain = "com.sun";
objects[obj_id].scope = "sampleja3";
- objects[obj_id].path = "/usr/lib/im/locale/ja/sampleja3/aux.jar";
-+ objects[obj_id].path = "/usr/local/lib/im/locale/ja/sampleja3/aux.jar";
++ objects[obj_id].path = IMDIR "/locale/ja/sampleja3/aux.jar";
objects[obj_id].signature = "";
objects[obj_id].class_names = class_names;
objects[obj_id].count_names = 1;
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_csconv.h b/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_csconv.h
index 24d32c1913c5..88a908b383c9 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_csconv.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_csconv.h
@@ -5,7 +5,7 @@
#endif /* !CSC_BASE_DIR_SYSTEM */
#if !defined(CSC_BASE_DIR_DEFAULT)
-# define CSC_BASE_DIR_DEFAULT "/usr/lib/im/csconv/"
-+# define CSC_BASE_DIR_DEFAULT "/usr/local/lib/im/csconv/"
++# define CSC_BASE_DIR_DEFAULT (IMDIR "/csconv/")
#endif /* !CSC_BASE_DIR_DEFAULT */
#define CSC_IS_PATH_ABS(path) (('/' == *(path)) || \
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_xaux_ext_common.h b/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_xaux_ext_common.h
index 227cf0807c96..2adf385af32c 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_xaux_ext_common.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_common_xaux_ext_common.h
@@ -5,7 +5,7 @@
#endif
-#define DEFAULT_HELP_PATH "file:/usr/lib/im/locale/ja/sampleja3/help/"
-+#define DEFAULT_HELP_PATH "file:/usr/local/lib/im/locale/ja/sampleja3/help/"
++#define DEFAULT_HELP_PATH ("file:" IMDIR "/locale/ja/sampleja3/help/")
#endif /* !XAUX_EXT_COMMON_H */
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_motif_sampleja3_xaux_so.c b/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_motif_sampleja3_xaux_so.c
index 7a243140c742..d172f71175fc 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_motif_sampleja3_xaux_so.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja3_xaux_motif_sampleja3_xaux_so.c
@@ -5,7 +5,7 @@
};
-#define XAUX_EXT_DIR "/usr/lib/im/locale/ja/sampleja3/xaux/motif/"
-+#define XAUX_EXT_DIR "/usr/local/lib/im/locale/ja/sampleja3/xaux/motif/"
++#define XAUX_EXT_DIR (IMDIR "/locale/ja/sampleja3/xaux/motif/")
xaux_class_t xaux_classes[AUX_CLASS_MAX + 1] = {
{
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_conv.c b/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_conv.c
index 41f47001a213..73dee74c23c1 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_conv.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_conv.c
@@ -5,7 +5,7 @@
#include <dlfcn.h>
#include "csconv.h"
-#define CSC_PATH "/usr/lib/im/csconv/csconv.so"
-+#define CSC_PATH "/usr/local/lib/im/csconv/csconv.so"
++#define CSC_PATH (IMDIR "/csconv/csconv.so")
#define CSC_OPEN_LOCALE "csconv_open_locale"
#define CSC_OPEN "csconv_open"
#define CSC_CONV "csconv"
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_help.h b/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_help.h
index 9680d0b5ec0f..fe92be9b45da 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_help.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_ext_help.h
@@ -5,6 +5,6 @@
#endif /* USE_CDE_HELP */
-#define DEFAULT_HELP_PATH "file:/usr/lib/im/locale/ja/sampleja4/help/"
-+#define DEFAULT_HELP_PATH "file:/usr/local/lib/im/locale/ja/sampleja4/help/"
++#define DEFAULT_HELP_PATH ("file:" IMDIR "/locale/ja/sampleja4/help/")
#endif /* !XAUX_EXT_HELP_H */
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_so_sampleja4.c b/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_so_sampleja4.c
index 1c952cd93ff0..b71286ef0c4c 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_so_sampleja4.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja4_xaux_xaux_so_sampleja4.c
@@ -5,4 +5,4 @@
* primary path for external executables
*/
-const char *xaux_so_extexec_path = "/usr/lib/im/locale/ja/sampleja4/xaux";
-+const char *xaux_so_extexec_path = "/usr/local/lib/im/locale/ja/sampleja4/xaux";
++const char *xaux_so_extexec_path = IMDIR "/locale/ja/sampleja4/xaux";
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja_sampleja.c b/textproc/iiimf-le-unit/files/patch-leif_sampleja_sampleja.c
index 5e3752c68d00..36c2ab4a4775 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja_sampleja.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja_sampleja.c
@@ -5,7 +5,7 @@
l->path = "d:\\sampleja_obj.jar"; /* path */
#else
- l->path = "/usr/lib/im/locale/ja/sampleja/sampleja_obj.jar"; /* path */
-+ l->path = "/usr/local/lib/im/locale/ja/sampleja/sampleja_obj.jar"; /* path */
++ l->path = IMDIR "/locale/ja/sampleja/sampleja_obj.jar"; /* path */
#endif
l->signature = "";
l->class_names = class_names;
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sampleja_xaux_aux_so.c b/textproc/iiimf-le-unit/files/patch-leif_sampleja_xaux_aux_so.c
index 0fa480eff443..b93bd2182665 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sampleja_xaux_aux_so.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sampleja_xaux_aux_so.c
@@ -5,7 +5,7 @@
#define HTT_AUX_PROP1_NAME "htt_aux_sample_prop1"
-#define AUX_EXT "/usr/lib/im/locale/ja/sampleja/aux_ext"
-+#define AUX_EXT "/usr/local/lib/im/locale/ja/sampleja/aux_ext"
++#define AUX_EXT (IMDIR "/locale/ja/sampleja/aux_ext")
typedef struct _aux_icid {
aux_t * aux;
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_KeyboardConfig.c b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_KeyboardConfig.c
index d0f499a61e8c..d05cba8a0ca8 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_KeyboardConfig.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_KeyboardConfig.c
@@ -14,7 +14,7 @@
lang_name = (char *)get_langname_from_locale(sLocaleName);
- sprintf(path_name, "/usr/lib/im/locale/%s", lang_name);
-+ sprintf(path_name, "/usr/local/lib/im/locale/%s", lang_name);
++ sprintf(path_name, IMDIR "/locale/%s", lang_name);
DEBUG_printf("path_name:%s\n", path_name);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_LookupImpl.c b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_LookupImpl.c
index 3c9e9fa63826..6a928a74cf4e 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_LookupImpl.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_LookupImpl.c
@@ -5,7 +5,7 @@
lang_name = (char *)get_langname_from_locale(sLocaleName);
- sprintf(path_name, "/usr/lib/im/locale/%s", lang_name);
-+ sprintf(path_name, "/usr/local/lib/im/locale/%s", lang_name);
++ sprintf(path_name, IMDIR "/locale/%s", lang_name);
ret = read_keyboard_config_file(path_name, DEFAULT_SYMBOLS_CONFIG_FILE);
}
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_OptionMessage.c b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_OptionMessage.c
index 22805cfea104..6943cf08d998 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_OptionMessage.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_OptionMessage.c
@@ -5,7 +5,7 @@
nLocaleID = get_encodeid_from_locale(locale_name);
lang_name = get_langname_from_locale(locale_name);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
gCatd = catopen(file_name, 0);
if (gCatd == (nl_catd)-1)
printf("WARNING: Could not open message catalog: %s\n", name);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_SelectMessage.c b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_SelectMessage.c
index 1b4518abf5b7..0757a751d2b6 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_SelectMessage.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_SelectMessage.c
@@ -5,7 +5,7 @@
nLocaleID = get_encodeid_from_locale(locale_name);
lang_name = get_langname_from_locale(locale_name);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
gCatd = catopen(file_name, 0);
if (gCatd == (nl_catd)-1)
printf("WARNING: Could not open message catalog: %s\n", name);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_UtilityConfig.c b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_UtilityConfig.c
index 6a8702a37fb2..ee83935a6dc7 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_UtilityConfig.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_common_auxwin_UtilityConfig.c
@@ -5,7 +5,7 @@
DEBUG_printf("lang_name:%s\n", lang_name);
- sprintf(file_name, "/usr/lib/im/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
DEBUG_printf("file_name:%s\n", file_name);
read_utility_config_file(file_name);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_common_include_hzinput.h b/textproc/iiimf-le-unit/files/patch-leif_sun_common_include_hzinput.h
index 0ea0099c530f..2edbc6c99ebe 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_common_include_hzinput.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_common_include_hzinput.h
@@ -5,7 +5,7 @@
#define ENGINE_INITIATED 3
-#define DEFAULT_ENGINE_PATH "/usr/lib/im/locale"
-+#define DEFAULT_ENGINE_PATH "/usr/local/lib/im/locale"
++#define DEFAULT_ENGINE_PATH (IMDIR "/locale")
#define DEFAULT_DICT_PATH "data"
#define COMMON_ENGINE_PATH "common"
#define CODETABLE_ENGINE_NAME "ctim"
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_common_leif_qjbj_punct.c b/textproc/iiimf-le-unit/files/patch-leif_sun_common_leif_qjbj_punct.c
index 449c4352b8a7..94ec2b9e4f11 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_common_leif_qjbj_punct.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_common_leif_qjbj_punct.c
@@ -5,7 +5,7 @@
lang_name = (char *)get_langname_from_langid(lang_id);
DEBUG_printf("lang_name:%s\n", lang_name);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/%s", lang_name, QJBJ_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/%s", lang_name, QJBJ_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/common/%s", lang_name, QJBJ_FILE_NAME);
DEBUG_printf("file_name:%s\n", file_name);
fd = fopen(file_name, "r");
@@ -14,7 +14,7 @@
lang_name = (char *)get_langname_from_langid(lang_id);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/%s", lang_name, PUNCT_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/%s", lang_name, PUNCT_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/common/%s", lang_name, PUNCT_FILE_NAME);
DEBUG_printf("file_name:%s\n", file_name);
fd = fopen(file_name, "r");
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxobj_xaux_so.c b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxobj_xaux_so.c
index 2084f4a76ba2..3e4228b44977 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxobj_xaux_so.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxobj_xaux_so.c
@@ -5,7 +5,7 @@
#define XAUX_CLASS_MAX 7
-#define XAUX_EXT_DIR "/usr/lib/im/locale/ko_KR/"
-+#define XAUX_EXT_DIR "/usr/local/lib/im/locale/ko_KR/"
++#define XAUX_EXT_DIR (IMDIR "/locale/ko_KR/")
CARD16 aux_utfname_palette[] = {
'c','o','m','.','s','u','n','.',
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxwin_gtk_keyboard_config.c b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxwin_gtk_keyboard_config.c
index 06aba51136f1..f590d7d2c29e 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxwin_gtk_keyboard_config.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_auxwin_gtk_keyboard_config.c
@@ -5,7 +5,7 @@
lang_name = (char *) strdup ("ko_KR");
- sprintf(path_name, "/usr/lib/im/locale/%s", lang_name);
-+ sprintf(path_name, "/usr/local/lib/im/locale/%s", lang_name);
++ sprintf(path_name, IMDIR "/locale/%s", lang_name);
free (lang_name);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_hanja_dic.h b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_hanja_dic.h
index 319e418ef8af..a36049c8c07c 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_hanja_dic.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_hanja_dic.h
@@ -5,10 +5,10 @@
#define USRNAME ".usrhjd"
#ifdef __STDC__
-#define SYSPATH "/usr/lib/im/locale/ko_KR/common/data"
-+#define SYSPATH "/usr/local/lib/im/locale/ko_KR/common/data"
++#define SYSPATH (IMDIR "/locale/ko_KR/common/data")
#else
-#define SYSPATH "/usr/lib/im/locale/ko_KR/common/data"
-+#define SYSPATH "/usr/local/lib/im/locale/ko_KR/common/data"
++#define SYSPATH (IMDIR "/locale/ko_KR/common/data")
#endif
#define SYSNAME "syshjd"
#define NULNAME "nulhjd"
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_koinput.h b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_koinput.h
index 0a799e5ec9bb..d74d5276e73c 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_koinput.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_koinput.h
@@ -5,7 +5,7 @@
#define ENGINE_INITIATED 3
-#define DEFAULT_ENGINE_PATH "/usr/lib/im/locale"
-+#define DEFAULT_ENGINE_PATH "/usr/local/lib/im/locale"
++#define DEFAULT_ENGINE_PATH (IMDIR "/locale")
#define DEFAULT_DICT_PATH "data"
#define COMMON_ENGINE_PATH "common"
#define LANGNAME "ko_KR"
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_le-options.h b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_le-options.h
index c828a80203ca..99d8f185d771 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_le-options.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_include_le-options.h
@@ -5,7 +5,7 @@
#endif
-#define DEFAULT_KOLE_OPTION_FILE "/usr/lib/im/locale/ko_KR/kole.conf"
-+#define DEFAULT_KOLE_OPTION_FILE "/usr/local/lib/im/locale/ko_KR/kole.conf"
++#define DEFAULT_KOLE_OPTION_FILE (IMDIR "/locale/ko_KR/kole.conf")
/* NAME of Options */
#define STR_OPTION_CHARSET "charset"
#define STR_OPTION_DELETION "delete by jaso"
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_leif_qjbj_punct.c b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_leif_qjbj_punct.c
index 7a7d2137ec28..43866369af87 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_leif_qjbj_punct.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_leif_qjbj_punct.c
@@ -5,7 +5,7 @@
lang_name = (char *)get_langname_from_langid(lang_id);
logf("lang_name:%s\n", lang_name);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/%s", lang_name, QJBJ_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/%s", lang_name, QJBJ_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/common/%s", lang_name, QJBJ_FILE_NAME);
logf("file_name:%s\n", file_name);
fd = fopen(file_name, "r");
@@ -14,7 +14,7 @@
lang_name = (char *)get_langname_from_langid(lang_id);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/%s", lang_name, PUNCT_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/%s", lang_name, PUNCT_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/common/%s", lang_name, PUNCT_FILE_NAME);
logf("file_name:%s\n", file_name);
fd = fopen(file_name, "r");
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_lookupbuf.c b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_lookupbuf.c
index 8b369307cc42..e2ce32bd7fa7 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_korea_lookupbuf.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_korea_lookupbuf.c
@@ -5,7 +5,7 @@
fp = fopen (argv[1], "w");
- construct_binary_tree_from_file ("/usr/lib/im/locale/ko_KR/common/data/hhdict",
-+ construct_binary_tree_from_file ("/usr/local/lib/im/locale/ko_KR/common/data/hhdict",
++ construct_binary_tree_from_file (IMDIR "/locale/ko_KR/common/data/hhdict",
&trees, &n_trees);
mthd_return = dictionary_search_hanja_candidates_in_utf16
(ga, &n_candidates, &cand );
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxobj_xaux_so.c b/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxobj_xaux_so.c
index 9d15475f37a5..61aaeeae6dd8 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxobj_xaux_so.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxobj_xaux_so.c
@@ -5,7 +5,7 @@
#define XAUX_CLASS_MAX 4
-#define XAUX_EXT_DIR "/usr/lib/im/locale/th_TH/"
-+#define XAUX_EXT_DIR "/usr/local/lib/im/locale/th_TH/"
++#define XAUX_EXT_DIR (IMDIR "/locale/th_TH/")
CARD16 aux_utfname_palette[] = {
'c','o','m','.','s','u','n','.',
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_OptionMessage.c b/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_OptionMessage.c
index 6a02587f5c8c..008cb30d2e53 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_OptionMessage.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_OptionMessage.c
@@ -5,7 +5,7 @@
nLocaleID = get_encodeid_from_locale(locale_name);
lang_name = get_langname_from_locale(locale_name);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/common/%s", lang_name, MSG_FILE_NAME);
gCatd = catopen(file_name, 0);
if (gCatd == (nl_catd)-1)
printf("WARNING: Could not open message catalog: %s\n", name);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_UtilityConfig.c b/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_UtilityConfig.c
index 1b236c5e0b4f..fbe0c5aa4bf2 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_UtilityConfig.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_th_auxwin_UtilityConfig.c
@@ -5,7 +5,7 @@
DEBUG_printf("lang_name:%s\n", lang_name);
- sprintf(file_name, "/usr/lib/im/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
DEBUG_printf("file_name:%s\n", file_name);
read_utility_config_file(file_name);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_th_leif_thai_le.c b/textproc/iiimf-le-unit/files/patch-leif_sun_th_leif_thai_le.c
index d1f1d636f027..d6722bfb459b 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_th_leif_thai_le.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_th_leif_thai_le.c
@@ -5,7 +5,7 @@
Bool if_le_OpenIF(iml_if_t * If)
{
- char *keymap_config_file = "/usr/lib/im/locale/th_TH/thai_keymap.cfg";
-+ char *keymap_config_file = "/usr/local/lib/im/locale/th_TH/thai_keymap.cfg";
++ char *keymap_config_file = IMDIR "/locale/th_TH/thai_keymap.cfg";
TThaiKeymapList *pThaiKeymapList = &gThaiKeymapList;
DEBUG_printf("if_le_OpenIF ====\n");
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxobj_xaux_so.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxobj_xaux_so.c
index 300812b876f7..5cdb2980ca60 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxobj_xaux_so.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxobj_xaux_so.c
@@ -5,7 +5,7 @@
#endif
-#define XAUX_EXT_DIR "/usr/lib/im/locale/zh_CN/"
-+#define XAUX_EXT_DIR "/usr/local/lib/im/locale/zh_CN/"
++#define XAUX_EXT_DIR (IMDIR "/locale/zh_CN/")
CARD16 aux_utfname_palette[] = {
'c','o','m','.','s','u','n','.',
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxwin_gtk_UtilityConfig.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxwin_gtk_UtilityConfig.c
index a2b1a7ff5b7f..2cbf82f6ebfa 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxwin_gtk_UtilityConfig.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_auxwin_gtk_UtilityConfig.c
@@ -5,7 +5,7 @@
DEBUG_printf("lang_name:%s\n", lang_name);
- sprintf(file_name, "/usr/lib/im/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
++ sprintf(file_name, IMDIR "/locale/%s/%s", lang_name, UTILITY_FILE_NAME);
DEBUG_printf("file_name:%s\n", file_name);
read_utility_config_file(file_name);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_newpy_NewPY.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_newpy_NewPY.c
index 946a1e129f9a..89f0a0a06427 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_newpy_NewPY.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_CN_newpy_NewPY.c
@@ -5,7 +5,7 @@
#define PUNCT_ENGLISH 1
-#define CIKU_DATA_PATH "/usr/lib/im/locale/zh_CN/common/data"
-+#define CIKU_DATA_PATH "/usr/local/lib/im/locale/zh_CN/common/data"
++#define CIKU_DATA_PATH (IMDIR "/locale/zh_CN/common/data")
JINT nGlobalSpMode; /* ZRM, CStar, ABC */
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_auxobj_xaux_so.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_auxobj_xaux_so.c
index bd0b13cff264..c49a92bca109 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_auxobj_xaux_so.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_auxobj_xaux_so.c
@@ -5,7 +5,7 @@
#endif
-#define XAUX_EXT_DIR "/usr/lib/im/locale/zh_HK/"
-+#define XAUX_EXT_DIR "/usr/local/lib/im/locale/zh_HK/"
++#define XAUX_EXT_DIR (IMDIR "/locale/zh_HK/")
CARD16 aux_utfname_palette[] = {
'c','o','m','.','s','u','n','.',
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_input_methods_newzy_CikuOper.h b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_input_methods_newzy_CikuOper.h
index 731a57ee5e88..a62d350b5916 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_input_methods_newzy_CikuOper.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_HK_input_methods_newzy_CikuOper.h
@@ -5,7 +5,7 @@
#define SINGLEHZ_DSP_FULL 2
-#define CIKU_DATA_PATH "/usr/lib/im/locale/zh_HK/common/data"
-+#define CIKU_DATA_PATH "/usr/local/lib/im/locale/zh_HK/common/data"
++#define CIKU_DATA_PATH (IMDIR "/locale/zh_HK/common/data")
typedef struct _CizuItem {
UCHAR szLine[CIZU_ITEM_LEN]; /* Org Line read from file */
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_auxobj_xaux_so.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_auxobj_xaux_so.c
index 11aafb385f52..6d53fc6b8eb3 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_auxobj_xaux_so.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_auxobj_xaux_so.c
@@ -5,7 +5,7 @@
#endif
-#define XAUX_EXT_DIR "/usr/lib/im/locale/zh_TW/"
-+#define XAUX_EXT_DIR "/usr/local/lib/im/locale/zh_TW/"
++#define XAUX_EXT_DIR (IMDIR "/locale/zh_TW/")
CARD16 aux_utfname_palette[] = {
'c','o','m','.','s','u','n','.',
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_config.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_config.c
deleted file mode 100644
index fd656f3815d5..000000000000
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_config.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- leif/sun_le_asia/zh_TW/input_methods/dayi/dayi_config.c Fri Mar 26 18:13:39 2004
-+++ leif/sun_le_asia/zh_TW/input_methods/dayi/dayi_config.c Wed Feb 16 20:46:10 2005
-@@ -63,7 +63,7 @@
- The format of Dayi configure file as follow:
-
- [ base_dir ]
--path=/usr/lib/im/locale/zh_TW
-+path=/usr/lcoal/lib/im/locale/zh_TW
-
- [ data_file ]
- file=data/dayi.data
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_im.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_im.c
index 91ed4aa466a3..356a2e3d730f 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_im.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_dayi_dayi_im.c
@@ -5,7 +5,7 @@
return(-1);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/dayi.cfg", core->envinfo.lang_name);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/dayi.cfg", core->envinfo.lang_name);
++ sprintf(file_name, IMDIR "/locale/%s/common/dayi.cfg", core->envinfo.lang_name);
ret = DayiData_Init(file_name, pDayiData);
if (ret == DAYI_ERROR) {
DayiData_Free(pDayiData);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_newzy_CikuOper.h b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_newzy_CikuOper.h
index b0cb267418d6..baf98426a5df 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_newzy_CikuOper.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_newzy_CikuOper.h
@@ -5,7 +5,7 @@
#define SINGLEHZ_DSP_FULL 2
-#define CIKU_DATA_PATH "/usr/lib/im/locale/zh_TW/common/data"
-+#define CIKU_DATA_PATH "/usr/local/lib/im/locale/zh_TW/common/data"
++#define CIKU_DATA_PATH (IMDIR "/locale/zh_TW/common/data")
typedef struct _CizuItem {
UCHAR szLine[CIZU_ITEM_LEN]; /* Org Line read from file */
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_config.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_config.c
deleted file mode 100644
index 92c124ff99bf..000000000000
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_config.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- leif/sun_le_asia/zh_TW/input_methods/zhuyin/zhuyin_config.c Fri Mar 26 18:13:39 2004
-+++ leif/sun_le_asia/zh_TW/input_methods/zhuyin/zhuyin_config.c Wed Feb 16 20:46:28 2005
-@@ -64,7 +64,7 @@
- The format of Zhuyin configure file as follow:
-
- [base_dir]
--path=/usr/lib/im/locale/zh_TW
-+path=/usr/local/lib/im/locale/zh_TW
-
- [data_file]
- file=data/zhuyin.data
diff --git a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_im.c b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_im.c
index ebf1bdaeec5e..64c4f0713dd1 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_im.c
+++ b/textproc/iiimf-le-unit/files/patch-leif_sun_zh_TW_im_zhuyin_zhuyin_im.c
@@ -5,7 +5,7 @@
return(-1);
- sprintf(file_name, "/usr/lib/im/locale/%s/common/zhuyin.cfg", core->envinfo.lang_name);
-+ sprintf(file_name, "/usr/local/lib/im/locale/%s/common/zhuyin.cfg", core->envinfo.lang_name);
++ sprintf(file_name, IMDIR "/locale/%s/common/zhuyin.cfg", core->envinfo.lang_name);
ret = ZhuyinData_Init(file_name, pZhuyinData);
if (ret == ZHUYIN_ERROR) {
ZhuyinData_Free(pZhuyinData);
diff --git a/textproc/iiimf-le-unit/files/patch-leif_unit_include_unit_input.h b/textproc/iiimf-le-unit/files/patch-leif_unit_include_unit_input.h
index a6f957e6a1e2..10545897d714 100644
--- a/textproc/iiimf-le-unit/files/patch-leif_unit_include_unit_input.h
+++ b/textproc/iiimf-le-unit/files/patch-leif_unit_include_unit_input.h
@@ -5,7 +5,7 @@
#define ENGINE_INITIATED 3
-#define DEFAULT_ENGINE_PATH "/usr/lib/im/locale"
-+#define DEFAULT_ENGINE_PATH "/usr/local/lib/im/locale"
++#define DEFAULT_ENGINE_PATH (IMDIR "/locale")
#define DEFAULT_DICT_PATH "data"
#define COMMON_ENGINE_PATH "common"
#define GENERIC_IM_TABLE_NAME "GENERIC_IM_TABLE"
diff --git a/textproc/iiimf-le-unit/files/patch-leif_unit_phonetic_im_mapfile_Makefile.am b/textproc/iiimf-le-unit/files/patch-leif_unit_phonetic_im_mapfile_Makefile.am
deleted file mode 100644
index 48e1554bfb15..000000000000
--- a/textproc/iiimf-le-unit/files/patch-leif_unit_phonetic_im_mapfile_Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
---- leif/unit/phonetic_im/mapfile/Makefile.am Sat Apr 3 11:50:21 2004
-+++ leif/unit/phonetic_im/mapfile/Makefile.am Wed Feb 16 17:04:08 2005
-@@ -1,5 +1,6 @@
- SUBDIRS = mapfile2c
- LEX = /usr/bin/lex
-+SED = /usr/bin/sed
-
- MAPFILES = bengali.mapfile gurmukhi.mapfile hindi.mapfile kannada.mapfile malayalam.mapfile tamil.mapfile telugu.mapfile gujarati.mapfile
-
-@@ -12,7 +13,7 @@
- .l.c:
- $(LEX) $(LFLAGS) $*.l
- mv lex.yy.c $*.tc
-- sed \
-+ $(SED) \
- -e "/^# line/d" \
- -e "s/parse_small_token/parse_$*/g" \
- -e "s/^void yyunput/static void yyunput/g" \
-@@ -58,9 +59,9 @@
- -e "s/^#define unput(c).*/#define unput(c) (\*--global_ptr=c)/g" \
- -e "/^#line/d" \
- -e "/^static char \*global_ptr\;/i\
--#define YY_NO_INPUT" -e "/^static char \*global_ptr\;/i\
--#define YY_NO_UNPUT" -e "/^static char \*global_ptr\;/i\
--#define input() (\*global_ptr++)" $*.tc > $*.c
-+ #define YY_NO_INPUT" -e "/^static char \*global_ptr\;/i\
-+ #define YY_NO_UNPUT" -e "/^static char \*global_ptr\;/i\
-+ #define input() (\*global_ptr++)" $*.tc > $*.c
- rm -f $*.tc
-
- noinst_LTLIBRARIES = libphonetic_temp.la
diff --git a/textproc/iiimf-le-unit/files/patch-leif_unit_xaux_common_Makefile.am b/textproc/iiimf-le-unit/files/patch-leif_unit_xaux_common_Makefile.am
deleted file mode 100644
index 07ce24b9d565..000000000000
--- a/textproc/iiimf-le-unit/files/patch-leif_unit_xaux_common_Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
---- leif/unit/xaux_common/Makefile.am Thu Jun 12 20:41:27 2003
-+++ leif/unit/xaux_common/Makefile.am Wed Feb 16 17:01:09 2005
-@@ -1,4 +1,5 @@
- libxaux_common_la_CFLAGS = -I../include
-+libxaux_common_la_LDFLAGS = -lintl
- libxaux_common_la_SOURCES = logf.c encode.c
- noinst_LTLIBRARIES = libxaux_common.la
-
diff --git a/textproc/iiimf-le-unit/files/patch-lib_EIMIL_autogen.sh b/textproc/iiimf-le-unit/files/patch-lib_EIMIL_autogen.sh
deleted file mode 100644
index cee0709c90ed..000000000000
--- a/textproc/iiimf-le-unit/files/patch-lib_EIMIL_autogen.sh
+++ /dev/null
@@ -1,72 +0,0 @@
---- lib/EIMIL/autogen.sh Wed May 5 02:15:22 2004
-+++ lib/EIMIL/autogen.sh Wed Feb 16 14:57:02 2005
-@@ -12,7 +12,14 @@
-
- DIE=0
-
--(libtool --version) < /dev/null > /dev/null 2>&1 || {
-+LIBTOOL=libtool15
-+INTLTOOLIZE=intltoolize15
-+ACLOCAL=aclocal15
-+AUTOHEADER=autoheader253
-+AUTOMAKE=automake15
-+AUTOCONF=autoconf253
-+
-+(${LIBTOOL} --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have libtool installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
-@@ -30,7 +37,7 @@
- }
-
- (grep "^AC_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
-- (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
-+ (${INTLTOOLIZE} --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "**Error**: You must have \`intltoolize' installed to compile $PKG_NAME."
- echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.10.tar.gz"
-@@ -39,7 +46,7 @@
- }
- }
-
--(autoconf --version) < /dev/null > /dev/null 2>&1 || {
-+(${AUTOCONF} --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have autoconf installed to compile $PROJECT."
- echo "libtool the appropriate package for your distribution,"
-@@ -48,8 +55,8 @@
- }
-
- have_automake=false
--if automake --version < /dev/null > /dev/null 2>&1 ; then
-- automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
-+if ${AUTOMAKE} --version < /dev/null > /dev/null 2>&1 ; then
-+ automake_version=`${AUTOMAKE} --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
- case $automake_version in
- 1.2*|1.3*|1.4)
- ;;
-@@ -96,19 +103,19 @@
- fi
- if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
- echo "Running intltoolize..."
-- intltoolize --copy --force --automake
-+ ${INTLTOOLIZE} --copy --force --automake
- fi
-
- # intentionally we don't call "libtoolize --force"
- # to avoid overriding ../../acfiles/ltmain.h, which we don't want to happen!
-
--aclocal -I ../../acfiles $ACLOCAL_FLAGS
-+${ACLOCAL} -I ../../acfiles $ACLOCAL_FLAGS
-
- # optionally feature autoheader
--(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
-+(${AUTOHEADER} --version) < /dev/null > /dev/null 2>&1 && ${AUTOHEADER}
-
--automake -a $am_opt
--autoconf
-+${AUTOMAKE} -a $am_opt
-+${AUTOCONF}
- cd $ORIGDIR
-
- if test -z "$AUTOGEN_SUBDIR_MODE"; then