diff options
author | Chris D. Faulhaber <jedgar@FreeBSD.org> | 2000-03-08 17:02:06 +0000 |
---|---|---|
committer | Chris D. Faulhaber <jedgar@FreeBSD.org> | 2000-03-08 17:02:06 +0000 |
commit | 2324fd2b3d1e15fb7808a7c31fb34a0d55f1e134 (patch) | |
tree | 9f658e7dedd9f55a6f127f635a337b01cc0be133 /net | |
parent | Become MAINTAINER, since the botched upgrade to 1.1.2 broke some of (diff) |
Update port to 1.5p2
PR: 17234
Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
Notes
Notes:
svn path=/head/; revision=26666
Diffstat (limited to 'net')
-rw-r--r-- | net/cnet/Makefile | 38 | ||||
-rw-r--r-- | net/cnet/distinfo | 2 | ||||
-rw-r--r-- | net/cnet/files/Makefile.freebsd | 54 | ||||
-rw-r--r-- | net/cnet/files/compile.c | 26 | ||||
-rw-r--r-- | net/cnet/files/patch-ab | 2 | ||||
-rw-r--r-- | net/cnet/files/patch-ad | 19 | ||||
-rw-r--r-- | net/cnet/files/patch-ae | 35 | ||||
-rw-r--r-- | net/cnet/files/patch-af | 20 | ||||
-rw-r--r-- | net/cnet/pkg-descr | 2 | ||||
-rw-r--r-- | net/cnet/pkg-plist | 12 |
10 files changed, 120 insertions, 90 deletions
diff --git a/net/cnet/Makefile b/net/cnet/Makefile index 18444dc0c0b4..b0854b14e425 100644 --- a/net/cnet/Makefile +++ b/net/cnet/Makefile @@ -1,31 +1,45 @@ # New ports collection makefile for: cnet -# Version required: 1.4 +# Version required: 1.5p2 # Date created: Feb 8th, 1988 # Whom: jkh # # $FreeBSD$ # -DISTNAME= cnet-1.4-4 -PKGNAME= cnet-1.4p4 -CATEGORIES= net -MASTER_SITES= http://www.cs.uwa.edu.au/pls/cnet/ +DISTNAME= cnet-1.5-2 +PKGNAME= cnet-1.5p2 +CATEGORIES= net tk82 +MASTER_SITES= http://www.cs.uwa.edu.au/cnet/ MAINTAINER= ports@FreeBSD.org -LIB_DEPENDS= xview.3:${PORTSDIR}/x11-toolkits/xview \ +LIB_DEPENDS= tk82.1:${PORTSDIR}/x11-toolkits/tk82 \ Xpm.4:${PORTSDIR}/graphics/xpm -WRKSRC= ${WRKDIR}/cnet-1.4 -ALL_TARGET= +USE_X_PREFIX= yes +USE_GMAKE= yes +ALL_TARGET= # empty MAN1= cnet.1 -pre-build: +post-extract: ${CP} ${FILESDIR}/Makefile.freebsd ${WRKSRC}/src - ${MKDIR} ${WRKSRC}/src/freebsd + @${MKDIR} ${WRKSRC}/src/freebsd ${CP} ${FILESDIR}/compile.c ${WRKSRC}/src/freebsd -pre-install: - ${MKDIR} ${PREFIX}/share/examples/cnet +post-patch: + @${PERL} -pi.in \ + -e "s|%%CC%%|${CC}|g;" \ + -e "s|%%PREFIX%%|${PREFIX}|g;" \ + ${WRKSRC}/src/config.h + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/cnet ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/src/cnet.h ${PREFIX}/include + ${INSTALL_MAN} ${WRKSRC}/DOC/cnet.man ${PREFIX}/man/man1/cnet.1 + @${MKDIR} ${PREFIX}/libdata/cnet + ${INSTALL_DATA} ${WRKSRC}/src/tcltk/cnet.tcl ${PREFIX}/libdata/cnet + ${INSTALL_DATA} ${WRKSRC}/src/tcltk/cnet_icon.bmp ${PREFIX}/libdata/cnet + @${MKDIR} ${PREFIX}/share/examples/cnet + ${INSTALL_DATA} ${WRKSRC}/EXAMPLES/* ${PREFIX}/share/examples/cnet .include <bsd.port.mk> diff --git a/net/cnet/distinfo b/net/cnet/distinfo index af63c83c51be..926ce45ff66b 100644 --- a/net/cnet/distinfo +++ b/net/cnet/distinfo @@ -1 +1 @@ -MD5 (cnet-1.4-4.tar.gz) = 939ad439acd8db17bf056616b607c53e +MD5 (cnet-1.5-2.tar.gz) = 746b317d0a86d0288d478dddc658c4f4 diff --git a/net/cnet/files/Makefile.freebsd b/net/cnet/files/Makefile.freebsd index 3e8721ffbd2f..530f439665f2 100644 --- a/net/cnet/files/Makefile.freebsd +++ b/net/cnet/files/Makefile.freebsd @@ -1,54 +1,28 @@ # -# The following #defines are for Sun's SunOS, >= SunOS4.1.2 -# CC may be either cc or gcc +# The following #defines are for FreeBSD # +XINCLUDES = -I${X11BASE}/include +XLIBS = -lXpm -lX11 -lm -L${X11BASE}/lib +ANSICC = ${CC} +INCLUDES = -I${LOCALBASE}/include \ + -I${LOCALBASE}/include/tcl8.2 \ + -I${LOCALBASE}/include/tk8.2 +CFLAGS += $(INCLUDES) $(XINCLUDES) -# Uncomment the following line if you wish Tcl/Tk windowing (see config.h) -# -#XINCLUDES = -#XLIBS = -ltcl -ltk -lXpm -lX11 -lm -# -# Uncomment the following line if you wish XView windowing (see config.h) -# -OPENWINHOME = ${X11BASE} -XINCLUDES = -I$(OPENWINHOME)/include -XLIBS = -L$(OPENWINHOME)/lib -lxview -lolgx -lXpm -lX11 -# -# Uncomment the following lines if you wish Motif windowing (see config.h) -# -#XINCLUDES = -I$(X11BASE)/include -#XLIBS = -L$(X11BASE)/lib -lXm -lXt -lXpm -lX11 - - -#CC = cc -CC = gcc -Wall -ansi - -INCLUDES = -CFLAGS = -O $(INCLUDES) $(XINCLUDES) - -#LD = cc -LD = gcc -LIBDIRS = -L/usr/local/lib -LIBS = -lm -lgnuregex +LD = ${CC} +LIBDIRS = -L${LOCALBASE}/lib +LIBS = -ltcl82 -ltk82 -lm -lgnuregex STRIP = strip -BINDIR = /usr/local/bin -MANDIR = /usr/local/man/man1 +BINDIR = ${PREFIX}/bin +MANDIR = ${PREFIX}/man/manl MANEXT = 1 -INCDIR = /usr/local/include +INCDIR = ${PREFIX}/include # ---------------------- No user-serviceable code below ----------------- include Makefile.common -kultarr: $(NAME) - chmod 711 $(NAME) - rcp -p $(NAME) kultarr:/usr/kultarr/bin/$(NAME) - rcp -p $(NAME) kultarr:/usr/local/bin/$(NAME) - chmod 644 cnet.h DOC/cnet.man - rcp -p cnet.h kultarr:/usr/local/include/cnet.h - rcp -p DOC/cnet.man kultarr:/usr/local/man/manl/cnet.l - diff --git a/net/cnet/files/compile.c b/net/cnet/files/compile.c index 8f3c4c2656e1..5f0405d14496 100644 --- a/net/cnet/files/compile.c +++ b/net/cnet/files/compile.c @@ -1,27 +1,25 @@ #include <dlfcn.h> #include <nlist.h> -static int add_compile_args(ac, av, kflag) int ac; char *av[]; int kflag; +static int add_compile_args(int ac, char *av[], int kflag) { - av[ac++] = "-fPIC"; - av[ac++] = "-I/usr/local/include"; /* XXX GROSS - should use prefix */ + av[ac++] = "-fPIC"; return(ac); } -static int add_link_args(ac, av, kflag) int ac; char *av[]; int kflag; +static int add_link_args(int ac, char *av[], int kflag) { av[ac++] = findenv("CNETLD", CNETLD); - av[ac++] = "cc"; - av[ac++] = "-Bshareable"; + av[ac++] = "ld"; + av[ac++] = "-shared"; return(ac); } -static void data_segments(n, handle, so_filenm) - int n; void *handle; char *so_filenm; +static void data_segments(int n, void *handle, char *so_filenm) { - extern int nlist _PARAMS((const char *, struct nlist *)); + extern int nlist(const char *, struct nlist *); typedef struct _c { char *so_filenm; @@ -48,8 +46,8 @@ static void data_segments(n, handle, so_filenm) nls[2].n_name = (char *)NULL; if(nlist(so_filenm, nls) != 0) { - (void)fprintf(stderr,"%s: cannot load symbols from %s\n", - progname,so_filenm); + fprintf(stderr,"%s: cannot load symbols from %s\n", + argv0,so_filenm); ++nerrors; return; } @@ -59,12 +57,12 @@ static void data_segments(n, handle, so_filenm) cp->length_data = (nls[1].n_value - nls[0].n_value); cp->incore_data = (char *)((long)dlsym(handle,"end") - cp->length_data); cp->original_data = (char *)malloc(cp->length_data); - (void)memcpy(cp->original_data, cp->incore_data, cp->length_data); + memcpy(cp->original_data, cp->incore_data, cp->length_data); cp->next = chd; chd = cp; if(vflag) - (void)fprintf(stderr,"%s dataseg=0x%08lx len(dataseg)=%ld\n", + fprintf(stderr,"%s dataseg=0x%08lx len(dataseg)=%ld\n", so_filenm, (long)cp->incore_data, cp->length_data); found: @@ -73,5 +71,5 @@ found: np->original_data[0] = cp->original_data; np->private_data[0] = (char *)malloc(cp->length_data); - (void)memcpy(np->private_data[0], cp->original_data, cp->length_data); + memcpy(np->private_data[0], cp->original_data, cp->length_data); } diff --git a/net/cnet/files/patch-ab b/net/cnet/files/patch-ab index 405620e4094d..7a3d525a4043 100644 --- a/net/cnet/files/patch-ab +++ b/net/cnet/files/patch-ab @@ -5,7 +5,7 @@ #define LENDATA_EVER_0 FALSE +#elif defined(USE_FREEBSD) -+#define NDATASEGS 1 ++#define NDATASEGS 1 +#define LENDATA_EVER_0 FALSE + #elif defined(USE_SOLARIS2) diff --git a/net/cnet/files/patch-ad b/net/cnet/files/patch-ad index f8a4ed61f52d..61d6301ed5a2 100644 --- a/net/cnet/files/patch-ad +++ b/net/cnet/files/patch-ad @@ -1,6 +1,5 @@ -patch-ad: ---- src/compile.c.orig Sun Jan 26 03:42:23 1997 -+++ src/compile.c Sat Feb 13 02:29:14 1999 +--- src/compile.c.orig Wed Apr 21 23:26:23 1999 ++++ src/compile.c Fri Mar 3 07:16:22 2000 @@ -2,6 +2,7 @@ #include <fcntl.h> @@ -9,25 +8,17 @@ patch-ad: #if !defined(MAXPATHLEN) #define MAXPATHLEN 1024 -@@ -25,6 +26,9 @@ +@@ -26,6 +27,9 @@ #elif defined(USE_IRIX5) #include "irix5/compile.c" +#elif defined(USE_FREEBSD) +#include "freebsd/compile.c" + - #elif defined(USE_LINUXAOUT) - #include "linuxaout/compile.c" + #endif -@@ -263,7 +267,6 @@ - int kflag; char **Cflags, *o_file, *c_file; - { - extern int fork _PARAMS((void)); -- extern int execvp _PARAMS((const char *, char **)); - - struct stat stat_c, stat_o; -@@ -483,6 +486,10 @@ +@@ -141,6 +145,10 @@ { #define RECIEVE "[Rr][Ee][Cc][IiEe][Ee][Vv]" diff --git a/net/cnet/files/patch-ae b/net/cnet/files/patch-ae new file mode 100644 index 000000000000..e95dd0e25902 --- /dev/null +++ b/net/cnet/files/patch-ae @@ -0,0 +1,35 @@ +--- src/config.h.orig Tue Mar 7 04:05:53 2000 ++++ src/config.h Tue Mar 7 04:11:33 2000 +@@ -19,6 +19,9 @@ + #elif defined(sgi) || defined(__sgi) || defined(__sgi__) + #define USE_IRIX5 + ++#elif defined(__FreeBSD__) ++#define USE_FREEBSD ++ + #else + #error Could not determine the operating system in config.h + #endif +@@ -68,6 +71,13 @@ + #define CNETGCC "/usr/local/bin/gcc" + #define CNETLD "/bin/ld" + ++#elif defined(USE_FREEBSD) ++#define OS_DEFINE "-DFREEBSD" ++#define CNETCPP "/usr/libexec/cpp" ++#define CNETCC "%%CC%%" ++#define CNETGCC "%%CC%%" ++#define CNETLD "/usr/bin/ld" ++ + #endif + + +@@ -93,7 +103,7 @@ + CNETPATH must be defined. + */ + +-#define CNETPATH ".:/cslinux/cnetlib:/net/tahoe6/cs78/cnetlib" ++#define CNETPATH ".:%%PREFIX%%/libdata/cnet:%%PREFIX%%/include" + + /* When compiled for Tcl/Tk, the Tcl/Tk script file may be taken from + CNETTCLTK or provided with the -F command-line option. diff --git a/net/cnet/files/patch-af b/net/cnet/files/patch-af new file mode 100644 index 000000000000..e9b72f9ed8e5 --- /dev/null +++ b/net/cnet/files/patch-af @@ -0,0 +1,20 @@ +--- src/Makefile.orig Thu Apr 22 00:42:28 1999 ++++ src/Makefile Fri Mar 3 07:06:53 2000 +@@ -14,6 +14,8 @@ + make -f Makefile.osf1 $(NAME) ; fi + @if uname -s -r | grep "IRIX" ; then \ + make -f Makefile.irix5 $(NAME) ; fi ++ @if uname -s -r | grep "FreeBSD" ; then \ ++ $(MAKE) -f Makefile.freebsd $(NAME) ; fi + + install: + @if uname -s -r | grep "Linux" ; then \ +@@ -26,6 +28,8 @@ + make -f Makefile.osf1 install ; fi + @if uname -s -r | grep "IRIX" ; then \ + make -f Makefile.irix5 install ; fi ++ @if uname -s -r | grep "FreeBSD" ; then \ ++ $(MAKE) -f Makefile.freebsd install ; fi + + # --------------------------------------------------------------------- + diff --git a/net/cnet/pkg-descr b/net/cnet/pkg-descr index 481b4fd62d26..71042c4db619 100644 --- a/net/cnet/pkg-descr +++ b/net/cnet/pkg-descr @@ -4,4 +4,4 @@ networking protocols. It has been specifically developed for, and used in, undergraduate computer networking courses by thousands of students since 1991. -WWW: http://www.cs.uwa.edu.au/pls/cnet/ +WWW: http://www.cs.uwa.edu.au/cnet/ diff --git a/net/cnet/pkg-plist b/net/cnet/pkg-plist index 9889f9656b6b..763a53970cac 100644 --- a/net/cnet/pkg-plist +++ b/net/cnet/pkg-plist @@ -1,14 +1,17 @@ bin/cnet include/cnet.h +libdata/cnet/cnet.tcl +libdata/cnet/cnet_icon.bmp share/examples/cnet/AUSTRALIA.MAP share/examples/cnet/CLICK -share/examples/cnet/FAST +share/examples/cnet/EUROPE.MAP share/examples/cnet/FLOODING1 share/examples/cnet/FLOODING2 share/examples/cnet/FLOODING3 share/examples/cnet/KEYBOARD share/examples/cnet/LINKSTATE share/examples/cnet/Makefile +share/examples/cnet/README.flooding share/examples/cnet/STOPANDWAIT share/examples/cnet/T2 share/examples/cnet/TICKTOCK @@ -18,19 +21,14 @@ share/examples/cnet/TOPOLOGY.2c share/examples/cnet/WORLD share/examples/cnet/WORLD.MAP share/examples/cnet/click.c -share/examples/cnet/cnet.h -share/examples/cnet/cnet.tcl -share/examples/cnet/fast.c share/examples/cnet/flooding.gp share/examples/cnet/flooding1.c -share/examples/cnet/flooding1.dat share/examples/cnet/flooding2.c -share/examples/cnet/flooding2.dat share/examples/cnet/flooding3.c -share/examples/cnet/flooding3.dat share/examples/cnet/keyboard.c share/examples/cnet/linkstate.c share/examples/cnet/protocol.c share/examples/cnet/stopandwait.c share/examples/cnet/ticktock.c @dirrm share/examples/cnet +@dirrm libdata/cnet |