mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
- update to 1.7.4
- use tk83 PR: 30143 Submitted by: KATO Tsuguru <tkato@prontomail.com>
This commit is contained in:
parent
08b801c52c
commit
f254027b5f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=47002
@ -6,14 +6,14 @@
|
||||
#
|
||||
|
||||
PORTNAME= cnet
|
||||
PORTVERSION= 1.6
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= net tk82
|
||||
PORTVERSION= 1.7.4
|
||||
CATEGORIES= net tk83
|
||||
MASTER_SITES= http://www.cs.uwa.edu.au/cnet/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
|
||||
LIB_DEPENDS= tk82.1:${PORTSDIR}/x11-toolkits/tk82
|
||||
LIB_DEPENDS= tk83.1:${PORTSDIR}/x11-toolkits/tk83
|
||||
|
||||
USE_X_PREFIX= yes
|
||||
USE_XPM= yes
|
||||
@ -21,29 +21,25 @@ USE_GMAKE= yes
|
||||
ALL_TARGET= # empty
|
||||
MAN1= cnet.1
|
||||
|
||||
post-extract:
|
||||
${CP} ${FILESDIR}/Makefile.freebsd ${WRKSRC}/src
|
||||
${CP} ${FILESDIR}/compile.c ${WRKSRC}/src/compile/freebsd.c
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi.in \
|
||||
-e "s|%%CC%%|${CC}|g;" \
|
||||
-e "s|%%PREFIX%%|${PREFIX}|g;" \
|
||||
${WRKSRC}/src/config.h
|
||||
@${PERL} -pi -e 's|8.2|8.3|g ; \
|
||||
s|82|83|g' ${WRKSRC}/src/Makefile.freebsd
|
||||
@${PERL} -pi -e 's|%%CC%%|${CC}|g ; \
|
||||
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}/share/cnet
|
||||
${INSTALL_DATA} ${WRKSRC}/cnetlib/* ${PREFIX}/share/cnet
|
||||
@${MKDIR} ${DATADIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/cnetlib/* ${DATADIR}
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${PREFIX}/share/examples/cnet
|
||||
${INSTALL_DATA} ${WRKSRC}/EXAMPLES/* ${PREFIX}/share/examples/cnet
|
||||
@${MKDIR} ${PREFIX}/share/doc/cnet
|
||||
${INSTALL_DATA} ${WRKSRC}/DOC/*.html ${PREFIX}/share/doc/cnet
|
||||
@${MKDIR} ${PREFIX}/share/doc/cnet/images
|
||||
${INSTALL_DATA} ${WRKSRC}/DOC/images/* ${PREFIX}/share/doc/cnet/images
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/DOC/*.html ${DOCSDIR}
|
||||
@${MKDIR} ${DOCSDIR}/images
|
||||
${INSTALL_DATA} ${WRKSRC}/DOC/images/* ${DOCSDIR}/images
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1 +1 @@
|
||||
MD5 (cnet-1.6.tar.gz) = fc7fa25547dce8966237e58274ef0f51
|
||||
MD5 (cnet-1.7.4.tgz) = 836521358e164ef1c742163740e1e08a
|
||||
|
@ -1,28 +0,0 @@
|
||||
#
|
||||
# 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)
|
||||
|
||||
LD = ${CC}
|
||||
LIBDIRS = -L${LOCALBASE}/lib
|
||||
LIBS = -ltcl82 -ltk82 -lm -lgnuregex
|
||||
STRIP = strip
|
||||
|
||||
BINDIR = ${PREFIX}/bin
|
||||
MANDIR = ${PREFIX}/man/manl
|
||||
MANEXT = 1
|
||||
INCDIR = ${PREFIX}/include
|
||||
|
||||
|
||||
# ---------------------- No user-serviceable code below -----------------
|
||||
|
||||
include Makefile.common
|
||||
|
@ -1,75 +0,0 @@
|
||||
#include <dlfcn.h>
|
||||
#include <nlist.h>
|
||||
|
||||
static int add_compile_args(int ac, char *av[], int kflag)
|
||||
{
|
||||
av[ac++] = "-fPIC";
|
||||
return(ac);
|
||||
}
|
||||
|
||||
|
||||
static int add_link_args(int ac, char *av[], int kflag)
|
||||
{
|
||||
av[ac++] = findenv("CNETLD", CNETLD);
|
||||
av[ac++] = "ld";
|
||||
av[ac++] = "-shared";
|
||||
return(ac);
|
||||
}
|
||||
|
||||
|
||||
static void data_segments(int n, void *handle, char *so_filenm)
|
||||
{
|
||||
extern int nlist(const char *, struct nlist *);
|
||||
|
||||
typedef struct _c {
|
||||
char *so_filenm;
|
||||
unsigned long length_data;
|
||||
char *incore_data;
|
||||
char *original_data;
|
||||
struct _c *next;
|
||||
} CACHE;
|
||||
|
||||
static CACHE *chd = (CACHE *)NULL;
|
||||
CACHE *cp = chd;
|
||||
|
||||
NODE *np = &NP[n];
|
||||
struct nlist nls[3];
|
||||
|
||||
while(cp != (CACHE *)NULL) {
|
||||
if(strcmp(cp->so_filenm, so_filenm) == 0)
|
||||
goto found;
|
||||
cp = cp->next;
|
||||
}
|
||||
|
||||
nls[0].n_name = "__DYNAMIC";
|
||||
nls[1].n_name = "_end";
|
||||
nls[2].n_name = (char *)NULL;
|
||||
|
||||
if(nlist(so_filenm, nls) != 0) {
|
||||
fprintf(stderr,"%s: cannot load symbols from %s\n",
|
||||
argv0,so_filenm);
|
||||
++nerrors;
|
||||
return;
|
||||
}
|
||||
|
||||
cp = (CACHE *)malloc(sizeof(CACHE));
|
||||
cp->so_filenm = strdup(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);
|
||||
memcpy(cp->original_data, cp->incore_data, cp->length_data);
|
||||
cp->next = chd;
|
||||
chd = cp;
|
||||
|
||||
if(vflag)
|
||||
fprintf(stderr,"%s dataseg=0x%08lx len(dataseg)=%ld\n",
|
||||
so_filenm, (long)cp->incore_data, cp->length_data);
|
||||
found:
|
||||
|
||||
np->length_data[0] = cp->length_data;
|
||||
np->incore_data[0] = cp->incore_data;
|
||||
np->original_data[0] = cp->original_data;
|
||||
|
||||
np->private_data[0] = (char *)malloc(cp->length_data);
|
||||
memcpy(np->private_data[0], cp->original_data, cp->length_data);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
--- src/cnetheader.h.orig Thu Jul 24 09:15:13 1997
|
||||
+++ src/cnetheader.h Sun Aug 16 23:27:41 1998
|
||||
@@ -22,6 +22,10 @@
|
||||
#define NDATASEGS 1
|
||||
#define LENDATA_EVER_0 FALSE
|
||||
|
||||
+#elif defined(USE_FREEBSD)
|
||||
+#define NDATASEGS 1
|
||||
+#define LENDATA_EVER_0 FALSE
|
||||
+
|
||||
#elif defined(USE_SOLARIS2)
|
||||
#define NDATASEGS 1
|
||||
#define LENDATA_EVER_0 FALSE
|
@ -1,13 +0,0 @@
|
||||
--- src/compile.c.orig Sat May 13 03:41:53 2000
|
||||
+++ src/compile.c Sat Jul 22 01:44:09 2000
|
||||
@@ -25,6 +25,10 @@
|
||||
#elif defined(USE_IRIX5)
|
||||
#include "compile/irix5.c"
|
||||
|
||||
+#elif defined(USE_FREEBSD)
|
||||
+#include <dlfcn.h>
|
||||
+#include "compile/freebsd.c"
|
||||
+
|
||||
#elif defined(USE_WIN32)
|
||||
#include <process.h>
|
||||
#include "compile/win32.c"
|
@ -1,35 +0,0 @@
|
||||
--- src/config.h.orig Thu Jun 22 16:39:34 2000
|
||||
+++ src/config.h Sat Jul 22 01:41:04 2000
|
||||
@@ -19,6 +19,9 @@
|
||||
#elif defined(sgi) || defined(__sgi) || defined(__sgi__)
|
||||
#define USE_IRIX5
|
||||
|
||||
+#elif defined(__FreeBSD__)
|
||||
+#define USE_FREEBSD
|
||||
+
|
||||
#elif defined(_WIN32)
|
||||
/* Don't get too excited here . The Windows implementation is still being
|
||||
developed and will first appear in the non-alpha version of 1.6.
|
||||
@@ -78,6 +81,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"
|
||||
+
|
||||
#elif defined(USE_WIN32)
|
||||
#define OS_DEFINE "/DWIN32"
|
||||
#endif
|
||||
@@ -102,7 +112,7 @@
|
||||
CNETPATH must be defined.
|
||||
*/
|
||||
|
||||
-#define CNETPATH ".:/cslinux/cnetlib:/home/chris/cnetlib"
|
||||
+#define CNETPATH ".:%%PREFIX%%/share/cnet:%%PREFIX%%/include"
|
||||
|
||||
|
||||
/* A small number of common errors are detected by cnet at run-time.
|
@ -1,20 +0,0 @@
|
||||
--- src/Makefile.orig Mon Feb 7 02:49:35 2000
|
||||
+++ src/Makefile Sat Jul 22 01:42:34 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
|
||||
cp cnet ..
|
||||
|
||||
install:
|
||||
@@ -27,6 +29,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
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
|
@ -10,7 +10,6 @@ share/cnet/mac.gif
|
||||
share/cnet/next.gif
|
||||
share/cnet/os2.gif
|
||||
share/cnet/palm.gif
|
||||
share/cnet/palm.xpm
|
||||
share/cnet/paused.gif
|
||||
share/cnet/repair.gif
|
||||
share/cnet/router.gif
|
||||
@ -19,6 +18,7 @@ share/cnet/sun.gif
|
||||
share/cnet/windows.gif
|
||||
share/cnet/zap.gif
|
||||
%%PORTDOCS%%share/doc/cnet/application.html
|
||||
%%PORTDOCS%%share/doc/cnet/drawframes.html
|
||||
%%PORTDOCS%%share/doc/cnet/enumerated.html
|
||||
%%PORTDOCS%%share/doc/cnet/eventdriven.html
|
||||
%%PORTDOCS%%share/doc/cnet/eventfuncs.html
|
||||
@ -26,6 +26,7 @@ share/cnet/zap.gif
|
||||
%%PORTDOCS%%share/doc/cnet/functions.html
|
||||
%%PORTDOCS%%share/doc/cnet/images/UWAsmall.gif
|
||||
%%PORTDOCS%%share/doc/cnet/images/australia.gif
|
||||
%%PORTDOCS%%share/doc/cnet/images/drawframes.gif
|
||||
%%PORTDOCS%%share/doc/cnet/images/mainlink.gif
|
||||
%%PORTDOCS%%share/doc/cnet/images/mainstdio.gif
|
||||
%%PORTDOCS%%share/doc/cnet/images/mainwindow.gif
|
||||
|
Loading…
Reference in New Issue
Block a user