aboutsummaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-07-13 02:38:15 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-07-13 02:38:15 +0000
commit8cdca7747387e5178d0b260d322418a3049630ac (patch)
tree6dd19b3551c4d8053d4be65f7399d65751227d67 /net-im
parent800b8ce98eafe25b4bc93ef9b69dabcc2d312b32 (diff)
downloadports-8cdca7747387e5178d0b260d322418a3049630ac.tar.gz
ports-8cdca7747387e5178d0b260d322418a3049630ac.zip
This is an update of the net/jabberd port to version 2.0.3 (vendor
string "2.0s3") which fixes some serious memory leaks and other significant bugs. This update also replaces the rc.d script with a new version that uses the rc.subr framework. I was able to successfully compile the port with all of the WITH_* knobs, but only have the means to test WITH_POSTGRESQL (which worked as expected). commiter says: - Added extra line to files/patch-util::util.h (4.x fix) - Changed --with-extra-include-path statements to work around mysql inclusion and db41 exclusion. - Added --disable- for options not choosen. PR: ports/68967 Submitted by: Kirk Strauser <kirk@strauser.com>
Notes
Notes: svn path=/head/; revision=113520
Diffstat (limited to 'net-im')
-rw-r--r--net-im/jabberd/Makefile56
-rw-r--r--net-im/jabberd/distinfo4
-rw-r--r--net-im/jabberd/files/jabberd.sh69
-rw-r--r--net-im/jabberd/files/patch-configure20
-rw-r--r--net-im/jabberd/files/patch-util.h11
-rw-r--r--net-im/jabberd/pkg-plist4
6 files changed, 95 insertions, 69 deletions
diff --git a/net-im/jabberd/Makefile b/net-im/jabberd/Makefile
index 4b987d8f14a0..93fab0c20918 100644
--- a/net-im/jabberd/Makefile
+++ b/net-im/jabberd/Makefile
@@ -6,26 +6,27 @@
#
PORTNAME= jabberd
-PORTVERSION= 2.0.2
+PORTVERSION= 2.0.3
CATEGORIES= net
MASTER_SITES= http://www.jabberstudio.org/files/jabberd2/
-DISTNAME= ${PORTNAME}-2.0s2
+DISTNAME= ${PORTNAME}-2.0s3
DIST_SUBDIR= jabber
MAINTAINER= ports@FreeBSD.org
COMMENT= Online presence and instant messaging server
+LIB_DEPENDS= idn.14:${PORTSDIR}/devel/libidn
+
GNU_CONFIGURE= yes
USE_OPENSSL= yes
USE_ICONV= yes
+USE_RC_SUBR= yes
CONFIGURE_ARGS= --localstatedir=/var \
- --with-libiconv-prefix=${LOCALBASE} \
- --with-openssl=${OPENSSLBASE} \
- --enable-storage='${STORAGE}' \
- --enable-authreg='${AUTHREG}'
+ --enable-ssl \
+ --with-extra-include-path=${LOCALBASE}/include${EIP} \
+ --with-extra-library-path=${LOCALBASE}/lib${ELP}
-STORAGE+= fs
-AUTHREG+= anon pipe
+CONFIGURE_ARGS+=--enable-fs
.if !defined(WITHOUT_DEBUG)
CONFIGURE_ARGS+=--enable-debug
@@ -33,34 +34,40 @@ CONFIGURE_ARGS+=--enable-debug
.if defined(WITH_POSTGRESQL)
LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
-CONFIGURE_ARGS+=--with-pgsql=${LOCALBASE}/include:${LOCALBASE}/lib
-STORAGE+= pgsql
-AUTHREG+= pgsql
+CONFIGURE_ARGS+=--enable-pgsql
+.else
+CONFIGURE_ARGS+=--disable-pgsql
.endif
.if defined(WITH_MYSQL)
USE_MYSQL= yes
-CONFIGURE_ARGS+=--with-mysql=${LOCALBASE}/include/mysql:${LOCALBASE}/lib/mysql
-STORAGE+= mysql
-AUTHREG+= mysql
+CONFIGURE_ARGS+=--enable-mysql
+EIP+=:${LOCALBASE}/include/mysql
+ELP+=:${LOCALBASE}/lib/mysql
+.else
+CONFIGURE_ARGS+=--disable-mysql
.endif
.if defined(WITH_BDB)
LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41
-CONFIGURE_ARGS+=--with-berkeley-db=${LOCALBASE}/include/db41:${LOCALBASE}/lib
-STORAGE+= db
-AUTHREG+= db
+CONFIGURE_ARGS+=--enable-db
+CONFIGURE_ARGS+=--oldincludedir=/nonexistant
+EIP+=:${LOCALBASE}/include/db41
+.else
+CONFIGURE_ARGS+=--disable-db
.endif
.if defined(WITH_LDAP)
USE_OPENLDAP= yes
-CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
-AUTHREG+= ldap
+CONFIGURE_ARGS+=--enable-ldap
+.else
+CONFIGURE_ARGS+=--disable-ldap
.endif
.if defined(WITH_PAM)
-CONFIGURE_ARGS+=--with-pam
-AUTHREG+= pam
+CONFIGURE_ARGS+=--enable-pam
+.else
+CONFIGURE_ARGS+=--disable-pam
.endif
MAN8= c2s.8 jabberd.8 resolver.8 router.8 s2s.8 sm.8
@@ -79,11 +86,8 @@ pre-install:
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
- ${INSTALL_DATA} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh-dist
- @if [ ! -f ${PREFIX}/etc/rc.d/jabberd.sh ]; then \
- ${ECHO} "Installing ${PREFIX}/etc/rc.d/jabberd.sh startup file."; \
- ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh; \
- fi
+ ${ECHO} "Installing ${PREFIX}/etc/rc.d/jabberd.sh startup file."
+ ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh
@${CHOWN} -R jabber:jabber ${PREFIX}/etc/jabberd
@${FIND} ${PREFIX}/etc/jabberd -type d | ${XARGS} ${CHMOD} 750
@${FIND} ${PREFIX}/etc/jabberd -type f | ${XARGS} ${CHMOD} 660
diff --git a/net-im/jabberd/distinfo b/net-im/jabberd/distinfo
index 19d9bba71164..c2636717bc80 100644
--- a/net-im/jabberd/distinfo
+++ b/net-im/jabberd/distinfo
@@ -1,2 +1,2 @@
-MD5 (jabber/jabberd-2.0s2.tar.gz) = 0f794b00e480a7b4c36d858d4d0095bf
-SIZE (jabber/jabberd-2.0s2.tar.gz) = 780944
+MD5 (jabber/jabberd-2.0s3.tar.gz) = c15f8f07cb2ee499cd21c0b883b9f353
+SIZE (jabber/jabberd-2.0s3.tar.gz) = 705819
diff --git a/net-im/jabberd/files/jabberd.sh b/net-im/jabberd/files/jabberd.sh
index c7dee3844214..ba4d7d177121 100644
--- a/net-im/jabberd/files/jabberd.sh
+++ b/net-im/jabberd/files/jabberd.sh
@@ -1,37 +1,48 @@
-#! /bin/sh
+#!/bin/sh
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jabberd\.sh\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
+# Start or stop jabberd
+# $FreeBSD: /tmp/pcvs/ports/net-im/jabberd/files/Attic/jabberd.sh,v 1.3 2004-07-13 02:38:15 edwin Exp $
-USER="jabber"
-RUNDIR="/var/jabberd/pid"
-HOSTNAME=`/bin/hostname`
+# PROVIDE: jabberd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
+#
+prefix=/usr/local
-test -x ${PREFIX}/bin/jabberd || exit 1
+# Define these jabberd_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/gkrellmd
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+jabberd_chdir="/var/jabberd/pid"
+jabberd_enable="NO"
+jabberd_flags=""
+jabberd_user="jabber"
-export PATH=/sbin:/bin:/usr/bin:${PREFIX}/bin:${PREFIX}/sbin
-umask 077
+. /etc/rc.subr
-cd ${RUNDIR} || exit
+name="jabberd"
+rcvar=`set_rcvar`
+command="/usr/local/bin/jabberd"
+command_args="&"
+procname="/usr/local/bin/router"
+
+load_rc_config $name
+
+pidfile="${jabberd_chdir}/router.pid"
case "$1" in
-start)
- su -f -m ${USER} -c ${PREFIX}/bin/jabberd &
- echo -n ' jabberd'
- ;;
-stop)
- killall -u ${USER} jabberd c2s resolver router s2s sm
- for file in c2s resolver router s2s sm
- do
- rm -f ${RUNDIR}/$file.pid
- done
- echo -n ' jabberd'
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
+ stop)
+ echo "Stopping Jabber2"
+ killall -u ${jabberd_user} jabberd c2s resolver router s2s sm
+ for file in c2s resolver router s2s sm; do
+ rm -f ${jabberd_chdir}/$file.pid
+ done
+ ;;
+ *)
+ run_rc_command "$1"
+ ;;
esac
-
-exit 0
diff --git a/net-im/jabberd/files/patch-configure b/net-im/jabberd/files/patch-configure
index 3a4c2e90c8bb..ac6637e6d87d 100644
--- a/net-im/jabberd/files/patch-configure
+++ b/net-im/jabberd/files/patch-configure
@@ -1,11 +1,11 @@
---- configure.orig Sun Feb 22 13:14:13 2004
-+++ configure Sun Feb 22 13:14:42 2004
-@@ -23709,7 +23709,7 @@
- ;;
- esac
+--- configure.orig Mon Jul 12 10:15:17 2004
++++ configure Mon Jul 12 10:15:26 2004
+@@ -20575,7 +20575,7 @@
+ done
-- for db_libname in db-4.2 db-4.1 db-4 db4 db; do
-+ for db_libname in db-4.2 db-4.1 db-4 db4 db41 db; do
- # We generate a separate cache variable for each prefix and libname
- # we search under. That way, we avoid caching information that
- # changes if the user runs `configure' with a different set of
+ if test "x-$ac_cv_header_db_h" = "x-yes" ; then
+- for lib in db-4.2 db-4.1 db-4 db4 db ; do
++ for lib in db-4.2 db-4.1 db-4 db4 db41 ; do
+ if test "x-$have_db_version" != "x-yes" ; then
+ echo "$as_me:$LINENO: checking for db_create in -l$lib" >&5
+ echo $ECHO_N "checking for db_create in -l$lib... $ECHO_C" >&6
diff --git a/net-im/jabberd/files/patch-util.h b/net-im/jabberd/files/patch-util.h
new file mode 100644
index 000000000000..dd73e70867aa
--- /dev/null
+++ b/net-im/jabberd/files/patch-util.h
@@ -0,0 +1,11 @@
+--- util/util.h.orig Mon May 31 16:31:06 2004
++++ util/util.h Mon Jul 12 10:29:58 2004
+@@ -30,6 +30,8 @@
+ #include <time.h>
+ #include <errno.h>
+ #include <assert.h>
++#include <sys/types.h>
++#include <sys/socket.h>
+
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
diff --git a/net-im/jabberd/pkg-plist b/net-im/jabberd/pkg-plist
index 17c5e6b23809..8c4bd2f35dbc 100644
--- a/net-im/jabberd/pkg-plist
+++ b/net-im/jabberd/pkg-plist
@@ -20,8 +20,8 @@ etc/jabberd/s2s.xml.dist
etc/jabberd/sm.xml.dist
@unexec if cmp -s %D/etc/jabberd/templates/roster.xml %D/etc/jabberd/templates/roster.xml.dist; then rm -f %D/etc/jabberd/templates/roster.xml; fi
etc/jabberd/templates/roster.xml.dist
-@unexec if cmp -s %D/etc/rc.d/jabberd.sh %D/etc/rc.d/jabberd.sh-dist; then rm -f %D/etc/rc.d/jabberd.sh; fi
-etc/rc.d/jabberd.sh-dist
+@unexec if cmp -s %D/etc/rc.d/jabberd.sh %D/etc/rc.d/jabberd.sh; then rm -f %D/etc/rc.d/jabberd.sh; fi
+etc/rc.d/jabberd.sh
share/jabberd/db-setup.mysql
share/jabberd/db-setup.pgsql
@dirrm share/jabberd