1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Finally, a port of the famous circuit simulation system.

Submitted by:	Julian Jenkins <kaveman@magna.com.au>
This commit is contained in:
Thomas Gellekum 1996-05-23 08:17:41 +00:00
parent 805d9aef3d
commit 79e8f75f8d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=3120
10 changed files with 413 additions and 0 deletions

34
cad/spice/Makefile Normal file
View File

@ -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>

1
cad/spice/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (spice3f4.tar.gz) = 8b0daf037e68aa675e37e23632150b4d

9
cad/spice/files/FreeBSD Normal file
View File

@ -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

11
cad/spice/files/Makefile Normal file
View File

@ -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

181
cad/spice/files/patch-aa Normal file
View File

@ -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 ----

140
cad/spice/files/patch-ab Normal file
View File

@ -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;
}

1
cad/spice/pkg-comment Normal file
View File

@ -0,0 +1 @@
Spice3f4, Circuit Simulator

14
cad/spice/pkg-descr Normal file
View File

@ -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

17
cad/spice/pkg-plist Normal file
View File

@ -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

5
cad/spice/scripts/configure vendored Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
rm -f ${WRKSRC}/makefile
cp ${FILESDIR}/Makefile ${WRKSRC}/Makefile
cp ${FILESDIR}/FreeBSD ${WRKSRC}/conf/FreeBSD