aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2003-09-06 06:15:51 +0800
committerglewis <glewis@FreeBSD.org>2003-09-06 06:15:51 +0800
commit871980daf0b9e0936d50b05c2dd6e6ac08e71f11 (patch)
tree67d2724c338e2ddb299f1988f091a01142baea30 /net
parent65c40ecc26c93a8943909cecdf51a837ce58e7c6 (diff)
downloadfreebsd-ports-gnome-871980daf0b9e0936d50b05c2dd6e6ac08e71f11.tar.gz
freebsd-ports-gnome-871980daf0b9e0936d50b05c2dd6e6ac08e71f11.tar.zst
freebsd-ports-gnome-871980daf0b9e0936d50b05c2dd6e6ac08e71f11.zip
. Add (optional) support for the DGD networking package.
Diffstat (limited to 'net')
-rw-r--r--net/dgd/Makefile22
-rw-r--r--net/dgd/distinfo1
-rw-r--r--net/dgd/files/patch-aa4
-rw-r--r--net/dgd/files/patch-comp.c74
-rw-r--r--net/dgd/files/patch-mud.dgd4
-rw-r--r--net/dgd/pkg-plist9
6 files changed, 109 insertions, 5 deletions
diff --git a/net/dgd/Makefile b/net/dgd/Makefile
index 760e70383cee..caa9fb1df4e3 100644
--- a/net/dgd/Makefile
+++ b/net/dgd/Makefile
@@ -7,11 +7,17 @@
PORTNAME= dgd
PORTVERSION= 1.2p3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net lang games
MASTER_SITES= ${MASTER_SITE_LOCAL:S|%SUBDIR%|glewis/dgd|} \
ftp://ftp.dworkin.nl/pub/dgd/ \
ftp://ftp.imaginary.com/pub/LPC/servers/DGD/
+.ifdef (WITH_NETWORKING)
+PATCH_SITES= ftp://noname.franken.de/pub/dgd/
+PATCHFILES= Network-1-DGD-1.2p3-patch.gz
+PATCH_DIST_STRIP= -p1
+PATCH_STRIP= -p0 -F 3
+.endif
MAINTAINER= glewis@FreeBSD.org
COMMENT= Dworkin's Generic Driver (network server)
@@ -21,14 +27,25 @@ RESTRICTED= "license required for commercial use"
DIST_SUBDIR= dgd
WRKSRC= ${WRKDIR}/dgd/src
+PATCH_WRKSRC= ${WRKDIR}/dgd
ALL_TARGET= install
USE_REINPLACE= yes
CPIO?= /usr/bin/cpio
+.ifdef (WITH_NETWORKING)
+PLIST_SUB+= NETWORKING=""
+.else
+PLIST_SUB+= NETWORKING="@comment "
+.endif
do-configure:
${REINPLACE_CMD} -e "s:%%DATADIR%%:${DATADIR}:" ${WRKDIR}/dgd/mud.dgd
+.ifdef (WITH_NETWORKING)
+post-configure:
+ cd ${WRKDIR}/dgd/ && ${FIND} . -name '*.orig' -delete
+.endif
+
do-install:
${INSTALL_PROGRAM} ${WRKDIR}/dgd/bin/driver ${PREFIX}/sbin/dgd
${INSTALL_PROGRAM} ${WRKDIR}/dgd/bin/precomp ${PREFIX}/bin/precomp
@@ -46,6 +63,9 @@ do-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/dgd/Copyright ${DOCSDIR}
+.ifdef (WITH_NETWORKING)
+ ${INSTALL_DATA} ${WRKDIR}/dgd/Copyright.NETWORK-PACKAGE ${DOCSDIR}
+.endif
${INSTALL_DATA} ${WRKDIR}/dgd/Credits ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/dgd/README ${DOCSDIR}
cd ${WRKDIR}/dgd/doc && ${FIND} . \
diff --git a/net/dgd/distinfo b/net/dgd/distinfo
index e8c1999f2df6..0ac5a1933ca2 100644
--- a/net/dgd/distinfo
+++ b/net/dgd/distinfo
@@ -1 +1,2 @@
MD5 (dgd/dgd-1.2p3.tar.gz) = f3576ef66ae139455244b30399ed29ed
+MD5 (dgd/Network-1-DGD-1.2p3-patch.gz) = 6204e4072df50a7fcf75b0968fa659e9
diff --git a/net/dgd/files/patch-aa b/net/dgd/files/patch-aa
index ba7c69fdbb55..6b66c026ea3a 100644
--- a/net/dgd/files/patch-aa
+++ b/net/dgd/files/patch-aa
@@ -1,7 +1,7 @@
$FreeBSD$
---- Makefile.orig Mon Aug 26 07:21:20 2002
-+++ Makefile Mon Aug 26 09:24:19 2002
+--- src/Makefile.orig Mon Aug 26 07:21:20 2002
++++ src/Makefile Mon Aug 26 09:24:19 2002
@@ -3,13 +3,12 @@
#
HOST= NETBSD
diff --git a/net/dgd/files/patch-comp.c b/net/dgd/files/patch-comp.c
new file mode 100644
index 000000000000..cb23188eb861
--- /dev/null
+++ b/net/dgd/files/patch-comp.c
@@ -0,0 +1,74 @@
+--- src/comp/comp.c.orig Tue Sep 2 10:58:56 2003
++++ src/comp/comp.c Tue Sep 2 11:14:29 2003
+@@ -558,6 +558,20 @@
+ return TRUE;
+ }
+
++#ifdef NETWORK_PACKAGE
++/*
++ * NAME: comm->openport()
++ * DESCRIPTION: pretend to open a port
++ */
++void comm_openport(f, obj, protocol, portnr)
++frame *f;
++object *obj;
++unsigned char protocol;
++unsigned short portnr;
++{
++}
++#endif
++
+ /*
+ * NAME: comm->finish()
+ * DESCRIPTION: pretend to terminate connections
+@@ -585,6 +599,35 @@
+ return 0;
+ }
+
++#ifdef NETWORK_PACKAGE
++/*
++ * NAME: comm->connect()
++ * DESCRIPTION: pretend to open a connection to a port
++ */
++void
++comm_connect(f, obj, addr, protocol, port)
++frame *f;
++object *obj;
++char *addr;
++unsigned char protocol;
++unsigned short port;
++{
++}
++
++/*
++ * NAME: comm->senddatagram()
++ * DESCRIPTION: pretend to send a UDP datagram
++ */
++int comm_senddatagram(obj, str, ip, port)
++object * obj;
++string * str;
++string * ip;
++int port;
++{
++ return 0;
++}
++#endif
++
+ /*
+ * NAME: comm->udpsend()
+ * DESCRIPTION: pretend to send a message on the UDP channel of a connection
+@@ -668,8 +711,14 @@
+ * NAME: comm->users()
+ * DESCRIPTION: pretend to return an array with all user objects
+ */
++#ifdef NETWORK_PACKAGE
++array *comm_users(data, ports)
++dataspace *data;
++bool ports;
++#else
+ array *comm_users(data)
+ dataspace *data;
++#endif
+ {
+ return (array *) NULL;
+ }
diff --git a/net/dgd/files/patch-mud.dgd b/net/dgd/files/patch-mud.dgd
index e2a32db40124..27b7535880f8 100644
--- a/net/dgd/files/patch-mud.dgd
+++ b/net/dgd/files/patch-mud.dgd
@@ -1,7 +1,7 @@
$FreeBSD$
---- ../mud.dgd.orig Thu Mar 4 13:54:52 1999
-+++ ../mud.dgd Thu Aug 28 14:54:26 2003
+--- mud.dgd.orig Thu Mar 4 13:54:52 1999
++++ mud.dgd Thu Aug 28 14:54:26 2003
@@ -1,10 +1,10 @@
telnet_port = 6047; /* telnet port number */
binary_port = 6048; /* binary port number */
diff --git a/net/dgd/pkg-plist b/net/dgd/pkg-plist
index 4abd1e567e73..d0f384fe2928 100644
--- a/net/dgd/pkg-plist
+++ b/net/dgd/pkg-plist
@@ -44,6 +44,7 @@ sbin/dgd
%%DATADIR%%/kernel/kernel/lib/api/user.c
%%DATADIR%%/kernel/kernel/lib/auto.c
%%DATADIR%%/kernel/kernel/lib/connection.c
+%%NETWORKING%%%%DATADIR%%/kernel/kernel/lib/network/port.c
%%DATADIR%%/kernel/kernel/lib/port.c
%%DATADIR%%/kernel/kernel/lib/user.c
%%DATADIR%%/kernel/kernel/lib/wiztool.c
@@ -58,9 +59,12 @@ sbin/dgd
%%DATADIR%%/kernel/kernel/sys/driver.c
%%DATADIR%%/kernel/kernel/sys/objregd.c
%%DATADIR%%/kernel/kernel/sys/rsrcd.c
+%%NETWORKING%%%%DATADIR%%/kernel/kernel/sys/telnet_port.c
%%DATADIR%%/kernel/kernel/sys/userd.c
+%%NETWORKING%%%%DATADIR%%/kernel/usr/System/initd.c
%%PORTDOCS%%%%DOCSDIR%%/Commercial
%%PORTDOCS%%%%DOCSDIR%%/Copyright
+%%NETWORKING%%%%PORTDOCS%%%%DOCSDIR%%/Copyright.NETWORK-PACKAGE
%%PORTDOCS%%%%DOCSDIR%%/Credits
%%PORTDOCS%%%%DOCSDIR%%/Extensions
%%PORTDOCS%%%%DOCSDIR%%/Introduction
@@ -81,7 +85,9 @@ sbin/dgd
%%PORTDOCS%%%%DOCSDIR%%/kfun/call_trace
%%PORTDOCS%%%%DOCSDIR%%/kfun/ceil
%%PORTDOCS%%%%DOCSDIR%%/kfun/clone_object
+%%NETWORKING%%%%PORTDOCS%%%%DOCSDIR%%/kfun/close_user
%%PORTDOCS%%%%DOCSDIR%%/kfun/compile_object
+%%NETWORKING%%%%PORTDOCS%%%%DOCSDIR%%/kfun/connect
%%PORTDOCS%%%%DOCSDIR%%/kfun/cos
%%PORTDOCS%%%%DOCSDIR%%/kfun/cosh
%%PORTDOCS%%%%DOCSDIR%%/kfun/crypt
@@ -112,7 +118,9 @@ sbin/dgd
%%PORTDOCS%%%%DOCSDIR%%/kfun/millitime
%%PORTDOCS%%%%DOCSDIR%%/kfun/modf
%%PORTDOCS%%%%DOCSDIR%%/kfun/object_name
+%%NETWORKING%%%%PORTDOCS%%%%DOCSDIR%%/kfun/open_port
%%PORTDOCS%%%%DOCSDIR%%/kfun/parse_string
+%%NETWORKING%%%%PORTDOCS%%%%DOCSDIR%%/kfun/ports
%%PORTDOCS%%%%DOCSDIR%%/kfun/pow
%%PORTDOCS%%%%DOCSDIR%%/kfun/previous_object
%%PORTDOCS%%%%DOCSDIR%%/kfun/previous_program
@@ -163,6 +171,7 @@ sbin/dgd
@dirrm %%DATADIR%%/kernel/usr
@dirrm %%DATADIR%%/kernel/kernel/sys
@dirrm %%DATADIR%%/kernel/kernel/obj
+%%NETWORKING%%@dirrm %%DATADIR%%/kernel/kernel/lib/network
@dirrm %%DATADIR%%/kernel/kernel/lib/api
@dirrm %%DATADIR%%/kernel/kernel/lib
@dirrm %%DATADIR%%/kernel/kernel/data