rework 19 and tclspice

This commit is contained in:
Chitlesh GOORAH 2009-08-09 15:58:12 +00:00
parent fbb6b691db
commit 9324a7486e
6 changed files with 196 additions and 53 deletions

View File

@ -1 +1 @@
ng-spice-rework-18.tar.gz
ng-spice-rework-19.tar.gz

View File

@ -1 +1,2 @@
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

View File

@ -0,0 +1,20 @@
--- src/frontend/resource.c 2009-04-17 23:59:05.000000000 +0200
+++ resource.c 2009-08-08 20:52:02.658775378 +0200
@@ -1,7 +1,7 @@
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
-$Id: resource.c,v 1.31 2009/04/17 21:59:05 h_vogt Exp $
+$Id: resource.c,v 1.32 2009/08/08 17:38:23 pnenzi Exp $
**********/
/*
@@ -549,7 +549,7 @@
#endif /*_WIN32_WINNT 0x0500*/
#else
FILE *fp;
- char buffer[1024];
+ char buffer[2048];
size_t bytes_read;
char *match;
long mem_got;

View File

@ -0,0 +1,27 @@
--- src/main.c 2009-04-12 23:08:18.000000000 +0200
+++ main.c 2009-08-01 14:10:46.785485894 +0200
@@ -566,6 +566,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"
@@ -772,6 +773,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'},
@@ -779,7 +781,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;

View File

@ -1,5 +1,5 @@
Name: ngspice
Version: 18
Version: 19
Release: 1%{?dist}
Summary: A mixed level/signal circuit simulator
@ -7,9 +7,16 @@ License: BSD
Group: Applications/Engineering
URL: http://%{name}.sourceforge.net/
Source0: http://ovh.dl.sourceforge.net/sourceforge/%{name}/ng-spice-rework-%{version}.tar.gz
Source0: http://downloads.sourceforge.net/sourceforge/%{name}/ng-spice-rework-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Ensuring interoperability with xcircuit via Tcl
Patch0: %{name}-xcircuit_bridge.patch
Patch1: %{name}-rework-19.memusage_warning.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
@ -35,11 +42,11 @@ 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}
Requires: ngspice = %{version}-%{release}
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
@ -48,49 +55,134 @@ This package contains the documentation of ngspice in pdf, postscript
and info format.
%prep
%setup -q -n ng-spice-rework-%{version}
%package -n tclspice
Summary: Tcl/Tk interface for ngspice
Group: Applications/Engineering
BuildRequires: tk-devel
BuildRequires: blt-devel
%description -n tclspice
TclSpice is an improved version of Berkeley Spice designed to be used with
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
%patch1 -p0 -b .mem
# make sure the examples are UTF-8...
for nonUTF8 in examples/tclspice/tcl-testbench4/selectfromlist.tcl \
examples/tclspice/tcl-testbench1/testCapa.cir \
examples/tclspice/tcl-testbench1/capa.cir ; do
%{_bindir}/iconv -f ISO-8859-1 -t utf-8 $nonUTF8 > $nonUTF8.conv
%{__mv} -f $nonUTF8.conv $nonUTF8
done
# rpmlint warnings
find examples/ -type f -name ".cvsignore" -exec rm -rf {} ';'
find src/ -type f -name "*.c" -exec chmod -x {} ';'
find src/ -type f -name "*.h" -exec chmod -x {} ';'
%ifarch x86_64 sparc64 ppc64 amd64
sed -i "s|@XSPICEINIT@ codemodel @prefix@/lib|@XSPICEINIT@ codemodel %{_libdir}|" \
src/spinit.in
%endif
# Fix Tclspice's examples
sed -i \
"s|load \"../../../src/.libs/libspice.so\"|lappend auto_path \"%{_libdir}/tclspice\"\npackage require spice|" \
examples/tclspice/*/*.tcl
sed -i \
"s|load ../../../src/.libs/libspice.so|lappend auto_path \"%{_libdir}/tclspice\"\npackage require spice|" \
examples/tclspice/*/*.tcl
sed -i \
"s|spice::codemodel ../../src/xspice/icm/spice2poly|spice::codemodel %{_libdir}/tclspice/spice|" \
examples/tclspice/tcl-testbench4/tcl-testbench4.tcl
%build
%ifarch x86_64 sparc64 ppc64 amd64
%{__cp} -p src/spinit.in src/spinit.in.ngspice
cat src/spinit.in.ngspice | sed \
-e 's|@XSPICEINIT@ codemodel @prefix@/lib/spice/spice2poly.cm|@XSPICEINIT@ codemodel @prefix@/lib64/spice/spice2poly.cm|'\
-e 's|@XSPICEINIT@ codemodel @prefix@/lib/spice/analog.cm|@XSPICEINIT@ codemodel @prefix@/lib64/spice/analog.cm|' \
-e 's|@XSPICEINIT@ codemodel @prefix@/lib/spice/digital.cm|@XSPICEINIT@ codemodel @prefix@/lib64/spice/digital.cm|'\
-e 's|@XSPICEINIT@ codemodel @prefix@/lib/spice/xtradev.cm|@XSPICEINIT@ codemodel @prefix@/lib64/spice/xtradev.cm|'\
-e 's|@XSPICEINIT@ codemodel @prefix@/lib/spice/xtraevt.cm|@XSPICEINIT@ codemodel @prefix@/lib64/spice/xtraevt.cm|'\
> src/spinit.in
%endif
%configure \
--enable-xgraph \
--enable-xspice \
%ifarch x86_64 sparc64 ppc64 amd64
--enable-libsuffix=64 \
%endif
# make in xgraph with another flag first so
# that we can correctly use Fedora compiler flags.
( cd xgraph ; %{__make} \
ADDITIONAL_INCLUDES="$RPM_OPT_FLAGS" %{?_smp_mflags} )
# ---- Tclspice ----------------------------------------------------------------
# Adding BLT support
export CFLAGS="$CFLAGS -I%{_includedir}/blt"
# Make builddir for tclspice
%{__mkdir} -p tclspice
%{__cp} -Rl `ls . | grep -v tclspice` tclspice
# Configure tclspice
cd tclspice
sed -i "s|\#define NGSPICEDATADIR \"\`echo \$dprefix/share/ngspice\`\"|\#define NGSPICEDATADIR \"\`echo %{_libdir}/tclspice\`\"|" configure*
%configure \
--disable-xgraph \
--enable-xspice \
--enable-maintainer-mode \
--enable-capzerobypass \
--enable-cider \
--enable-newpred \
--enable-expdevices \
--enable-intnoise \
--enable-predictor \
--enable-numparam \
--enable-dot-global \
--enable-shared \
--with-tcl=%{_libdir}/tcl8.5/ \
--libdir=%{_libdir}/tclspice
%{__make}
cd ..
# ------------------------------------------------------------------------------
%configure \
--disable-xgraph \
--enable-xspice \
--enable-maintainer-mode \
--enable-capzerobypass \
--enable-cider \
--enable-newpred \
--enable-expdevices \
--enable-intnoise \
--enable-predictor \
--enable-numparam \
--enable-dot-global \
--enable-shared \
--libdir=%{_libdir}
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
#chmod 644 src/xspice/*/*.{c,h,l,y}
#chmod 644 src/frontend/*.{c,h}
#chmod 644 src/include/*.h
%{__make} INSTALL="install -p" install DESTDIR=%{buildroot}
%{__rm} -rf doc/Makefile* %{buildroot}%{_datadir}/info/dir
# ---- Tclspice ----------------------------------------------------------------
# Tclspice : Make install
cd tclspice
%{__make} INSTALL="install -p" install DESTDIR=%{buildroot}
cd ..
%{__rm} -rf %{buildroot}%{_libdir}/tclspice/libspice.la
# ------------------------------------------------------------------------------
#chmod +x %{buildroot}%{_libdir}/spice/{xtraevt.cm,xtradev.cm,analog.cm,spice2poly.cm,digital.cm}
#%{__rm} -f %{buildroot}%{_libdir}/ng-spice-rework/libbsim4.a
# Ensuring that all docs are under %%{_docdir}/%%{name}-%%{version}/
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 Stuarts_Poly_Notes FAQ DEVICES ANALYSES %{buildroot}%{_docdir}/%{name}-%{version}/
cp -pr AUTHORS COPYING README BUGS ChangeLog NEWS %{buildroot}%{_docdir}/%{name}-%{version}/
# pull as debuginfo
chmod +x %{buildroot}%{_libdir}/spice/*.cm
%{__rm} -rf %{buildroot}%{_datadir}/info/dir
%check
#make check
%clean
@ -105,31 +197,34 @@ cat src/spinit.in.ngspice | sed \
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README BUGS ChangeLog NEWS
%{_bindir}/cmpp
%{_bindir}/ngmakeidx
%{_bindir}/ngmultidec
%{_bindir}/ngnutmeg
%{_bindir}/ngproc2mod
%{_bindir}/ngsconvert
%{_bindir}/%{name}
%{_bindir}/xgraph
%{_datadir}/ng-spice-rework/
%{_bindir}/*
%{_datadir}/%{name}/
%{_libdir}/spice/
%{_mandir}/man1/ngnutmeg.1.*
%{_mandir}/man1/ngsconvert.1.*
%{_mandir}/man1/ngmultidec.1.*
%{_mandir}/man1/%{name}.1.*
%{_mandir}/manm/xgraph.man.*
%{_mandir}/man1/*
%files -n tclspice
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}/examples/tclspice
%{_libdir}/tclspice/
%files doc
%defattr(-, root, root, -)
%exclude %doc %{_docdir}/%{name}-%{version}/examples/tclspice
%doc %{_docdir}/%{name}-%{version}/
%{_infodir}/ngspice.info*.*
%doc examples/ doc/
%doc Stuarts_Poly_Notes FAQ DEVICES ANALYSES
%Changelog
%changelog
* Sun Aug 02 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 19-1
- new upstream release
- RHBZ #514484 A Long Warning Message (patched)
- RHBZ #511695 FTBFS ngspice-18-2.fc11
* Sat Feb 21 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 18-2
- x11 windows (help and plot) fixes #RHBZ 481525
* Sat Jan 10 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 18-1
- new upstream release

View File

@ -1 +1 @@
3ab09b939939f7d0fb8cc9d8c77ead71 ng-spice-rework-18.tar.gz
52d01ef53332b8a0e58bf4f7ac7f2c42 ng-spice-rework-19.tar.gz