summaryrefslogtreecommitdiffstats
path: root/cad
diff options
context:
space:
mode:
authortg <tg@FreeBSD.org>1996-05-23 08:17:41 +0000
committertg <tg@FreeBSD.org>1996-05-23 08:17:41 +0000
commit449cd2a9e7e55957a81f54deffc7f01265cf00b5 (patch)
tree106441d5075c7a631a4ab4dbc0e4119e1618d997 /cad
parent0f3e0e55dfbf8e03db468209a2b2ede241b6da97 (diff)
downloadFreeBSD-ports-449cd2a9e7e55957a81f54deffc7f01265cf00b5.zip
FreeBSD-ports-449cd2a9e7e55957a81f54deffc7f01265cf00b5.tar.gz
Finally, a port of the famous circuit simulation system.
Submitted by: Julian Jenkins <kaveman@magna.com.au>
Diffstat (limited to 'cad')
-rw-r--r--cad/spice/Makefile34
-rw-r--r--cad/spice/distinfo1
-rw-r--r--cad/spice/files/FreeBSD9
-rw-r--r--cad/spice/files/Makefile11
-rw-r--r--cad/spice/files/patch-aa181
-rw-r--r--cad/spice/files/patch-ab140
-rw-r--r--cad/spice/pkg-comment1
-rw-r--r--cad/spice/pkg-descr14
-rw-r--r--cad/spice/pkg-plist17
-rw-r--r--cad/spice/scripts/configure5
10 files changed, 413 insertions, 0 deletions
diff --git a/cad/spice/Makefile b/cad/spice/Makefile
new file mode 100644
index 0000000..8c4bced
--- /dev/null
+++ b/cad/spice/Makefile
@@ -0,0 +1,34 @@
+# New ports collection makefile for: spice
+# Version required: 3f4 (3f5?)
+# Date created: 26 Mar 96
+# Whom: Julian Jenkins <kaveman@magna.com.au>
+#
+#
+
+DISTNAME= spice3f4
+PKGNAME= spice-3f4
+CATEGORIES+= cad
+MASTER_SITES= ftp://sunsite.unc.edu/pub/Linux/apps/circuits/
+
+#PATCH_SITES= ftp://ic.eecs.berkeley.edu/pub/Spice3/3f4patches
+#PATCHFILES= grid.patch newcoms.patch spsmp.patch
+# documentation in ftp://ic.eecs.berkeley.edu/pub/Spice3/um.3f3.ps
+
+MAINTAINER= kaveman@magna.com.au
+
+# export restrictions
+NO_CDROM= yes
+
+post-install:
+ chmod a+rx ${PREFIX}/bin/spice3 ${PREFIX}/bin/nutmeg \
+ ${PREFIX}/bin/sconvert ${PREFIX}/bin/help ${PREFIX}/bin/proc2mod \
+ ${PREFIX}/bin/multidec
+ strip ${PREFIX}/bin/spice3 ${PREFIX}/bin/nutmeg \
+ ${PREFIX}/bin/sconvert ${PREFIX}/bin/help ${PREFIX}/bin/proc2mod \
+ ${PREFIX}/bin/multidec
+ chmod -R a+rX ${PREFIX}/share/spice
+ chmod a+rx ${PREFIX}/man/man5/mfbcap.5.gz \
+ ${PREFIX}/man/man1/sconvert.1.gz ${PREFIX}/man/man1/nutmeg.1.gz \
+ ${PREFIX}/man/man1/spice.1.gz ${PREFIX}/man/man3/mfb.3.gz
+
+.include <bsd.port.mk>
diff --git a/cad/spice/distinfo b/cad/spice/distinfo
new file mode 100644
index 0000000..c5b80aa
--- /dev/null
+++ b/cad/spice/distinfo
@@ -0,0 +1 @@
+MD5 (spice3f4.tar.gz) = 8b0daf037e68aa675e37e23632150b4d
diff --git a/cad/spice/files/FreeBSD b/cad/spice/files/FreeBSD
new file mode 100644
index 0000000..87835b6
--- /dev/null
+++ b/cad/spice/files/FreeBSD
@@ -0,0 +1,9 @@
+# FreeBSD config exception file
+
+MAKE = /usr/bin/make
+INTERFACE_OPTS = -DWANT_X11
+CC = gcc
+CC_OPT = -O2 -pipe -Dbsd
+CC_OPT_SAFE = -O2 -pipe -Dbsd
+LDFLAGS = -L /usr/X11R6/lib -lm -ltermcap
+ASM_HACK = < /dev/null
diff --git a/cad/spice/files/Makefile b/cad/spice/files/Makefile
new file mode 100644
index 0000000..15c041e
--- /dev/null
+++ b/cad/spice/files/Makefile
@@ -0,0 +1,11 @@
+
+all:
+ util/build FreeBSD default
+
+install:
+ util/build FreeBSD install
+ gzip < man/man5/mfbcap.5 > ${PREFIX}/man/man5/mfbcap.5.gz
+ gzip < man/man1/sconvert.1 > ${PREFIX}/man/man1/sconvert.1.gz
+ gzip < man/man1/nutmeg.1 > ${PREFIX}/man/man1/nutmeg.1.gz
+ gzip < man/man1/spice.1 > ${PREFIX}/man/man1/spice.1.gz
+ gzip < man/man3/mfb.3 > ${PREFIX}/man/man3/mfb.3.gz
diff --git a/cad/spice/files/patch-aa b/cad/spice/files/patch-aa
new file mode 100644
index 0000000..e3b82b4
--- /dev/null
+++ b/cad/spice/files/patch-aa
@@ -0,0 +1,181 @@
+*** conf/defaults.orig Thu Mar 28 21:25:24 1996
+--- conf/defaults Sun Mar 31 11:04:30 1996
+***************
+*** 108,119 ****
+ # file listed on the "build" command line.
+
+ # SPICE_DIR = $(TOP1)/$(SYSTEM)
+! SPICE_DIR = $(DIST_DIR)
+! SPICE_LIB_DIR = $(SPICE_DIR)/lib
+ SPICE_EXEC_DIR = $(SPICE_DIR)/bin
+
+ S_SPICE_DIR = $(SPICE_DIR)
+! S_SPICE_LIB_DIR = $(S_SPICE_DIR)/lib
+ S_SPICE_EXEC_DIR= $(S_SPICE_DIR)/bin
+
+ # INSTALL_DIRS lists the directories that need to be created before
+--- 108,119 ----
+ # file listed on the "build" command line.
+
+ # SPICE_DIR = $(TOP1)/$(SYSTEM)
+! SPICE_DIR = ${PREFIX}
+! SPICE_LIB_DIR = $(SPICE_DIR)/share/spice
+ SPICE_EXEC_DIR = $(SPICE_DIR)/bin
+
+ S_SPICE_DIR = $(SPICE_DIR)
+! S_SPICE_LIB_DIR = $(S_SPICE_DIR)/share/spice
+ S_SPICE_EXEC_DIR= $(S_SPICE_DIR)/bin
+
+ # INSTALL_DIRS lists the directories that need to be created before
+***************
+*** 132,142 ****
+ # an extra definition to work around the same strange bug. See either
+ # file "conf/vax" or "conf/gcc".
+
+! CC = cc
+
+ # CC_OPT: Default compile options (optimization/debug level, other)
+
+! CC_OPT = -g
+
+ # CC_OPT_SAFE: Special compile options to override CC_OPT for code
+ # which typically causes problems for most compilers (bsim1 and bsim2).
+--- 132,142 ----
+ # an extra definition to work around the same strange bug. See either
+ # file "conf/vax" or "conf/gcc".
+
+! CC = gcc
+
+ # CC_OPT: Default compile options (optimization/debug level, other)
+
+! CC_OPT =
+
+ # CC_OPT_SAFE: Special compile options to override CC_OPT for code
+ # which typically causes problems for most compilers (bsim1 and bsim2).
+***************
+*** 206,212 ****
+ # X_DIR indicates the top of the X11 lib/include hierarchy; it is only
+ # a convenience that is used in the following definitions.
+
+! X_DIR = /usr
+
+ # INCX lists the X include directories. This may be different between
+ # MIT X11r5, X11r4, and your vendor's version of X11, though listing
+--- 206,212 ----
+ # X_DIR indicates the top of the X11 lib/include hierarchy; it is only
+ # a convenience that is used in the following definitions.
+
+! X_DIR = /usr/X11R6
+
+ # INCX lists the X include directories. This may be different between
+ # MIT X11r5, X11r4, and your vendor's version of X11, though listing
+***************
+*** 286,292 ****
+ # code for either or both MFB (a terminal independent graphics
+ # interface) or X11.
+
+! INTERFACE_OPTS = -DWANT_MFB -DWANT_X11
+
+ # BUGADDR is the e-mail address to send bug reports. If left blank
+ # the "bug" command in spice will not operate.
+--- 286,292 ----
+ # code for either or both MFB (a terminal independent graphics
+ # interface) or X11.
+
+! INTERFACE_OPTS = -DWANT_X11
+
+ # BUGADDR is the e-mail address to send bug reports. If left blank
+ # the "bug" command in spice will not operate.
+***************
+*** 296,302 ****
+ # DEFAULT_EDITOR lists where the default editor used by the "edit"
+ # command is located.
+
+! DEFAULT_EDITOR = jove
+
+ # ASCII_RAWFILE indicates that the default format of the spice3 raw data
+ # file should be in human-readable format ( = 1 ) or in the smaller,
+--- 296,302 ----
+ # DEFAULT_EDITOR lists where the default editor used by the "edit"
+ # command is located.
+
+! DEFAULT_EDITOR = /usr/bin/vi
+
+ # ASCII_RAWFILE indicates that the default format of the spice3 raw data
+ # file should be in human-readable format ( = 1 ) or in the smaller,
+*** util/build.orig Sun Mar 31 10:56:09 1996
+--- util/build Sun Mar 31 10:57:21 1996
+***************
+*** 96,102 ****
+
+ TMP_LEADER="${TMP_DIR}/buildl$$"
+ TMP_TRAILER="${TMP_DIR}/buildt$$"
+! trap 'rm -f ${TMP_LEADER} ${TMP_TRAILER}; exit 1' 1 2 3 4 6 7 8 9 10 12 13 14 15
+ echo > "${TMP_TRAILER}"
+ BAD=false
+ DEBUG=
+--- 96,102 ----
+
+ TMP_LEADER="${TMP_DIR}/buildl$$"
+ TMP_TRAILER="${TMP_DIR}/buildt$$"
+! trap 'rm -f ${TMP_LEADER} ${TMP_TRAILER}; exit 1' 1 2 3 4 6 7 8 10 12 13 14 15
+ echo > "${TMP_TRAILER}"
+ BAD=false
+ DEBUG=
+*** src/lib/fte/resource.c.orig Sun Mar 31 10:59:57 1996
+--- src/lib/fte/resource.c Sun Mar 31 11:00:57 1996
+***************
+*** 369,375 ****
+--- 369,377 ----
+ long x;
+ SIGNAL_TYPE (*orig_signal)( );
+
++ #ifndef __FreeBSD__
+ if (getenv("SPICE_NO_DATASEG_CHECK"))
++ #endif
+ return 0;
+
+ low = 0;
+*** src/include/misc.h.orig Thu Dec 1 09:17:02 1994
+--- src/include/misc.h Sun Mar 31 12:32:58 1996
+***************
+*** 86,92 ****
+--- 86,94 ----
+ extern char *realloc();
+ extern char *getenv();
+ extern int errno;
++ #ifndef __FreeBSD__
+ extern char *sys_errlist[];
++ #endif
+ extern char *getenv();
+ extern char *getwd();
+ extern int rand();
+*** src/lib/misc/math.c.orig Sat Jun 19 06:13:39 1993
+--- src/lib/misc/math.c Sun Mar 31 13:38:40 1996
+***************
+*** 11,17 ****
+ #include "misc.h"
+ #include "suffix.h"
+
+! #ifdef HAS_NO_IEEE_LOGB
+
+ /* changed all instances of logb to normslogb (NJ) */
+ double normslogb(x)
+--- 11,17 ----
+ #include "misc.h"
+ #include "suffix.h"
+
+! #if (defined(HAS_NO_IEEE_LOGB) || defined(__FreeBSD__))
+
+ /* changed all instances of logb to normslogb (NJ) */
+ double normslogb(x)
+***************
+*** 58,64 ****
+
+ return x * z;
+ }
+-
+ #endif
+
+ #ifdef HAS_NO_ERFC
+--- 58,63 ----
diff --git a/cad/spice/files/patch-ab b/cad/spice/files/patch-ab
new file mode 100644
index 0000000..d561a07
--- /dev/null
+++ b/cad/spice/files/patch-ab
@@ -0,0 +1,140 @@
+*** src/lib/fte/grid.c.orig Sun Apr 25 14:53:11 1993
+--- src/lib/fte/grid.c Sat Jan 29 10:47:59 1994
+***************
+*** 17,22 ****
+--- 17,23 ----
+ #include "suffix.h"
+
+ #define RAD_TO_DEG (180.0 / M_PI)
++ #define LABEL_CHARS 20
+
+ static double *lingrid(), *loggrid();
+ static void polargrid(), smithgrid();
+***************
+*** 225,231 ****
+ int max;
+ static double dd[2];
+ int mult = 1;
+! char buf[16], *s;
+ int slim, digits;
+
+ if (axis == y_axis && graph->grid.ysized) {
+--- 226,232 ----
+ int max;
+ static double dd[2];
+ int mult = 1;
+! char buf[LABEL_CHARS], *s;
+ int slim, digits;
+
+ if (axis == y_axis && graph->grid.ysized) {
+***************
+*** 477,483 ****
+ drawlingrid(graph, units, spacing, nsp, dst, lmt, hmt, onedec, mult, mag,
+ digits, axis)
+ GRAPH *graph;
+! char units[16];
+ bool onedec;
+ int nsp, spacing, mult;
+ double hmt, lmt, dst;
+--- 478,484 ----
+ drawlingrid(graph, units, spacing, nsp, dst, lmt, hmt, onedec, mult, mag,
+ digits, axis)
+ GRAPH *graph;
+! char *units;
+ bool onedec;
+ int nsp, spacing, mult;
+ double hmt, lmt, dst;
+***************
+*** 488,494 ****
+
+ int i, j;
+ double m, step;
+! char buf[16];
+
+ /* i counts how many pixels we have drawn, and j counts which unit
+ * we are at.
+--- 489,495 ----
+
+ int i, j;
+ double m, step;
+! char buf[LABEL_CHARS];
+
+ /* i counts how many pixels we have drawn, and j counts which unit
+ * we are at.
+***************
+*** 567,573 ****
+ double k;
+ double decs;
+ double mag, gain;
+! char buf[32], *s;
+
+ if (axis == x_axis && graph->grid.xsized) {
+ lmt = graph->grid.xaxis.log.lmt;
+--- 568,574 ----
+ double k;
+ double decs;
+ double mag, gain;
+! char buf[LABEL_CHARS], *s;
+
+ if (axis == x_axis && graph->grid.xsized) {
+ lmt = graph->grid.xaxis.log.lmt;
+***************
+*** 671,677 ****
+ {
+ int i, j, k, l, m;
+ double t;
+! char buf[16];
+
+ /* Now plot every pp'th decade line, with subs lines between them. */
+ if (subs > 1)
+--- 672,678 ----
+ {
+ int i, j, k, l, m;
+ double t;
+! char buf[LABEL_CHARS];
+
+ /* Now plot every pp'th decade line, with subs lines between them. */
+ if (subs > 1)
+*** src/lib/fte/newcoms.c.orig Sun Mar 7 16:30:58 1993
+--- src/lib/fte/newcoms.c Wed Feb 23 22:39:55 1994
+***************
+*** 151,156 ****
+--- 151,160 ----
+ /* Copy from the first */
+ vname = cp_unquote(wl->wl_word);
+ dv = vec_get(vname);
++ if (!dv) {
++ printf("'%s' reference vector not found\n", vname);
++ return;
++ }
+ numdims = dv->v_numdims;
+ dims = dv->v_dims;
+ wl = wl->wl_next;
+*** src/lib/sparse/spsmp.c.orig Wed Feb 3 14:20:50 1993
+--- src/lib/sparse/spsmp.c Sun Jan 30 11:53:10 1994
+***************
+*** 483,492 ****
+ int CreateIfMissing;
+ {
+ MatrixPtr Matrix = (MatrixPtr)eMatrix;
+! ElementPtr Element = Matrix->FirstInCol[Col];
+
+ /* Begin `SMPfindElt'. */
+ ASSERT( IS_SPARSE( Matrix ) );
+ Element = spcFindElementInCol(Matrix, &Element, Row, Col, CreateIfMissing);
+ return (SMPelement *)Element;
+ }
+--- 485,497 ----
+ int CreateIfMissing;
+ {
+ MatrixPtr Matrix = (MatrixPtr)eMatrix;
+! ElementPtr Element;
+
+ /* Begin `SMPfindElt'. */
+ ASSERT( IS_SPARSE( Matrix ) );
++ Row = Matrix->ExtToIntRowMap[Row];
++ Col = Matrix->ExtToIntColMap[Col];
++ Element = Matrix->FirstInCol[Col];
+ Element = spcFindElementInCol(Matrix, &Element, Row, Col, CreateIfMissing);
+ return (SMPelement *)Element;
+ }
diff --git a/cad/spice/pkg-comment b/cad/spice/pkg-comment
new file mode 100644
index 0000000..e0a30e6
--- /dev/null
+++ b/cad/spice/pkg-comment
@@ -0,0 +1 @@
+Spice3f4, Circuit Simulator \ No newline at end of file
diff --git a/cad/spice/pkg-descr b/cad/spice/pkg-descr
new file mode 100644
index 0000000..8f365e0
--- /dev/null
+++ b/cad/spice/pkg-descr
@@ -0,0 +1,14 @@
+SPICE is a general-purpose circuit simulation program for nonlinear dc,
+nonlinear transient, and linear ac analyses. Circuits may contain resistors,
+capacitors, inductors, mutual inductors, independent voltage and current
+sources, four types of dependent sources, lossless and lossy transmission
+lines (two separate implementations), switches, uniform distributed RC
+lines, and the five most common semiconductor devices: diodes, BJTs, JFETs,
+MESFETs, and MOSFETs.
+
+ From the SPICE3 Version3f3 User's Manual.
+ This is availble as a postscript document from:
+ ftp://ic.eecs.berkeley.edu/pub/Spice3/um.3f3.ps
+
+Julian Jenkins
+kaveman@magna.com.au \ No newline at end of file
diff --git a/cad/spice/pkg-plist b/cad/spice/pkg-plist
new file mode 100644
index 0000000..8db12a9
--- /dev/null
+++ b/cad/spice/pkg-plist
@@ -0,0 +1,17 @@
+bin/spice3
+bin/nutmeg
+bin/sconvert
+bin/help
+bin/proc2mod
+bin/multidec
+share/spice/helpdir/spice.txt
+share/spice/helpdir/spice.idx
+share/spice/scripts/setplot
+share/spice/scripts/spinit
+share/spice/mfbcap
+share/spice/news
+man/man5/mfbcap.5.gz
+man/man1/sconvert.1.gz
+man/man1/nutmeg.1.gz
+man/man1/spice.1.gz
+man/man3/mfb.3.gz
diff --git a/cad/spice/scripts/configure b/cad/spice/scripts/configure
new file mode 100644
index 0000000..a7a9c4a
--- /dev/null
+++ b/cad/spice/scripts/configure
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+rm -f ${WRKSRC}/makefile
+cp ${FILESDIR}/Makefile ${WRKSRC}/Makefile
+cp ${FILESDIR}/FreeBSD ${WRKSRC}/conf/FreeBSD \ No newline at end of file
OpenPOWER on IntegriCloud