[Pkg-octave-commit] rev 200 - in trunk/packages/octave-forge/debian: . patches

Rafael Laboissiere pkg-octave-devel@lists.alioth.debian.org
Fri, 15 Apr 2005 12:48:58 +0000


Author: rafael
Date: 2005-04-15 12:48:57 +0000 (Fri, 15 Apr 2005)
New Revision: 200

Added:
   trunk/packages/octave-forge/debian/patches/50_eliminate-getfields-setfields.dpatch
Modified:
   trunk/packages/octave-forge/debian/changelog
   trunk/packages/octave-forge/debian/patches/00list
   trunk/packages/octave-forge/debian/patches/50_weekday-doc.dpatch
   trunk/packages/octave-forge/debian/rules
Log:
Debian release 2004.11.16-7


Modified: trunk/packages/octave-forge/debian/changelog
===================================================================
--- trunk/packages/octave-forge/debian/changelog	2005-04-14 15:14:52 UTC (rev 199)
+++ trunk/packages/octave-forge/debian/changelog	2005-04-15 12:48:57 UTC (rev 200)
@@ -1,16 +1,19 @@
 octave-forge (2004.11.16-7) unstable; urgency=low
 
-  NOT YET RELEASED !
-
   +++ Changes by Rafael Laboissiere
 
-  * debian/rules: Use option --with-altmpath of configure, such that
-    _pl_grace_octave_path in grace_octave_path.m points to the right
-    directory (closes: #298539)
+  * debian/rules:
+    - Use option --with-altmpath of configure, such that
+      _pl_grace_octave_path in grace_octave_path.m points to the right
+      directory (closes: #298539)
+    - Fixed {} bashism
   * debian/patches/50_weekday-doc.dpatch: Added patch to fix documentation
     of weekday.m (closes: #296973)
+  * debian/patches/50_eliminate-getfields-setfields.dpatch: Added patch to
+    eliminate call to obsolete getfields/setfields (closes: #299510)
+    (closes: #299957)
 
- --
+ -- Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>  Fri, 15 Apr 2005 14:11:24 +0200
 
 octave-forge (2004.11.16-6) unstable; urgency=low
 

Modified: trunk/packages/octave-forge/debian/patches/00list
===================================================================
--- trunk/packages/octave-forge/debian/patches/00list	2005-04-14 15:14:52 UTC (rev 199)
+++ trunk/packages/octave-forge/debian/patches/00list	2005-04-15 12:48:57 UTC (rev 200)
@@ -2,3 +2,4 @@
 50_big-endian-rand-fix
 50_exclude-xlib-in-aurecord
 50_weekday-doc
+50_eliminate-getfields-setfields

Added: trunk/packages/octave-forge/debian/patches/50_eliminate-getfields-setfields.dpatch
===================================================================
--- trunk/packages/octave-forge/debian/patches/50_eliminate-getfields-setfields.dpatch	2005-04-14 15:14:52 UTC (rev 199)
+++ trunk/packages/octave-forge/debian/patches/50_eliminate-getfields-setfields.dpatch	2005-04-15 12:48:57 UTC (rev 200)
@@ -0,0 +1,260 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 50_eliminate-getfields-setfields.dpatch by  <rafael@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: New patch generated from octave-forge 2004.11.16-7 diff.gz
+
+@DPATCH@
+
+--- octave-forge-2004.11.16.orig/main/miscellaneous/read_options.m
++++ octave-forge-2004.11.16/main/miscellaneous/read_options.m
+@@ -53,7 +53,7 @@
+ 
+ verbose = 0;
+ 
+-op = setfields ();		# Empty struct
++op = struct ();		# Empty struct
+ op0 = op1 = " ";
+ skipnan = prefix = quiet = nocase = quiet = 0;
+ extra = ""; 
+--- octave-forge-2004.11.16.orig/main/optim/fminunc.m
++++ octave-forge-2004.11.16/main/optim/fminunc.m
+@@ -88,7 +88,7 @@
+ 
+ ## Transform fminunc options into minimize() options
+ 
+-opm = setfields();		# minimize() options
++opm = struct();		# minimize() options
+ 
+ equiv = struct ("TolX"       , "utol"   , "TolFun"     , "ftol",\
+ 		"MaxFunEvals", "maxev"  , "MaxIter"    , "maxit",\
+--- octave-forge-2004.11.16.orig/main/optim/minimize.m
++++ octave-forge-2004.11.16/main/optim/minimize.m
+@@ -157,17 +157,12 @@
+ ops = read_options (opls,\
+ 		    "op0",op0, "op1",op1, "default",default);
+ 
+-[backend,verbose,   \
+- df, df, d2f, d2i,  \
+- hess, ihess, jac,  \
+- ftol, utol, dtol,  \
+- order, narg, maxev,\
+- isz, ndiff] = getfields (ops, "backend","verbose",\
+-			 "df", "df","d2f", "d2i", \
+-			 "hess", "ihess", "jac",  \
+-			 "ftol" , "utol", "dtol", \
+-			 "order", "narg", "maxev",\
+-			 "isz", "ndiff");
++backend=ops.backend; verbose=ops.verbose; 
++df=ops.df; d2f=ops.d2f; d2i=ops.d2i; 
++hess=ops.hess; ihess=ops.ihess; jac=ops.jac; 
++ftol=ops.ftol; utol=ops.utol; dtol=ops.dtol;
++order=ops.order; narg=ops.narg; maxev=ops.maxev; 
++isz=ops.isz; ndiff=ops.ndiff;
+ 
+ if length (df), error ("Option 'df' doesn't exist any more. Sorry.\n");end
+ if jac, error ("Option 'jac' doesn't exist any more. Sorry.\n");end
+--- octave-forge-2004.11.16.orig/main/optim/optimset.m
++++ octave-forge-2004.11.16/main/optim/optimset.m
+@@ -41,7 +41,7 @@
+ 
+ args = varargin;
+ 
+-opt = setfields ();
++opt = struct ();
+ 
+ 				# Integrate all leading structs
+ 
+@@ -49,7 +49,7 @@
+ 
+   args = args(2:length(args)); 	# Remove 1st element of args
+ 				# Add key/value pairs
+-  for [v,k] = o, opt = set_field (opt,k,v); end    
++  for [v,k] = o, opt = setfield (opt,k,v); end    
+ end
+ 
+ ## All the option
+--- octave-forge-2004.11.16.orig/main/struct/setfields.m
++++ octave-forge-2004.11.16/main/struct/setfields.m
+@@ -31,7 +31,7 @@
+ 
+ function s = setfields(s,varargin)
+ if rem(nargin,2) != 1,
+-      error('setfields: called with odd number of arguments\n') ; 
++      error('setfields: expected struct, key1, val1, key2, val2, ...\n') ; 
+ endif
+ 	
+ for i=1:2:nargin-1
+--- octave-forge-2004.11.16.orig/main/vrml/select_3D_points.m
++++ octave-forge-2004.11.16/main/vrml/select_3D_points.m
+@@ -26,7 +26,9 @@
+ 
+   opts = read_options (varargin, "op1", op1,"default",opts);
+ end
+-[frame, deco, balls] = getfields (opts, "frame", "deco", "balls");
++frame = opts.frame;
++deco = opts.deco;
++balls = opts.balls;
+ 
+ want_list = 0;			# Return list of selected points or 0-1
+ 				# matrix 
+--- octave-forge-2004.11.16.orig/main/vrml/vrml_Background.m
++++ octave-forge-2004.11.16/main/vrml/vrml_Background.m
+@@ -3,16 +3,16 @@
+ ##  s is a string of the form :
+ ##  ------------------------------------------------------------------
+ ##  Background { 
+-##    exposedField MFColor  skyColor          0 0 0
+-##    exposedField MFFloat  skyAngle          []   
+-##    exposedField MFColor  groundColor       []   
+-##    exposedField MFFloat  groundangle       []   
+-##    exposedField MFString backUrl           []
+-##    exposedField MFString bottomUrl         []
+-##    exposedField MFString frontUrl          []
+-##    exposedField MFString leftUrl           []
+-##    exposedField MFString rightUrl          []
+-##    exposedField MFString topUrl            []
++##    skyColor          [0 0 0]
++##    skyAngle          [0]   
++##    groundColor       [0 0 0]   
++##    groundangle       [0]   
++##    backUrl           ""
++##    bottomUrl         ""
++##    frontUrl          ""
++##    leftUrl           ""
++##    rightUrl          ""
++##    topUrl            ""
+ ##  }
+ ##  ------------------------------------------------------------------
+ ##
+@@ -28,52 +28,44 @@
+ 
+ function s = vrml_Background (varargin)
+ 
+-hash.dummy = 0;
++hash = struct(varargin{:});
+ 
+-
+-if nargin, hash = leval ("setfields", varargin); end
+-## hash = rmfield (hash, "dummy");
+-
+-tpl1 = struct (\
+-	       "skyColor",         "%8.3f %8.3f %8.3f",\
+-	       "skyAngle",         "%8.3f",\
+-	       "groundColor",      "%8.3f %8.3f %8.3f",\
+-	       "groundAngle",      "%8.3f");
+-
+-tpl2 = struct (\
+-	       "backUrl",          "%s",\
+-	       "bottomUrl",        "%s",\
+-	       "frontUrl",         "%s",\
+-	       "leftUrl",          "%s",\
+-	       "rightUrl",         "%s",\
+-	       "topUrl",           "%s");
++opts = struct ("skyColor",         3,
++	       "groundColor",      3,
++               "skyAngle",         1,
++	       "groundAngle",      1,
++	       "backUrl",          0,
++	       "bottomUrl",        0,
++	       "frontUrl",         0,
++	       "leftUrl",          0,
++	       "rightUrl",         0,
++	       "topUrl",           0);
+ 
+ body = "";
+ for [val,key] = hash,
+-				# Ignore dummy field
+-  if !strcmp (key, "dummy") && (!isnumeric (val) || !isnan (val)),
+-
+-				# Check validity of field
+-
+-
+-				# Add numeric field
+-    if struct_contains (tpl1, key)
+-
+-      body = [body,\
+-	      sprintf("   %-20s   [ %s ]\n",key,\
+-		      sprintf (getfield (tpl1,key), val))];
+-
+-
+-				# Add string field
+-    elseif struct_contains (tpl2, key)
+-
+-      body = [body,\
+-	      sprintf("   %-20s   \"%s\"\n",key,\
+-		      sprintf (getfield (tpl2,key), val))];
++  if struct_contains (opts, key)
++    n = opts.(key);
++    if (n == 0)
++      if (ischar(val))
++        body = [ body, sprintf('   %-20s   "%s"\n', key, val) ];
++      else
++        error ("vrml_Background: field '%s' expects string", key);
++      endif
++    elseif (n == 1)
++      if (isscalar(val))
++        body = [ body, sprintf('   %-20s   [ %8.3f ]\n', key, val) ];
++      else
++        error ("vrml_Background: field '%s' expects scalar", key);
++      endif
+     else
+-      error (sprintf ("vrml_Background : unknown field '%s'",key));
+-    end
+-				# Add field
++      if (isvector(val) && length(val) == 3)
++        body = [body, sprintf('   %-20s   [ %8.3f %8.3f %8.3f ]\n', key, val)];
++      else
++        error ("vrml_Background: field '%s' expects [r g b]", key);
++      endif
++    endif
++  else
++    error ("vrml_Background : unknown field '%s'",key);
+   end
+ end
+ s = sprintf ("Background { \n%s}\n", body);
+--- octave-forge-2004.11.16.orig/main/vrml/vrml_PointLight.m
++++ octave-forge-2004.11.16/main/vrml/vrml_PointLight.m
+@@ -24,9 +24,8 @@
+ 
+ function s = vrml_PointLight (varargin)
+ 
+-  h = struct ();
+-
+-  if nargin, h = leval ("setfields", varargin); end
++if mod(nargin,2) != 0, usage("vrml_PointLight('key',val,...)"); end
++h = struct (varargin{:});
+ 
+ tpl = struct ("ambientIntensity", "%8.3f",\
+ 	      "intensity",        "%8.3f",\
+--- octave-forge-2004.11.16.orig/main/vrml/vrml_frame.m
++++ octave-forge-2004.11.16/main/vrml/vrml_frame.m
+@@ -62,8 +62,10 @@
+   op1 = " col hcol diam scale ";
+   op0 = " verbose ";
+   s = read_options (leftover_args, "op1",op1,"op0",op0,"default",df,"skipnan",1);
+-  [col, hcol, diam, scale, verbose] = \
+-      getfields (s, "col","hcol","diam","scale","verbose");
++  col = s.col;
++  hcol = s.hcol;
++  diam = s.diam;
++  scale = s.scale;
+ end
+ 
+ ######################################################################
+--- octave-forge-2004.11.16.orig/main/vrml/vrml_parallelogram.m
++++ octave-forge-2004.11.16/main/vrml/vrml_parallelogram.m
+@@ -31,10 +31,9 @@
+   op1 = " col emit tran balls border bcol btran bemit brad borad bocol boemit ";
+   df = tar (col,emit,tran,balls,border,bcol,btran,bemit,brad,borad,bocol,boemit);
+   s = read_options (varargin, "op1",op1, "default",df);
+-  [col,emit,tran,balls,border,bcol,btran,bemit,brad,borad,bocol,boemit] = \
+-      getfields (s,\
+-		"col","emit","tran","balls","border","bcol","btran","bemit",\
+-		"brad","borad","bocol","boemit");
++  col=s.col; emit=s.emit; tran=s.tran; balls=s.balls; border=s.border;
++  bcol = s.bcol; btran = s.btran; bemit = s.bemit; brad = s.brad;
++  borad = s.borad; bocol = s.bocol; boemit = s.boemit;
+ end
+ 
+ if ! isnan (bcol) ||! isnan (brad) || ! isnan (bemit), balls = 1; end


Property changes on: trunk/packages/octave-forge/debian/patches/50_eliminate-getfields-setfields.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/packages/octave-forge/debian/patches/50_weekday-doc.dpatch
===================================================================
--- trunk/packages/octave-forge/debian/patches/50_weekday-doc.dpatch	2005-04-14 15:14:52 UTC (rev 199)
+++ trunk/packages/octave-forge/debian/patches/50_weekday-doc.dpatch	2005-04-15 12:48:57 UTC (rev 200)
@@ -1,8 +1,7 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_weekday-doc.dpatch by  <rafael@debian.org>
+## 50_weekday-doc.dpatch by  Rafael Laboissiere <rafael@debian.org>
 ##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: New patch generated from octave-forge 2004.11.16-7 diff.gz
+## Fix documentation of weekday
 
 @DPATCH@
 

Modified: trunk/packages/octave-forge/debian/rules
===================================================================
--- trunk/packages/octave-forge/debian/rules	2005-04-14 15:14:52 UTC (rev 199)
+++ trunk/packages/octave-forge/debian/rules	2005-04-15 12:48:57 UTC (rev 200)
@@ -113,12 +113,12 @@
 		dh_testroot
 		rm -f configure-stamp build-stamp install-stamp check-stamp
 		-test -f Makefile && $(MAKE) clean
-		-rm -rf *~ $(debtmp) debian/*~ debian/files* build \
-			config.status config.cache config.log conftest \
-			extra/symband/*.oct build.log \
-			main/fixed/doc/fixed.{ps,info} \
-			Makeconf octinst.sh fntests.* \
-			admin/RPM/octave-forge.spec
+		-rm -rf *~ $(debtmp) debian/*~ debian/files* build	\
+			config.status config.cache config.log conftest	\
+			extra/symband/*.oct build.log			\
+			main/fixed/doc/fixed.ps 			\
+			main/fixed/doc/fixed.info Makeconf octinst.sh	\
+			fntests.* admin/RPM/octave-forge.spec
 		dh_clean
 
 binary-indep: 	build install check