aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/spread/Makefile109
-rw-r--r--net/spread/distinfo1
-rw-r--r--net/spread/files/patch-FreeBSD_makefile36
-rw-r--r--net/spread/pkg-comment1
-rw-r--r--net/spread/pkg-descr12
-rw-r--r--net/spread/pkg-plist59
-rw-r--r--net/spread/scripts/createusergroup37
-rw-r--r--net/spread4/Makefile109
-rw-r--r--net/spread4/distinfo1
-rw-r--r--net/spread4/files/patch-FreeBSD_makefile36
-rw-r--r--net/spread4/pkg-comment1
-rw-r--r--net/spread4/pkg-descr12
-rw-r--r--net/spread4/pkg-plist59
-rw-r--r--net/spread4/scripts/createusergroup37
15 files changed, 511 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index e71b1659a738..e14a9baca073 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -392,6 +392,7 @@
SUBDIR += sntop
SUBDIR += socks5
SUBDIR += spat
+ SUBDIR += spread
SUBDIR += ssldump
SUBDIR += sting
SUBDIR += stone
diff --git a/net/spread/Makefile b/net/spread/Makefile
new file mode 100644
index 000000000000..dd09105f58ae
--- /dev/null
+++ b/net/spread/Makefile
@@ -0,0 +1,109 @@
+# New ports collection makefile for: spread
+# Date created: 11 June 2001
+# Whom: Anders Nordby <anders@fix.no>
+#
+# $FreeBSD$
+#
+
+PORTNAME= spread
+PORTVERSION= 3.15.2
+CATEGORIES= net perl5 java
+MASTER_SITES=
+DISTNAME= ${PORTNAME}-src-${PORTVERSION}
+
+MAINTAINER= anders@fix.no
+
+.if defined(WITH_JAVA_LIB)
+BUILD_DEPENDS= ${LOCALBASE}/jdk1.1.8/bin/javac:${PORTSDIR}/java/jdk
+.endif
+
+MAKEFILE= FreeBSD_makefile
+
+MAN1= spread.1
+MAN3= SP_connect.3 SP_disconnect.3 SP_equal_group_ids.3 SP_error.3 \
+ SP_join.3 SP_leave.3 SP_multicast.3 SP_multigroup_multicast.3 \
+ SP_multigroup_scat_multicast.3 SP_poll.3 SP_receive.3 \
+ SP_scat_multicast.3 SP_scat_receive.3
+
+USE_PERL5= yes
+NO_CDROM= "See the license: http://www.spread.org/license/"
+#NO_PACKAGE= "User and group needs to be created"
+RESTRICTED= "See the license: http://www.spread.org/license/"
+INSTALLS_SHLIB= yes
+
+JAVASUBDIR= jdk1.1.8
+JAVADIR= ${PREFIX}/${JAVASUBDIR}
+JAVALIBDIR= ${JAVADIR}/lib
+DOCDIR= ${PREFIX}/share/doc/${PORTNAME}
+
+.if defined(WITH_JAVA_LIB)
+PLIST_SUB+= JAVALIB='' JAVALIBDIR=${JAVASUBDIR}/lib
+.if defined(NOPORTDOCS)
+PLIST_SUB+= JAVALIB_DOCS='@comment '
+.else
+PLIST_SUB+= JAVALIB_DOCS=''
+.endif
+.else
+PLIST_SUB+= JAVALIB='@comment ' JAVALIB_DOCS='@comment ' JAVALIBDIR=''
+.endif
+
+MAKE_ARGS+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS}
+
+.include <bsd.port.pre.mk>
+
+.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
+IGNORE='You must fetch the source manually from http://www.cnds.jhu.edu/download/download_spread.cgi and copy the file to ${DISTDIR}. Then run make again.'
+.endif
+
+post-build:
+ (cd ${WRKSRC}/perl/Spread-3.15.2-1.03; ${PERL} Makefile.PL; ${MAKE})
+.if defined(WITH_JAVA_LIB)
+ (cd ${WRKSRC}/java; ${JAVADIR}/bin/javac \
+ splib_src/*.java -d ./)
+.endif
+
+do-install:
+ @${SH} ${SCRIPTDIR}/createusergroup
+ ${INSTALL_PROGRAM} ${WRKSRC}/spread ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${WRKSRC}/flooder ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/monitor ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/user ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/tuser ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/libsp.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/libtsp.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/sp.h ${PREFIX}/include
+ ${INSTALL_DATA} ${WRKSRC}/sample.spread.conf ${PREFIX}/etc/spread.conf.example
+ ${INSTALL_MAN} ${WRKSRC}/docs/spread.1 ${PREFIX}/man/man1
+ (cd ${WRKSRC}/perl/Spread-3.15.2-1.03 && ${MAKE} install)
+ ${GZIP_CMD} ${GZIP} ${LOCALBASE}/lib/perl5/${PERL_VERSION}/man/man3/Spread.3
+.if defined(WITH_JAVA_LIB)
+ ${INSTALL} -d -o root -g wheel -m 0755 ${JAVALIBDIR}/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/java/spread/*.class ${JAVALIBDIR}/${PORTNAME}
+.endif
+.for f in ${MAN3}
+ ${INSTALL_MAN} ${WRKSRC}/docs/${f} ${PREFIX}/man/man3
+.endfor
+.if !defined(NOPORTDOCS)
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/Readme.txt ${DOCDIR}
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/perl
+ ${INSTALL_DATA} ${WRKSRC}/perl/Spread-3.15.2-1.03/README ${DOCDIR}/perl
+ ${INSTALL_DATA} ${WRKSRC}/perl/Spread-3.15.2-1.03/test.pl ${DOCDIR}/perl
+.if defined(WITH_JAVA_LIB)
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java
+ ${INSTALL_DATA} ${WRKSRC}/java/readme.txt ${DOCDIR}/java
+ ${INSTALL_DATA} ${WRKSRC}/java/Flooder.java ${DOCDIR}/java
+ ${INSTALL_DATA} ${WRKSRC}/java/User.java ${DOCDIR}/java
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java/html
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java/html/spread
+ ${INSTALL_DATA} ${WRKSRC}/java/docs/*.html ${DOCDIR}/java/html
+ ${INSTALL_DATA} ${WRKSRC}/java/docs/stylesheet.css ${DOCDIR}/java/html
+ ${INSTALL_DATA} ${WRKSRC}/java/docs/spread/*.html ${DOCDIR}/java/html/spread
+.endif
+.endif
+ @${ECHO} "================================================================================"
+ @${ECHO} "NB: Create the directory /var/run/spread, with write permissions for the spread"
+ @${ECHO} "user/group. The spread daemon will chroot there, and fail if it can't."
+ @${ECHO} "================================================================================"
+
+.include <bsd.port.post.mk>
diff --git a/net/spread/distinfo b/net/spread/distinfo
new file mode 100644
index 000000000000..7495d08cb6ce
--- /dev/null
+++ b/net/spread/distinfo
@@ -0,0 +1 @@
+MD5 (spread-src-3.15.2.tar.gz) = 41a974ba00496362ce3bc733af41dc46
diff --git a/net/spread/files/patch-FreeBSD_makefile b/net/spread/files/patch-FreeBSD_makefile
new file mode 100644
index 000000000000..99a446859799
--- /dev/null
+++ b/net/spread/files/patch-FreeBSD_makefile
@@ -0,0 +1,36 @@
+--- FreeBSD_makefile.orig Mon Oct 2 16:09:34 2000
++++ FreeBSD_makefile Mon Jun 11 02:10:13 2001
+@@ -1,4 +1,3 @@
+-CC=gcc
+ MAKEFILE=FreeBSD_makefile
+ YACC = bison -y
+ LEX = flex
+@@ -8,8 +7,8 @@
+ #SRCDIRS= dir1 dir2
+ #INCL=$(SRCDIRS:%=-I%)
+ #CFLAGS = -O does not always work on BSDI pc
+-CFLAGS = -ansi -c -Wall -O3
+-TCFLAGS = $(CFLAGS) -pthread
++CFLAGS+= -ansi -c
++TCFLAGS = $(CFLAGS) $(PTHREAD_LIBS)
+
+ COBJS = lex.yy.o y.tab.o configuration.o skiplist.o
+ OBJS = alarm.o events.o memory.o membership.o data_link.o network.o status.o log.o flow_control.o message.o
+@@ -28,7 +27,7 @@
+ $(CC) -o user user.o libsp.a
+
+ tuser : user.to libtsp.a
+- $(CC) -pthread -o tuser user.to libtsp.a
++ $(CC) $(PTHREAD_LIBS) -o tuser user.to libtsp.a
+
+ simple_user : simple_user.o libsp.a
+ $(CC) -o simple_user simple_user.o libsp.a
+@@ -64,7 +63,7 @@
+ $(CC) $(CFLAGS) $*.c
+
+ .c.to:
+- $(CC) $(TCFLAGS) -D_THREAD_SAFE -D_REENTRANT $*.c -o $*.to
++ $(CC) $(TCFLAGS) $(PTHREAD_CFLAGS) -D_REENTRANT $*.c -o $*.to
+
+ depend:
+ cp $(MAKEFILE) $(MAKEFILE).bak \
diff --git a/net/spread/pkg-comment b/net/spread/pkg-comment
new file mode 100644
index 000000000000..51bf80b78bd6
--- /dev/null
+++ b/net/spread/pkg-comment
@@ -0,0 +1 @@
+The Spread Wide Area Group Communication System, a network toolkit
diff --git a/net/spread/pkg-descr b/net/spread/pkg-descr
new file mode 100644
index 000000000000..5725b77ac40d
--- /dev/null
+++ b/net/spread/pkg-descr
@@ -0,0 +1,12 @@
+Spread is a toolkit and daemon that provide multicast and group communications
+support to applications across local and wide area networks. Spread is designed
+to make it easy to write groupware, networked multimedia, reliable server, and
+collaborative work applications.
+
+Spread consists of a library that user applications are linked with, a binary
+daemon which runs on each computer that is part of the processor group, and
+various utility and demonstration programs.
+
+WWW: http://www.spread.org/
+
+- Anders Nordby <anders@fix.no>
diff --git a/net/spread/pkg-plist b/net/spread/pkg-plist
new file mode 100644
index 000000000000..2ace5e62ee2f
--- /dev/null
+++ b/net/spread/pkg-plist
@@ -0,0 +1,59 @@
+sbin/spread
+bin/flooder
+bin/monitor
+bin/user
+bin/tuser
+include/sp.h
+etc/spread.conf.example
+lib/libsp.a
+lib/libtsp.a
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/Spread.so
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/Spread.bs
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/autosplit.ix
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/.packlist
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Spread.pm
+@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread 2>/dev/null || true
+lib/perl5/%%PERL_VERSION%%/man/man3/Spread.3.gz
+%%JAVALIB%%%%JAVALIBDIR%%/spread/AdvancedMessageListener.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/BasicMessageListener.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/GroupID.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/MembershipInfo.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/MessageFactory.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadConnection$Listener.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadConnection.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadException.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadGroup.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadMessage.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadVersion.class
+%%JAVALIB%%@dirrm %%JAVALIBDIR%%/spread
+%%JAVALIB_DOCS%%share/doc/spread/java/readme.txt
+%%JAVALIB_DOCS%%share/doc/spread/java/Flooder.java
+%%JAVALIB_DOCS%%share/doc/spread/java/User.java
+%%JAVALIB_DOCS%%share/doc/spread/java/html/allclasses-frame.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/deprecated-list.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/help-doc.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/index-all.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/index.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/java.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/overview-tree.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/packages.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/serialized-form.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/stylesheet.css
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/AdvancedMessageListener.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/BasicMessageListener.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/GroupID.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/MembershipInfo.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/MessageFactory.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadConnection.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadException.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadGroup.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadMessage.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadVersion.html
+%%JAVALIB_DOCS%%@dirrm share/doc/spread/java/html/spread
+%%JAVALIB_DOCS%%@dirrm share/doc/spread/java/html
+%%JAVALIB_DOCS%%@dirrm share/doc/spread/java
+%%PORTDOCS%%share/doc/spread/perl/README
+%%PORTDOCS%%share/doc/spread/perl/test.pl
+%%PORTDOCS%%share/doc/spread/Readme.txt
+%%PORTDOCS%%@dirrm share/doc/spread/perl
+%%PORTDOCS%%@dirrm share/doc/spread
diff --git a/net/spread/scripts/createusergroup b/net/spread/scripts/createusergroup
new file mode 100644
index 000000000000..a34b27d5de10
--- /dev/null
+++ b/net/spread/scripts/createusergroup
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+PATH=/bin:/usr/sbin
+
+USER=spread
+USER_HOMEDIR=/nonexistent
+GROUP=spread
+
+if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+else
+ if pw groupadd ${GROUP}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+fi
+
+if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${USER_HOMEDIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${USER_HOMEDIR}\"."
+ else
+ echo "Changing home directory of \"${USER}\" to \"${USER_HOMEDIR}\" failed."
+ exit 1
+ fi
+else
+ if pw useradd ${USER} -g ${GROUP} -h - \
+ -d ${USER_HOMEDIR} -s /sbin/nologin -c "Spread User"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ fi
+fi
diff --git a/net/spread4/Makefile b/net/spread4/Makefile
new file mode 100644
index 000000000000..dd09105f58ae
--- /dev/null
+++ b/net/spread4/Makefile
@@ -0,0 +1,109 @@
+# New ports collection makefile for: spread
+# Date created: 11 June 2001
+# Whom: Anders Nordby <anders@fix.no>
+#
+# $FreeBSD$
+#
+
+PORTNAME= spread
+PORTVERSION= 3.15.2
+CATEGORIES= net perl5 java
+MASTER_SITES=
+DISTNAME= ${PORTNAME}-src-${PORTVERSION}
+
+MAINTAINER= anders@fix.no
+
+.if defined(WITH_JAVA_LIB)
+BUILD_DEPENDS= ${LOCALBASE}/jdk1.1.8/bin/javac:${PORTSDIR}/java/jdk
+.endif
+
+MAKEFILE= FreeBSD_makefile
+
+MAN1= spread.1
+MAN3= SP_connect.3 SP_disconnect.3 SP_equal_group_ids.3 SP_error.3 \
+ SP_join.3 SP_leave.3 SP_multicast.3 SP_multigroup_multicast.3 \
+ SP_multigroup_scat_multicast.3 SP_poll.3 SP_receive.3 \
+ SP_scat_multicast.3 SP_scat_receive.3
+
+USE_PERL5= yes
+NO_CDROM= "See the license: http://www.spread.org/license/"
+#NO_PACKAGE= "User and group needs to be created"
+RESTRICTED= "See the license: http://www.spread.org/license/"
+INSTALLS_SHLIB= yes
+
+JAVASUBDIR= jdk1.1.8
+JAVADIR= ${PREFIX}/${JAVASUBDIR}
+JAVALIBDIR= ${JAVADIR}/lib
+DOCDIR= ${PREFIX}/share/doc/${PORTNAME}
+
+.if defined(WITH_JAVA_LIB)
+PLIST_SUB+= JAVALIB='' JAVALIBDIR=${JAVASUBDIR}/lib
+.if defined(NOPORTDOCS)
+PLIST_SUB+= JAVALIB_DOCS='@comment '
+.else
+PLIST_SUB+= JAVALIB_DOCS=''
+.endif
+.else
+PLIST_SUB+= JAVALIB='@comment ' JAVALIB_DOCS='@comment ' JAVALIBDIR=''
+.endif
+
+MAKE_ARGS+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS}
+
+.include <bsd.port.pre.mk>
+
+.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
+IGNORE='You must fetch the source manually from http://www.cnds.jhu.edu/download/download_spread.cgi and copy the file to ${DISTDIR}. Then run make again.'
+.endif
+
+post-build:
+ (cd ${WRKSRC}/perl/Spread-3.15.2-1.03; ${PERL} Makefile.PL; ${MAKE})
+.if defined(WITH_JAVA_LIB)
+ (cd ${WRKSRC}/java; ${JAVADIR}/bin/javac \
+ splib_src/*.java -d ./)
+.endif
+
+do-install:
+ @${SH} ${SCRIPTDIR}/createusergroup
+ ${INSTALL_PROGRAM} ${WRKSRC}/spread ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${WRKSRC}/flooder ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/monitor ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/user ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/tuser ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/libsp.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/libtsp.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/sp.h ${PREFIX}/include
+ ${INSTALL_DATA} ${WRKSRC}/sample.spread.conf ${PREFIX}/etc/spread.conf.example
+ ${INSTALL_MAN} ${WRKSRC}/docs/spread.1 ${PREFIX}/man/man1
+ (cd ${WRKSRC}/perl/Spread-3.15.2-1.03 && ${MAKE} install)
+ ${GZIP_CMD} ${GZIP} ${LOCALBASE}/lib/perl5/${PERL_VERSION}/man/man3/Spread.3
+.if defined(WITH_JAVA_LIB)
+ ${INSTALL} -d -o root -g wheel -m 0755 ${JAVALIBDIR}/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/java/spread/*.class ${JAVALIBDIR}/${PORTNAME}
+.endif
+.for f in ${MAN3}
+ ${INSTALL_MAN} ${WRKSRC}/docs/${f} ${PREFIX}/man/man3
+.endfor
+.if !defined(NOPORTDOCS)
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/Readme.txt ${DOCDIR}
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/perl
+ ${INSTALL_DATA} ${WRKSRC}/perl/Spread-3.15.2-1.03/README ${DOCDIR}/perl
+ ${INSTALL_DATA} ${WRKSRC}/perl/Spread-3.15.2-1.03/test.pl ${DOCDIR}/perl
+.if defined(WITH_JAVA_LIB)
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java
+ ${INSTALL_DATA} ${WRKSRC}/java/readme.txt ${DOCDIR}/java
+ ${INSTALL_DATA} ${WRKSRC}/java/Flooder.java ${DOCDIR}/java
+ ${INSTALL_DATA} ${WRKSRC}/java/User.java ${DOCDIR}/java
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java/html
+ ${INSTALL} -d -o root -g wheel -m 0755 ${DOCDIR}/java/html/spread
+ ${INSTALL_DATA} ${WRKSRC}/java/docs/*.html ${DOCDIR}/java/html
+ ${INSTALL_DATA} ${WRKSRC}/java/docs/stylesheet.css ${DOCDIR}/java/html
+ ${INSTALL_DATA} ${WRKSRC}/java/docs/spread/*.html ${DOCDIR}/java/html/spread
+.endif
+.endif
+ @${ECHO} "================================================================================"
+ @${ECHO} "NB: Create the directory /var/run/spread, with write permissions for the spread"
+ @${ECHO} "user/group. The spread daemon will chroot there, and fail if it can't."
+ @${ECHO} "================================================================================"
+
+.include <bsd.port.post.mk>
diff --git a/net/spread4/distinfo b/net/spread4/distinfo
new file mode 100644
index 000000000000..7495d08cb6ce
--- /dev/null
+++ b/net/spread4/distinfo
@@ -0,0 +1 @@
+MD5 (spread-src-3.15.2.tar.gz) = 41a974ba00496362ce3bc733af41dc46
diff --git a/net/spread4/files/patch-FreeBSD_makefile b/net/spread4/files/patch-FreeBSD_makefile
new file mode 100644
index 000000000000..99a446859799
--- /dev/null
+++ b/net/spread4/files/patch-FreeBSD_makefile
@@ -0,0 +1,36 @@
+--- FreeBSD_makefile.orig Mon Oct 2 16:09:34 2000
++++ FreeBSD_makefile Mon Jun 11 02:10:13 2001
+@@ -1,4 +1,3 @@
+-CC=gcc
+ MAKEFILE=FreeBSD_makefile
+ YACC = bison -y
+ LEX = flex
+@@ -8,8 +7,8 @@
+ #SRCDIRS= dir1 dir2
+ #INCL=$(SRCDIRS:%=-I%)
+ #CFLAGS = -O does not always work on BSDI pc
+-CFLAGS = -ansi -c -Wall -O3
+-TCFLAGS = $(CFLAGS) -pthread
++CFLAGS+= -ansi -c
++TCFLAGS = $(CFLAGS) $(PTHREAD_LIBS)
+
+ COBJS = lex.yy.o y.tab.o configuration.o skiplist.o
+ OBJS = alarm.o events.o memory.o membership.o data_link.o network.o status.o log.o flow_control.o message.o
+@@ -28,7 +27,7 @@
+ $(CC) -o user user.o libsp.a
+
+ tuser : user.to libtsp.a
+- $(CC) -pthread -o tuser user.to libtsp.a
++ $(CC) $(PTHREAD_LIBS) -o tuser user.to libtsp.a
+
+ simple_user : simple_user.o libsp.a
+ $(CC) -o simple_user simple_user.o libsp.a
+@@ -64,7 +63,7 @@
+ $(CC) $(CFLAGS) $*.c
+
+ .c.to:
+- $(CC) $(TCFLAGS) -D_THREAD_SAFE -D_REENTRANT $*.c -o $*.to
++ $(CC) $(TCFLAGS) $(PTHREAD_CFLAGS) -D_REENTRANT $*.c -o $*.to
+
+ depend:
+ cp $(MAKEFILE) $(MAKEFILE).bak \
diff --git a/net/spread4/pkg-comment b/net/spread4/pkg-comment
new file mode 100644
index 000000000000..51bf80b78bd6
--- /dev/null
+++ b/net/spread4/pkg-comment
@@ -0,0 +1 @@
+The Spread Wide Area Group Communication System, a network toolkit
diff --git a/net/spread4/pkg-descr b/net/spread4/pkg-descr
new file mode 100644
index 000000000000..5725b77ac40d
--- /dev/null
+++ b/net/spread4/pkg-descr
@@ -0,0 +1,12 @@
+Spread is a toolkit and daemon that provide multicast and group communications
+support to applications across local and wide area networks. Spread is designed
+to make it easy to write groupware, networked multimedia, reliable server, and
+collaborative work applications.
+
+Spread consists of a library that user applications are linked with, a binary
+daemon which runs on each computer that is part of the processor group, and
+various utility and demonstration programs.
+
+WWW: http://www.spread.org/
+
+- Anders Nordby <anders@fix.no>
diff --git a/net/spread4/pkg-plist b/net/spread4/pkg-plist
new file mode 100644
index 000000000000..2ace5e62ee2f
--- /dev/null
+++ b/net/spread4/pkg-plist
@@ -0,0 +1,59 @@
+sbin/spread
+bin/flooder
+bin/monitor
+bin/user
+bin/tuser
+include/sp.h
+etc/spread.conf.example
+lib/libsp.a
+lib/libtsp.a
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/Spread.so
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/Spread.bs
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/autosplit.ix
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread/.packlist
+lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Spread.pm
+@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Spread 2>/dev/null || true
+lib/perl5/%%PERL_VERSION%%/man/man3/Spread.3.gz
+%%JAVALIB%%%%JAVALIBDIR%%/spread/AdvancedMessageListener.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/BasicMessageListener.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/GroupID.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/MembershipInfo.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/MessageFactory.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadConnection$Listener.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadConnection.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadException.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadGroup.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadMessage.class
+%%JAVALIB%%%%JAVALIBDIR%%/spread/SpreadVersion.class
+%%JAVALIB%%@dirrm %%JAVALIBDIR%%/spread
+%%JAVALIB_DOCS%%share/doc/spread/java/readme.txt
+%%JAVALIB_DOCS%%share/doc/spread/java/Flooder.java
+%%JAVALIB_DOCS%%share/doc/spread/java/User.java
+%%JAVALIB_DOCS%%share/doc/spread/java/html/allclasses-frame.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/deprecated-list.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/help-doc.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/index-all.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/index.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/java.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/overview-tree.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/packages.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/serialized-form.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/stylesheet.css
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/AdvancedMessageListener.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/BasicMessageListener.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/GroupID.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/MembershipInfo.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/MessageFactory.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadConnection.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadException.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadGroup.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadMessage.html
+%%JAVALIB_DOCS%%share/doc/spread/java/html/spread/SpreadVersion.html
+%%JAVALIB_DOCS%%@dirrm share/doc/spread/java/html/spread
+%%JAVALIB_DOCS%%@dirrm share/doc/spread/java/html
+%%JAVALIB_DOCS%%@dirrm share/doc/spread/java
+%%PORTDOCS%%share/doc/spread/perl/README
+%%PORTDOCS%%share/doc/spread/perl/test.pl
+%%PORTDOCS%%share/doc/spread/Readme.txt
+%%PORTDOCS%%@dirrm share/doc/spread/perl
+%%PORTDOCS%%@dirrm share/doc/spread
diff --git a/net/spread4/scripts/createusergroup b/net/spread4/scripts/createusergroup
new file mode 100644
index 000000000000..a34b27d5de10
--- /dev/null
+++ b/net/spread4/scripts/createusergroup
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+PATH=/bin:/usr/sbin
+
+USER=spread
+USER_HOMEDIR=/nonexistent
+GROUP=spread
+
+if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+else
+ if pw groupadd ${GROUP}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+fi
+
+if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ if pw usermod ${USER} -d ${USER_HOMEDIR}
+ then
+ echo "Changed home directory of \"${USER}\" to \"${USER_HOMEDIR}\"."
+ else
+ echo "Changing home directory of \"${USER}\" to \"${USER_HOMEDIR}\" failed."
+ exit 1
+ fi
+else
+ if pw useradd ${USER} -g ${GROUP} -h - \
+ -d ${USER_HOMEDIR} -s /sbin/nologin -c "Spread User"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ fi
+fi