From 45245b314a3fdab07ea845ac10acaae31eb0452b Mon Sep 17 00:00:00 2001 From: Chitlesh GOORAH Date: Jul 16 2010 21:16:29 +0000 Subject: 20-3 revert --- diff --git a/.cvsignore b/.cvsignore index 0007b36..07a3f56 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ngspice-rework-20.cvs20100619.tar.bz2 +ng-spice-rework-20.tar.gz diff --git a/import.log b/import.log index 1b2351d..3a1554a 100644 --- a/import.log +++ b/import.log @@ -6,3 +6,4 @@ ngspice-20-2_fc12:F-12:ngspice-20-2.fc12.src.rpm:1260231732 ngspice-20-3_fc12:F-12:ngspice-20-3.fc12.src.rpm:1260314128 ngspice-21-1_cvs20100620_fc12:EL-6:ngspice-21-1.cvs20100620.fc12.src.rpm:1278012375 ngspice-21-2_cvs20100620_fc12:EL-6:ngspice-21-2.cvs20100620.fc12.src.rpm:1278955578 +ngspice-20-3_fc12:EL-6:ngspice-20-3.fc12.src.rpm:1279314908 diff --git a/ngspice-rework-20-compatmode.h b/ngspice-rework-20-compatmode.h new file mode 100644 index 0000000..c59391d --- /dev/null +++ b/ngspice-rework-20-compatmode.h @@ -0,0 +1,12 @@ +#ifndef _COMPATMODE_H +#define _COMPATMODE_H + +#include + +typedef enum { + COMPATMODE_NATIVE = 0, + COMPATMODE_HSPICE = 1, + COMPATMODE_SPICE3 = 2 +} COMPATMODE_T ; + +#endif diff --git a/ngspice-xcircuit_bridge.patch b/ngspice-xcircuit_bridge.patch new file mode 100644 index 0000000..b03c171 --- /dev/null +++ b/ngspice-xcircuit_bridge.patch @@ -0,0 +1,101 @@ +--- 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; diff --git a/ngspice.spec b/ngspice.spec index dab78cc..795a52f 100644 --- a/ngspice.spec +++ b/ngspice.spec @@ -1,35 +1,25 @@ -# -## 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: 21 -Release: 2.cvs20100620%{?dist} +Version: 20 +Release: 3%{?dist} Summary: A mixed level/signal circuit simulator License: BSD Group: Applications/Engineering -URL: http://ngspice.sourceforge.net - -#Source0: http://downloads.sourceforge.net/sourceforge/%{name}/ngspice%{version}_100620.zip -Source0: ngspice-rework-20.cvs20100619.tar.bz2 +URL: http://%{name}.sourceforge.net/ +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) -# Ensured interoperability with xcircuit via Tcl +# Ensuring interoperability with xcircuit via Tcl +Patch0: %{name}-xcircuit_bridge.patch + +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info BuildRequires: readline-devel, libXext-devel, libpng-devel, libICE-devel BuildRequires: libXaw-devel, mesa-libGL-devel, libXt-devel, automake, libtool -BuildRequires: lyx -BuildRequires: bison -BuildRequires: byacc -BuildRequires: flex ImageMagick -Obsoletes: ngspice-doc < 20-4.cvs20100619 -Provides: ngspice-doc = %{version}-%{release} %description Ngspice is a general-purpose circuit simulator program. @@ -53,6 +43,18 @@ 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 @@ -65,8 +67,11 @@ the Tcl/Tk scripting language. The project is based upon the NG-Spice source code base with many improvements. %prep -%setup -q -n ngspice -cd ng-spice-rework +%setup -q + +%patch0 -p0 -b .xcircuit + +cp -p %{SOURCE1} src/include/compatmode.h # make sure the examples are UTF-8... for nonUTF8 in examples/tclspice/tcl-testbench4/selectfromlist.tcl \ @@ -101,11 +106,9 @@ examples/tclspice/tcl-testbench4/tcl-testbench4.tcl #{__aclocal} #{__automake} --add-missing #{__autoconf} -./autogen.sh %build -cd ng-spice-rework # ---- Tclspice ---------------------------------------------------------------- # Adding BLT support @@ -118,9 +121,6 @@ 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,12 +162,10 @@ 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} @@ -185,8 +183,7 @@ cd .. rm -rf %{buildroot}%{_docdir}/%{name}-%{version}/ mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/ cp -pr examples/ %{buildroot}%{_docdir}/%{name}-%{version}/ -cp -pr manual/*.pdf %{buildroot}%{_docdir}/%{name}-%{version}/ -rm -rf %{buildroot}%{_docdir}/%{name} +cp -pr doc/*.pdf %{buildroot}%{_docdir}/%{name}-%{version}/ cp -pr Stuarts_Poly_Notes FAQ DEVICES ANALYSES %{buildroot}%{_docdir}/%{name}-%{version}/ cp -pr AUTHORS COPYING README BUGS ChangeLog NEWS %{buildroot}%{_docdir}/%{name}-%{version}/ @@ -198,21 +195,26 @@ 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,-) @@ -220,16 +222,14 @@ cd ng-spice-rework/tests %{_libdir}/tclspice/ -%changelog -* Sun Jul 11 2010 Chitlesh Goorah 21-2.cvs20100620 -- added bison and byacc as BR - -* Thu Jul 01 2010 Chitlesh Goorah 21-1.cvs20100620 -- release -21 with BSIMSOI support for < 130nm designs +%files doc +%defattr(-, root, root, -) +%exclude %doc %{_docdir}/%{name}-%{version}/examples/tclspice +%doc %{_docdir}/%{name}-%{version}/ +%{_infodir}/ngspice.info*.* -* Sat Jun 19 2010 Chitlesh Goorah 20-4.cvs20100619 -- prerelease -21 with BSIMSOI support for < 130nm designs +%changelog * Tue Dec 8 2009 Chitlesh Goorah 20-3 - Fixed build on CentOS-5 diff --git a/sources b/sources index c51dd13..d8e6c87 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ad714f1aa268edac34681c2008071fcd ngspice-rework-20.cvs20100619.tar.bz2 +81bc667a4190ef31081a6957d3c7f7b5 ng-spice-rework-20.tar.gz