Package: octave-plplot
Version: 5.9.9-3
Severity: important
Tags: patch
The current version of plplot build-depends on octave3.2-headers. This
later package will be removed from unstable once the transition to the
new version of octave (currently 3.6.1) will be completed (see the wiki
page of the DOG [1]).
The xmds package needed octave3.2-headers only for making the
substitution of ${octave:Depends} in debian/control through the script
octave-depends and also for using the very thin make fragment deps.make.
There will be no octave-depends script in octave_3.6.1, since we
abandoned the packages with versioned names. We think that the Debian
packages depending/recommending/suggesting octave should specify
themselves the needed version. Making octave-plplot depends on "octave
(>= 3.6.1)" will be appropriate.
I am attaching below a patch for fixing the issues in this bug report.
Note that the patch applies against the debian/* files in the SVN
repository. I also added the appropriate entries in debian/changelog.
In order to have the package working with Octave 3.6.1, I added three
patches to the upstream sources. They are also attached below.
Rafael
[1] http://wiki.debian.org/Teams/DebianOctaveGroup
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (700, 'testing'), (650, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Rafael
Index: control
===================================================================
--- control (revision 12184)
+++ control (working copy)
@@ -5,7 +5,7 @@
Standards-Version: 3.9.3
Build-Depends: cmake (>= 2.6.3), debhelper (>= 7),
tcl8.5-dev, tk8.5-dev, itcl3-dev, libx11-dev, libxext-dev,
- libxi-dev, gfortran, itk3-dev, octave3.2-headers,
+ libxi-dev, gfortran, itk3-dev, liboctave-dev,
libgd2-noxpm-dev | libgd2-xpm-dev, m4, libqhull-dev (>= 2003.1-8),
libxml-parser-perl, libxml-dom-perl, libltdl3-dev, pkg-config,
quilt, slice, python-gtk2-dev, libwxgtk2.8-dev,
@@ -17,7 +17,7 @@
liblablgtk2-ocaml-dev, liblua5.1-0-dev, lua5.1, gdc-v1
Build-Depends-Indep: docbook-xml, docbook, docbook-dsssl, docbook-xsl,
docbook2x, opensp, jadetex, ghostscript
-Build-Conflicts: libplplot5, octave3.0-headers
+Build-Conflicts: libplplot5
X-Python-Version: >=2.4
Homepage: http://www.plplot.org
Vcs-Svn: https://plplot.svn.sourceforge.net/svnroot/plplot/trunk/debian
@@ -316,7 +316,7 @@
Package: octave-plplot
Architecture: any
-Depends: libplplot11 (= ${binary:Version}), ${shlibs:Depends}, ${octave:Depends},
+Depends: libplplot11 (= ${binary:Version}), octave (>= 3.6.1), ${shlibs:Depends},
${misc:Depends}
Description: Octave support for PLplot, a plotting library
PLplot is relatively small, portable, freely distributable, and is rich
Index: patches/series
===================================================================
--- patches/series (revision 12184)
+++ patches/series (working copy)
@@ -2,3 +2,6 @@
#04_use-mkoctfile.diff
#07_octave_prune_examples.diff
08_nn_link_libm.diff
+replace-deprecated-split.diff
+proper-path-handling.diff
+fix-boolean-operators.diff
Index: octave-plplot.files
===================================================================
--- octave-plplot.files (revision 12184)
+++ octave-plplot.files (working copy)
@@ -1,6 +1,6 @@
usr/share/plplot_octave
usr/share/octave/site/m/PLplot
-usr/lib/octave
+usr/lib/*/octave
usr/share/doc/libplplot11/*.octave
usr/share/doc/libplplot11/examples/*octave*
usr/share/doc/octave-plplot
Index: control.in
===================================================================
--- control.in (revision 12184)
+++ control.in (working copy)
@@ -5,7 +5,7 @@
Standards-Version: 3.9.3
Build-Depends: cmake (>= 2.6.3), debhelper (>= 7),
tcl8.5-dev, tk8.5-dev, itcl3-dev, libx11-dev, libxext-dev,
- libxi-dev, gfortran, itk3-dev, octave3.2-headers,
+ libxi-dev, gfortran, itk3-dev, liboctave-dev,
libgd2-noxpm-dev | libgd2-xpm-dev, m4, libqhull-dev (>= 2003.1-8),
libxml-parser-perl, libxml-dom-perl, libltdl3-dev, pkg-config,
quilt, slice, python-gtk2-dev, libwxgtk2.8-dev,
@@ -17,7 +17,7 @@
liblablgtk2-ocaml-dev, liblua5.1-0-dev, lua5.1, gdc-v1
Build-Depends-Indep: docbook-xml, docbook, docbook-dsssl, docbook-xsl,
docbook2x, opensp, jadetex, ghostscript
-Build-Conflicts: libplplot5, octave3.0-headers
+Build-Conflicts: libplplot5
X-Python-Version: >=2.4
Homepage: http://www.plplot.org
Vcs-Svn: https://plplot.svn.sourceforge.net/svnroot/plplot/trunk/debian
@@ -316,7 +316,7 @@
Package: octave-plplot
Architecture: any
-Depends: libplplot11 (= ${binary:Version}), ${shlibs:Depends}, ${octave:Depends},
+Depends: libplplot11 (= ${binary:Version}), octave (>= 3.6.1), ${shlibs:Depends},
${misc:Depends}
Description: Octave support for PLplot, a plotting library
PLplot is relatively small, portable, freely distributable, and is rich
Index: changelog
===================================================================
--- changelog (revision 12184)
+++ changelog (working copy)
@@ -1,5 +1,6 @@
plplot (5.9.9-3) unstable; urgency=low
+ [ Andrew Ross ]
* debian/control.in:
+ Bump standards version to 3.9.3.
+ Fix broken suggests package plplot11-tcl for libplplot11.
@@ -18,6 +19,23 @@
warning.
* Rebuild python-plplot package against new version of numpy as part of the
numpy transition.
+
+ [ Rafael Laboissiere ]
+ * debian/control.in:
+ + Build-depend on liboctave-dev
+ + Drop build-conflict with octave3.0-headers
+ + Depend directly on octave, instead of using the substitution
+ variable ${octave:Depends}
+ * debian/rules:
+ + Set directly the Octave paths, instead of using defs.make
+ + Drop the call to octave-depends
+ * Adjust the upstream code for working with Octave 3.6.1, by adding the
+ following patches:
+ + debian/patches/replace-deprecated-split.diff
+ + debian/patches/proper-path-handling.diff
+ + debian/patches/fix-boolean-operators.diff
+ * debian/octave-plplot.files: The path in /usr/lib has now an
+ architecture triplet
-- Andrew Ross <[email protected]> Mon, 27 Feb 2012 21:34:46 +0000
Index: rules
===================================================================
--- rules (revision 12184)
+++ rules (working copy)
@@ -11,7 +11,10 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-include /usr/share/octave/debian/defs.make
+# Paths for Octave
+MDIR = $(shell octave-config --print LOCALAPIFCNFILEDIR)
+OCTDIR = $(shell octave-config --print LOCALAPIOCTFILEDIR)
+
#include /usr/share/quilt/quilt.make
version := $(shell perl debian/get-upstream-version.pl < cmake/modules/plplot_version.cmake)
@@ -241,7 +244,6 @@
dh_shlibdeps -a --no-package=octave-plplot -L $(libpkg) \
-l $(debbase)/$(libpkg)/usr/lib:$(debbase)/plplot-tcl/usr/lib
dpkg-shlibdeps -Tdebian/octave-plplot.substvars -S$(debbase)/$(libpkg)/usr/lib/*.so* -S/usr/lib/$(octver)/*.so* $(debbase)/octave-plplot/$(OCTDIR)/plplot_octave.oct
- octave-depends --package=octave-plplot
dh_installdeb -a
dh_lintian -a
dh_gencontrol -a -- -VF:OCamlABI="$(OCAMLABI)"
Description: Replace the calls to the deprecated split function
Author: Rafael Laboissiere <[email protected]>
Last-Update: 2012-03-31
--- plplot-5.9.9.orig/bindings/octave/PLplot/figure.m
+++ plplot-5.9.9/bindings/octave/PLplot/figure.m
@@ -49,7 +49,7 @@ function [n, driver, intp]= figure (n, d
global pl_automatic_replot
if (!exist("__pl") || !struct_contains (__pl,"inited"))
- v = split(version ,'.');
+ v = char(strsplit(version ,'.'));
if (! ((str2num(v(1,:)) > 2) ||
(str2num(v(1,:)) == 2 && str2num(v(2,:)) == 9 &&
str2num(v(3,:)) >= 0)))
--- plplot-5.9.9.orig/bindings/octave/PLplot/toggle_plplot_use.m
+++ plplot-5.9.9/bindings/octave/PLplot/toggle_plplot_use.m
@@ -32,7 +32,7 @@ else
endif
use_plplot_path = plplot_octave_path;
-plplot_path_to_remove = split(genpath(use_plplot_path),pathsep);
+plplot_path_to_remove = strsplit(genpath(use_plplot_path),pathsep);
for use_plplot_i=1:size(plplot_path_to_remove)(1)
if (findstr(path,deblank(plplot_path_to_remove(use_plplot_i,:))) > 0)
rmpath(deblank(plplot_path_to_remove(use_plplot_i,:)));
Description: Proper use of the rmpath function
Author: Rafael Laboissiere <[email protected]>
Last-Update: 2012-03-31
--- plplot-5.9.9.orig/bindings/octave/PLplot/toggle_plplot_use.m
+++ plplot-5.9.9/bindings/octave/PLplot/toggle_plplot_use.m
@@ -34,9 +34,7 @@ endif
use_plplot_path = plplot_octave_path;
plplot_path_to_remove = strsplit(genpath(use_plplot_path),pathsep);
for use_plplot_i=1:size(plplot_path_to_remove)(1)
- if (findstr(path,deblank(plplot_path_to_remove(use_plplot_i,:))) > 0)
- rmpath(deblank(plplot_path_to_remove(use_plplot_i,:)));
- endif
+ rmpath(plplot_path_to_remove{use_plplot_i});
endfor
if (strcmp (use_plplot_state, "on"))
Description: Fix the short-circuit boolean operators
Author: Rafael Laboissiere <[email protected]>
Last-Update: 2012-03-31
--- plplot-5.9.9.orig/bindings/octave/PLplot/figure.m
+++ plplot-5.9.9/bindings/octave/PLplot/figure.m
@@ -183,7 +183,7 @@ function [n, driver, intp]= figure (n, d
endif
## the tk stuff
- if (0 & strcmp("tk", sprintf("%s",plgdev')))
+ if (0 && strcmp("tk", sprintf("%s",plgdev')))
if (! exist("tk_start") && nargin == 6)
error("Can't use this Tk feature of PLplot until tk_octave \
is installed!\n")
@@ -234,7 +234,7 @@ function [n, driver, intp]= figure (n, d
#pladv(0);
#plflush;pleop;
- if ( 0 & exist("__tk_name") & (strcmp("tk", sprintf("%s",plgdev'))))
+ if ( 0 && exist("__tk_name") && (strcmp("tk", sprintf("%s",plgdev'))))
eval(tk_receive(1));
__pl.intp = __pl_matstr(__pl.intp, intp, strm); # tk interpreter name
unlink(init_file);
--- plplot-5.9.9.orig/bindings/octave/PLplot/shade.m
+++ plplot-5.9.9/bindings/octave/PLplot/shade.m
@@ -52,7 +52,7 @@ function shade(x, y, z, levels, cont )
levels = 2;
endif
- if (rows(x) > 1 & columns(x) > 1 & rows(y) > 1 & columns(y) > 1)
+ if (rows(x) > 1 && columns(x) > 1 && rows(y) > 1 && columns(y) > 1)
xymat = 1;
else
xymat = 0;
@@ -76,7 +76,7 @@ function shade(x, y, z, levels, cont )
if (__pl.axis_st(strm))
xm = __pl.axis(strm,1); xM = __pl.axis(strm,2);
if (xymat == 0)
- ix = find(x >= xm & x <= xM);
+ ix = find(x >= xm && x <= xM);
x=x(ix); z=z(:,ix);
xmm = min(x);
endif
@@ -84,7 +84,7 @@ function shade(x, y, z, levels, cont )
if (length(__pl.axis(strm,:)) >= 4)
ym = __pl.axis(strm,3); yM = __pl.axis(strm,4);
if (xymat == 0)
- iy = find(y >= ym & y <= yM);
+ iy = find(y >= ym && y <= yM);
y=y(iy); z=z(iy,:);
ymm = min(y);
endif
@@ -113,8 +113,8 @@ function shade(x, y, z, levels, cont )
ymm = ym = __pl.axis(strm,3); yM = __pl.axis(strm,4);
zm = __pl.axis(strm,5); zM = __pl.axis(strm,6);
if (xymat == 0)
- ix = find(x >= xm & x <= xM);
- iy = find(y >= ym & y <= yM);
+ ix = find(x >= xm && x <= xM);
+ iy = find(y >= ym && y <= yM);
z = z( iy, ix );
x = x( ix );
y = y( iy );
@@ -122,10 +122,10 @@ function shade(x, y, z, levels, cont )
endif
maxx = max(max(x)); maxy = max(max(y)); minx = min(min(x)); miny = min(min(y));
- if (columns(x)>1 & rows(x) == 1)
+ if (columns(x)>1 && rows(x) == 1)
x = x';
endif
- if (columns(y)>1 & rows(y) == 1)
+ if (columns(y)>1 && rows(y) == 1)
y = y';
endif
@@ -154,7 +154,7 @@ function shade(x, y, z, levels, cont )
cont_color, cont_width, max_color, max_width, 1, x, y);
endfor
else
- if (columns(x) == 1 & columns(y) == 1)
+ if (columns(x) == 1 && columns(y) == 1)
plshades1(z', minx, maxx, miny, maxy,
clevel', 1, cont_color, cont_width, 1, x, y);
else
--- plplot-5.9.9.orig/bindings/octave/PLplot/plot3.m
+++ plplot-5.9.9/bindings/octave/PLplot/plot3.m
@@ -32,11 +32,11 @@ function plot3 (x, y, z, fmt)
global __pl
strm = __pl_init;
- if (nargin != 4 & nargin != 3)
+ if (nargin != 4 && nargin != 3)
error("plot3: not yet.\n");
endif
- if (isvector(x) & isvector(y) & isvector(y))
+ if (isvector(x) && isvector(y) && isvector(y))
if (nargin == 3)
fmt = "-r";
@@ -44,7 +44,7 @@ function plot3 (x, y, z, fmt)
__pl_plot3(x, y, z, fmt);
- elseif (ismatrix(x) & ismatrix(y) & ismatrix(z))
+ elseif (ismatrix(x) && ismatrix(y) && ismatrix(z))
if (!common_size(x,y,z))
--- plplot-5.9.9.orig/bindings/octave/PLplot/fill.m
+++ plplot-5.9.9/bindings/octave/PLplot/fill.m
@@ -45,10 +45,10 @@ function fill(x, y, c)
error("fill: not yet.\n");
endif
- if (isvector(x) & isvector(y))
+ if (isvector(x) && isvector(y))
__pl_fill(x, y, c);
- elseif (ismatrix(x) | ismatrix(y))
+ elseif (ismatrix(x) || ismatrix(y))
if (rows(x) == rows(y))
if (isvector(x))
--- plplot-5.9.9.orig/bindings/octave/PLplot/save_fig.m
+++ plplot-5.9.9/bindings/octave/PLplot/save_fig.m
@@ -88,7 +88,7 @@ function save_fig(file, device, rev)
device = dev;
- if (nargin >= 1 && ischar(device) & ischar(file))
+ if (nargin >= 1 && ischar(device) && ischar(file))
to_prt = 0;
if (strcmp(file,"|lp")) # special output file, printer!
@@ -97,7 +97,7 @@ function save_fig(file, device, rev)
fclose(fp);
elseif (file(1) == '~')
file = tilde_expand(file);
- elseif (exist("FIGDIR") & file(1) != '/' & file(1) != '.')
+ elseif (exist("FIGDIR") && file(1) != '/' && file(1) != '.')
file = [FIGDIR, '/', file];
endif
--- plplot-5.9.9.orig/bindings/octave/PLplot/support/__pl_logplotit.m
+++ plplot-5.9.9/bindings/octave/PLplot/support/__pl_logplotit.m
@@ -39,7 +39,7 @@ function __pl_logplotit
endif
elseif (__pl.type(strm) == 30)
if (any(y <= 0) || any(x <= 0))
- expr = "ix = find(y > 0 & x > 0);";
+ expr = "ix = find(y > 0 && x > 0);";
else
break;
endif
--- plplot-5.9.9.orig/bindings/octave/PLplot/support/__pl_fill.m
+++ plplot-5.9.9/bindings/octave/PLplot/support/__pl_fill.m
@@ -31,7 +31,7 @@ function __pl_fill(x, y, c)
strm = plgstrm+1;
- if (isvector(x) & isvector(y))
+ if (isvector(x) && isvector(y))
if (columns(x) != 1)
x = x';
y = y';
@@ -55,7 +55,7 @@ function __pl_fill(x, y, c)
__pl_plenv(min(x), max(x), min(y), max(y), 0, -1);
endif
- if (ischar(c) & length(c) == 1)
+ if (ischar(c) && length(c) == 1)
## map to plplot color
coln = ['r','g','b','c','m','y','w','k'];
coli = [2, 4, 10, 12, 14, 3, 16, 1];
@@ -67,11 +67,11 @@ function __pl_fill(x, y, c)
else
plcol1(c);
endif
- elseif (isvector(c) & length(c) == 3)
+ elseif (isvector(c) && length(c) == 3)
## FIXME -- color 15 became permanently set!
plscol0(15, c(1), c(2), c(3));
plcol0(15);
- elseif (isvector(c) & length(x) == length(x))
+ elseif (isvector(c) && length(x) == length(x))
## If C is a vector the same length as X and Y, its elements are
## scaled by CAXIS and used as indices into the current COLORMAP to
--- plplot-5.9.9.orig/bindings/octave/PLplot/support/__pl_plot3.m
+++ plplot-5.9.9/bindings/octave/PLplot/support/__pl_plot3.m
@@ -20,7 +20,7 @@ function __pl_plot3(x, y, z, c)
strm = plgstrm+1;
- if (isvector(x) & isvector(y) & isvector(z))
+ if (isvector(x) && isvector(y) && isvector(z))
if (columns(x) != 1)
x = x';
--- plplot-5.9.9.orig/bindings/octave/PLplot/support/__pl_matstr.m
+++ plplot-5.9.9/bindings/octave/PLplot/support/__pl_matstr.m
@@ -20,7 +20,7 @@
function out = __pl_matstr(mat, str, n)
## Octave damned string arrays are defective!
- if (ischar(str) & ischar(mat) & rows(str) == 1)
+ if (ischar(str) && ischar(mat) && rows(str) == 1)
if (isempty(mat))
out(n,:) = str;
else