aboutsummaryrefslogtreecommitdiffstats
path: root/cad/magic
diff options
context:
space:
mode:
authorswallace <swallace@FreeBSD.org>1994-12-19 05:12:10 +0800
committerswallace <swallace@FreeBSD.org>1994-12-19 05:12:10 +0800
commite2f77028891fb8756d43288c9495cbe9aa995a30 (patch)
treec225994c759e7fc9ef68b3efbb7abf5e721e1108 /cad/magic
parent810e3a4f07a49ff8d6cd143a647447d7e43b89f3 (diff)
downloadfreebsd-ports-gnome-e2f77028891fb8756d43288c9495cbe9aa995a30.tar.gz
freebsd-ports-gnome-e2f77028891fb8756d43288c9495cbe9aa995a30.tar.zst
freebsd-ports-gnome-e2f77028891fb8756d43288c9495cbe9aa995a30.zip
Port of Magic version 6.4.4, a VLSI CAD tool.
Diffstat (limited to 'cad/magic')
-rw-r--r--cad/magic/Makefile25
-rw-r--r--cad/magic/files/patch-aa342
-rw-r--r--cad/magic/pkg-comment1
-rw-r--r--cad/magic/pkg-descr10
-rw-r--r--cad/magic/pkg-plist51
-rw-r--r--cad/magic/scripts/post-configure8
6 files changed, 437 insertions, 0 deletions
diff --git a/cad/magic/Makefile b/cad/magic/Makefile
new file mode 100644
index 000000000000..9955224f8f98
--- /dev/null
+++ b/cad/magic/Makefile
@@ -0,0 +1,25 @@
+# New ports collection makefile for: magic
+# Version required: 6.4.4
+# Date created: 18 Dec 1994
+# Whom: swallace
+#
+# $Id: Makefile,v 1.2 1994/10/06 07:52:04 swallace Exp $
+#
+
+DISTNAME= magic-6.4.4
+EXTRACT_SUFX= .tar.Z
+MASTER_SITES= ftp://gatekeeper.dec.com/pub/DEC/magic/6.4/
+
+install:
+ @echo "===> Installing for ${DISTNAME}"
+ @${MAKE} ${.MAKEFLAGS} pre-install
+ @(cd ${WRKSRC}; ${MAKE} PREFIX=${PREFIX} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
+ @(cd ${PREFIX}; chmod 555 bin/magic bin/ext2dlys bin/ext2sim bin/fsleeper bin/magicusage bin/net2ir bin/extcheck bin/X11Helper)
+ @(cd ${PREFIX}; chmod 444 man/man8/prleak.8 man/man8/prleak.8 man/man1/ext2dlys.1 man/man1/ext2spice.1 man/man1/extcheck.1 man/man1/magic.1 man/man1/magicusage.1 man/man1/grsunprog.1 man/man1/ext2sim.1 man/man1/net2ir.1 man/man1/rsleeper.1 man/man1/sim2spice.1 man/man1/sleeper.1 man/man1/fsleeper.1 man/man5/cmap.5 man/man5/displays.5 man/man5/dlys.5 man/man5/sim.5 man/man5/dstyle.5 man/man5/ext.5 man/man5/glyphs.5 man/man5/magic.5 man/man5/net.5 man/man3/mpack.3 man/man3/dqueue.3 man/man3/extflat.3 man/man3/geometry.3 man/man3/hash.3 man/man3/heap.3 man/man3/libmalloc.3 man/man3/list.3 man/man3/magicutils.3 man/man3/malloc.3 man/man3/path.3 man/man3/runstats.3 man/man3/set.3 man/man3/show.3 man/man3/stack.3 man/man3/string.3 lib/mpack.h lib/libmpack.a)
+ @(cd ${PREFIX}; chmod -R a+rX,go-w lib/magic)
+ @(cd ${PREFIX}; strip bin/magic bin/ext2dlys bin/ext2sim bin/fsleeper bin/magicusage bin/net2ir bin/extcheck bin/X11Helper)
+ @(cd ${PREFIX}; chown bin.bin bin/magic bin/ext2dlys bin/ext2sim bin/fsleeper bin/magicusage bin/net2ir bin/extcheck bin/X11Helper)
+ @(cd ${PREFIX}; chown bin.bin man/man8/prleak.8 man/man8/prleak.8 man/man1/ext2dlys.1 man/man1/ext2spice.1 man/man1/extcheck.1 man/man1/magic.1 man/man1/magicusage.1 man/man1/grsunprog.1 man/man1/ext2sim.1 man/man1/net2ir.1 man/man1/rsleeper.1 man/man1/sim2spice.1 man/man1/sleeper.1 man/man1/fsleeper.1 man/man5/cmap.5 man/man5/displays.5 man/man5/dlys.5 man/man5/sim.5 man/man5/dstyle.5 man/man5/ext.5 man/man5/glyphs.5 man/man5/magic.5 man/man5/net.5 man/man3/mpack.3 man/man3/dqueue.3 man/man3/extflat.3 man/man3/geometry.3 man/man3/hash.3 man/man3/heap.3 man/man3/libmalloc.3 man/man3/list.3 man/man3/magicutils.3 man/man3/malloc.3 man/man3/path.3 man/man3/runstats.3 man/man3/set.3 man/man3/show.3 man/man3/stack.3 man/man3/string.3 lib/mpack.h lib/libmpack.a)
+ @(cd ${PREFIX}; chown -R bin.bin lib/magic)
+
+.include <bsd.port.mk>
diff --git a/cad/magic/files/patch-aa b/cad/magic/files/patch-aa
new file mode 100644
index 000000000000..424777970012
--- /dev/null
+++ b/cad/magic/files/patch-aa
@@ -0,0 +1,342 @@
+*** extflat/extflat.h.orig Tue Jul 12 14:29:15 1994
+--- extflat/extflat.h Sat Dec 17 15:53:53 1994
+***************
+*** 23,29 ****
+--- 23,31 ----
+ int err0 = Need_to_include_magic_header;
+ #endif _MAGIC
+
++ #ifndef __FreeBSD__
+ typedef unsigned char u_char;
++ #endif
+
+ /*
+ * Arguments to EFFlatBuild().
+*** misc/CFLAGS.orig Fri Jul 29 17:46:00 1994
+--- misc/CFLAGS Sat Dec 17 23:51:53 1994
+***************
+*** 1 ****
+! -g
+--- 1 ----
+! -m486 -O2
+*** misc/patchlevel.c.orig Fri Jul 29 12:34:47 1994
+--- misc/patchlevel.c Sat Dec 17 23:43:48 1994
+***************
+*** 57,62 ****
+--- 57,63 ----
+ strcat(patchstr, "release-6.4");
+ strcat(patchstr, ", linux1");
+
++ strcat(patchstr, ", FreeBSD1");
+ /* NEW PATCH LINES GO RIGHT BEFORE THIS LINE */
+ return patchstr;
+ }
+*** misc/paths.h.orig Thu Jul 7 15:26:29 1994
+--- misc/paths.h Sat Dec 17 23:28:58 1994
+***************
+*** 53,59 ****
+ # define PAGERDIR "/usr/bin/pg"
+ # endif
+ #else
+! # ifdef linux
+ # define PAGERDIR "/usr/bin/more"
+ # else
+ # define PAGERDIR "/usr/ucb/more"
+--- 53,59 ----
+ # define PAGERDIR "/usr/bin/pg"
+ # endif
+ #else
+! # if linux || __FreeBSD__
+ # define PAGERDIR "/usr/bin/more"
+ # else
+ # define PAGERDIR "/usr/ucb/more"
+*** plot/plotPixels.c.orig Fri Jul 29 15:05:41 1994
+--- plot/plotPixels.c Sat Dec 17 16:03:24 1994
+***************
+*** 1336,1342 ****
+--- 1336,1344 ----
+ FILE *file; /* File stream on which to dump it. */
+ {
+ int i;
++ #ifndef __FreeBSD__
+ extern char *sys_errlist[];
++ #endif
+ extern int errno;
+ int r,g,b;
+
+*** plot/plotRutils.c.orig Mon Jul 11 11:10:50 1994
+--- plot/plotRutils.c Sat Dec 17 16:06:21 1994
+***************
+*** 394,400 ****
+--- 394,402 ----
+ FILE *file; /* File in which to dump it. */
+ {
+ int count;
++ #ifndef __FreeBSD__
+ extern char *sys_errlist[];
++ #endif
+ extern int errno;
+
+ count = write(fileno(file), (char *) raster->ras_bits,
+*** plow/PlowMain.c.orig Fri Jul 29 17:08:25 1994
+--- plow/PlowMain.c Sat Dec 17 15:44:56 1994
+***************
+*** 22,27 ****
+--- 22,28 ----
+ static char rcsid[]="$Header: PlowMain.c,v 6.0 90/08/28 18:52:57 mayo Exp $";
+ #endif not lint
+
++ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ #include <stdio.h>
+*** prleak/prleak.c.orig Thu Sep 13 13:27:43 1990
+--- prleak/prleak.c Sat Dec 17 15:50:19 1994
+***************
+*** 51,59 ****
+ static char allName[] = "/tmp/prlaaXXXXX";
+
+ long ftell();
+ long getw();
+ FILE *uopen();
+! int cleanup();
+
+ int aflag = 0; /* -a: print all calls to malloc/free */
+ int dflag = 0; /* -d: print duplicate frees */
+--- 51,61 ----
+ static char allName[] = "/tmp/prlaaXXXXX";
+
+ long ftell();
++ #ifndef __FreeBSD__
+ long getw();
++ #endif
+ FILE *uopen();
+! void cleanup();
+
+ int aflag = 0; /* -a: print all calls to malloc/free */
+ int dflag = 0; /* -d: print duplicate frees */
+***************
+*** 280,286 ****
+ {
+ if (ap = (struct active *) HashGetValue(he))
+ {
+! putw(he->h_key.h_ptr, fd);
+ putw(ap->a_size, fd);
+ putw(ap->a_seek, fd);
+ FREE((char *) ap);
+--- 282,288 ----
+ {
+ if (ap = (struct active *) HashGetValue(he))
+ {
+! putw((int)he->h_key.h_ptr, fd);
+ putw(ap->a_size, fd);
+ putw(ap->a_seek, fd);
+ FREE((char *) ap);
+***************
+*** 615,621 ****
+ return (ret);
+ }
+
+! cleanup()
+ {
+ unlink(dupName);
+ unlink(leakName);
+--- 617,623 ----
+ return (ret);
+ }
+
+! void cleanup()
+ {
+ unlink(dupName);
+ unlink(leakName);
+*** utils/getrect.c.orig Mon Jul 18 14:12:35 1994
+--- utils/getrect.c Sat Dec 17 17:34:16 1994
+***************
+*** 64,75 ****
+--- 64,83 ----
+ #define FILE_SET_PTR(fin, cp) ((fin)->_IO_read_ptr = (cp))
+
+ #else
++ #ifdef __FreeBSD__
++ #define FILE_CNT(fin) ((fin)->_r)
++ #define FILE_PTR(fin) ((char *) (fin)->_p)
++ #define FILE_DEC_CNT(fin, n) ((fin)->_r -= (n))
++ #define FILE_SET_PTR(fin, cp) ((fin)->_p = (cp))
++
++ #else
+ #define FILE_CNT(fin) ((fin)->_cnt)
+ #define FILE_PTR(fin) ((char *) fin->_ptr)
+ #define FILE_DEC_CNT(fin, n) ((fin)->_cnt -= (n))
+ #define FILE_SET_PTR(fin, cp) ((fin)->_ptr = (cp))
+
+ #endif
++ #endif
+
+ bool
+ GetRect(fin, skip, rect)
+***************
+*** 115,121 ****
+ rect->r_ytop = isNegative ? -n : n;
+
+ /* Adjust the stdio pointers to reflect the characters read */
+! FILE_DEC_CNT(fin, cp - (char *) fin->_ptr);
+ FILE_SET_PTR(fin, (STDIOCHAR *) cp);
+
+ /* Make sure we skip to end of line or EOF */
+--- 123,129 ----
+ rect->r_ytop = isNegative ? -n : n;
+
+ /* Adjust the stdio pointers to reflect the characters read */
+! FILE_DEC_CNT(fin, cp - FILE_PTR(fin));
+ FILE_SET_PTR(fin, (STDIOCHAR *) cp);
+
+ /* Make sure we skip to end of line or EOF */
+***************
+*** 125,131 ****
+
+ /* Adjust the stdio pointers to reflect the characters read */
+ fastbad:
+! FILE_DEC_CNT(fin, cp - (char *) fin->_ptr);
+ FILE_SET_PTR(fin, (STDIOCHAR *) cp);
+ goto bad;
+
+--- 133,139 ----
+
+ /* Adjust the stdio pointers to reflect the characters read */
+ fastbad:
+! FILE_DEC_CNT(fin, cp - FILE_PTR(fin));
+ FILE_SET_PTR(fin, (STDIOCHAR *) cp);
+ goto bad;
+
+*** utils/malloc.c.orig Thu Aug 25 14:22:18 1994
+--- utils/malloc.c Sat Dec 17 16:08:04 1994
+***************
+*** 643,649 ****
+--- 643,651 ----
+ int cursize;
+ extern etext;
+ extern int errno;
++ #ifndef __FreeBSD__
+ extern char *sys_errlist[];
++ #endif
+
+ /*
+ * Hmmmm. Somebody's not giving us enough memory.
+*** utils/port.c.orig Thu Aug 18 13:14:30 1994
+--- utils/port.c Sat Dec 17 17:38:57 1994
+***************
+*** 19,24 ****
+--- 19,25 ----
+ static char rcsid[] = "$Header: port.c,v 6.0 90/08/28 19:01:11 mayo Exp $";
+ #endif not lint
+
++ #include <stdlib.h>
+ #include <stdio.h>
+ #include <math.h>
+ #include "magic.h"
+*** windows/windCmdAM.c.orig Fri Jul 29 16:57:18 1994
+--- windows/windCmdAM.c Sat Dec 17 16:12:01 1994
+***************
+*** 281,287 ****
+ {
+ #define NUM_FD 20 /* max number of open files per process */
+ extern int errno, sys_nerr;
+! #ifndef ALPHA
+ extern char *sys_errlist[];
+ #endif
+ int fd;
+--- 281,287 ----
+ {
+ #define NUM_FD 20 /* max number of open files per process */
+ extern int errno, sys_nerr;
+! #if !ALPHA && !__FreeBSD__
+ extern char *sys_errlist[];
+ #endif
+ int fd;
+*** garouter/Makefile.orig Thu Aug 4 13:16:59 1994
+--- garouter/Makefile Sat Dec 17 16:50:47 1994
+***************
+*** 22,31 ****
+
+ LINTFLAGS= ${IFLAGS} -u
+ LINTLIBS=
+! #LINTLIBS= ${LIB}/lint/database.ln \
+! ${LIB}/lint/gcr.ln ${LIB}/lint/grouter.ln \
+! ${LIB}/lint/signals.ln ${LIB}/lint/textio.ln \
+! ${LIB}/lint/tiles.ln ${LIB}/lint/utils.ln
+ .SUFFIXES: .po
+
+ ${MODULE}.o: ${OBJS}
+--- 22,28 ----
+
+ LINTFLAGS= ${IFLAGS} -u
+ LINTLIBS=
+! #LINTLIBS= ${LIB}/lint/database.ln ${LIB}/lint/gcr.ln ${LIB}/lint/grouter.ln ${LIB}/lint/signals.ln ${LIB}/lint/textio.ln ${LIB}/lint/tiles.ln ${LIB}/lint/utils.ln
+ .SUFFIXES: .po
+
+ ${MODULE}.o: ${OBJS}
+*** fsleeper/fsleeper.c.orig Thu Jul 7 15:47:35 1994
+--- fsleeper/fsleeper.c Sat Dec 17 16:35:09 1994
+***************
+*** 44,49 ****
+--- 44,58 ----
+ #endif
+ #endif
+
++ #ifdef __FreeBSD__
++ #ifndef gtty
++ #define gtty(fd, buf) ioctl(fd, TIOCGETP, buf)
++ #endif
++ #ifndef stty
++ #define stty(fd, buf) ioctl(fd, TIOCSETP, buf)
++ #endif
++ #endif
++
+ main(argc, argv)
+ char *argv[];
+ {
+*** Makefile.orig Tue Sep 20 13:55:57 1994
+--- Makefile Sun Dec 18 00:24:12 1994
+***************
+*** 41,46 ****
+--- 41,48 ----
+ CADDIR = `:findcad`
+ CADDIR_SUB = `../:findcad`
+
++ all: everything
++
+ everything: ${MODULES} .config
+ /bin/csh :makeall installhdrs ${MODULES}
+ /bin/csh :makeall install ${MODULES}
+*** misc/magic.h.orig Tue Aug 2 15:18:15 1994
+--- misc/magic.h Sat Dec 17 15:31:52 1994
+***************
+*** 217,222 ****
+--- 217,226 ----
+ #define IS_LITTLE_ENDIAN /* Digital Alpha AXP */
+ #endif
+
++ #ifdef i386
++ #define IS_LITTLE_ENDIAN /* i386 CPU */
++ #endif
++
+ /* Well, how'd we do? */
+
+ #if !defined(IS_BIG_ENDIAN) && !defined(IS_LITTLE_ENDIAN)
+***************
+*** 298,304 ****
+ #ifdef SYSV
+ extern int sprintf();
+ #else
+! #ifndef ALPHA
+ extern char* sprintf();
+ #endif
+ #endif
+--- 302,308 ----
+ #ifdef SYSV
+ extern int sprintf();
+ #else
+! #if !ALPHA && !__FreeBSD__
+ extern char* sprintf();
+ #endif
+ #endif
diff --git a/cad/magic/pkg-comment b/cad/magic/pkg-comment
new file mode 100644
index 000000000000..ae4c112f8c45
--- /dev/null
+++ b/cad/magic/pkg-comment
@@ -0,0 +1 @@
+Magic CAD Tool 6.4.4
diff --git a/cad/magic/pkg-descr b/cad/magic/pkg-descr
new file mode 100644
index 000000000000..e16b141fec0c
--- /dev/null
+++ b/cad/magic/pkg-descr
@@ -0,0 +1,10 @@
+Magic 6.4.4
+
+Magic is an interactive editor for VLSI layouts that runs under BSD.
+
+To run magic, users should set CAD_HOME to the base installation directory
+where magic was installed, e.g. /usr/local. Alternatively, the system
+administrator can create a dummy user named 'cad' with its home
+directory set to the installation directory.
+
+Ported to FreeBSD by Steven Wallace, swallace@freebsd.org
diff --git a/cad/magic/pkg-plist b/cad/magic/pkg-plist
new file mode 100644
index 000000000000..0df19acd8422
--- /dev/null
+++ b/cad/magic/pkg-plist
@@ -0,0 +1,51 @@
+@cwd /usr/local
+bin/magic
+bin/ext2dlys
+bin/ext2spice
+bin/ext2sim
+bin/fsleeper
+bin/magicusage
+bin/net2ir
+bin/extcheck
+bin/X11Helper
+man/man8/prleak.8
+man/man1/ext2dlys.1
+man/man1/ext2spice.1
+man/man1/extcheck.1
+man/man1/magic.1
+man/man1/magicusage.1
+man/man1/grsunprog.1
+man/man1/ext2sim.1
+man/man1/net2ir.1
+man/man1/rsleeper.1
+man/man1/sim2spice.1
+man/man1/sleeper.1
+man/man1/fsleeper.1
+man/man5/cmap.5
+man/man5/displays.5
+man/man5/dlys.5
+man/man5/sim.5
+man/man5/dstyle.5
+man/man5/ext.5
+man/man5/glyphs.5
+man/man5/magic.5
+man/man5/net.5
+man/man3/mpack.3
+man/man3/dqueue.3
+man/man3/extflat.3
+man/man3/geometry.3
+man/man3/hash.3
+man/man3/heap.3
+man/man3/libmalloc.3
+man/man3/list.3
+man/man3/magicutils.3
+man/man3/malloc.3
+man/man3/path.3
+man/man3/runstats.3
+man/man3/set.3
+man/man3/show.3
+man/man3/stack.3
+man/man3/string.3
+lib/mpack.h
+lib/libmpack.a
+lib/magic
diff --git a/cad/magic/scripts/post-configure b/cad/magic/scripts/post-configure
new file mode 100644
index 000000000000..d46db1e71dbb
--- /dev/null
+++ b/cad/magic/scripts/post-configure
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# $Id: post-configure,v 1.2 1994/10/04 15:12:51 jkh Exp $
+#
+
+cp ${CURDIR}/files/vfont.h ${WRKSRC}/include
+echo echo $PREFIX > ${WRKSRC}/:findcad
+chmod -R a+rX ${WRKSRC}