[Pkg-octave-commit] [SCM] octave-vrml branch, master, updated. 1.0.10-1-11-g12783b1
Thomas Weber
thomas.weber.mail at gmail.com
Sat May 1 21:10:59 UTC 2010
The following commit has been merged in the master branch:
commit b791ca3a6af806a1214fbe17661e8374b1745411
Author: Thomas Weber <thomas.weber.mail at gmail.com>
Date: Sat May 1 19:48:17 2010 +0200
New patches from upstream: remove_broken_files and remove_unused_files
diff --git a/debian/changelog b/debian/changelog
index 450b9ed..b602ebd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,11 @@ octave-vrml (1.0.11-1) UNRELEASED; urgency=low
* Bump standards version to 3.8.4, no changes needed
* Switch to dpkg-source 3.0 (quilt) format
* Drop patch pass-tests-with-octave-3.2, applied upstream
+ * New patches:
+ - remove_unused_files, removes unused files (taken from upstream
+ SVN, r7266)
+ - remove_broken_files, removes broken files (taken from upstream
+ SVN, r7267)
-- Thomas Weber <thomas.weber.mail at gmail.com> Sun, 28 Feb 2010 23:00:01 +0100
diff --git a/debian/patches/remove_broken_files b/debian/patches/remove_broken_files
new file mode 100644
index 0000000..c746e4a
--- /dev/null
+++ b/debian/patches/remove_broken_files
@@ -0,0 +1,229 @@
+From: Etienne Grossmann
+Subject: Remove broken files
+
+Origin: upstream,http://octave.svn.sourceforge.net/viewvc/octave?view=rev&revision=7267
+
+--- a/inst/select_3D_points.m
++++ /dev/null
+@@ -1,147 +0,0 @@
+-## Copyright (C) 2002 Etienne Grossmann. All rights reserved.
+-##
+-## This program is free software; you can redistribute it and/or modify it
+-## under the terms of the GNU General Public License as published by the
+-## Free Software Foundation; either version 2, or (at your option) any
+-## later version.
+-##
+-## This is distributed in the hope that it will be useful, but WITHOUT
+-## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-## for more details.
+-##
+-
+-## sel2 = select_3D_points (x, sel1, deco) - select 3D points
+-##
+-## x : 3 x P : 3D points
+-## sel1 : P : 0-1 matrix specifying currently selected points
+-## or Q1 : List of indices of currently selected points
+-## Default=zeros(1,P)
+-## deco : string : Vrml code for decorating set of 3D points
+-## Default=""
+-##
+-## sel2 : P : 0-1 matrix or list of selected points (default)
+-## or Q2 List of selected points
+-
+-## Author : Etienne Grossmann <etienne at isr.ist.utl.pt>
+-
+-function sel2 = select_3D_points (x, sel1, varargin)
+-
+-P = columns (x);
+-global vrml_b_pid = 0;
+-
+-opts = struct ("frame", 1,\
+- "deco", "",\
+- "balls", 0);
+-
+-if nargin > 2
+- op1 = " frame deco balls ";
+-
+- opts = read_options (varargin, "op1", op1,"default",opts);
+-end
+-frame = opts.frame;
+-deco = opts.deco;
+-balls = opts.balls;
+-
+-want_list = 0; # Return list of selected points or 0-1
+- # matrix
+-
+-
+-
+-if nargin >=2 && length (sel1(:)) == P && all (sel1==0 || sel1==1),
+- # sel1 has been passed
+- sel1 = sel1(:)';
+- if columns (sel1) != P || (!isempty (sel1) && any (sel1!=1 & sel1!=0)),
+- want_list = 1;
+- tmp = zeros (1,P);
+- tmp(state) = 1;
+- sel1 = tmp;
+- ## sel1 = loose (sel1, P)';
+- end
+-else
+- sel1 = zeros (1,P); # Default : nothing pre-selected
+-end
+- # NOTE : this filename hardcoded in
+- # vrml_browse()
+-data_out = "/tmp/octave_browser_out.txt";
+-
+-x -= mean(x')' * ones(1,P);
+-x ./= sqrt (mean (x(:).^2));
+-
+-s = vrml_select_points (x, sel1, balls);
+-
+-## vrml_browse ("-kill"); # Stop previous browser, if any
+-
+-sbg = vrml_Background ("skyColor", [0.5 0.5 0.6]);
+-
+- # Clean data file ####################
+-[st,err,msg] = stat (data_out);
+-if ! err, # There's a file : clean it
+- [err,msg] = unlink (data_out);
+- if err,
+- error ("select_3D_points : Can't remove data file '%s'",data_out);
+- end
+- # There's no file, but there's a pid.
+-elseif vrml_b_pid,
+- # assume browser died. kill it for sure
+- vrml_browse ("-kill");
+-end
+-
+-if frame
+- sframe = vrml_frame ([0 0 0],[0 0 0],"col",0.5*(eye(3) + ones (3)));
+-else
+- sframe = "";
+-end
+-
+- # Start browser ######################
+-vrml_browse ([sbg, sframe, s, deco]);
+-
+-printf ("\nMenu: (R)estart browser. Other key : done. ");
+-inch = upper (kbhit());
+-
+-## while my_menu ("\nMenu: (R)estart browser. Other key : done") == "R",
+-while inch == "R",
+- vrml_browse ("-kill");
+- vrml_browse ([s,deco]);
+- printf ("\nMenu: (R)estart browser. Other key : done. ");
+- inch = upper (kbhit());
+-end
+-printf ("\n");
+-
+-## printf ("press <CR> when done selecting points\n");
+-## pause
+-
+-## vrml_browse ("-kill"); # Stop browser #######################
+-
+- # Retrieve history of clicks #########
+-perlcmd = "print qq{$1,$2;} if /^TAG:\\s*(\\d+)\\s*STATE:\\s*(\\d+)/";
+-cmd = sprintf ("perl -ne '%s' %s", perlcmd, data_out);
+-
+-[status, res] = system (cmd, 1);
+-res = res(1:length(res)-1); # Remove last ";"
+-stl = eval (["[",res,"];"])'; # List of clicks
+-
+-sel2 = sel1 ;
+-
+- # Build new selection matrix
+-## HERE I trust octave to behave as
+-## for i=1:columns(stl), sel2(stl(1,:)) = stl(2,i); end
+-
+-if ! isempty (stl), sel2(stl(1,:)) = stl(2,:); end
+-
+- # Eventually transform 0-1 matrix into
+- # list of selected points.
+-if want_list, sel2 = find (sel2); end
+-
+-[st,err,msg] = stat (data_out);
+-if !err,
+- [err, msg] = unlink (data_out);
+- if err,
+- printf (["select_3D_points :\n",\
+- " error '%s'\n",\
+- " while removing temp file %s\n"],\
+- msg,err);
+- end
+-end
+-endfunction
+-
+--- a/inst/vrml_select_points.m
++++ /dev/null
+@@ -1,71 +0,0 @@
+-## Copyright (C) 2002 Etienne Grossmann. All rights reserved.
+-##
+-## This program is free software; you can redistribute it and/or modify it
+-## under the terms of the GNU General Public License as published by the
+-## Free Software Foundation; either version 2, or (at your option) any
+-## later version.
+-##
+-## This is distributed in the hope that it will be useful, but WITHOUT
+-## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-## for more details.
+-
+-## s = vrml_select_points (x, state) - vrml code for selecting 3D points
+-##
+-## x : 3 x P : 3D points
+-## state : P : 0-1 matrix specifying currently selected points
+-## or Q : List of indices of currently selected points
+-## Default=zeros(1,P)
+-## sphere: bool : If true represent points as spheres instead of cubes.
+-##
+-## s : string : vrml code representing points in x as spheres that
+-## change color (green to/from blue) when clicked upon.
+-##
+-## See select_3D_points() for complete 3D point selection interface.
+-
+-## Author : Etienne Grossmann <etienne at isr.ist.utl.pt>
+-function s = vrml_select_points (x, state, sphere)
+-
+-printf("vrml_select_points does not work any more. Sorry\n");
+-return
+-P = columns (x);
+-
+-if nargin < 2,
+- state = zeros (1,P); # Default : nothing pre-selected
+-else
+- state = state(:)';
+- if length (state) != P || any (state != 1 & state != 0),
+- tmp = zeros (1,P);
+- tmp(state) = 1;
+- state = tmp;
+- ## state = loose (state, P)';
+- end
+-end
+-if nargin < 3, sphere = 0; end
+-
+-diam = 0.1 * mean (sqrt (sum ((x-mean(x')'*ones(1,P)).^2))) ;
+-
+-## For odb
+-## Depends: defSpeakSphere.wrl defSpeakBox.wrl
+-
+-if sphere
+- proto = "data/defSpeakSphere.wrl" ;
+-else
+- proto = "data/defSpeakBox.wrl" ;
+-end
+-
+-s0 = slurp_file (proto);
+-
+- # Pre-selected spheres will be lighter-colored
+-col1 = [0.4;0.4;0.9]*ones(1,P);
+-if any (state),
+- col1(:,find(state)) = [0.6;0.6;0.8]*ones(1,sum(state));
+-end
+-
+-tp = "SpeakSphere {col1 %8.3f %8.3f %8.3f state %i pos %8.3g %8.3g %8.3g scale %8.3g %8.3g %8.3g tag \"%i\"}\n";
+-
+-s1 = sprintf (tp, [col1; state; x; diam*ones(3,P);1:P]);
+-
+-s = [s0,s1];
+-endfunction
+-
diff --git a/debian/patches/remove_unused_files b/debian/patches/remove_unused_files
new file mode 100644
index 0000000..3e9c324
--- /dev/null
+++ b/debian/patches/remove_unused_files
@@ -0,0 +1,369 @@
+From: Etienne Grossmann
+Subject: Remove unused files
+
+Origin: upstream,http://octave.svn.sourceforge.net/viewvc/octave?view=rev&revision=7266
+
+--- a/data/defSpeakBox.wrl
++++ /dev/null
+@@ -1,88 +0,0 @@
+-#VRML V2.0 utf8
+-
+-# Sphere whose color changes when it is touched
+-#
+-# Author : Etienne Grossmann <etienne at isr.ist.utl.pt>
+-
+-
+-# A sphere with a touch sensor
+-PROTO ClickSphere [
+- eventIn SFColor the_color # This event accepted (from script)
+- eventOut SFTime touched # This event emitted when touched
+- field SFVec3f the_pos 0 0 0
+- field SFVec3f the_scale 1 1 1
+-] {
+- Transform {
+- translation IS the_pos
+- scale IS the_scale
+- children [
+- TouchSensor { touchTime IS touched }
+-
+- Shape {
+- appearance Appearance {material Material {diffuseColor IS the_color}}
+- ## geometry Sphere { }
+- geometry Box { }
+- }
+- ]
+- }
+-}
+-
+-# A SpeakSphere is a sphere that changes color and prints out its tag
+-# and current state when clicked upon.
+-#
+-# Output format is : TAG:<tag> STATE:<state>
+-
+-PROTO SpeakSphere [
+- field SFColor col1 0.4 0.4 0.9
+- field SFColor col2 0.4 0.9 0.4
+- field SFVec3f pos 0 0 0
+- field SFVec3f scale 1 1 1
+- field SFInt32 state 0
+- field SFString tag "No Tag"
+-] {
+- Group {
+- children [
+- # The sphere itself is here
+- DEF TS ClickSphere {
+- the_pos IS pos
+- the_scale IS scale
+- }
+-
+- # The script that receives pointer
+- # events from the ClickSphere, updates
+- # the state of the SpeakSphere
+- DEF PS Script {
+- eventIn SFTime touch_function
+- eventOut SFColor col
+- field SFInt32 sstate IS state
+- field SFColor scol1 IS col1
+- field SFColor scol2 IS col2
+- field SFString stag IS tag
+- url [
+- "perl:
+- # $t is the (tied) hash that
+- # represents the Script node : the
+- # eventIn/eventOut/field are keys.
+- touch_function => sub {
+-
+- $t->{sstate} ^= 1 ;
+-
+- print qq{TAG:$t->{stag} STATE:$t->{sstate}}.chr(10);
+-
+- # Set the eventOut 'col'
+- $t->{col} = $t->{ $t->{sstate} ? 'scol2' : 'scol1' };
+- },
+- initialize => sub {
+- # Set initial col
+- $t->{col} = $t->{ $t->{sstate} ? 'scol2' : 'scol1' };
+- }
+- "
+- ]
+- }
+- ]
+- }
+- # Send touch event into script and
+- # updated color into ClickSphere
+- ROUTE TS.touched TO PS.touch_function
+- ROUTE PS.col TO TS.the_color
+-}
+--- a/data/defSpeakSphere.wrl
++++ /dev/null
+@@ -1,88 +0,0 @@
+-#VRML V2.0 utf8
+-
+-# Sphere whose color changes when it is touched
+-#
+-# Author : Etienne Grossmann <etienne at isr.ist.utl.pt>
+-
+-
+-# A sphere with a touch sensor
+-PROTO ClickSphere [
+- eventIn SFColor the_color # This event accepted (from script)
+- eventOut SFTime touched # This event emitted when touched
+- field SFVec3f the_pos 0 0 0
+- field SFVec3f the_scale 1 1 1
+-] {
+- Transform {
+- translation IS the_pos
+- scale IS the_scale
+- children [
+- TouchSensor { touchTime IS touched }
+-
+- Shape {
+- appearance Appearance {material Material {diffuseColor IS the_color}}
+- geometry Sphere { }
+- ## geometry Box { }
+- }
+- ]
+- }
+-}
+-
+-# A SpeakSphere is a sphere that changes color and prints out its tag
+-# and current state when clicked upon.
+-#
+-# Output format is : TAG:<tag> STATE:<state>
+-
+-PROTO SpeakSphere [
+- field SFColor col1 0.4 0.4 0.9
+- field SFColor col2 0.4 0.9 0.4
+- field SFVec3f pos 0 0 0
+- field SFVec3f scale 1 1 1
+- field SFInt32 state 0
+- field SFString tag "No Tag"
+-] {
+- Group {
+- children [
+- # The sphere itself is here
+- DEF TS ClickSphere {
+- the_pos IS pos
+- the_scale IS scale
+- }
+-
+- # The script that receives pointer
+- # events from the ClickSphere, updates
+- # the state of the SpeakSphere
+- DEF PS Script {
+- eventIn SFTime touch_function
+- eventOut SFColor col
+- field SFInt32 sstate IS state
+- field SFColor scol1 IS col1
+- field SFColor scol2 IS col2
+- field SFString stag IS tag
+- url [
+- "perl:
+- # $t is the (tied) hash that
+- # represents the Script node : the
+- # eventIn/eventOut/field are keys.
+- touch_function => sub {
+-
+- $t->{sstate} ^= 1 ;
+-
+- print qq{TAG:$t->{stag} STATE:$t->{sstate}}.chr(10);
+-
+- # Set the eventOut 'col'
+- $t->{col} = $t->{ $t->{sstate} ? 'scol2' : 'scol1' };
+- },
+- initialize => sub {
+- # Set initial col
+- $t->{col} = $t->{ $t->{sstate} ? 'scol2' : 'scol1' };
+- }
+- "
+- ]
+- }
+- ]
+- }
+- # Send touch event into script and
+- # updated color into ClickSphere
+- ROUTE TS.touched TO PS.touch_function
+- ROUTE PS.col TO TS.the_color
+-}
+--- a/inst/data/defSpeakBox.wrl
++++ /dev/null
+@@ -1,88 +0,0 @@
+-#VRML V2.0 utf8
+-
+-# Sphere whose color changes when it is touched
+-#
+-# Author : Etienne Grossmann <etienne at isr.ist.utl.pt>
+-
+-
+-# A sphere with a touch sensor
+-PROTO ClickSphere [
+- eventIn SFColor the_color # This event accepted (from script)
+- eventOut SFTime touched # This event emitted when touched
+- field SFVec3f the_pos 0 0 0
+- field SFVec3f the_scale 1 1 1
+-] {
+- Transform {
+- translation IS the_pos
+- scale IS the_scale
+- children [
+- TouchSensor { touchTime IS touched }
+-
+- Shape {
+- appearance Appearance {material Material {diffuseColor IS the_color}}
+- ## geometry Sphere { }
+- geometry Box { }
+- }
+- ]
+- }
+-}
+-
+-# A SpeakSphere is a sphere that changes color and prints out its tag
+-# and current state when clicked upon.
+-#
+-# Output format is : TAG:<tag> STATE:<state>
+-
+-PROTO SpeakSphere [
+- field SFColor col1 0.4 0.4 0.9
+- field SFColor col2 0.4 0.9 0.4
+- field SFVec3f pos 0 0 0
+- field SFVec3f scale 1 1 1
+- field SFInt32 state 0
+- field SFString tag "No Tag"
+-] {
+- Group {
+- children [
+- # The sphere itself is here
+- DEF TS ClickSphere {
+- the_pos IS pos
+- the_scale IS scale
+- }
+-
+- # The script that receives pointer
+- # events from the ClickSphere, updates
+- # the state of the SpeakSphere
+- DEF PS Script {
+- eventIn SFTime touch_function
+- eventOut SFColor col
+- field SFInt32 sstate IS state
+- field SFColor scol1 IS col1
+- field SFColor scol2 IS col2
+- field SFString stag IS tag
+- url [
+- "perl:
+- # $t is the (tied) hash that
+- # represents the Script node : the
+- # eventIn/eventOut/field are keys.
+- touch_function => sub {
+-
+- $t->{sstate} ^= 1 ;
+-
+- print qq{TAG:$t->{stag} STATE:$t->{sstate}}.chr(10);
+-
+- # Set the eventOut 'col'
+- $t->{col} = $t->{ $t->{sstate} ? 'scol2' : 'scol1' };
+- },
+- initialize => sub {
+- # Set initial col
+- $t->{col} = $t->{ $t->{sstate} ? 'scol2' : 'scol1' };
+- }
+- "
+- ]
+- }
+- ]
+- }
+- # Send touch event into script and
+- # updated color into ClickSphere
+- ROUTE TS.touched TO PS.touch_function
+- ROUTE PS.col TO TS.the_color
+-}
+--- a/inst/data/defSpeakSphere.wrl
++++ /dev/null
+@@ -1,88 +0,0 @@
+-#VRML V2.0 utf8
+-
+-# Sphere whose color changes when it is touched
+-#
+-# Author : Etienne Grossmann <etienne at isr.ist.utl.pt>
+-
+-
+-# A sphere with a touch sensor
+-PROTO ClickSphere [
+- eventIn SFColor the_color # This event accepted (from script)
+- eventOut SFTime touched # This event emitted when touched
+- field SFVec3f the_pos 0 0 0
+- field SFVec3f the_scale 1 1 1
+-] {
+- Transform {
+- translation IS the_pos
+- scale IS the_scale
+- children [
+- TouchSensor { touchTime IS touched }
+-
+- Shape {
+- appearance Appearance {material Material {diffuseColor IS the_color}}
+- geometry Sphere { }
+- ## geometry Box { }
+- }
+- ]
+- }
+-}
+-
+-# A SpeakSphere is a sphere that changes color and prints out its tag
+-# and current state when clicked upon.
+-#
+-# Output format is : TAG:<tag> STATE:<state>
+-
+-PROTO SpeakSphere [
+- field SFColor col1 0.4 0.4 0.9
+- field SFColor col2 0.4 0.9 0.4
+- field SFVec3f pos 0 0 0
+- field SFVec3f scale 1 1 1
+- field SFInt32 state 0
+- field SFString tag "No Tag"
+-] {
+- Group {
+- children [
+- # The sphere itself is here
+- DEF TS ClickSphere {
+- the_pos IS pos
+- the_scale IS scale
+- }
+-
+- # The script that receives pointer
+- # events from the ClickSphere, updates
+- # the state of the SpeakSphere
+- DEF PS Script {
+- eventIn SFTime touch_function
+- eventOut SFColor col
+- field SFInt32 sstate IS state
+- field SFColor scol1 IS col1
+- field SFColor scol2 IS col2
+- field SFString stag IS tag
+- url [
+- "perl:
+- # $t is the (tied) hash that
+- # represents the Script node : the
+- # eventIn/eventOut/field are keys.
+- touch_function => sub {
+-
+- $t->{sstate} ^= 1 ;
+-
+- print qq{TAG:$t->{stag} STATE:$t->{sstate}}.chr(10);
+-
+- # Set the eventOut 'col'
+- $t->{col} = $t->{ $t->{sstate} ? 'scol2' : 'scol1' };
+- },
+- initialize => sub {
+- # Set initial col
+- $t->{col} = $t->{ $t->{sstate} ? 'scol2' : 'scol1' };
+- }
+- "
+- ]
+- }
+- ]
+- }
+- # Send touch event into script and
+- # updated color into ClickSphere
+- ROUTE TS.touched TO PS.touch_function
+- ROUTE PS.col TO TS.the_color
+-}
diff --git a/debian/patches/series b/debian/patches/series
index 89821a7..93f78b3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
+remove_broken_files
+remove_unused_files
whitedune_for_freewrl
--
octave-vrml
More information about the Pkg-octave-commit
mailing list