diff options
author | pav <pav@FreeBSD.org> | 2006-06-27 02:34:59 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2006-06-27 02:34:59 +0800 |
commit | d5800da692242fd547b3d7b88d348a35751fdaf2 (patch) | |
tree | d4119bb02dd9c4b2b1a9711b3ca2636c68d552c3 /cad | |
parent | 0b8b3fa270816dc38b170e98c37d591ea3c70bbd (diff) | |
download | freebsd-ports-gnome-d5800da692242fd547b3d7b88d348a35751fdaf2.tar.gz freebsd-ports-gnome-d5800da692242fd547b3d7b88d348a35751fdaf2.tar.zst freebsd-ports-gnome-d5800da692242fd547b3d7b88d348a35751fdaf2.zip |
TclSpice is an improved version of Berkeley Spice designed to be used with
the Tcl/Tk scripting language. The project is open-source (BSD license)
and based upon the NG-Spice source code base with many improvements
Features and Improvements
- Fully Tcl scriptable - installs with 'package require spice' statement
- Hspice syntax (SpicePP).
- GUI interfaces, various (Tk).
- SpiceWish (BLT graph widget)
- BLT (tcl compatible) vectors for storage, manipulation and arithmetic
upon Spice waveforms.
- Xspice additions (Georgia Tech).
- Trigger upon waveform events.
- Spice 'simulator state' save and restore for rapid 'what-if' simulations
(no longer need to re-simulate from the beginning each time a
device value is changed).
Author: Stefan Jones <stefan.jones@multigig.com>
WWW: http://tclspice.sourceforge.net/
PR: ports/99399
Submitted by: Stanislav Sedov <ssedov@mbsd.msk.ru>
Diffstat (limited to 'cad')
-rw-r--r-- | cad/Makefile | 1 | ||||
-rw-r--r-- | cad/tclspice/Makefile | 67 | ||||
-rw-r--r-- | cad/tclspice/distinfo | 3 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_Makefile.am | 49 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_frontend_aspice.c | 11 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_frontend_parser_complete.c | 45 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_frontend_resource.c | 41 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_spicelib_devices_names.c | 10 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_spicepp.pl.in | 11 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_spicewish | 11 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_tcl_plot.tcl | 10 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_tcl_vector_test.tcl | 10 | ||||
-rw-r--r-- | cad/tclspice/files/patch-src_xspice_icm_Makefile | 14 | ||||
-rw-r--r-- | cad/tclspice/files/pkg-message.in | 7 | ||||
-rw-r--r-- | cad/tclspice/pkg-descr | 19 | ||||
-rw-r--r-- | cad/tclspice/pkg-plist | 28 |
16 files changed, 337 insertions, 0 deletions
diff --git a/cad/Makefile b/cad/Makefile index 1f11cc7aa02d..7b212826caa4 100644 --- a/cad/Makefile +++ b/cad/Makefile @@ -57,6 +57,7 @@ SUBDIR += slffea SUBDIR += spice SUBDIR += systemc + SUBDIR += tclspice SUBDIR += tkgate SUBDIR += tochnog SUBDIR += transcalc diff --git a/cad/tclspice/Makefile b/cad/tclspice/Makefile new file mode 100644 index 000000000000..d9f9f543e905 --- /dev/null +++ b/cad/tclspice/Makefile @@ -0,0 +1,67 @@ +# New ports collection makefile for: tclspice +# Date created: 2006-06-24 +# Whom: Stanislav Sedov <stas@fonon.realnet> +# +# $FreeBSD$ +# + +PORTNAME= tclspice +PORTVERSION= 0.2.18 +CATEGORIES= cad +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= tclspice + +MAINTAINER= ssedov@mbsd.msk.ru +COMMENT= Improved version on SPICE3 suite with TCL scripting features + +BUILD_DEPENDS= bltwish:${PORTSDIR}/x11-toolkits/blt \ + ${LOCALBASE}/lib/libtclreadline.so:${PORTSDIR}/devel/tclreadline +RUN_DEPENDS= ${BUILD_DEPENDS} + +WRKSRC= ${WRKDIR}/${PORTNAME} +USE_AUTOTOOLS= aclocal:19 automake:19 autoconf:259 libtool:15 +AUTOMAKE_ARGS= -c -a +USE_GMAKE= yes +ALL_TARGET= tcl +INSTALL_TARGET= install-tcl +INSTALLS_SHLIB= yes + +SUB_FILES= pkg-message + +OPTIONS= EXPERIMENTAL "Enable experimental features" on \ + EXAMPLES "Install sample scrips" on + +CONFIGURE_ARGS= --with-tcl=${LOCALBASE}/lib/tcl8.4 +CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include ${CFLAGS} -fPIC" \ + LDFLAGS="-L${LOCALBASE}/lib" +ACLOCAL_ARGS= --acdir=${ACLOCAL_DIR} -I ${LOCALBASE}/share/aclocal + +WISH= ${LOCALBASE}/bin/wish8.4 + +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_EXPERIMENTAL) +CONFIGURE_ARGS+= --enable-experimental +.endif + +.if !defined(WITHOUT_EXAMPLES) +PLIST_SUB+= EXAMPLES="" +.else +PLIST_SUB+= EXAMPLES="@comment " +.endif + +post-patch: +.for FILE in spicewish tcl/plot.tcl tcl/vector_test.tcl + @${REINPLACE_CMD} -e 's|%%WISH%%|${WISH}|g' ${WRKSRC}/src/${FILE} +.endfor + +post-install: +.if !defined(WITHOUT_EXAMPLES) + @${MKDIR} ${EXAMPLESDIR} +.for FILE in README example.cir plot.tcl vector_test.tcl + @${INSTALL_DATA} ${WRKSRC}/src/tcl/${FILE} ${EXAMPLESDIR} +.endfor + @${CAT} ${PKGMESSAGE} +.endif + +.include <bsd.port.post.mk> diff --git a/cad/tclspice/distinfo b/cad/tclspice/distinfo new file mode 100644 index 000000000000..0800de4498f2 --- /dev/null +++ b/cad/tclspice/distinfo @@ -0,0 +1,3 @@ +MD5 (tclspice-0.2.18.tar.gz) = a7c02132ca74064611011f8dee6bd3d5 +SHA256 (tclspice-0.2.18.tar.gz) = 0393a61b89a56b5dba2444a8914cb85b6212b552f2fbc80f0a822bfe04b74f5e +SIZE (tclspice-0.2.18.tar.gz) = 2985319 diff --git a/cad/tclspice/files/patch-src_Makefile.am b/cad/tclspice/files/patch-src_Makefile.am new file mode 100644 index 000000000000..1c94ec5415b3 --- /dev/null +++ b/cad/tclspice/files/patch-src_Makefile.am @@ -0,0 +1,49 @@ +--- src/Makefile.am.orig Fri Jul 23 20:22:10 2004 ++++ src/Makefile.am Sat Jun 24 03:43:15 2006 +@@ -181,12 +181,12 @@ + + pkgIndex.tcl: pkgIndex.tcl.in + rm -f $@ +- sed -e 's;%LIB_DIR%;$(TCL_PKG_PATH);g' $< | \ ++ sed -e 's;%LIB_DIR%;$(libdir);g' $< | \ + sed -e 's;%VERSION%;$(TCLSPICE_VERSION);g' > $@ + + spicepp.pl: spicepp.pl.in + rm -f $@ +- sed -e 's;%LIB_DIR%;$(TCL_PKG_PATH);g' $< | \ ++ sed -e 's;%LIB_DIR%;$(libdir);g' $< | \ + sed -e 's;%VERSION%;$(TCLSPICE_VERSION);g' > $@ + + install-tcl: install-tcl-recursive install-tclspice install-data-am +@@ -199,17 +199,17 @@ + done; + + install-tclspice: $(TCL_FILES) +- $(mkinstalldirs) $(DESTDIR)$(TCL_PKG_PATH) +- $(INSTALL_DATA) libspice.so $(DESTDIR)$(TCL_PKG_PATH) +- $(mkinstalldirs) $(DESTDIR)$(TCL_PKG_PATH)/spice +- $(INSTALL_PROGRAM) spicepp.pl $(DESTDIR)$(TCL_PKG_PATH)/spice +- $(INSTALL_PROGRAM) measure_spice.pl $(DESTDIR)$(TCL_PKG_PATH)/spice ++ $(mkinstalldirs) $(DESTDIR)$(libdir) ++ $(INSTALL_DATA) libspice.so $(DESTDIR)$(libdir) ++ $(mkinstalldirs) $(DESTDIR)$(libdir)/tclspice ++ $(INSTALL_SCRIPT) spicepp.pl $(DESTDIR)$(libdir)/tclspice ++ $(INSTALL_SCRIPT) measure_spice.pl $(DESTDIR)$(libdir)/tclspice + @for f in $(TCL_SOURCE) ; do \ +- echo $(INSTALL_DATA) $$f $(DESTDIR)$(TCL_PKG_PATH)/spice; \ +- $(INSTALL_DATA) $$f $(DESTDIR)$(TCL_PKG_PATH)/spice; \ ++ echo $(INSTALL_DATA) $$f $(DESTDIR)$(libdir)/tclspice; \ ++ $(INSTALL_DATA) $$f $(DESTDIR)$(libdir)/tclspice; \ + done + $(mkinstalldirs) $(DESTDIR)$(bindir) +- $(INSTALL_PROGRAM) spicewish $(DESTDIR)$(bindir) ++ $(INSTALL_SCRIPT) spicewish $(DESTDIR)$(bindir) + + tclspice.o: tclspice.c + $(COMPILE) -c -fpic tclspice.c -DTCLSPICE_version="\"$(TCLSPICE_VERSION)\"" +@@ -229,4 +229,4 @@ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) all) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; +- make $(TCL_FILES) ++ gmake $(TCL_FILES) diff --git a/cad/tclspice/files/patch-src_frontend_aspice.c b/cad/tclspice/files/patch-src_frontend_aspice.c new file mode 100644 index 000000000000..cf88a40304ba --- /dev/null +++ b/cad/tclspice/files/patch-src_frontend_aspice.c @@ -0,0 +1,11 @@ +--- ./src/frontend/aspice.c.orig Sat Jun 24 01:39:15 2006 ++++ ./src/frontend/aspice.c Sat Jun 24 01:39:39 2006 +@@ -176,7 +176,7 @@ + * whether the exit was normal or not. + */ + +-#if defined(__NetBSD__) || defined(SOLARIS) ++#if defined(__NetBSD__) || defined(SOLARIS) || defined(__FreeBSD__) + pid_t status; + #else + union wait status; diff --git a/cad/tclspice/files/patch-src_frontend_parser_complete.c b/cad/tclspice/files/patch-src_frontend_parser_complete.c new file mode 100644 index 000000000000..c096cff128a2 --- /dev/null +++ b/cad/tclspice/files/patch-src_frontend_parser_complete.c @@ -0,0 +1,45 @@ +--- ./src/frontend/parser/complete.c.orig Sat Jun 24 01:40:09 2006 ++++ ./src/frontend/parser/complete.c Sat Jun 24 01:40:17 2006 +@@ -415,7 +415,7 @@ + # else + # ifdef HAVE_TERMIOS_H + +-# if defined(__NetBSD__) || defined(__APPLE_CC__) ++# if defined(__NetBSD__) || defined(__APPLE_CC__) || defined(__FreeBSD__) + # define TCGETS + # define TCSETS + # endif +@@ -428,7 +428,7 @@ + # endif + # endif + +-# if defined(TERM_GET) || defined(__NetBSD__) || defined(__APPLE_CC__) ++# if defined(TERM_GET) || defined(__NetBSD__) || defined(__APPLE_CC__) || defined(__FreeBSD__) + static bool ison = FALSE; + + if (cp_nocc || !cp_interactive || (ison == on)) +@@ -436,7 +436,7 @@ + ison = on; + + if (ison == TRUE) { +-#if defined(__NetBSD__) || defined(__APPLE_CC__) ++#if defined(__NetBSD__) || defined(__APPLE_CC__) || defined(__FreeBSD__) + tcgetattr(fileno(cp_in),&OS_Buf); + #else + (void) ioctl(fileno(cp_in), TERM_GET, (char *) &OS_Buf); +@@ -445,13 +445,13 @@ + sbuf.c_cc[VEOF] = 0; + sbuf.c_cc[VEOL] = ESCAPE; + sbuf.c_cc[VEOL2] = CNTRL_D; +-#if defined(__NetBSD__) || defined(__APPLE_CC__) ++#if defined(__NetBSD__) || defined(__APPLE_CC__) || defined(__FreeBSD__) + tcsetattr(fileno(cp_in),TCSANOW,&sbuf); + #else + (void) ioctl(fileno(cp_in), TERM_SET, (char *) &sbuf); + #endif + } else { +-#if defined(__NetBSD__) || defined(__APPLE_CC__) ++#if defined(__NetBSD__) || defined(__APPLE_CC__) || defined(__FreeBSD__) + tcsetattr(fileno(cp_in),TCSANOW,&OS_Buf); + #else + (void) ioctl(fileno(cp_in), TERM_SET, (char *) &OS_Buf); diff --git a/cad/tclspice/files/patch-src_frontend_resource.c b/cad/tclspice/files/patch-src_frontend_resource.c new file mode 100644 index 000000000000..2527af20005d --- /dev/null +++ b/cad/tclspice/files/patch-src_frontend_resource.c @@ -0,0 +1,41 @@ +--- src/frontend/resource.c.orig Sat Jun 24 04:53:17 2006 ++++ src/frontend/resource.c Sat Jun 24 04:55:41 2006 +@@ -311,7 +311,7 @@ + static RETSIGTYPE + fault(void) + { +- signal(SIGSEGV, (SIGNAL_FUNCTION) fault); /* SysV style */ ++ signal(SIGBUS, (SIGNAL_FUNCTION) fault); /* SysV style */ + siglongjmp(env, 1); + } + #if !defined(__MINGW32__) && !defined(__APPLE_CC__) +@@ -321,7 +321,8 @@ + char *low, *high, *at; + /* char *sbrk(int); */ + long x; +- RETSIGTYPE (*orig_signal)( ); ++ RETSIGTYPE (*orig_sigsegv)( ); ++ RETSIGTYPE (*orig_sigbus)( ); + + if (getenv("SPICE_NO_DATASEG_CHECK")) + return 0; +@@ -330,7 +331,8 @@ + low = 0; + high = (char *) ((unsigned long) sbrk(0) & ~((1 << LOG2_PAGESIZE) - 1)); + +- orig_signal = signal(SIGSEGV, (SIGNAL_FUNCTION) fault); ++ orig_sigsegv = signal(SIGSEGV, (SIGNAL_FUNCTION) fault); ++ orig_sigbus = signal(SIGBUS, (SIGNAL_FUNCTION) fault); + + do { + +@@ -358,7 +360,8 @@ + + } while (1); + +- (void) signal(SIGSEGV, (SIGNAL_FUNCTION) orig_signal); ++ (void) signal(SIGSEGV, (SIGNAL_FUNCTION) orig_sigsegv); ++ (void) signal(SIGBUS, (SIGNAL_FUNCTION) orig_sigbus); + return (void *) high; + } + #endif diff --git a/cad/tclspice/files/patch-src_spicelib_devices_names.c b/cad/tclspice/files/patch-src_spicelib_devices_names.c new file mode 100644 index 000000000000..f6542f61cba0 --- /dev/null +++ b/cad/tclspice/files/patch-src_spicelib_devices_names.c @@ -0,0 +1,10 @@ +--- ./src/spicelib/devices/names.c.orig Sat Jun 24 02:01:08 2006 ++++ ./src/spicelib/devices/names.c Sat Jun 24 02:01:17 2006 +@@ -28,7 +28,6 @@ + #include <assert.h> + #include <stdlib.h> + #include <string.h> +-#include <malloc.h> + + #define __NAMES_PRIVATE__ + #include "names.h" diff --git a/cad/tclspice/files/patch-src_spicepp.pl.in b/cad/tclspice/files/patch-src_spicepp.pl.in new file mode 100644 index 000000000000..958d6541431f --- /dev/null +++ b/cad/tclspice/files/patch-src_spicepp.pl.in @@ -0,0 +1,11 @@ +--- src/spicepp.pl.in.orig Sat Jun 24 03:44:04 2006 ++++ src/spicepp.pl.in Sat Jun 24 03:44:16 2006 +@@ -307,7 +307,7 @@ + push(@xtra, ".control"); + push(@xtra, "print time $trig $targ > meas.data"); + push(@xtra, "echo $_ > meas.ctl"); +- push(@xtra, "shell %LIB_DIR%/spice/measure_spice.pl $name"); ++ push(@xtra, "shell %LIB_DIR%/tclspice/measure_spice.pl $name"); + push(@xtra, ".endc"); + splice(@deck,$i,1,@xtra); + @xtra=(); diff --git a/cad/tclspice/files/patch-src_spicewish b/cad/tclspice/files/patch-src_spicewish new file mode 100644 index 000000000000..3be8dc9e5556 --- /dev/null +++ b/cad/tclspice/files/patch-src_spicewish @@ -0,0 +1,11 @@ +--- src/spicewish.orig Sat Jun 24 04:21:41 2006 ++++ src/spicewish Sat Jun 24 04:21:59 2006 +@@ -2,7 +2,7 @@ + # 22/6/04 -ad + + # the next line starts SpiceWish interactively with the given file name \ +-exec wish "$0" "$@" ++exec %%WISH%% "$0" "$@" + + package require spice + package require tclreadline diff --git a/cad/tclspice/files/patch-src_tcl_plot.tcl b/cad/tclspice/files/patch-src_tcl_plot.tcl new file mode 100644 index 000000000000..e1a3bc141c0d --- /dev/null +++ b/cad/tclspice/files/patch-src_tcl_plot.tcl @@ -0,0 +1,10 @@ +--- src/tcl/plot.tcl.orig Sat Jun 24 05:36:11 2006 ++++ src/tcl/plot.tcl Sat Jun 24 05:36:33 2006 +@@ -1,6 +1,6 @@ + #!/bin/sh + # WishFix \ +- exec wish -f "$0" ${1+"$@"} ++ exec %%WISH%% -f "$0" ${1+"$@"} + ### + + package require spice diff --git a/cad/tclspice/files/patch-src_tcl_vector_test.tcl b/cad/tclspice/files/patch-src_tcl_vector_test.tcl new file mode 100644 index 000000000000..43ccd03f4273 --- /dev/null +++ b/cad/tclspice/files/patch-src_tcl_vector_test.tcl @@ -0,0 +1,10 @@ +--- src/tcl/vector_test.tcl.orig Sat Jun 24 05:37:20 2006 ++++ src/tcl/vector_test.tcl Sat Jun 24 05:37:14 2006 +@@ -1,6 +1,6 @@ + #!/bin/sh + # WishFix \ +- exec wish -f "$0" ${1+"$@"} ++ exec %%WISH%% -f "$0" ${1+"$@"} + ### + + package require BLT diff --git a/cad/tclspice/files/patch-src_xspice_icm_Makefile b/cad/tclspice/files/patch-src_xspice_icm_Makefile new file mode 100644 index 000000000000..38675ebbf4ed --- /dev/null +++ b/cad/tclspice/files/patch-src_xspice_icm_Makefile @@ -0,0 +1,14 @@ +--- src/xspice/icm/Makefile.orig Sat Jun 24 05:04:12 2006 ++++ src/xspice/icm/Makefile Sat Jun 24 05:04:39 2006 +@@ -12,9 +12,9 @@ + -include .deps/cm.P + -include .deps/dlmain.P + +-UPMAKE = make -f $(TOPDIR)../Makefile TOPDIR=$(TOPDIR)../ ++UPMAKE = gmake -f $(TOPDIR)../Makefile TOPDIR=$(TOPDIR)../ + +-MAKE = make -f $(TOPDIR)Makefile TOPDIR=$(TOPDIR) ++MAKE = gmake -f $(TOPDIR)Makefile TOPDIR=$(TOPDIR) + + COMPILE = $(CC) $(INCLUDES) $(CFLAGS) + diff --git a/cad/tclspice/files/pkg-message.in b/cad/tclspice/files/pkg-message.in new file mode 100644 index 000000000000..dd26621993ca --- /dev/null +++ b/cad/tclspice/files/pkg-message.in @@ -0,0 +1,7 @@ +============================================================================ + +Example scrips was installed in %%EXAMPLESDIR%%. Take a +look on %%EXAMPLESDIR%%/README for additional information +on how to create your own Tcl scrips. + +============================================================================ diff --git a/cad/tclspice/pkg-descr b/cad/tclspice/pkg-descr new file mode 100644 index 000000000000..cbc2c349d0ee --- /dev/null +++ b/cad/tclspice/pkg-descr @@ -0,0 +1,19 @@ +TclSpice is an improved version of Berkeley Spice designed to be used with +the Tcl/Tk scripting language. The project is open-source (BSD license) +and based upon the NG-Spice source code base with many improvements + +Features and Improvements + - Fully Tcl scriptable - installs with 'package require spice' statement + - Hspice syntax (SpicePP). + - GUI interfaces, various (Tk). + - SpiceWish (BLT graph widget) + - BLT (tcl compatible) vectors for storage, manipulation and arithmetic + upon Spice waveforms. + - Xspice additions (Georgia Tech). + - Trigger upon waveform events. + - Spice 'simulator state' save and restore for rapid 'what-if' simulations + (no longer need to re-simulate from the beginning each time a + device value is changed). + +Author: Stefan Jones <stefan.jones@multigig.com> +WWW: http://tclspice.sourceforge.net/ diff --git a/cad/tclspice/pkg-plist b/cad/tclspice/pkg-plist new file mode 100644 index 000000000000..fb1479d53055 --- /dev/null +++ b/cad/tclspice/pkg-plist @@ -0,0 +1,28 @@ +bin/spicewish +lib/libspice.so +lib/tclspice/controls.tcl +lib/tclspice/engUnits.tcl +lib/tclspice/gnuplot.tcl +lib/tclspice/measure.tcl +lib/tclspice/measure_spice.pl +lib/tclspice/nodeDialog.tcl +lib/tclspice/pkgIndex.tcl +lib/tclspice/readline.tcl +lib/tclspice/spicepp.pl +lib/tclspice/spicepp.tcl +lib/tclspice/spicewish.tcl +lib/tclspice/viewer.tcl +%%DATADIR%%/helpdir/ngspice.idx +%%DATADIR%%/helpdir/ngspice.txt +%%DATADIR%%/scripts/setplot +%%DATADIR%%/scripts/spectrum +%%DATADIR%%/scripts/spinit +%%EXAMPLES%%share/examples/tclspice/README +%%EXAMPLES%%share/examples/tclspice/example.cir +%%EXAMPLES%%share/examples/tclspice/plot.tcl +%%EXAMPLES%%share/examples/tclspice/vector_test.tcl +%%EXAMPLES%%@dirrm share/examples/tclspice +@dirrm lib/tclspice +@dirrm %%DATADIR%%/helpdir +@dirrm %%DATADIR%%/scripts +@dirrm %%DATADIR%% |