[ngspice] 49/61: * Remove part of patch, wish8.4 changed back to wish for tclspice examples * Add patch 03_fix_compilation.patch (Thanks to Robert Larice) * Remove stripping of codemodel files * Add -BLT and -ltcl8.6 to configure for tclspice. Needed by libtclspice

Andreas Tille tille at debian.org
Tue Dec 12 14:08:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository ngspice.

commit aaf4344dc6039589cb8e927674391984280b00d5
Author: Gudjon I. Gudjonsson <gudjon at gudjon.org>
Date:   Sat Oct 19 20:12:59 2013 +0000

    * Remove part of patch, wish8.4 changed back to wish for tclspice examples
    * Add patch 03_fix_compilation.patch
      (Thanks to Robert Larice)
    * Remove stripping of codemodel files
    * Add -BLT and -ltcl8.6 to configure for tclspice.
      Needed by libtclspice
---
 debian/changelog                         | 10 +++--
 debian/ngspice-doc.doc-base              |  4 +-
 debian/patches/02_fix_tcl_examples.patch | 65 ++++++---------------------
 debian/patches/03_fix_compilation.patch  | 76 ++++++++++++++++++++++++++++----
 debian/rules                             | 17 +++----
 5 files changed, 99 insertions(+), 73 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9ba36d2..26fb1ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,13 +3,17 @@ ngspice (25-1) UNRELEASED; urgency=low
   * New upstream release (Closes: #706821)
   * Bump standards version to 3.9.4
   * Make VCS field canonical
-  * Add patch 03_fix_compilation.patch
   * Change tcl version to 8.6
+  * Remove part of patch, wish8.4 changed back to wish for tclspice examples
   * Add pdf manual
   * Remove DM-upload line from control
+  * Add patch 03_fix_compilation.patch
+    (Thanks to Robert Larice)
+  * Remove stripping of codemodel files
+  * Add -BLT and -ltcl8.6 to configure for tclspice.
+    Needed by libtclspice
 
- -- Gudjon I. Gudjonsson <gudjon at gudjon.org>  Sat, 28 Sep 2013 22:17:50 +0200
-
+ -- Gudjon I. Gudjonsson <gudjon at gudjon.org>  Tue, 08 Oct 2013 21:40:10 +0200
 
 ngspice (24-1) unstable; urgency=low
 
diff --git a/debian/ngspice-doc.doc-base b/debian/ngspice-doc.doc-base
index 0d7cc1f..8a0b33a 100644
--- a/debian/ngspice-doc.doc-base
+++ b/debian/ngspice-doc.doc-base
@@ -4,8 +4,8 @@ Author: Many authors
 Abstract: NgSpice, a spice circuit simulator.
 Section: Science/Electronics
 
-Format: postscript
-Files: /usr/share/doc/ngspice-doc/ngspice.ps.gz
+Format: PDF
+Files: /usr/share/doc/ngspice-doc/ngspice.pdf.gz
 
 Format: HTML
 Index: /usr/share/doc/ngspice-doc/html/manual.html
diff --git a/debian/patches/02_fix_tcl_examples.patch b/debian/patches/02_fix_tcl_examples.patch
index d08a656..a364cf8 100644
--- a/debian/patches/02_fix_tcl_examples.patch
+++ b/debian/patches/02_fix_tcl_examples.patch
@@ -1,15 +1,8 @@
 Change wish to wish8.4, other wish shells don't work.
 Change search path of libspice.so to /usr/lib/tcltk/
-Index: ngspice-24/examples/tclspice/tcl-testbench1/tcl-testbench1.tcl
-===================================================================
---- ngspice-24.orig/examples/tclspice/tcl-testbench1/tcl-testbench1.tcl	2012-05-17 08:25:17.629265705 +0200
-+++ ngspice-24/examples/tclspice/tcl-testbench1/tcl-testbench1.tcl	2012-05-17 08:25:23.484220306 +0200
-@@ -1,11 +1,11 @@
- #!/bin/sh
- # WishFix \
--        exec wish -f "$0" ${1+"$@"}
-+        exec wish8.4 -f "$0" ${1+"$@"}
- 	###
+--- a/examples/tclspice/tcl-testbench1/tcl-testbench1.tcl
++++ b/examples/tclspice/tcl-testbench1/tcl-testbench1.tcl
+@@ -5,7 +5,7 @@
  
  # old name:  analyse-20070504-0.tcl
  package require BLT
@@ -18,15 +11,9 @@ Index: ngspice-24/examples/tclspice/tcl-testbench1/tcl-testbench1.tcl
  
  # Test of virtual capacitore circuit
  # Vary the control voltage and log the resulting capacitance
-Index: ngspice-24/examples/tclspice/tcl-testbench2/tcl-testbench2.tcl
-===================================================================
---- ngspice-24.orig/examples/tclspice/tcl-testbench2/tcl-testbench2.tcl	2012-05-17 08:25:17.629265705 +0200
-+++ ngspice-24/examples/tclspice/tcl-testbench2/tcl-testbench2.tcl	2012-05-17 08:25:23.484220306 +0200
-@@ -1,10 +1,10 @@
- #!/bin/sh
- # WishFix \
--	exec wish -f "$0" ${1+"$@"}
-+	exec wish8.4 -f "$0" ${1+"$@"}
+--- a/examples/tclspice/tcl-testbench2/tcl-testbench2.tcl
++++ b/examples/tclspice/tcl-testbench2/tcl-testbench2.tcl
+@@ -4,7 +4,7 @@
  ###
  
  package require BLT
@@ -35,15 +22,9 @@ Index: ngspice-24/examples/tclspice/tcl-testbench2/tcl-testbench2.tcl
  namespace import blt::*
  
  wm title . "Vector Test script"
-Index: ngspice-24/examples/tclspice/tcl-testbench3/tcl-testbench3.tcl
-===================================================================
---- ngspice-24.orig/examples/tclspice/tcl-testbench3/tcl-testbench3.tcl	2012-05-17 08:25:17.629265705 +0200
-+++ ngspice-24/examples/tclspice/tcl-testbench3/tcl-testbench3.tcl	2012-05-17 08:25:23.484220306 +0200
-@@ -1,10 +1,10 @@
- #!/bin/sh
- # WishFix \
--        exec wish -f "$0" ${1+"$@"}
-+        exec wish8.4 -f "$0" ${1+"$@"}
+--- a/examples/tclspice/tcl-testbench3/tcl-testbench3.tcl
++++ b/examples/tclspice/tcl-testbench3/tcl-testbench3.tcl
+@@ -4,7 +4,7 @@
  	###
  
  package require BLT
@@ -52,20 +33,8 @@ Index: ngspice-24/examples/tclspice/tcl-testbench3/tcl-testbench3.tcl
  source differentiate.tcl
  spice::codemodel ../../../src/xspice/icm/spice2poly/spice2poly.cm 
  proc temperatures_calc {temp_inf temp_sup points} {
-Index: ngspice-24/examples/tclspice/tcl-testbench4/tcl-testbench4.tcl
-===================================================================
---- ngspice-24.orig/examples/tclspice/tcl-testbench4/tcl-testbench4.tcl	2012-05-17 08:25:17.629265705 +0200
-+++ ngspice-24/examples/tclspice/tcl-testbench4/tcl-testbench4.tcl	2012-05-17 08:25:23.484220306 +0200
-@@ -1,4 +1,4 @@
- #!/bin/sh
- # WishFix \
--	exec wish vspicechart.tcl example.cir
-+	exec wish8.4 vspicechart.tcl example.cir
- ###
-Index: ngspice-24/examples/tclspice/tcl-testbench4/vspicechart.tcl
-===================================================================
---- ngspice-24.orig/examples/tclspice/tcl-testbench4/vspicechart.tcl	2012-05-17 08:25:17.629265705 +0200
-+++ ngspice-24/examples/tclspice/tcl-testbench4/vspicechart.tcl	2012-05-17 08:27:46.853892007 +0200
+--- a/examples/tclspice/tcl-testbench4/vspicechart.tcl
++++ b/examples/tclspice/tcl-testbench4/vspicechart.tcl
 @@ -7,7 +7,7 @@
  
  
@@ -84,15 +53,9 @@ Index: ngspice-24/examples/tclspice/tcl-testbench4/vspicechart.tcl
  Blt_Crosshairs .f2.chart
  Blt_ClosestPoint .f2.chart
  Blt_PrintKey .f2.chart
-Index: ngspice-24/examples/tclspice/tcl/test_vectoblt.tcl
-===================================================================
---- ngspice-24.orig/examples/tclspice/tcl/test_vectoblt.tcl	2012-05-17 08:25:17.629265705 +0200
-+++ ngspice-24/examples/tclspice/tcl/test_vectoblt.tcl	2012-05-17 08:25:23.488222327 +0200
-@@ -1,10 +1,10 @@
- #!/bin/sh
- # WishFix \
--        exec wish -f "$0" ${1+"$@"}
-+        exec wish8.4 -f "$0" ${1+"$@"}
+--- a/examples/tclspice/tcl/test_vectoblt.tcl
++++ b/examples/tclspice/tcl/test_vectoblt.tcl
+@@ -4,7 +4,7 @@
          ###
  
  package require BLT
diff --git a/debian/patches/03_fix_compilation.patch b/debian/patches/03_fix_compilation.patch
index 930ecf7..b0f6e09 100644
--- a/debian/patches/03_fix_compilation.patch
+++ b/debian/patches/03_fix_compilation.patch
@@ -1,6 +1,5 @@
-#Fix minor compilation errors
-#Well, in tclspice.c I am probably commenting out something important. Will 
-# be sent to upstream.
+#Fix minor compilation errors + applying a patch to tclspice.c from Robert Larice (in 
+# upstream team)
 --- a/src/xspice/mif/mifgetmod.c
 +++ b/src/xspice/mif/mifgetmod.c
 @@ -224,7 +224,7 @@
@@ -25,21 +24,80 @@
              }
 --- a/src/tclspice.c
 +++ b/src/tclspice.c
-@@ -1457,7 +1457,7 @@
+@@ -962,7 +962,7 @@
+         return TCL_ERROR;
+     }
+     for (v = pl->pl_dvecs; v; v = v->v_next)
+-        if (!strcmp(v->v_name, name))
++        if (!strcmp(v->v_name, name)) {
+             if (index < v->v_length) {
+                 Tcl_SetObjResult(interp, Tcl_NewDoubleObj((double) v->v_realdata[index]));
+                 return TCL_OK;
+@@ -970,6 +970,7 @@
+                 Tcl_SetResult(interp, "Bad index", TCL_STATIC);
+                 return TCL_ERROR;
+             }
++    }
+ 
+     Tcl_SetResult(interp, "variable not found", TCL_STATIC);
+     return TCL_ERROR;
+@@ -1456,8 +1457,7 @@
+     if (argc == 2)
          (ft_curckt->ci_ckt)->CKTdelta = atof(argv[1]);
  
-     /*Ok, as log as string less than 200 chars*/
+-    /*Ok, as log as string less than 200 chars*/
 -    sprintf(interp->result, "%G", (ft_curckt->ci_ckt)->CKTdelta);
-+    //sprintf(interp->result, "%G", (ft_curckt->ci_ckt)->CKTdelta);
++    Tcl_SetObjResult(interp, Tcl_NewDoubleObj((ft_curckt->ci_ckt)->CKTdelta));
      return TCL_OK;
  }
  
-@@ -1485,7 +1485,7 @@
+@@ -1484,8 +1484,7 @@
+     if (argc == 2)
          job->TRANmaxStep = atof(argv[1]);
  
-     /*Ok, as log as string less than 200 chars*/
+-    /*Ok, as log as string less than 200 chars*/
 -    sprintf(interp->result, "%G", job->TRANmaxStep);
-+    //sprintf(interp->result, "%G", job->TRANmaxStep);
++    Tcl_SetObjResult(interp, Tcl_NewDoubleObj(job->TRANmaxStep));
+     return TCL_OK;
+ }
+ 
+@@ -1495,8 +1494,6 @@
+ get_initTime TCL_CMDPROCARGS(clientData, interp, argc, argv)
+ {
+     TRANan *job;
+-    double itime;
+-    char buf[128];
+     NG_IGNORE(argv);
+     NG_IGNORE(clientData);
+ 
+@@ -1510,9 +1507,7 @@
+     }
+ 
+     job = (TRANan*)(ft_curckt->ci_ckt)->CKTcurJob;
+-    itime = job->TRANinitTime;
+-    sprintf(buf, "%g", itime);
+-    Tcl_SetResult(interp, buf, TCL_VOLATILE);
++    Tcl_SetObjResult(interp, Tcl_NewDoubleObj(job->TRANinitTime));
+     return TCL_OK;
+ }
+ 
+@@ -1522,8 +1517,6 @@
+ get_finalTime TCL_CMDPROCARGS(clientData, interp, argc, argv)
+ {
+     TRANan *job;
+-    double ftime;
+-    char buf[128];
+     NG_IGNORE(argv);
+     NG_IGNORE(clientData);
+ 
+@@ -1537,9 +1530,7 @@
+     }
+ 
+     job = (TRANan*)(ft_curckt->ci_ckt)->CKTcurJob;
+-    ftime = job->TRANfinalTime;
+-    sprintf(buf, "%g", ftime);
+-    Tcl_SetResult(interp, buf, TCL_VOLATILE);
++    Tcl_SetObjResult(interp, Tcl_NewDoubleObj(job->TRANfinalTime));
      return TCL_OK;
  }
  
diff --git a/debian/rules b/debian/rules
index ff6aa21..1d1483f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -59,7 +59,8 @@ config.status-stamp:
 		--disable-debug \
 		--disable-x \
 		--with-tcl=/usr/lib/tcl8.6 \
-		CFLAGS="$(CFLAGS)")
+		CFLAGS="$(CFLAGS)" \
+		LDFLAGS="-lBLT -ltcl8.6")
 	touch $@
 
 build: build-arch build-indep
@@ -102,11 +103,11 @@ install-arch: build-arch
 	# but the ngspice are the correct ones.
 	cd build/tclspice && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install 
 	cd build/ngspice && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-	# The code model files must be stripped
-ifneq ("nostrip","$(findstring nostrip,$(DEB_BUILD_OPTIONS))")
-	strip $(CURDIR)/debian/tmp/usr/lib/ngspice/*.cm
-	strip $(CURDIR)/debian/tmp/usr/lib/tcltk/ngspice/*.cm
-endif
+	# The code mode were stripped but change since version 25
+	#ifneq ("nostrip","$(findstring nostrip,$(DEB_BUILD_OPTIONS))")
+	#strip $(CURDIR)/debian/tmp/usr/lib/ngspice/*.cm
+	#strip $(CURDIR)/debian/tmp/usr/lib/tcltk/ngspice/*.cm
+	#endif
 
 	# Remove empty dirs:
 	find $(CURDIR)/debian/tclspice -type d -empty -delete
@@ -115,7 +116,7 @@ endif
 install-indep: build-indep
 	# Documentation for ngspice, the same as for tclspice
 	mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/ngspice-doc/html
-	cp -a build/manual/manual.html.LyXconv/* \
+	cp -a $(CURDIR)/build/manual/manual.html.LyXconv/* \
 		$(CURDIR)/debian/tmp/usr/share/doc/ngspice-doc/html
 	install -o root -g root -m 644 build/manual/manual.ps \
 		$(CURDIR)/debian/tmp/usr/share/doc/ngspice-doc/ngspice.ps
@@ -161,7 +162,7 @@ binary-arch: install-arch
 		"$(CURDIR)/debian/tclspice/usr/lib/tcltk/libspice.la"
 	dh_installman -a
 	dh_link -a
-	dh_strip -a
+	dh_strip -a --exlude=.cm
 	dh_compress -a --exclude=.tcl --exclude=.cir
 	dh_fixperms -a
 	dh_installdeb -a

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ngspice.git



More information about the debian-science-commits mailing list