From 751d42226a60d1243928d5113ba320e9426a9836 Mon Sep 17 00:00:00 2001 From: Chitlesh GOORAH Date: Sun, 24 Dec 2006 16:46:21 +0000 Subject: [PATCH] auto-import ngspice-17-8 on branch devel from ngspice-17-8.src.rpm --- ngspice-17-pipemode.patch | 318 ++++++++++++++++++++++++++++++++++++++ ngspice.spec | 55 ++++--- 2 files changed, 352 insertions(+), 21 deletions(-) create mode 100644 ngspice-17-pipemode.patch diff --git a/ngspice-17-pipemode.patch b/ngspice-17-pipemode.patch new file mode 100644 index 0000000..a697665 --- /dev/null +++ b/ngspice-17-pipemode.patch @@ -0,0 +1,318 @@ +--- src/main.c 2005-05-31 18:47:48.000000000 +0200 ++++ main.c 2006-12-23 12:47:24.000000000 +0100 +@@ -69,7 +69,7 @@ + #ifdef CIDER + #include "numenum.h" + #include "maths/misc/accuracy.h" +-#endif ++#endif + + + #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) +@@ -108,7 +108,7 @@ + #ifdef CIDER + /* Globals definitions for Machine Accuracy Limits + * (needed by CIDER) +- */ ++ */ + double BMin; /* lower limit for B(x) */ + double BMax; /* upper limit for B(x) */ + double ExpLim; /* limit for exponential */ +@@ -118,19 +118,19 @@ + + /* Global debug flags from CIDER, soon they will become + * spice variables :) +- */ ++ */ + BOOLEAN ONEacDebug = FALSE; + BOOLEAN ONEdcDebug = TRUE; + BOOLEAN ONEtranDebug = TRUE; + BOOLEAN ONEjacDebug = FALSE; +- ++ + BOOLEAN TWOacDebug = FALSE; + BOOLEAN TWOdcDebug = TRUE; + BOOLEAN TWOtranDebug = TRUE; +-BOOLEAN TWOjacDebug = FALSE; +- ++BOOLEAN TWOjacDebug = FALSE; ++ + /* CIDER Global Variable Declarations */ +- ++ + int BandGapNarrowing; + int TempDepMobility, ConcDepMobility, FieldDepMobility, TransDepMobility; + int SurfaceMobility, MatchingMobility, MobDeriv; +@@ -138,14 +138,14 @@ + int Srh, Auger, ConcDepLifetime, AvalancheGen; + int FreezeOut = FALSE; + int OneCarrier; +- ++ + int MaxIterations = 100; + int AcAnalysisMethod = DIRECT; +- ++ + double Temp, RelTemp, Vt; + double RefPsi;/* potential at Infinity */ + double EpsNorm, VNorm, NNorm, LNorm, TNorm, JNorm, GNorm, ENorm; +- ++ + /* end cider globals */ + #endif /* CIDER */ + +@@ -255,7 +255,7 @@ + bool + if_tranparams(struct circ *ckt, double *start, double *stop, double *step) + { +- return (FALSE); ++ return (FALSE); + } + + /* -------------------------------------------------------------------------- */ +@@ -325,15 +325,15 @@ + SIMinfo.numDevices = DEVmaxnum = num_devices(); + SIMinfo.devices = devices_ptr(); + SIMinfo.numAnalyses = spice_num_analysis(); +- SIMinfo.analyses = (IFanalysis **)spice_analysis_ptr(); /* va: we recast, because we use +- * only the public part ++ SIMinfo.analyses = (IFanalysis **)spice_analysis_ptr(); /* va: we recast, because we use ++ * only the public part + */ +- ++ + #ifdef CIDER + /* Evaluates limits of machine accuracy for CIDER */ + evalAccLimits(); +-#endif /* CIDER */ +- ++#endif /* CIDER */ ++ + #endif /* SIMULATOR */ + + SPfrontEnd = frontEnd; +@@ -374,13 +374,13 @@ + + if (cp_interactive == FALSE) + return NULL; /* NULL means no prompt */ +- ++ + s = get_alt_prompt(); + if(s==NULL) + s = cp_promptstring; + if(s==NULL) + s = "->"; +- ++ + while (*s) { + switch (strip(*s)) { + case '!': +@@ -419,7 +419,7 @@ + /* Process device events in Readline's hook since there is no where + else to do it now - AV */ + static int +-rl_event_func() ++rl_event_func() + /* called by GNU readline periodically to know what to do about keypresses */ + { + static REQUEST reqst = { checkup_option, 0 }; +@@ -433,7 +433,7 @@ + /* Process device events in Editline's hook. + similar to the readline function above but returns void */ + static void +-rl_event_func() ++rl_event_func() + /* called by GNU readline periodically to know what to do about keypresses */ + { + static REQUEST reqst = { checkup_option, 0 }; +@@ -452,28 +452,28 @@ + #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) + /* GNU Readline Support -- Andrew Veliath */ + char *line, *expanded_line; +- ++ + /* --- set up readline params --- */ + strcpy(history_file, getenv("HOME")); + strcat(history_file, "/."); + strcat(history_file, application_name); + strcat(history_file, "_history"); +- ++ + using_history(); + read_history(history_file); +- ++ + rl_readline_name = application_name; + rl_instream = cp_in; + rl_outstream = cp_out; + rl_event_hook = rl_event_func; + rl_catch_signals = 0; /* disable signal handling */ +- ++ + /* sjb - what to do for editline? +- This variable is not supported by editline. */ +-#if defined(HAVE_GNUREADLINE) ++ This variable is not supported by editline. */ ++#if defined(HAVE_GNUREADLINE) + rl_catch_sigwinch = 1; /* allow readline to respond to resized windows */ +-#endif +- ++#endif ++ + /* note that we want some mechanism to detect ctrl-D and expand it to exit */ + while (1) { + history_set_pos(history_length); +@@ -497,7 +497,7 @@ + if (line) free(line); + } + /* History gets written in ../fte/misccoms.c com_quit */ +- ++ + #else + while (cp_evloop((char *) NULL) == 1) ; + #endif /* defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) */ +@@ -516,8 +516,9 @@ + " -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" ++ " -r, --rawfile=FILE set the rawfile output\n" + " -s, --server run spice as a server process\n" + " -t, --term=TERM set the terminal type\n" + " -h, --help display this help and exit\n" +@@ -566,11 +567,11 @@ + #endif /* not HAVE_ASPRINTF */ + char * path; + bool result = FALSE; +- ++ + /* check name */ + if(name==NULL || name[0]=='\0') + return FALSE; /* Fail; name needed */ +- ++ + /* contruct the full path */ + if(dir == NULL || dir[0]=='\0') { + path = name; +@@ -587,7 +588,7 @@ + + /* now access the file */ + #ifdef HAVE_UNISTD_H +- if (access(path, R_OK) == 0) { ++ if (access(path, R_OK) == 0) { + #else + if ((fp = fopen(path, "r")) != NULL) { + (void) fclose(fp); +@@ -595,10 +596,10 @@ + inp_source(path); + #ifdef TRACE + printf("Init file: '%s'\n",path); +-#endif /* TRACE */ ++#endif /* TRACE */ + result = TRUE; /* loaded okay */ + } +- ++ + /* if dir was not NULL and not empty then we allocated memory above */ + if(dir!=NULL && dir[0] !='\0') + #ifdef HAVE_ASPRINTF +@@ -606,7 +607,7 @@ + #else + tfree(path); + #endif /* HAVE_ASPRINTF */ +- ++ + return result; + } + +@@ -616,7 +617,7 @@ + extern int OUTpBeginPlot(), OUTpData(), OUTwBeginPlot(), OUTwReference(); + extern int OUTwData(), OUTwEnd(), OUTendPlot(), OUTbeginDomain(); + extern int OUTendDomain(), OUTstopnow(), OUTerror(), OUTattributes(); +-#endif /* SIMULATOR */ ++#endif /* SIMULATOR */ + + int + #ifdef HAS_WINDOWS +@@ -631,7 +632,7 @@ + char* copystring;/*DG*/ + #ifdef SIMULATOR + int error2; +- ++ + static IFfrontEnd nutmeginfo = { + IFnewUid, + IFdelUid, +@@ -742,10 +743,11 @@ + {"rawfile", 1, 0, 'r'}, + {"server", 0, 0, 's'}, + {"terminal", 1, 0, 't'}, ++ {"pipe", 0, 0, 'p'}, + {0, 0, 0, 0} + }; + +- c = getopt_long (argc, argv, "hvbc:ihno:qr:st:", ++ c = getopt_long (argc, argv, "hvbc:ihno:pqr:st:", + long_options, &option_index); + if (c == -1) + break; +@@ -793,10 +795,10 @@ + /* Open the log file */ + #ifdef HAS_WINDOWS + /* flogp goes to winmain's putc and writes to file buf */ +- if (!(flogp = fopen(buf, "w"))) { ++ if (!(flogp = fopen(buf, "w"))) { + #else + /* Connect stdout to file buf and log stdout */ +- if (!(freopen (buf, "w", stdout))) { ++ if (!(freopen (buf, "w", stdout))) { + #endif + perror (buf); + shutdown (EXIT_BAD); +@@ -877,7 +879,7 @@ + if (!ft_batchmode) + goto bot; + } +- ++ + /* Set up signal handling */ + if (!ft_batchmode) { + /* Set up interrupt handler */ +@@ -909,14 +911,14 @@ + /* load user's initialisation file */ + if (readinit) { + bool good; +- ++ + /* Try accessing the initialisation file in the current directory */ + good = read_initialisation_file("",INITSTR); +- ++ + /* if that fail try the alternate name */ + if(good == FALSE) + good = read_initialisation_file("",ALT_INITSTR); +- ++ + /* if that failed try in the user's home directory + if their HOME environment variable is set */ + if(good == FALSE) { +@@ -964,7 +966,7 @@ + if (!ft_servermode && !ft_nutmeg) { + /* Concatenate all non-option arguments into a temporary file + and load that file into the spice core. +- ++ + The original routine took a special path if there was only + one non-option argument. In that case, it didn't create + the temporary file but used the original file instead. The +@@ -1046,7 +1048,7 @@ + "no simulations run\n"); + shutdown(EXIT_BAD); + } +- } /* --- if (ft_batchmode) --- */ ++ } /* --- if (ft_batchmode) --- */ + else { + cp_interactive = TRUE; + app_rl_readlines(); /* enter the command processing loop */ diff --git a/ngspice.spec b/ngspice.spec index e24cc3f..56d6326 100644 --- a/ngspice.spec +++ b/ngspice.spec @@ -1,6 +1,6 @@ Name: ngspice Version: 17 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A mixed level/signal circuit simulator License: BSD @@ -9,6 +9,7 @@ URL: http://%{name}.sourceforge.net/ Source0: http://ovh.dl.sourceforge.net/sourceforge/%{name}/ng-spice-rework-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: %{name}-%{version}-pipemode.patch BuildRequires: readline-devel, libXext-devel, libpng-devel, libICE-devel BuildRequires: libXaw-devel, mesa-libGL-devel, libXt-devel @@ -48,6 +49,8 @@ and info format. %prep %setup -q -n ng-spice-rework-%{version} +%patch0 -p0 -b .pipemode-xcircuit + %build %ifarch x86_64 sparc64 ppc64 amd64 %{__cp} -p src/spinit.in src/spinit.in.ngspice @@ -92,23 +95,29 @@ chmod 644 src/include/*.h %{__rm} -f doc/ngspice.info* chmod +x %{buildroot}%{_libdir}/spice/{xtraevt.cm,xtradev.cm,analog.cm,spice2poly.cm,digital.cm} -rm -f %{buildroot}%{_libdir}/ng-spice-rework/libbsim4.a +%{__rm} -f %{buildroot}%{_libdir}/ng-spice-rework/libbsim4.a + +%{__cp} -pr doc/ %{buildroot}%{_datadir}/ng-spice-rework/ +%{__cp} -p Stuarts_Poly_Notes FAQ DEVICES ANALYSES %{buildroot}%{_datadir}/ng-spice-rework/doc/ +%{__cp} -pr examples/ %{buildroot}%{_datadir}/ng-spice-rework/ %clean %{__rm} -rf %{buildroot} -%post doc -/sbin/install-info --quiet --info-dir=%{_infodir}/dir %{_infodir}/%{name}.info.gz >/dev/null 2>&1 +%post +/sbin/install-info --quiet --info-dir=%{_infodir}/dir %{_infodir}/%{name}.info.* ||: -%preun doc -if [ "$1" = 0 ]; then - /sbin/install-info --del %{_infodir}/%{name}.info.gz --info-dir=%{_infodir}/dir >/dev/null 2>&1 +%preun +if [ "$1" -eq 0 ]; then + /sbin/install-info --delete %{_infodir}/%{name}.info.* --info-dir=%{_infodir}/dir ||: fi %files %defattr(-,root,root,-) -%doc ANALYSES AUTHORS BUGS ChangeLog COPYING DEVICES NEWS README +%doc AUTHORS COPYING README BUGS ChangeLog NEWS +%exclude %{_datadir}/ng-spice-rework/doc/ +%exclude %{_datadir}/ng-spice-rework/examples/ %{_bindir}/cmpp %{_bindir}/makeidx %{_bindir}/nghelp @@ -118,39 +127,43 @@ fi %{_bindir}/ngsconvert %{_bindir}/%{name} %{_bindir}/xgraph -%{_datadir}/ng-spice-rework +%{_datadir}/ng-spice-rework/ %{_libdir}/spice/ - - -%files doc -%defattr(-, root, root, -) -%doc doc/ examples/ Stuarts_Poly_Notes FAQ %{_infodir}/ngspice.info*.* %{_mandir}/man1/ngnutmeg.1.* %{_mandir}/man1/ngsconvert.1.* %{_mandir}/man1/%{name}.1.* %{_mandir}/manm/xgraph.man.* +%files doc +%defattr(-, root, root, -) +%{_datadir}/ng-spice-rework/doc/ +%{_datadir}/ng-spice-rework/examples/ %Changelog -* Sun Oct 15 2006 Chitlesh Goorah 17-7 +* Tue Dec 19 2006 Chitlesh Goorah 17-8 +- patch0 for xcircuit pipemode +- XCircuit can work as an ng-spice front-end +- fixed infodir to mean FE guidelines + +* Sun Oct 15 2006 Chitlesh Goorah 17-7 - Fixed src/spinit.in for 64 bit -* Thu Oct 12 2006 Chitlesh Goorah 17-6 -- Testing on 64 bit arch +* Thu Oct 12 2006 Chitlesh Goorah 17-6 +- Testing on 64 bit arch -* Mon Sep 04 2006 Chitlesh Goorah 17-5 +* Mon Sep 04 2006 Chitlesh Goorah 17-5 - Added libXt-devel to include X headers * Wed Aug 30 2006 Mamoru Tasaka 17-4 - Fix to pass compiler flags in xgraph. -* Tue Aug 29 2006 Chitlesh Goorah 17-3 +* Tue Aug 29 2006 Chitlesh Goorah 17-3 - Fixed BR and script-without-shellbang for debug file -* Mon Aug 28 2006 Chitlesh Goorah 17-2 +* Mon Aug 28 2006 Chitlesh Goorah 17-2 - Fixed BRs and excluded libbsim4.a - Removed duplicates and useless ldconfig from %%post -* Sun Aug 27 2006 Chitlesh Goorah 17-1 +* Sun Aug 27 2006 Chitlesh Goorah 17-1 - Initial Package for Fedora Extras \ No newline at end of file