aboutsummaryrefslogtreecommitdiff
path: root/textproc/iiimf-server
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2005-02-28 04:17:02 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2005-02-28 04:17:02 +0000
commit806320585f11517fb0170fe185bbab72146f4afb (patch)
tree27b00b83610d0ff124cac329890239f6ba0a95f2 /textproc/iiimf-server
parenta71c961dc48934fc41084a036b9decab93c34916 (diff)
downloadports-806320585f11517fb0170fe185bbab72146f4afb.tar.gz
ports-806320585f11517fb0170fe185bbab72146f4afb.zip
Notes
Diffstat (limited to 'textproc/iiimf-server')
-rw-r--r--textproc/iiimf-server/Makefile63
-rw-r--r--textproc/iiimf-server/distinfo4
-rw-r--r--textproc/iiimf-server/files/htt.sh.in21
-rw-r--r--textproc/iiimf-server/files/patch-Makefile19
-rw-r--r--textproc/iiimf-server/files/patch-acfiles_check_sys.m436
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf-src-Makefile.am9
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_Makefile.am8
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_autogen.sh93
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_IMAuth.cpp11
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_IMSignal.cpp27
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_IMSvrCfg.cpp28
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_IMXMLUtil.cpp20
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_Makefile.am34
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_iwrap.c35
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_segvlogger.c24
-rw-r--r--textproc/iiimf-server/files/patch-iiimsf_src_watchdog.c17
-rw-r--r--textproc/iiimf-server/pkg-plist21
17 files changed, 388 insertions, 82 deletions
diff --git a/textproc/iiimf-server/Makefile b/textproc/iiimf-server/Makefile
index ab67d39ecd7e..4c372edad3b5 100644
--- a/textproc/iiimf-server/Makefile
+++ b/textproc/iiimf-server/Makefile
@@ -10,42 +10,59 @@ PORTVERSION= ${IIIMF_VER:S/_/./g:C/-.*//}
CATEGORIES= textproc
MASTER_SITES= http://www.openi18n.org/download/im-sdk/src/
PKGNAMEPREFIX= iiimf-
-DISTNAME= im-sdk
-DISTFILES= ${DISTNAME}-src-${IIIMF_VER}.tgz
+DISTNAME= im-sdk-src-${IIIMF_VER}
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= kcwu@csie.org
COMMENT= Internet/Intranet Input Method Server Framework
-LIB_DEPENDS= iiimp.0:${PORTSDIR}/textproc/iiimf-protocol-lib
-
-IIIMF_VER= r12_0_1-svn1891
-WRKSRC= ${WRKDIR}/${DISTNAME}-${IIIMF_VER}/iiimsf
-PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}-${IIIMF_VER}
-USE_OPENSSL= yes
-USE_REINPLACE= yes
-USE_AUTOCONF_VER= 259
-USE_AUTOHEADER_VER= 259
-USE_AUTOMAKE_VER= 19
-USE_LIBTOOL_VER= 15
-LIBTOOLFILES= ${WRKSRC}/aclocal.m4
-CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}"
+LIB_DEPENDS= iiimp.0:${PORTSDIR}/textproc/iiimf-protocol-lib
+
+IIIMF_VER= r12_1-svn2002
+USE_RC_SUBR= htt.sh
+USE_REINPLACE= yes
+USE_GMAKE= yes
+USE_GNOME= intltool pkgconfig libxml2
+USE_OPENSSL= yes
+WANT_AUTOCONF_VER=253
+WANT_AUTOHEADER_VER=253
+WANT_AUTOMAKE_VER=15
+WANT_LIBTOOL_VER=15
+
+WRKSRC= ${WRKDIR}/${DISTNAME:S/src-//}/iiimsf
+PATCH_WRKSRC= ${WRKDIR}/${DISTNAME:S/src-//}
.include <bsd.port.pre.mk>
-.if ${ARCH} == "sparc64"
-BROKEN= "Does not build on sparc64"
+.if ${OSVERSION} < 503000
+IGNORE= "It is supported on FreeBSD 5.3 and later"
+.endif
+
+.if ${ARCH} != "i386"
+IGNORE= "${ARCH} is not support."
.endif
+MAKE_ARGS+= LIBTOOL="${LIBTOOL} --tag=CXX"
+UPDATE_ARGS+= ACLOCAL=${ACLOCAL} AUTOMAKE=${AUTOMAKE} \
+ AUTOHEADER=${AUTOHEADER} AUTOCONF=${AUTOCONF} \
+ LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE}
+
post-patch:
${REINPLACE_CMD} -e "s,/usr/lib/im,${PREFIX}/lib/im,g" \
${WRKSRC}/../acfiles/im_common.m4 \
- ${WRKSRC}/configure.ac \
- ${WRKSRC}/src/IMSvrCfg.cpp \
- ${WRKSRC}/src/watchdog.c
+ ${WRKSRC}/src/le.xml.conf
+ ${MV} ${WRKSRC}/htt.xml.conf ${WRKSRC}/htt.xml.conf.sample
+ ${MV} ${WRKSRC}/src/le.xml.conf ${WRKSRC}/src/le.xml.conf.sample
pre-configure:
- cd ${WRKSRC} && ${ACLOCAL} -I ${LOCALBASE}/share/aclocal -I ../acfiles
- ${TOUCH} ${WRKSRC}/config.h.in
+ (cd ${WRKSRC}/.. && ${GMAKE} ${UPDATE_ARGS} update-acfiles)
+ (cd ${WRKSRC}/../acfiles/ && ${TOUCH} ltconfig)
+
+do-configure:
+ (cd ${WRKSRC} && ./autogen.sh --prefix=${PREFIX})
+
+post-configure:
+ ${REINPLACE_CMD} -e "s,\$${prefix}/var,/var,g" \
+ ${WRKSRC}/src/Makefile
.include <bsd.port.post.mk>
diff --git a/textproc/iiimf-server/distinfo b/textproc/iiimf-server/distinfo
index 29d049a782bc..440e49d16220 100644
--- a/textproc/iiimf-server/distinfo
+++ b/textproc/iiimf-server/distinfo
@@ -1,2 +1,2 @@
-MD5 (im-sdk-src-r12_0_1-svn1891.tgz) = 4e51e4fd07391bd957622db0e89aeefe
-SIZE (im-sdk-src-r12_0_1-svn1891.tgz) = 18206118
+MD5 (im-sdk-src-r12_1-svn2002.tar.bz2) = 51f3f10b11f8d4a206e2b190ec36a32a
+SIZE (im-sdk-src-r12_1-svn2002.tar.bz2) = 18141292
diff --git a/textproc/iiimf-server/files/htt.sh.in b/textproc/iiimf-server/files/htt.sh.in
new file mode 100644
index 000000000000..27e47629c743
--- /dev/null
+++ b/textproc/iiimf-server/files/htt.sh.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+# PROVIDE: htt
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD shutdown
+
+prefix=%%PREFIX%%
+
+htt_enable=${htt_enable:-"NO"}
+
+. %%RC_SUBR%%
+
+name="htt"
+rcvar=`set_rcvar`
+command="${prefix}/lib/im/htt"
+
+load_rc_config $name
+command_args="> /dev/null 2>&1 &"
+run_rc_command "$1"
diff --git a/textproc/iiimf-server/files/patch-Makefile b/textproc/iiimf-server/files/patch-Makefile
new file mode 100644
index 000000000000..85df0e345035
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-Makefile
@@ -0,0 +1,19 @@
+--- 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
+
+ CONFIG_CMD = $(ACLOCAL) -I $${acfilesdir} && \
+ $(AUTOHEADER) && \
+@@ -21,7 +22,7 @@
+
+ update-acfiles:
+ cd acfiles && \
+- $(ACLOCAL) && $(AUTOMAKE) --add-missing --copy && libtoolize --force --copy && \
++ $(ACLOCAL) && $(AUTOMAKE) --add-missing --copy && $(LIBTOOLIZE) --force --copy && \
+ rm -f Makefile.in aclocal.m4
+
+ config:
diff --git a/textproc/iiimf-server/files/patch-acfiles_check_sys.m4 b/textproc/iiimf-server/files/patch-acfiles_check_sys.m4
deleted file mode 100644
index 974f159f9098..000000000000
--- a/textproc/iiimf-server/files/patch-acfiles_check_sys.m4
+++ /dev/null
@@ -1,36 +0,0 @@
---- acfiles/check_sys.m4.orig Thu Aug 12 18:01:23 2004
-+++ acfiles/check_sys.m4 Wed Sep 8 16:15:39 2004
-@@ -74,6 +74,11 @@
- ## Checks for thread library.
- AC_CHECK_LIB(pthread, pthread_create, [ HAVE_LIBPTHREAD="yes" ])
- AC_CHECK_LIB(thread, thr_create, [ HAVE_LIBUITHREAD="yes" ])
-+
-+ case "${target}" in
-+ *freebsd*) HAVE_LIBPTHREAD="yes";;
-+ esac
-+
- if test "X${HAVE_LIBPTHREAD}" = "Xyes" ; then
- HAVE_THREAD="pthread"
- elif test "X${HAVE_LIBUITHREAD}" = "Xyes" ; then
-@@ -210,8 +215,6 @@
- COMMON_CXX_CFLAGS="${COMMON_CXX_CFLAGS} -DLinux"
- ;;
- *freebsd*)
-- THREAD_LDFLAGS="-pthread"
-- PTHREAD_LIBS=""
- ;;
- esac
-
-@@ -249,9 +252,9 @@
- THREAD_CXX_CFLAGS="-mt"
- HAVE_THREAD="uithread"
- ;;
-- *freebsd*@gcc:*)
-- THREAD_LDFLAGS="-pthread"
-- THREAD_LIBS=""
-+ *freebsd*)
-+ THREAD_CXX_CFLAGS="${PTHREAD_CFLAGS}"
-+ THREAD_LIBS="${PTHREAD_LIBS}"
- HAVE_THREAD="freebsd-pthread"
- ;;
- *linux*)
diff --git a/textproc/iiimf-server/files/patch-iiimsf-src-Makefile.am b/textproc/iiimf-server/files/patch-iiimsf-src-Makefile.am
deleted file mode 100644
index b6583826f94d..000000000000
--- a/textproc/iiimf-server/files/patch-iiimsf-src-Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
---- iiimsf/src/Makefile.am.orig Sun Sep 5 04:47:50 2004
-+++ iiimsf/src/Makefile.am Sun Sep 5 04:48:50 2004
-@@ -29,5 +29,5 @@
-
- htt_SOURCES = watchdog.c
-
--htt_server_LDADD = $(LIB_DIR)/iml/libiml.la $(IM_LIBDIR)/iiimp/libiiimp.la $(SOCKET_LIBS) $(LIBCRYPT_FLAGS) $(LIBPAM_FLAGS) $(LIBWRAP_FLAGS) $(THREAD_LIBS) $(TLS_LIBS)
-+htt_server_LDADD = $(LIB_DIR)/iml/libiml.la -L$(LOCALBASE)/lib -liiimp $(SOCKET_LIBS) $(LIBCRYPT_FLAGS) $(LIBPAM_FLAGS) $(LIBWRAP_FLAGS) $(THREAD_LIBS) $(TLS_LIBS)
- bin_PROGRAMS = htt_server htt
diff --git a/textproc/iiimf-server/files/patch-iiimsf_Makefile.am b/textproc/iiimf-server/files/patch-iiimsf_Makefile.am
new file mode 100644
index 000000000000..a1398d6ca0e5
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_Makefile.am
@@ -0,0 +1,8 @@
+--- iiimsf/Makefile.am.orig Sat Feb 19 03:33:28 2005
++++ iiimsf/Makefile.am Sat Feb 19 03:33:48 2005
+@@ -2,4 +2,4 @@
+ SUBDIRS = lib src
+
+ confdir = $(XMLCONFDIR)
+-conf_DATA = htt.xml.conf
++conf_DATA = htt.xml.conf.sample src/le.xml.conf.sample
diff --git a/textproc/iiimf-server/files/patch-iiimsf_autogen.sh b/textproc/iiimf-server/files/patch-iiimsf_autogen.sh
new file mode 100644
index 000000000000..fe4fb7cc2707
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_autogen.sh
@@ -0,0 +1,93 @@
+--- iiimsf/autogen.sh Wed Mar 24 06:05:08 2004
++++ iiimsf/autogen.sh Wed Feb 16 16:17:26 2005
+@@ -6,6 +6,14 @@
+
+ DIE=0
+
++LIBTOOL=libtool15
++INTLTOOLIZE=intltoolize15
++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-server/files/patch-iiimsf_src_IMAuth.cpp b/textproc/iiimf-server/files/patch-iiimsf_src_IMAuth.cpp
index b23769d4bed7..85dbd9e5252a 100644
--- a/textproc/iiimf-server/files/patch-iiimsf_src_IMAuth.cpp
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_IMAuth.cpp
@@ -1,11 +1,12 @@
---- iiimsf/src/IMAuth.cpp.orig Sat Dec 6 02:39:41 2003
-+++ iiimsf/src/IMAuth.cpp Sat Dec 6 02:39:50 2003
-@@ -47,7 +47,7 @@
+--- iiimsf/src/IMAuth.cpp Sun Jun 20 06:46:28 2004
++++ iiimsf/src/IMAuth.cpp Wed Feb 16 16:21:47 2005
+@@ -47,7 +47,9 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
--#include <alloca.h>
-+#include <sys/types.h>
++#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
++#endif
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/textproc/iiimf-server/files/patch-iiimsf_src_IMSignal.cpp b/textproc/iiimf-server/files/patch-iiimsf_src_IMSignal.cpp
new file mode 100644
index 000000000000..3073025f3c2c
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_IMSignal.cpp
@@ -0,0 +1,27 @@
+--- iiimsf/src/IMSignal.cpp.orig Sat Oct 16 10:28:13 2004
++++ iiimsf/src/IMSignal.cpp Sun Feb 20 18:43:18 2005
+@@ -1,7 +1,11 @@
+ #include <config.h>
+ #include <sstream>
+ #include <sys/types.h>
++#ifdef __FreeBSD__
++#include <sys/wait.h>
++#else
+ #include <wait.h>
++#endif
+ #include <unistd.h>
+ #ifdef HAVE_SIGNAL
+ #include <signal.h>
+@@ -67,10 +71,8 @@
+ stringstream s;
+ string spid, signum;
+
+- s << getpid();
+- spid = s.str();
+- s << num;
+- signum = s.str();
++ s << getpid() << " " << num;
++ s >> spid >> signum;
+
+ in_segv++;
+
diff --git a/textproc/iiimf-server/files/patch-iiimsf_src_IMSvrCfg.cpp b/textproc/iiimf-server/files/patch-iiimsf_src_IMSvrCfg.cpp
new file mode 100644
index 000000000000..c7b0457f8673
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_IMSvrCfg.cpp
@@ -0,0 +1,28 @@
+--- iiimsf/src/IMSvrCfg.cpp Mon Oct 4 18:07:05 2004
++++ iiimsf/src/IMSvrCfg.cpp Wed Feb 16 20:38:05 2005
+@@ -90,14 +90,14 @@
+ void
+ IMSvrCfg::initialize()
+ {
+- initstr(IMDIR, "IM main directory.", "/usr/lib/im");
++ initstr(IMDIR, "IM main directory.", "/usr/local/lib/im");
+ initstr(BASICLOCALE, "Locale used by default", "C");
+ #ifdef WIN32
+ initstr(IFPATHNAME, "Language Engine module directory",
+ "D:\\WINNT\\System32\\iiimf");
+ #else
+ initstr(IFPATHNAME, "Language Engine module directory",
+- "/usr/lib/im/leif");
++ "/usr/local/lib/im/leif");
+ #endif
+ initstr(IFNAME, "Language Engine name", "");
+ initstr(PORT, "Port or service name", "9010");
+@@ -115,7 +115,7 @@
+ initstr(CONVERSIONKEYS, "Conversion ON keys", "<Ctrl>space");
+ initstr(LABEL, "Label type", "numeric");
+ initbool(SETTRIGGEROFFKEYS, "set trigger off keys", false);
+- // initstr(IMCONFIG, "/usr/lib/im/etc/im.config");
++ // initstr(IMCONFIG, "/usr/local/lib/im/etc/im.config");
+ // initbool(DIRECT_XSUNIM, true);
+ initstr(LOG_FACILITY, "syslog facility", "USER");
+ initstr(LOG_LEVEL, "log level", "NORMAL");
diff --git a/textproc/iiimf-server/files/patch-iiimsf_src_IMXMLUtil.cpp b/textproc/iiimf-server/files/patch-iiimsf_src_IMXMLUtil.cpp
new file mode 100644
index 000000000000..3df7e74e17a2
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_IMXMLUtil.cpp
@@ -0,0 +1,20 @@
+--- iiimsf/src/IMXMLUtil.cpp Mon Oct 4 18:07:05 2004
++++ iiimsf/src/IMXMLUtil.cpp Wed Feb 16 20:38:34 2005
+@@ -78,7 +78,7 @@
+ {
+ IMXMLModifier xml((const char *)argv[1]);
+ IMModuleInfoVec *lev;
+- string mod("/usr/lib/im/leif/freewnnle.so");
++ string mod("/usr/local/lib/im/leif/freewnnle.so");
+ string lang("ja");
+ string out("foo.conf");
+
+@@ -101,7 +101,7 @@
+ }
+ */
+ printf("\n\n*** remove\n");
+- mod = "/usr/lib/im/leif/CannaLE.so";
++ mod = "/usr/local/lib/im/leif/CannaLE.so";
+ xml.removemodule(mod, lang);
+ /*
+ for (IMModuleInfoVec::iterator i = lev->begin (); i != lev->end (); i++) {
diff --git a/textproc/iiimf-server/files/patch-iiimsf_src_Makefile.am b/textproc/iiimf-server/files/patch-iiimsf_src_Makefile.am
new file mode 100644
index 000000000000..eab0bfc200bc
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_Makefile.am
@@ -0,0 +1,34 @@
+--- iiimsf/src/Makefile.am.orig Fri Oct 15 03:39:38 2004
++++ iiimsf/src/Makefile.am Sun Feb 20 19:42:40 2005
+@@ -22,6 +22,7 @@
+ libiiimsf_la_LIBADD = \
+ $(TLS_LIBS) \
+ $(XML_LIBS) \
++ -liiimp \
+ $(NULL)
+
+ sbindir = $(IMBINDIR)
+@@ -56,7 +57,6 @@
+
+ htt_server_LDADD = \
+ $(LIB_DIR)/iml/libiml.la \
+- $(IM_LIBDIR)/iiimp/libiiimp.la \
+ $(SOCKET_LIBS) \
+ $(LIBCRYPT_FLAGS) \
+ $(LIBPAM_FLAGS) \
+@@ -72,7 +72,6 @@
+ $(NULL)
+ iiimf_le_tools_LDADD = \
+ $(XML_LIBS) \
+- -ldl \
+ libiiimsf.la \
+ $(NULL)
+
+@@ -82,6 +81,7 @@
+ iiimf_segv_logger_CFLAGS = \
+ -DLOGDIR="\"$(localstatedir)/log/iiim\"" \
+ -DDATADIR="\"$(gdbcmddir)\"" \
++ -DIMBINDIR="\"$(IMBINDIR)\"" \
+ -g \
+ $(NULL)
+ gdbcmddir = $(datadir)/iiim
diff --git a/textproc/iiimf-server/files/patch-iiimsf_src_iwrap.c b/textproc/iiimf-server/files/patch-iiimsf_src_iwrap.c
new file mode 100644
index 000000000000..c309e37a03f1
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_iwrap.c
@@ -0,0 +1,35 @@
+Index: iiimsf/src/iwrap.c
+diff -u -p iiimsf/src/iwrap.c.orig iiimsf/src/iwrap.c
+--- iiimsf/src/iwrap.c.orig Thu Sep 9 06:17:09 2004
++++ iiimsf/src/iwrap.c Tue Feb 22 15:22:41 2005
+@@ -72,6 +72,15 @@ int permit_access(
+ {
+ #ifdef HAVE_LIBWRAP
+ struct request_info req;
++ struct sockaddr_storage ss;
++ struct sockaddr *pname = (struct sockaddr*) &ss;
++ socklen_t size;
++
++ size = sizeof(ss);
++ if (getpeername(h, pname, &size) < 0)
++ return 0;
++ if (pname->sa_family == AF_UNIX)
++ return 1;
+
+ request_init(&req, RQ_DAEMON, cmdname, RQ_FILE, h, 0);
+ fromhost(&req);
+@@ -177,6 +186,14 @@ authenticate_with_unix(
+ #ifdef HAVE_GETPEEREID
+ /* OpenBSD */
+ git_t gid;
++
++ if (getpeereid(sock, &uid, &gid) != 0) {
++ return 0;
++ }
++
++#elif defined(__FreeBSD__)
++ /* FreeBSD */
++ gid_t gid = -1;
+
+ if (getpeereid(sock, &uid, &gid) != 0) {
+ return 0;
diff --git a/textproc/iiimf-server/files/patch-iiimsf_src_segvlogger.c b/textproc/iiimf-server/files/patch-iiimsf_src_segvlogger.c
new file mode 100644
index 000000000000..0f6f42dcc947
--- /dev/null
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_segvlogger.c
@@ -0,0 +1,24 @@
+--- iiimsf/src/segvlogger.c.orig Sat Oct 16 10:28:13 2004
++++ iiimsf/src/segvlogger.c Sun Feb 20 19:43:06 2005
+@@ -19,6 +19,10 @@
+ #include <time.h>
+ #include <dirent.h>
+
++#ifdef __FreeBSD__
++#include <sys/syslimits.h>
++#endif
++
+ int
+ main(int argc, char **argv)
+ {
+@@ -43,8 +47,8 @@
+ exit(1);
+ }
+
+- snprintf(buffer, 1024, "gdb --batch --quiet --command %s/gdbcmd --pid %d",
+- DATADIR, ppid);
++ snprintf(buffer, 1024, "gdb -batch -q -x %s/gdbcmd %s/htt_server %d",
++ DATADIR, IMBINDIR, ppid);
+
+ if ((fpr = popen(buffer, "r")) != NULL) {
+ char logfile[PATH_MAX];
diff --git a/textproc/iiimf-server/files/patch-iiimsf_src_watchdog.c b/textproc/iiimf-server/files/patch-iiimsf_src_watchdog.c
index 76cf4b93dad1..9ba4519fd547 100644
--- a/textproc/iiimf-server/files/patch-iiimsf_src_watchdog.c
+++ b/textproc/iiimf-server/files/patch-iiimsf_src_watchdog.c
@@ -1,11 +1,20 @@
---- iiimsf/src/watchdog.c.orig Sat Dec 6 02:47:06 2003
-+++ iiimsf/src/watchdog.c Sat Dec 6 02:47:34 2003
-@@ -324,6 +324,8 @@
+--- iiimsf/src/watchdog.c Thu Oct 14 23:07:37 2004
++++ iiimsf/src/watchdog.c Wed Feb 16 19:03:59 2005
+@@ -220,7 +220,7 @@
+ int argc;
+ char **argv;
+ {
+- const char *httpath="/usr/lib/im/htt_server" ; /* SUNWiiimf Only */
++ const char *httpath="/usr/local/lib/im/htt_server" ; /* SUNWiiimf Only */
+ pid_t pgrp;
+ void (*disp)(int);
+ char **new_argv, **pp;
+@@ -361,6 +361,8 @@
if ((pid_t)(-1) == pgrp)
fprintf (stderr,"cannot set session id");
+#elif defined(__FreeBSD__)
-+ setsid();
++ pgrp = setsid();
#else /* !SunOS */
pgrp = setpgrp();
#endif /* !SunOS */
diff --git a/textproc/iiimf-server/pkg-plist b/textproc/iiimf-server/pkg-plist
index 2fadb979635f..67408775f54c 100644
--- a/textproc/iiimf-server/pkg-plist
+++ b/textproc/iiimf-server/pkg-plist
@@ -1,4 +1,19 @@
-lib/im/htt_server
+bin/iiimf-le-tools
+etc/iiim/htt.xml.conf.sample
+etc/iiim/le.xml.conf.sample
lib/im/htt
-lib/im/htt.conf
-@dirrm lib/im
+lib/im/htt_server
+libexec/iiimf-segv-logger
+share/iiim/gdbcmd
+@dirrm etc/iiim
+@dirrm share/iiim
+@unexec rmdir %D/lib/im > /dev/null 2>&1 || true
+@exec mkdir -p /var/log/iiim
+@unexec rm -f /var/log/iiim/*.log
+@unexec rmdir /var/log/iiim > /dev/null 2>&1 || true
+@exec mkdir -p /var/run/iiim
+@unexec rm -f /var/run/iiim/.iiimp-unix/[0-9]* > /dev/null 2>&1 || true
+@unexec rm -f /var/run/iiim/.iiimp-unix-*/[0-9]* > /dev/null 2>&1 || true
+@unexec rmdir /var/run/iiim/.iiimp-unix > /dev/null 2>&1 || true
+@unexec rmdir /var/run/iiim/.iiimp-unix-* > /dev/null 2>&1 || true
+@unexec rmdir /var/run/iiim > /dev/null 2>&1 || true