rework 19 and tclspice
This commit is contained in:
parent
6095a7fff4
commit
863c5ddc3e
@ -1 +1 @@
|
|||||||
ng-spice-rework-18.tar.gz
|
ng-spice-rework-19.tar.gz
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
ngspice-18-1_fc10:HEAD:ngspice-18-1.fc10.src.rpm:1231713849
|
ngspice-18-1_fc10:HEAD:ngspice-18-1.fc10.src.rpm:1231713849
|
||||||
ngspice-18-2_fc10:HEAD:ngspice-18-2.fc10.src.rpm:1235260319
|
ngspice-18-2_fc10:HEAD:ngspice-18-2.fc10.src.rpm:1235260319
|
||||||
|
ngspice-19-1_fc11:HEAD:ngspice-19-1.fc11.src.rpm:1249833090
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
--- src/frontend/help/x11disp.c 2005-09-06 22:21:09.000000000 +0200
|
|
||||||
+++ x11disp.c 2009-02-21 18:58:58.000000000 +0100
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
|
||||||
Author: Jeffrey M. Hsu
|
|
||||||
Modified 1999 Emmanuel Rouat
|
|
||||||
-$Id: x11disp.c,v 1.3 2005/09/06 20:21:09 sjborley Exp $
|
|
||||||
+$Id: x11disp.c,v 1.4 2009/02/20 18:25:21 h_vogt Exp $
|
|
||||||
**********/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
@@ -25,6 +25,24 @@
|
|
||||||
static topic *topics = NULL;
|
|
||||||
void newtopic(Widget w, caddr_t client_data, caddr_t call_data), delete(Widget w, caddr_t client_data, caddr_t call_data), quit(Widget w, caddr_t client_data, caddr_t call_data);
|
|
||||||
static void sputline(char *buf, char *s);
|
|
||||||
+/* atoms for catching window delet by WM x-button */
|
|
||||||
+static Atom atom_wm_delete_window;
|
|
||||||
+static Atom atom_wm_protocols;
|
|
||||||
+static Display *display;
|
|
||||||
+
|
|
||||||
+/* callback function for catching window deletion by WM x-button */
|
|
||||||
+static void handle_wm_messages(Widget w, XtPointer client_data, XEvent *event, Boolean *cont) {
|
|
||||||
+ topic *top = (topic *) client_data;
|
|
||||||
+
|
|
||||||
+ if (event->type == ClientMessage
|
|
||||||
+ && event->xclient.message_type == atom_wm_protocols
|
|
||||||
+ && event->xclient.data.l[0] == atom_wm_delete_window)
|
|
||||||
+ {
|
|
||||||
+ hlp_killfamily(top);
|
|
||||||
+ hlp_fixchildren(top);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
|
|
||||||
/* Create a new window... */
|
|
||||||
bool
|
|
||||||
@@ -191,6 +209,14 @@
|
|
||||||
top->winlink = topics;
|
|
||||||
topics = top;
|
|
||||||
|
|
||||||
+
|
|
||||||
+ /* WM_DELETE_WINDOW protocol */
|
|
||||||
+ display = XtDisplay(top->shellwidget);
|
|
||||||
+ atom_wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False);
|
|
||||||
+ atom_wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False);
|
|
||||||
+ XtAddEventHandler(top->shellwidget, NoEventMask, True, handle_wm_messages, top);
|
|
||||||
+ XSetWMProtocols(display, XtWindow(top->shellwidget), &atom_wm_delete_window, 1);
|
|
||||||
+
|
|
||||||
return (TRUE);
|
|
||||||
|
|
||||||
}
|
|
20
ngspice-rework-19.memusage_warning.patch
Normal file
20
ngspice-rework-19.memusage_warning.patch
Normal 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;
|
27
ngspice-xcircuit_bridge.patch
Normal file
27
ngspice-xcircuit_bridge.patch
Normal 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;
|
195
ngspice.spec
195
ngspice.spec
@ -1,16 +1,21 @@
|
|||||||
Name: ngspice
|
Name: ngspice
|
||||||
Version: 18
|
Version: 19
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A mixed level/signal circuit simulator
|
Summary: A mixed level/signal circuit simulator
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
URL: http://%{name}.sourceforge.net/
|
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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
Patch0: ngspice-18-help.patch
|
# 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: readline-devel, libXext-devel, libpng-devel, libICE-devel
|
||||||
BuildRequires: libXaw-devel, mesa-libGL-devel, libXt-devel
|
BuildRequires: libXaw-devel, mesa-libGL-devel, libXt-devel
|
||||||
@ -37,11 +42,11 @@ develop their own models for devices using the codemodel interface.
|
|||||||
|
|
||||||
It could be used for VLSI simulations as well.
|
It could be used for VLSI simulations as well.
|
||||||
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for ngspice, a mixed level/signal circuit simulator
|
Summary: Documentation for ngspice, a mixed level/signal circuit simulator
|
||||||
Group: Documentation
|
Group: Documentation
|
||||||
Requires: ngspice = %{version}
|
Requires: ngspice = %{version}-%{release}
|
||||||
|
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
Requires(preun): /sbin/install-info
|
Requires(preun): /sbin/install-info
|
||||||
|
|
||||||
@ -50,52 +55,134 @@ This package contains the documentation of ngspice in pdf, postscript
|
|||||||
and info format.
|
and info format.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%package -n tclspice
|
||||||
%setup -q -n ng-spice-rework-%{version}
|
Summary: Tcl/Tk interface for ngspice
|
||||||
|
Group: Applications/Engineering
|
||||||
|
BuildRequires: tk-devel
|
||||||
|
BuildRequires: blt-devel
|
||||||
|
|
||||||
%patch0 -p0 -b .help
|
%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
|
%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
|
|
||||||
|
|
||||||
#./autogen.sh
|
|
||||||
|
# ---- 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 \
|
%configure \
|
||||||
--enable-xgraph \
|
--disable-xgraph \
|
||||||
--enable-xspice \
|
--enable-xspice \
|
||||||
%ifarch x86_64 sparc64 ppc64 amd64
|
--enable-maintainer-mode \
|
||||||
--enable-libsuffix=64 \
|
--enable-capzerobypass \
|
||||||
%endif
|
--enable-cider \
|
||||||
|
--enable-newpred \
|
||||||
# make in xgraph with another flag first so
|
--enable-expdevices \
|
||||||
# that we can correctly use Fedora compiler flags.
|
--enable-intnoise \
|
||||||
( cd xgraph ; %{__make} \
|
--enable-predictor \
|
||||||
ADDITIONAL_INCLUDES="$RPM_OPT_FLAGS" %{?_smp_mflags} )
|
--enable-numparam \
|
||||||
|
--enable-dot-global \
|
||||||
|
--enable-shared \
|
||||||
|
--libdir=%{_libdir}
|
||||||
|
|
||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__rm} -rf %{buildroot}
|
%{__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}
|
%{__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}
|
# Ensuring that all docs are under %%{_docdir}/%%{name}-%%{version}/
|
||||||
#%{__rm} -f %{buildroot}%{_libdir}/ng-spice-rework/libbsim4.a
|
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
|
%clean
|
||||||
@ -110,31 +197,31 @@ cat src/spinit.in.ngspice | sed \
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc AUTHORS COPYING README BUGS ChangeLog NEWS
|
%{_bindir}/*
|
||||||
%{_bindir}/cmpp
|
%{_datadir}/%{name}/
|
||||||
%{_bindir}/ngmakeidx
|
|
||||||
%{_bindir}/ngmultidec
|
|
||||||
%{_bindir}/ngnutmeg
|
|
||||||
%{_bindir}/ngproc2mod
|
|
||||||
%{_bindir}/ngsconvert
|
|
||||||
%{_bindir}/%{name}
|
|
||||||
%{_bindir}/xgraph
|
|
||||||
%{_datadir}/ng-spice-rework/
|
|
||||||
%{_libdir}/spice/
|
%{_libdir}/spice/
|
||||||
%{_mandir}/man1/ngnutmeg.1.*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man1/ngsconvert.1.*
|
|
||||||
%{_mandir}/man1/ngmultidec.1.*
|
|
||||||
%{_mandir}/man1/%{name}.1.*
|
%files -n tclspice
|
||||||
%{_mandir}/manm/xgraph.man.*
|
%defattr(-,root,root,-)
|
||||||
|
%doc %{_docdir}/%{name}-%{version}/examples/tclspice
|
||||||
|
%{_libdir}/tclspice/
|
||||||
|
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-, root, root, -)
|
%defattr(-, root, root, -)
|
||||||
|
%exclude %doc %{_docdir}/%{name}-%{version}/examples/tclspice
|
||||||
|
%doc %{_docdir}/%{name}-%{version}/
|
||||||
%{_infodir}/ngspice.info*.*
|
%{_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
|
* Sat Feb 21 2009 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> 18-2
|
||||||
- x11 windows (help and plot) fixes #RHBZ 481525
|
- x11 windows (help and plot) fixes #RHBZ 481525
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user