From 319b15a9dc583ea9bf38ba4b677b7032a7e4efae Mon Sep 17 00:00:00 2001 From: Chitlesh GOORAH Date: Tue, 8 Dec 2009 23:20:59 +0000 Subject: [PATCH] fixed built with compatmode.h --- import.log | 1 + ngspice-rework-20-compatmode.h | 12 ++++++++++++ ngspice.spec | 20 +++++++++++++++----- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 ngspice-rework-20-compatmode.h diff --git a/import.log b/import.log index eef1b75..32ed9bc 100644 --- a/import.log +++ b/import.log @@ -2,3 +2,4 @@ ngspice-18-1_fc10:EL-5:ngspice-18-1.fc10.src.rpm:1231713953 ngspice-19-1_fc11:EL-5:ngspice-19-1.fc11.src.rpm:1249833383 ngspice-20-1_fc12:EL-5:ngspice-20-1.fc12.src.rpm:1259910513 ngspice-20-2_fc12:EL-5:ngspice-20-2.fc12.src.rpm:1260232344 +ngspice-20-3_fc12:EL-5:ngspice-20-3.fc12.src.rpm:1260314383 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.spec b/ngspice.spec index 201330c..795a52f 100644 --- a/ngspice.spec +++ b/ngspice.spec @@ -1,6 +1,6 @@ Name: ngspice Version: 20 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A mixed level/signal circuit simulator License: BSD @@ -8,6 +8,7 @@ Group: Applications/Engineering 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) # Ensuring interoperability with xcircuit via Tcl @@ -70,6 +71,8 @@ code base with many improvements. %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 \ examples/tclspice/tcl-testbench1/testCapa.cir \ @@ -99,10 +102,10 @@ sed -i \ "s|spice::codemodel ../../src/xspice/icm/spice2poly|spice::codemodel %{_libdir}/tclspice/spice|" \ examples/tclspice/tcl-testbench4/tcl-testbench4.tcl -%{__libtoolize} --force --copy -%{__aclocal} -%{__automake} --add-missing -%{__autoconf} +#{__libtoolize} --force --copy +#{__aclocal} +#{__automake} --add-missing +#{__autoconf} %build @@ -132,7 +135,11 @@ sed -i "s|\#define NGSPICEDATADIR \"\`echo \$dprefix/share/ngspice\`\"|\#define --enable-dot-global \ --enable-shared \ --enable-ndev \ +%if 0%{?fedora} --with-tcl=%{_libdir}/tcl8.5/ \ +%else + --with-tcl=%{_libdir}/ \ +%endif --libdir=%{_libdir}/tclspice %{__make} @@ -223,6 +230,9 @@ chmod +x %{buildroot}%{_libdir}/tclspice/spice/*.cm %changelog +* Tue Dec 8 2009 Chitlesh Goorah 20-3 +- Fixed build on CentOS-5 + * Tue Dec 8 2009 Chitlesh Goorah 20-2 - Improved interoperobability with xcircuit