rework 21
This commit is contained in:
parent
0c91ae3e79
commit
0e2b413971
@ -1 +1 @@
|
||||
ng-spice-rework-20.tar.gz
|
||||
ngspice-rework-20.cvs20100619.tar.bz2
|
||||
|
@ -4,3 +4,4 @@ ngspice-19-1_fc11:HEAD:ngspice-19-1.fc11.src.rpm:1249833090
|
||||
ngspice-20-1_fc12:HEAD:ngspice-20-1.fc12.src.rpm:1259910372
|
||||
ngspice-20-2_fc12:HEAD:ngspice-20-2.fc12.src.rpm:1260231894
|
||||
ngspice-20-3_fc12:HEAD:ngspice-20-3.fc12.src.rpm:1260314184
|
||||
ngspice-21-1_cvs20100620_fc12:HEAD:ngspice-21-1.cvs20100620.fc12.src.rpm:1278012202
|
||||
|
@ -1,12 +0,0 @@
|
||||
#ifndef _COMPATMODE_H
|
||||
#define _COMPATMODE_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
typedef enum {
|
||||
COMPATMODE_NATIVE = 0,
|
||||
COMPATMODE_HSPICE = 1,
|
||||
COMPATMODE_SPICE3 = 2
|
||||
} COMPATMODE_T ;
|
||||
|
||||
#endif
|
@ -1,101 +0,0 @@
|
||||
--- src/main.c 2009-10-24 08:28:09.000000000 +0200
|
||||
+++ main.c 2009-12-07 22:42:09.000000000 +0100
|
||||
@@ -5,7 +5,7 @@
|
||||
Author: 1985 Wayne A. Christopher
|
||||
|
||||
The main routine for ngspice
|
||||
- $Id: main.c,v 1.58 2009/10/24 06:28:09 dwarning Exp $
|
||||
+ $Id: main.c,v 1.60 2009/12/07 21:42:09 h_vogt Exp $
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "frontend/variable.h"
|
||||
#include "frontend/display.h" /* added by SDB to pick up Input() fcn */
|
||||
#include "frontend/signal_handler.h"
|
||||
+#include "compatmode.h"
|
||||
|
||||
/* saj xspice headers */
|
||||
#ifdef XSPICE
|
||||
@@ -188,9 +189,14 @@
|
||||
extern struct comm spcp_coms[ ];
|
||||
struct comm *cp_coms = spcp_coms;
|
||||
|
||||
-extern int OUTpBeginPlot(), OUTpData(), OUTwBeginPlot(), OUTwReference();
|
||||
-extern int OUTwData(), OUTwEnd(), OUTendPlot(), OUTbeginDomain();
|
||||
-extern int OUTendDomain(), OUTstopnow(), OUTerror(), OUTattributes();
|
||||
+extern int OUTpBeginPlot(void *,void *,IFuid,IFuid,int,int,IFuid *,int,void **);
|
||||
+extern int OUTpData(void *,IFvalue *,IFvalue *);
|
||||
+extern int OUTwBeginPlot(void *,void *,IFuid,IFuid,int,int,IFuid *,int,void **);
|
||||
+extern int OUTwReference(void *,IFvalue *,void **);
|
||||
+extern int OUTwData(void *,int,IFvalue *,void *), OUTwEnd(void *), OUTendPlot(void *);
|
||||
+extern int OUTbeginDomain(void *,IFuid,int,IFvalue *);
|
||||
+extern int OUTendDomain(void *), OUTstopnow(void), OUTerror(int,char *,IFuid *);
|
||||
+extern int OUTattributes(void *,IFuid *,int,IFvalue *);
|
||||
|
||||
IFfrontEnd nutmeginfo = {
|
||||
IFnewUid,
|
||||
@@ -347,6 +353,26 @@
|
||||
int DEVmaxnum = 0;
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
+/* Set a compatibility flag.
|
||||
+ Currently available are flags for:
|
||||
+ ngspice (standard)
|
||||
+ HSPICE
|
||||
+ Spice3
|
||||
+*/
|
||||
+COMPATMODE_T ngspice_compat_mode(void)
|
||||
+{
|
||||
+ char behaviour[80] ;
|
||||
+
|
||||
+ if( cp_getvar("ngbehavior", VT_STRING, behaviour)){
|
||||
+ if (strcasecmp(behaviour,"hspice")==0)
|
||||
+ return( COMPATMODE_HSPICE ) ;
|
||||
+ if (strcasecmp(behaviour,"spice3")==0)
|
||||
+ return( COMPATMODE_SPICE3 ) ;
|
||||
+ }
|
||||
+ return(COMPATMODE_NATIVE) ;
|
||||
+} /* end ngspice_compat_mode() */
|
||||
+
|
||||
+/* -------------------------------------------------------------------------- */
|
||||
int
|
||||
SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator)
|
||||
{
|
||||
@@ -553,6 +579,7 @@
|
||||
" -i, --interactive run in interactive mode\n"
|
||||
" -n, --no-spiceinit don't load the local or user's config file\n"
|
||||
" -o, --output=FILE set the outputfile\n"
|
||||
+ " -p, --pipe run in I/O pipe mode\n"
|
||||
" -q, --completion activate command completion\n"
|
||||
" -r, --rawfile=FILE set the rawfile output\n"
|
||||
" -s, --server run spice as a server process\n"
|
||||
@@ -759,6 +786,7 @@
|
||||
{"interactive", 0, 0, 'i'},
|
||||
{"no-spiceinit", 0, 0, 'n'},
|
||||
{"output", 1, 0, 'o'},
|
||||
+ {"pipe", 0, 0, 'p'},
|
||||
{"completion", 0, 0, 'q'},
|
||||
{"rawfile", 1, 0, 'r'},
|
||||
{"server", 0, 0, 's'},
|
||||
@@ -766,7 +794,7 @@
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
- c = getopt_long (argc, argv, "hvbac:ihno:qr:st:",
|
||||
+ c = getopt_long (argc, argv, "hvbac:ihno:pqr:st:",
|
||||
long_options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
@@ -826,6 +854,11 @@
|
||||
}
|
||||
break;
|
||||
|
||||
+ case 'p': /* Run in pipe mode */
|
||||
+ iflag = TRUE;
|
||||
+ istty = TRUE;
|
||||
+ break;
|
||||
+
|
||||
case 'q': /* Command completion */
|
||||
qflag = TRUE;
|
||||
break;
|
82
ngspice.spec
82
ngspice.spec
@ -1,25 +1,32 @@
|
||||
#
|
||||
## To download development trunk
|
||||
#
|
||||
# cvs -d:pserver:anonymous@ngspice.cvs.sourceforge.net:/cvsroot/ngspice login
|
||||
# cvs -z3 -d:pserver:anonymous@ngspice.cvs.sourceforge.net:/cvsroot/ngspice co -P ngspice
|
||||
# tar cjf ~/rpmbuild/SOURCES/ngspice-rework-20.cvs`date '+%Y%m%d'`.tar.bz2 ngspice
|
||||
|
||||
Name: ngspice
|
||||
Version: 20
|
||||
Release: 3%{?dist}
|
||||
Version: 21
|
||||
Release: 1.cvs20100620%{?dist}
|
||||
Summary: A mixed level/signal circuit simulator
|
||||
|
||||
License: BSD
|
||||
Group: Applications/Engineering
|
||||
URL: http://%{name}.sourceforge.net/
|
||||
URL: http://ngspice.sourceforge.net
|
||||
|
||||
#Source0: http://downloads.sourceforge.net/sourceforge/%{name}/ngspice%{version}_100620.zip
|
||||
Source0: ngspice-rework-20.cvs20100619.tar.bz2
|
||||
|
||||
Source0: http://downloads.sourceforge.net/sourceforge/%{name}/ng-spice-rework-%{version}.tar.gz
|
||||
Source1: ngspice-rework-20-compatmode.h
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# Ensuring interoperability with xcircuit via Tcl
|
||||
Patch0: %{name}-xcircuit_bridge.patch
|
||||
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
# Ensured interoperability with xcircuit via Tcl
|
||||
|
||||
BuildRequires: readline-devel, libXext-devel, libpng-devel, libICE-devel
|
||||
BuildRequires: libXaw-devel, mesa-libGL-devel, libXt-devel, automake, libtool
|
||||
BuildRequires: lyx
|
||||
|
||||
Obsoletes: ngspice-doc < 20-4.cvs20100619
|
||||
Provides: ngspice-doc = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Ngspice is a general-purpose circuit simulator program.
|
||||
@ -43,18 +50,6 @@ develop their own models for devices using the codemodel interface.
|
||||
It could be used for VLSI simulations as well.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for ngspice, a mixed level/signal circuit simulator
|
||||
Group: Documentation
|
||||
Requires: ngspice = %{version}-%{release}
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
|
||||
%description doc
|
||||
This package contains the documentation of ngspice in pdf, postscript
|
||||
and info format.
|
||||
|
||||
|
||||
%package -n tclspice
|
||||
Summary: Tcl/Tk interface for ngspice
|
||||
Group: Applications/Engineering
|
||||
@ -67,11 +62,8 @@ the Tcl/Tk scripting language. The project is based upon the NG-Spice source
|
||||
code base with many improvements.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0 -p0 -b .xcircuit
|
||||
|
||||
cp -p %{SOURCE1} src/include/compatmode.h
|
||||
%setup -q -n ngspice
|
||||
cd ng-spice-rework
|
||||
|
||||
# make sure the examples are UTF-8...
|
||||
for nonUTF8 in examples/tclspice/tcl-testbench4/selectfromlist.tcl \
|
||||
@ -106,9 +98,11 @@ examples/tclspice/tcl-testbench4/tcl-testbench4.tcl
|
||||
#{__aclocal}
|
||||
#{__automake} --add-missing
|
||||
#{__autoconf}
|
||||
./autogen.sh
|
||||
|
||||
%build
|
||||
|
||||
cd ng-spice-rework
|
||||
|
||||
# ---- Tclspice ----------------------------------------------------------------
|
||||
# Adding BLT support
|
||||
@ -121,6 +115,9 @@ export CFLAGS="%{optflags} -I%{_includedir}/blt"
|
||||
# Configure tclspice
|
||||
cd tclspice
|
||||
sed -i "s|\#define NGSPICEDATADIR \"\`echo \$dprefix/share/ngspice\`\"|\#define NGSPICEDATADIR \"\`echo %{_libdir}/tclspice\`\"|" configure*
|
||||
# fix ng-spice-manuals directory location
|
||||
sed -i 's|../ng-spice-manuals|../../ng-spice-manuals|g' manual/Makefile.am
|
||||
|
||||
%configure \
|
||||
--disable-xgraph \
|
||||
--enable-xspice \
|
||||
@ -162,10 +159,12 @@ cd ..
|
||||
--enable-ndev \
|
||||
--libdir=%{_libdir}
|
||||
|
||||
%{__make} %{?_smp_mflags}
|
||||
%{__make}
|
||||
# %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
cd ng-spice-rework
|
||||
|
||||
%{__make} INSTALL="install -p" install DESTDIR=%{buildroot}
|
||||
|
||||
@ -183,7 +182,8 @@ cd ..
|
||||
rm -rf %{buildroot}%{_docdir}/%{name}-%{version}/
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/
|
||||
cp -pr examples/ %{buildroot}%{_docdir}/%{name}-%{version}/
|
||||
cp -pr doc/*.pdf %{buildroot}%{_docdir}/%{name}-%{version}/
|
||||
cp -pr manual/*.pdf %{buildroot}%{_docdir}/%{name}-%{version}/
|
||||
rm -rf %{buildroot}%{_docdir}/%{name}
|
||||
cp -pr Stuarts_Poly_Notes FAQ DEVICES ANALYSES %{buildroot}%{_docdir}/%{name}-%{version}/
|
||||
cp -pr AUTHORS COPYING README BUGS ChangeLog NEWS %{buildroot}%{_docdir}/%{name}-%{version}/
|
||||
|
||||
@ -195,26 +195,21 @@ chmod +x %{buildroot}%{_libdir}/tclspice/spice/*.cm
|
||||
%{__rm} -rf %{buildroot}%{_datadir}/info/dir
|
||||
|
||||
%check
|
||||
cd ng-spice-rework/tests
|
||||
#make check
|
||||
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%post doc
|
||||
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||
|
||||
%preun doc
|
||||
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/*
|
||||
%{_datadir}/%{name}/
|
||||
%{_libdir}/spice/
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%exclude %doc %{_docdir}/%{name}-%{version}/examples/tclspice
|
||||
%doc %{_docdir}/%{name}-%{version}/
|
||||
|
||||
%files -n tclspice
|
||||
%defattr(-,root,root,-)
|
||||
@ -222,14 +217,13 @@ chmod +x %{buildroot}%{_libdir}/tclspice/spice/*.cm
|
||||
%{_libdir}/tclspice/
|
||||
|
||||
|
||||
%files doc
|
||||
%defattr(-, root, root, -)
|
||||
%exclude %doc %{_docdir}/%{name}-%{version}/examples/tclspice
|
||||
%doc %{_docdir}/%{name}-%{version}/
|
||||
%{_infodir}/ngspice.info*.*
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jul 01 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 21-0.cvs20100620
|
||||
- prerelease -21 with BSIMSOI support for < 130nm designs
|
||||
|
||||
* Sat Jun 19 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 20-4.cvs20100619
|
||||
- prerelease -21 with BSIMSOI support for < 130nm designs
|
||||
|
||||
* Tue Dec 8 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 20-3
|
||||
- Fixed build on CentOS-5
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user