summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Laboissière <rafael@debian.org>2020-12-30 13:40:56 -0300
committerRafael Laboissière <rafael@debian.org>2020-12-30 13:40:56 -0300
commitbcb9ef9e2a9266aac21560f731dd32394b619b4b (patch)
treea49f7ca1db4629e2f108f2441f36e11292173176
parentc692ffe4fbb70d60e941176feb775fdf971a0cab (diff)
parenta8adab1b55d8fb15633312f014c54078fed0e124 (diff)
octave-stk (2.6.1-5) unstable; urgency=medium
* Team upload * This version builds correctly against Octave 6 (Closes: #976206) * d/control: Bump Standards-Version to 4.5.1 (no changes needed) [dgit import unpatched octave-stk 2.6.1-5]
-rw-r--r--debian/changelog209
-rw-r--r--debian/control23
-rw-r--r--debian/copyright49
-rw-r--r--debian/octave-stk.lintian-overrides8
-rw-r--r--debian/patches/0002-Remove-the-MOLE.patch886
-rw-r--r--debian/patches/0003-Mark-expected-failure.patch21
-rw-r--r--debian/patches/series2
-rwxr-xr-xdebian/rules5
-rw-r--r--debian/source/format1
-rw-r--r--debian/upstream/metadata9
-rw-r--r--debian/watch2
11 files changed, 1215 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..23ef585
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,209 @@
+octave-stk (2.6.1-5) unstable; urgency=medium
+
+ * Team upload
+ * This version builds correctly against Octave 6 (Closes: #976206)
+ * d/control: Bump Standards-Version to 4.5.1 (no changes needed)
+
+ -- Rafael Laboissière <rafael@debian.org> Wed, 30 Dec 2020 13:40:56 -0300
+
+octave-stk (2.6.1-4) unstable; urgency=medium
+
+ * Team upload
+
+ * d/octave-secs2d.lintian-overrides: New file.
+ Add override for Lintian false positive warning
+ debian-changelog-file-is-a-symlink.
+ * d/control: Build-depend on dh-octave >= 1.0.2.
+ This ensures that the upstream ChangeLog.gz file has maximum
+ compression level.
+
+ -- Rafael Laboissière <rafael@debian.org> Tue, 10 Nov 2020 17:20:14 -0300
+
+octave-stk (2.6.1-3) unstable; urgency=medium
+
+ * Team upload
+
+ * d/control:
+ + Bump Standards-Version to 4.5.0 (no changes needed)
+ + Bump debhelper compatibility level to 13
+ * d/u/metadata:
+ + Add Bug-{Database,Submit} and Repository-Browse fields
+ + Drop Name and Contact fields
+ * d/p/0003-Mark-expected-failure.patch: Set Forwarded:not-needed
+ * d/octave-stk.lintian-overrides: Rename tag
+ shared-library-lacks-prerequisites
+
+ -- Rafael Laboissière <rafael@debian.org> Sun, 02 Aug 2020 13:07:37 -0300
+
+octave-stk (2.6.1-2) unstable; urgency=medium
+
+ * Team upload
+
+ * d/control: Bump dependency on dh-octave to >= 0.7.1
+ This allows the injection of the virtual package octave-abi-N into
+ the package's list of dependencies.
+ * d/octave-stk.lintian-overrides: Ignore Lintian warning
+ shared-lib-without-dependency-information.
+
+ -- Rafael Laboissiere <rafael@debian.org> Sat, 09 Nov 2019 03:41:25 -0300
+
+octave-stk (2.6.1-1) unstable; urgency=medium
+
+ * Team upload
+
+ * New upstream version 2.6.1
+ * d/p/0002-Remove-the-MOLE.patch: Refresh for new upstream version
+ * d/p/0003-Mark-expected-failure.patch: Refresh for new upstream version
+ * d/control: Bump Standards-Version to 4.4.1 (no changes needed)
+
+ -- Rafael Laboissiere <rafael@debian.org> Thu, 24 Oct 2019 13:33:11 -0300
+
+octave-stk (2.6.0-1) unstable; urgency=medium
+
+ * Team upload
+
+ * New upstream version 2.6.0
+ * d/copyright: Reflect upstream changes
+ * d/control: Bump Standards-Version to 4.4.0 (no changes needed)
+ * d/u/metadata: Update for new upstream version
+
+ -- Rafael Laboissiere <rafael@debian.org> Sun, 22 Sep 2019 13:51:35 -0300
+
+octave-stk (2.5.1-2) unstable; urgency=medium
+
+ * Team upload
+
+ * d/control:
+ + Add Rules-Requires-Root: no
+ + Bump Standards-Version to 4.3.0
+ + Bump to debhelper compat level 12
+ * Build-depend on debhelper-compat instead of using d/compat
+
+ -- Rafael Laboissiere <rafael@debian.org> Wed, 02 Jan 2019 22:57:53 -0200
+
+octave-stk (2.5.1-1) unstable; urgency=medium
+
+ * Team upload.
+ * New upstream version 2.5.1
+
+ -- Rafael Laboissiere <rafael@debian.org> Tue, 03 Jul 2018 05:05:58 -0300
+
+octave-stk (2.5.0-2) unstable; urgency=medium
+
+ * Team upload.
+
+ * d/control:
+ + Bump Standards-Version to 4.1.4 (no changes needed)
+ + Bump build-dependency on dh-octave to >= 0.5.3.
+ This avoids FTBFS when unit tests need to output plot commands.
+ * d/p/init-vars-in-compute-decomposition.patch: New patch.
+ This is a workaround for avoinding FTBFS against Octave 4.4.
+ * d/octave-stk.lintian-overrides: Remove unused overrides
+
+ -- Rafael Laboissiere <rafael@debian.org> Sat, 16 Jun 2018 16:41:42 -0300
+
+octave-stk (2.5.0-1) unstable; urgency=medium
+
+ [ Mike Miller ]
+ * d/control, d/copyright: Use secure URL for upstream source.
+
+ [ Julien Bect ]
+ * New upstream version 2.5.0
+ * d/copyright: Update copyright info
+ * d/patches: Remove patch 0001, no longer needed
+ * d/patches/0002: update patch
+ * d/patches/0003: update patch
+
+ -- Julien Bect <julien.bect@centralesupelec.fr> Mon, 26 Feb 2018 09:08:11 +0100
+
+octave-stk (2.4.2-5) unstable; urgency=medium
+
+ * Use dh-octave for building the package
+ * d/control:
+ + Use Debian's GitLab URLs in Vcs-* headers
+ + Change Maintainer to team+pkg-octave-team@tracker.debian.org
+
+ -- Rafael Laboissiere <rafael@debian.org> Sat, 10 Feb 2018 07:39:09 -0200
+
+octave-stk (2.4.2-4) unstable; urgency=medium
+
+ * Team upload.
+
+ * Use the dh-based version of octave-pkg-dev
+ * Set debhelper compatibility level to >= 11
+ * d/control: Bump Standards-Version to 4.1.3 (no changes needed)
+
+ -- Rafael Laboissiere <rafael@debian.org> Fri, 29 Dec 2017 22:14:50 -0200
+
+octave-stk (2.4.2-3) unstable; urgency=medium
+
+ * Team upload.
+
+ * d/control: Build-depend on octave-pkg-dev > 1.5.2.
+ This version of octave-pkg-dev pulls gnuplot-nox. This later is no
+ more needed in the build-dependency list.
+
+ -- Rafael Laboissiere <rafael@debian.org> Sat, 21 Oct 2017 08:47:02 -0200
+
+octave-stk (2.4.2-2) unstable; urgency=medium
+
+ * Team upload.
+
+ [ Rafael Laboissiere ]
+ * d/control: Add Testsuite field
+ * d/control: Bump Standards-Version to 4.1.1 (no changes needed)
+
+ [ Julien Bect ]
+ * d/patches/0003-Mark-expected-failure.patch: New patch.
+ (Closes: #876777)
+
+ -- Sébastien Villemot <sebastien@debian.org> Fri, 13 Oct 2017 19:38:10 +0200
+
+octave-stk (2.4.2-1) unstable; urgency=medium
+
+ [ Rafael Laboissiere ]
+ * d/u/metadata: Add citation
+ * Bump debhelper compat level to 10
+ * d/control: Build-depends on octave-pkg-dev >= 1.4.4
+ * d/u/metadata: Fix Homepage
+ * d/u/metadata: Fix URL
+ * d/u/metadata: Quote text in Title.
+ Thanks to Adreas Tille for the patch
+ * Closes: #854448
+ * d/control: Use cgit instead of gitweb in Vcs-Browser URL
+
+ [ Sébastien Villemot ]
+ * d/copyright: use secure URL for format.
+ * d/watch: bump to format version 4.
+ * New upstream version 2.4.2
+ * d/copyright: reflect upstream changes.
+ * d/control: bump Standards-Version to 4.0.0.
+
+ [ Julien Bect ]
+ * d/octave-stk.lintian-overrides: Fix typo
+ * d/patches/0001: Refresh patch
+ * d/patches/0002: Refresh patch
+ * d/patches/0004: Remove patch (no longer needed, applied upstream)
+
+ -- Julien Bect <julien.bect@centralesupelec.fr> Fri, 07 Jul 2017 17:21:00 +0200
+
+octave-stk (2.3.4-1) unstable; urgency=low
+
+ [ Rafael Laboissiere ]
+ * d/control: Use secure URIs in the Vcs-* fields
+ * d/control: Bump Standards-Version to 3.9.7 (no changes needed)
+
+ [ Julien Bect ]
+ * Imported Upstream version 2.3.4
+ * d/patches/0002: Refresh patch
+ * d/patches/0003: Remove patch (no longer needed, applied upstream)
+ * d/patches/0004: Remove patch (no longer needed, applied upstream)
+ * d/control: Bump Standards-Version to 3.9.8 (no changes needed)
+
+ -- Julien Bect <julien.bect@centralesupelec.fr> Tue, 21 Jun 2016 08:25:13 +0200
+
+octave-stk (2.3.3-1) unstable; urgency=low
+
+ * Initial release (closes: #799173)
+
+ -- Julien Bect <julien.bect@centralesupelec.fr> Fri, 20 Nov 2015 11:19:50 +0100
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b90687e
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,23 @@
+Source: octave-stk
+Section: math
+Priority: optional
+Maintainer: Debian Octave Group <team+pkg-octave-team@tracker.debian.org>
+Uploaders: Julien Bect <julien.bect@centralesupelec.fr>,
+Build-Depends: debhelper-compat (= 13),
+ dh-octave (>= 1.0.2)
+Standards-Version: 4.5.1
+Homepage: https://octave.sourceforge.io/stk/
+Vcs-Git: https://salsa.debian.org/pkg-octave-team/octave-stk.git
+Vcs-Browser: https://salsa.debian.org/pkg-octave-team/octave-stk
+Testsuite: autopkgtest-pkg-octave
+Rules-Requires-Root: no
+
+Package: octave-stk
+Architecture: any
+Depends: ${misc:Depends},
+ ${octave:Depends},
+ ${shlibs:Depends}
+Description: (not so) Small Toolbox for Kriging
+ ${octave:Upstream-Description}
+ .
+ This Octave add-on package is part of the Octave-Forge project.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..020f727
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,49 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: stk package for Octave
+Upstream-Contact: The Octave Community <octave-maintainers@octave.org>
+Source: https://octave.sourceforge.io/stk/
+
+Files: *
+Copyright: 2015-2017, 2019 CentraleSupelec
+ 2011-2014, SUPELEC
+ 2014, Ashwin Ravisankar
+ 2013, Guillaume Carlier
+ 2013, Florian Pasanisi
+ 2013, Valentin Resseguier
+ 2013, Alexandra Krauth
+ 2013, Elham Rahali
+ 2013, Derek Bingham, Simon Fraser University
+ 2012, Rik Wehbring
+ 1995-2012, Kurt Hornik
+ 2015-2017, LNE
+ 2005-2015, John W. Eaton
+ 2013-2015, Arun Giridhar
+ 2016, IRT SystemX
+ 2016, EDF R&D
+ 2007, Massachusetts Institute of Technology
+ 2010, Lyndon While, Lucas Bradstreet
+License: GPL-3+
+
+Files: debian/*
+Copyright: 2015-2018 Julien Bect <julien.bect@centralesupelec.fr>
+ 2017 Sébastien Villemot <sebastien@debian.org>
+ 2016-2020 Rafael Laboissière <rafael@debian.org>
+License: GPL-3+
+
+License: GPL-3+
+ 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 3 of the License, or
+ (at your option) any later version.
+ .
+ This program 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.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License, version 3, can be found in the file
+ `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/octave-stk.lintian-overrides b/debian/octave-stk.lintian-overrides
new file mode 100644
index 0000000..8069aef
--- /dev/null
+++ b/debian/octave-stk.lintian-overrides
@@ -0,0 +1,8 @@
+# The *.mex produced by the octave-stk package behave as plugin
+# modules which are loaded at running time by Octave. There is no
+# need to provide dependency information for them.
+octave-stk: shared-library-lacks-prerequisites usr/lib/*
+
+# This is a false positive. The file
+# usr/share/doc/octave-stk/changelog.gz is not the Debian changelog.
+octave-stk: debian-changelog-file-is-a-symlink usr/share/doc/octave-stk/changelog.gz
diff --git a/debian/patches/0002-Remove-the-MOLE.patch b/debian/patches/0002-Remove-the-MOLE.patch
new file mode 100644
index 0000000..9dda690
--- /dev/null
+++ b/debian/patches/0002-Remove-the-MOLE.patch
@@ -0,0 +1,886 @@
+Description: Remove the MOLE
+ Remove the MOLE (Matlab/Octave Language Extensions), which is a set of
+ helper functions that make it possible to run the stk package in Matlab
+ and in older releases of Octave.
+Author: Julien Bect <julien.bect@centralesupelec.fr>
+Forwarded: not-needed
+Last-Update: 2019-10-24
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/inst/misc/mole/linsolve/linsolve.m
++++ /dev/null
+@@ -1,141 +0,0 @@
+-## Copyright (C) 2013 Nir Krakauer
+-##
+-## 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 3 of the License, or
+-## (at your option) any later version.
+-##
+-## This program 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.
+-##
+-## You should have received a copy of the GNU General Public License
+-## along with this program; If not, see <http://www.gnu.org/licenses/>.
+-
+-## -*- texinfo -*-
+-## @deftypefn {Function File} {@var{x} =} linsolve (@var{A}, @var{b})
+-## @deftypefnx {Function File} {@var{x} =} linsolve (@var{A}, @var{b}, @var{opts})
+-## @deftypefnx {Function File} {[@var{x}, @var{R}] =} linsolve (@dots{})
+-## Solve the linear system @code{A*x = b}.
+-##
+-## With no options, this function is equivalent to the left division operator
+-## @w{(@code{x = A \ b})} or the matrix-left-divide function
+-## @w{(@code{x = mldivide (A, b)})}.
+-##
+-## Octave ordinarily examines the properties of the matrix @var{A} and chooses
+-## a solver that best matches the matrix. By passing a structure @var{opts}
+-## to @code{linsolve} you can inform Octave directly about the matrix @var{A}.
+-## In this case Octave will skip the matrix examination and proceed directly
+-## to solving the linear system.
+-##
+-## @strong{Warning:} If the matrix @var{A} does not have the properties
+-## listed in the @var{opts} structure then the result will not be accurate
+-## AND no warning will be given. When in doubt, let Octave examine the matrix
+-## and choose the appropriate solver as this step takes little time and the
+-## result is cached so that it is only done once per linear system.
+-##
+-## Possible @var{opts} fields (set value to true/false):
+-##
+-## @table @asis
+-## @item LT
+-## @var{A} is lower triangular
+-##
+-## @item UT
+-## @var{A} is upper triangular
+-##
+-## @item UHESS
+-## @var{A} is upper Hessenberg (currently makes no difference)
+-##
+-## @item SYM
+-## @var{A} is symmetric or complex Hermitian (currently makes no difference)
+-##
+-## @item POSDEF
+-## @var{A} is positive definite
+-##
+-## @item RECT
+-## @var{A} is general rectangular (currently makes no difference)
+-##
+-## @item TRANSA
+-## Solve @code{A'*x = b} by @code{transpose (A) \ b}
+-## @end table
+-##
+-## The optional second output @var{R} is the inverse condition number of
+-## @var{A} (zero if matrix is singular).
+-## @seealso{mldivide, matrix_type, rcond}
+-## @end deftypefn
+-
+-## Author: Nir Krakauer <nkrakauer@ccny.cuny.edu>
+-
+-## STK notes:
+-## * This version of linsolve.m comes from revision b66f068e4468 of Octave's
+-## hg repository (changeset by Nir Krakauer on 2013-09-26, 09:38:51)
+-## * The only change that has been made is the introduction of a tolerance
+-## in the first assert of the first unit test, that's all !
+-
+-function [x, R] = linsolve (A, b, opts)
+-
+- if (nargin < 2 || nargin > 3)
+- print_usage ();
+- endif
+-
+- if (! (isnumeric (A) && isnumeric (b)))
+- error ("linsolve: A and B must be numeric");
+- endif
+-
+- ## Process any opts
+- if (nargin > 2)
+- if (! isstruct (opts))
+- error ("linsolve: OPTS must be a structure");
+- endif
+- trans_A = false;
+- if (isfield (opts, "TRANSA") && opts.TRANSA)
+- trans_A = true;
+- A = A';
+- endif
+- if (isfield (opts, "POSDEF") && opts.POSDEF)
+- A = matrix_type (A, "positive definite");
+- endif
+- if (isfield (opts, "LT") && opts.LT)
+- if (trans_A)
+- A = matrix_type (A, "upper");
+- else
+- A = matrix_type (A, "lower");
+- endif
+- endif
+- if (isfield (opts, "UT") && opts.UT)
+- if (trans_A)
+- A = matrix_type (A, "lower");
+- else
+- A = matrix_type (A, "upper");
+- endif
+- endif
+- endif
+-
+- x = A \ b;
+-
+- if (nargout > 1)
+- if (issquare (A))
+- R = rcond (A);
+- else
+- R = 0;
+- endif
+- endif
+-endfunction # linsolve
+-
+-
+-%!test
+-%! n = 4;
+-%! A = triu (rand (n));
+-%! x = rand (n, 1);
+-%! b = A' * x;
+-%! opts.UT = true;
+-%! opts.TRANSA = true;
+-%! assert (linsolve (A, b, opts), A' \ b, 1e-12);
+-
+-%!error linsolve ()
+-%!error linsolve (1)
+-%!error linsolve (1,2,3)
+-%!error <A and B must be numeric> linsolve ({1},2)
+-%!error <A and B must be numeric> linsolve (1,{2})
+-%!error <OPTS must be a structure> linsolve (1,2,3)
+--- a/inst/stk_init.m
++++ b/inst/stk_init.m
+@@ -52,10 +52,7 @@
+
+ case 'pkg_unload'
+ stk_init__pkg_unload (root);
+-
+- case 'prune_mole'
+- stk_init__config_mole (root, false, true); % prune, but do not add to path
+
+ case 'clear_persistents'
+ % Note: this implies munlock
+ stk_init__clear_persistents ();
+@@ -181,9 +178,6 @@
+ % Add STK folders to the path
+ addpath (path{:});
+
+-% Selectively add MOLE subdirectories to compensate for missing functions
+-stk_init__config_mole (root, true, false); % (add to path, but do not prune)
+-
+ end % function
+
+
+@@ -272,89 +266,3 @@
+ s = strrep (s, '.', '\.');
+
+ end % function
+-
+-
+-function stk_init__config_mole (root, do_addpath, prune_unused)
+-
+-mole_dir = fullfile (root, 'misc', 'mole');
+-isoctave = (exist ('OCTAVE_VERSION', 'builtin') == 5);
+-
+-if isoctave
+- recursive_rmdir_state = confirm_recursive_rmdir (0);
+-end
+-
+-opts = {root, mole_dir, do_addpath, prune_unused};
+-
+-% Provide missing octave functions for Matlab users
+-% TODO: extract functions that are REALLY needed in separate directories
+-% and get rid of the others !
+-if (exist ('OCTAVE_VERSION', 'builtin') ~= 5) % if Matlab
+- if do_addpath
+- addpath (fullfile (mole_dir, 'matlab'));
+- end
+-elseif prune_unused
+- rmdir (fullfile (mole_dir, 'matlab'), 's');
+-end
+-
+-% graphics_toolkit
+-% * For Octave users: graphics_toolkit is missing in some old version of Octave
+-% * For Matlab users: there is no function named graphics_toolkit in Matlab.
+-% Our implementation returns either 'matlab-jvm' or 'matlab-nojvm'.
+-install_mole_function ('graphics_toolkit', opts{:});
+-
+-% isrow
+-% * For Octave users: ?
+-% * For Matlab users: missing in R2007a
+-install_mole_function ('isrow', opts{:});
+-
+-% linsolve
+-% * For Octave users: linsolve has been missing in Octave for a long time
+-% (up to 3.6.4)
+-% * For Matlab users: ?
+-install_mole_function ('linsolve', opts{:});
+-
+-% quantile
+-% * For Octave users: ?
+-% * For Matlab users: quantile is missing from Matlab itself, but it provided
+-% by the Statistics toolbox if you're rich enough to afford it.
+-install_mole_function ('quantile', opts{:});
+-
+-% cleanup
+-if isoctave
+- confirm_recursive_rmdir (recursive_rmdir_state);
+-end
+-
+-end % function
+-
+-
+-function install_mole_function (funct_name, ...
+- root, mole_dir, do_addpath, prune_unused)
+-
+-function_dir = fullfile (mole_dir, funct_name);
+-
+-w = which (funct_name);
+-
+-if (isempty (w)) || (~ isempty (strfind (w, root))) % if the function is absent
+-
+- function_mfile = fullfile (function_dir, [funct_name '.m']);
+-
+- if exist (function_dir, 'dir') && exist (function_mfile, 'file')
+-
+- % fprintf ('[MOLE] Providing function %s\n', function_name);
+- if do_addpath
+- addpath (function_dir);
+- end
+-
+- else
+-
+- warning (sprintf ('[MOLE] Missing function: %s\n', funct_name));
+-
+- end
+-
+-elseif prune_unused && (exist (function_dir, 'dir'))
+-
+- rmdir (function_dir, 's');
+-
+-end
+-
+-end % function
+--- a/inst/misc/mole/isrow/isrow.m
++++ /dev/null
+@@ -1,34 +0,0 @@
+-% ISROW returns true for row vectors and false otherwise
+-
+-% Copyright Notice
+-%
+-% Copyright (C) 2014 SUPELEC
+-%
+-% Author: Julien Bect <julien.bect@centralesupelec.fr>
+-
+-% Copying Permission Statement
+-%
+-% This file is part of
+-%
+-% STK: a Small (Matlab/Octave) Toolbox for Kriging
+-% (http://sourceforge.net/projects/kriging)
+-%
+-% STK 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 3 of the License, or (at your
+-% option) any later version.
+-%
+-% STK 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.
+-%
+-% You should have received a copy of the GNU General Public License
+-% along with STK. If not, see <http://www.gnu.org/licenses/>.
+-
+-function b = isrow (x)
+-
+-n = length (x);
+-b = isequal (size (x), [1 n]);
+-
+-end % function
+--- a/inst/misc/mole/quantile/quantile.m
++++ /dev/null
+@@ -1,463 +0,0 @@
+-% QUANTILE ...
+-
+-% Copyright Notice
+-%
+-% Copyright (C) 2013 SUPELEC
+-%
+-% Author: Julien Bect <julien.bect@centralesupelec.fr>
+-%
+-% The function comes from Octave 3.7.6+'s quantile.m, with minor
+-% modifications. The original copyright notice was:
+-%
+-% Copyright (C) 2008-2012 Ben Abbott and Jaroslav Hajek
+-
+-% Copying Permission Statement
+-%
+-% This file is part of
+-%
+-% STK: a Small (Matlab/Octave) Toolbox for Kriging
+-% (http://sourceforge.net/projects/kriging)
+-%
+-% STK 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 3 of the License, or (at your
+-% option) any later version.
+-%
+-% STK 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.
+-%
+-% You should have received a copy of the GNU General Public License
+-% along with STK. If not, see <http://www.gnu.org/licenses/>.
+-
+-% ## Copyright (C) 2008-2012 Ben Abbott and Jaroslav Hajek
+-% ##
+-% ## This file is part of Octave.
+-% ##
+-% ## Octave 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 3 of the License, or (at
+-% ## your option) any later version.
+-% ##
+-% ## Octave 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.
+-% ##
+-% ## You should have received a copy of the GNU General Public License
+-% ## along with Octave; see the file COPYING. If not, see
+-% ## <http://www.gnu.org/licenses/>.
+-%
+-% ## -*- texinfo -*-
+-% ## @deftypefn {Function File} {@var{q} =} quantile (@var{x})
+-% ## @deftypefnx {Function File} {@var{q} =} quantile (@var{x}, @var{p})
+-% ## @deftypefnx {Function File} {@var{q} =} quantile (@var{x}, @var{p}, @var{dim})
+-% ## @deftypefnx {Function File} {@var{q} =} quantile (@var{x}, @var{p}, @var{dim}, @var{method})
+-% ## For a sample, @var{x}, calculate the quantiles, @var{q}, corresponding to
+-% ## the cumulative probability values in @var{p}. All non-numeric values (NaNs)
+-% ## of @var{x} are ignored.
+-% ##
+-% ## If @var{x} is a matrix, compute the quantiles for each column and
+-% ## return them in a matrix, such that the i-th row of @var{q} contains
+-% ## the @var{p}(i)th quantiles of each column of @var{x}.
+-% ##
+-% ## If @var{p} is unspecified, return the quantiles for
+-% ## @code{[0.00 0.25 0.50 0.75 1.00]}.
+-% ## The optional argument @var{dim} determines the dimension along which
+-% ## the quantiles are calculated. If @var{dim} is omitted, and @var{x} is
+-% ## a vector or matrix, it defaults to 1 (column-wise quantiles). If
+-% ## @var{x} is an N-D array, @var{dim} defaults to the first non-singleton
+-% ## dimension.
+-% ##
+-% ## The methods available to calculate sample quantiles are the nine methods
+-% ## used by R (@url{http://www.r-project.org/}). The default value is
+-% ## @w{METHOD = 5}.
+-% ##
+-% ## Discontinuous sample quantile methods 1, 2, and 3
+-% ##
+-% ## @enumerate 1
+-% ## @item Method 1: Inverse of empirical distribution function.
+-% ##
+-% ## @item Method 2: Similar to method 1 but with averaging at discontinuities.
+-% ##
+-% ## @item Method 3: SAS definition: nearest even order statistic.
+-% ## @end enumerate
+-% ##
+-% ## Continuous sample quantile methods 4 through 9, where p(k) is the linear
+-% ## interpolation function respecting each methods' representative cdf.
+-% ##
+-% ## @enumerate 4
+-% ## @item Method 4: p(k) = k / n. That is, linear interpolation of the
+-% ## empirical cdf.
+-% ##
+-% ## @item Method 5: p(k) = (k - 0.5) / n. That is a piecewise linear function
+-% ## where the knots are the values midway through the steps of the empirical
+-% ## cdf.
+-% ##
+-% ## @item Method 6: p(k) = k / (n + 1).
+-% ##
+-% ## @item Method 7: p(k) = (k - 1) / (n - 1).
+-% ##
+-% ## @item Method 8: p(k) = (k - 1/3) / (n + 1/3). The resulting quantile
+-% ## estimates are approximately median-unbiased regardless of the distribution
+-% ## of @var{x}.
+-% ##
+-% ## @item Method 9: p(k) = (k - 3/8) / (n + 1/4). The resulting quantile
+-% ## estimates are approximately unbiased for the expected order statistics if
+-% ## @var{x} is normally distributed.
+-% ## @end enumerate
+-% ##
+-% ## Hyndman and Fan (1996) recommend method 8. Maxima, S, and R
+-% ## (versions prior to 2.0.0) use 7 as their default. Minitab and SPSS
+-% ## use method 6. @sc{matlab} uses method 5.
+-% ##
+-% ## References:
+-% ##
+-% ## @itemize @bullet
+-% ## @item Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New
+-% ## S Language. Wadsworth & Brooks/Cole.
+-% ##
+-% ## @item Hyndman, R. J. and Fan, Y. (1996) Sample quantiles in
+-% ## statistical packages, American Statistician, 50, 361--365.
+-% ##
+-% ## @item R: A Language and Environment for Statistical Computing;
+-% ## @url{http://cran.r-project.org/doc/manuals/fullrefman.pdf}.
+-% ## @end itemize
+-% ##
+-% ## Examples:
+-% ## @c Set example in small font to prevent overfull line
+-% ##
+-% ## @smallexample
+-% ## @group
+-% ## x = randi (1000, [10, 1]); # Create empirical data in range 1-1000
+-% ## q = quantile (x, [0, 1]); # Return minimum, maximum of distribution
+-% ## q = quantile (x, [0.25 0.5 0.75]); # Return quartiles of distribution
+-% ## @end group
+-% ## @end smallexample
+-% ## @seealso{prctile}
+-% ## @end deftypefn
+-%
+-% ## Author: Ben Abbott <bpabbott@mac.com>
+-% ## Description: Matlab style quantile function of a discrete/continuous distribution
+-
+-function q = quantile (x, p, dim, method)
+-
+-if nargin < 2,
+- p = [];
+-end
+-
+-if nargin < 3,
+- dim = 1;
+-end
+-
+-if nargin < 4,
+- % Use Matlab compatiblity mode
+- method = 5;
+-end
+-
+-if (~ (isnumeric (x) || islogical (x)))
+- error ('quantile: X must be a numeric vector or matrix');
+-end
+-
+-if (isempty (p))
+- p = [0.00 0.25, 0.50, 0.75, 1.00];
+-end
+-
+-if (~ (isnumeric (p) && isvector (p)))
+- error ('quantile: P must be a numeric vector');
+-end
+-
+-if (~ (isscalar (dim) && dim == fix (dim)) ...
+- || ~(1 <= dim && dim <= ndims (x)))
+- error ('quantile: DIM must be an integer and a valid dimension');
+-end
+-
+-% Set the permutation vector.
+-perm = 1:ndims (x);
+-perm(1) = dim;
+-perm(dim) = 1;
+-
+-% Permute dim to the 1st index.
+-x = permute (x, perm);
+-
+-% Save the size of the permuted x N-d array.
+-sx = size (x);
+-
+-% Reshape to a 2-d array.
+-x = reshape (x, [sx(1), prod(sx(2:end))]);
+-
+-% Calculate the quantiles.
+-q = octave__quantile__ (x, p, method);
+-
+-% Return the shape to the original N-d array.
+-q = reshape (q, [numel(p), sx(2:end)]);
+-
+-% Permute the 1st index back to dim.
+-q = ipermute (q, perm);
+-
+-end % function
+-
+-%!test
+-%! p = 0.5;
+-%! x = sort (rand (11));
+-%! q = quantile (x, p);
+-%! assert (isequal (q, x(6,:)));
+-%! x = x.';
+-%! q = quantile (x, p, 2);
+-%! assert (isequal (q, x(:,6)));
+-
+-% Note: method 3 not available yet because Matlab doesn't have roundb()
+-
+-%!test
+-%! p = [0.00, 0.25, 0.50, 0.75, 1.00];
+-%! x = [1; 2; 3; 4];
+-%! a = [1.0000 1.0000 2.0000 3.0000 4.0000
+-%! 1.0000 1.5000 2.5000 3.5000 4.0000
+-%! 1.0000 1.0000 2.0000 3.0000 4.0000
+-%! 1.0000 1.0000 2.0000 3.0000 4.0000
+-%! 1.0000 1.5000 2.5000 3.5000 4.0000
+-%! 1.0000 1.2500 2.5000 3.7500 4.0000
+-%! 1.0000 1.7500 2.5000 3.2500 4.0000
+-%! 1.0000 1.4167 2.5000 3.5833 4.0000
+-%! 1.0000 1.4375 2.5000 3.5625 4.0000];
+-%! for m = [1:2 4:9]
+-%! q = quantile (x, p, 1, m).';
+-%! assert (stk_isequal_tolabs (q, a(m,:), 0.0001));
+-%! end
+-
+-%!test
+-%! p = [0.00, 0.25, 0.50, 0.75, 1.00];
+-%! x = [1; 2; 3; 4; 5];
+-%! a = [1.0000 2.0000 3.0000 4.0000 5.0000
+-%! 1.0000 2.0000 3.0000 4.0000 5.0000
+-%! 1.0000 1.0000 2.0000 4.0000 5.0000
+-%! 1.0000 1.2500 2.5000 3.7500 5.0000
+-%! 1.0000 1.7500 3.0000 4.2500 5.0000
+-%! 1.0000 1.5000 3.0000 4.5000 5.0000
+-%! 1.0000 2.0000 3.0000 4.0000 5.0000
+-%! 1.0000 1.6667 3.0000 4.3333 5.0000
+-%! 1.0000 1.6875 3.0000 4.3125 5.0000];
+-%! for m = [1:2 4:9]
+-%! q = quantile (x, p, 1, m).';
+-%! assert (stk_isequal_tolabs (q, a(m,:), 0.0001));
+-%! end
+-
+-%!test
+-%! p = [0.00, 0.25, 0.50, 0.75, 1.00];
+-%! x = [1; 2; 5; 9];
+-%! a = [1.0000 1.0000 2.0000 5.0000 9.0000
+-%! 1.0000 1.5000 3.5000 7.0000 9.0000
+-%! 1.0000 1.0000 2.0000 5.0000 9.0000
+-%! 1.0000 1.0000 2.0000 5.0000 9.0000
+-%! 1.0000 1.5000 3.5000 7.0000 9.0000
+-%! 1.0000 1.2500 3.5000 8.0000 9.0000
+-%! 1.0000 1.7500 3.5000 6.0000 9.0000
+-%! 1.0000 1.4167 3.5000 7.3333 9.0000
+-%! 1.0000 1.4375 3.5000 7.2500 9.0000];
+-%! for m = [1:2 4:9]
+-%! q = quantile (x, p, 1, m).';
+-%! assert (stk_isequal_tolabs (q, a(m,:), 0.0001));
+-%! end
+-
+-%!test
+-%! p = [0.00, 0.25, 0.50, 0.75, 1.00];
+-%! x = [1; 2; 5; 9; 11];
+-%! a = [1.0000 2.0000 5.0000 9.0000 11.0000
+-%! 1.0000 2.0000 5.0000 9.0000 11.0000
+-%! 1.0000 1.0000 2.0000 9.0000 11.0000
+-%! 1.0000 1.2500 3.5000 8.0000 11.0000
+-%! 1.0000 1.7500 5.0000 9.5000 11.0000
+-%! 1.0000 1.5000 5.0000 10.0000 11.0000
+-%! 1.0000 2.0000 5.0000 9.0000 11.0000
+-%! 1.0000 1.6667 5.0000 9.6667 11.0000
+-%! 1.0000 1.6875 5.0000 9.6250 11.0000];
+-%! for m = [1:2 4:9]
+-%! q = quantile (x, p, 1, m).';
+-%! assert (stk_isequal_tolabs (q, a(m,:), 0.0001));
+-%! end
+-
+-%!test
+-%! p = [0.00, 0.25, 0.50, 0.75, 1.00];
+-%! x = [16; 11; 15; 12; 15; 8; 11; 12; 6; 10];
+-%! a = [6.0000 10.0000 11.0000 15.0000 16.0000
+-%! 6.0000 10.0000 11.5000 15.0000 16.0000
+-%! 6.0000 8.0000 11.0000 15.0000 16.0000
+-%! 6.0000 9.0000 11.0000 13.5000 16.0000
+-%! 6.0000 10.0000 11.5000 15.0000 16.0000
+-%! 6.0000 9.5000 11.5000 15.0000 16.0000
+-%! 6.0000 10.2500 11.5000 14.2500 16.0000
+-%! 6.0000 9.8333 11.5000 15.0000 16.0000
+-%! 6.0000 9.8750 11.5000 15.0000 16.0000];
+-%! for m = [1:2 4:9]
+-%! q = quantile (x, p, 1, m).';
+-%! assert (stk_isequal_tolabs (q, a(m,:), 0.0001));
+-%! end
+-
+-%!test
+-%! p = [0.00, 0.25, 0.50, 0.75, 1.00];
+-%! x = [-0.58851; 0.40048; 0.49527; -2.551500; -0.52057; ...
+-%! -0.17841; 0.057322; -0.62523; 0.042906; 0.12337];
+-%! a = [-2.551474 -0.588505 -0.178409 0.123366 0.495271
+-%! -2.551474 -0.588505 -0.067751 0.123366 0.495271
+-%! -2.551474 -0.625231 -0.178409 0.123366 0.495271
+-%! -2.551474 -0.606868 -0.178409 0.090344 0.495271
+-%! -2.551474 -0.588505 -0.067751 0.123366 0.495271
+-%! -2.551474 -0.597687 -0.067751 0.192645 0.495271
+-%! -2.551474 -0.571522 -0.067751 0.106855 0.495271
+-%! -2.551474 -0.591566 -0.067751 0.146459 0.495271
+-%! -2.551474 -0.590801 -0.067751 0.140686 0.495271];
+-%! for m = [1:2 4:9]
+-%! q = quantile (x, p, 1, m).';
+-%! assert (stk_isequal_tolabs (q, a(m,:), 0.0001));
+-%! end
+-
+-%!test
+-%! p = 0.5;
+-%! x = [0.112600, 0.114800, 0.052100, 0.236400, 0.139300
+-%! 0.171800, 0.727300, 0.204100, 0.453100, 0.158500
+-%! 0.279500, 0.797800, 0.329600, 0.556700, 0.730700
+-%! 0.428800, 0.875300, 0.647700, 0.628700, 0.816500
+-%! 0.933100, 0.931200, 0.963500, 0.779600, 0.846100];
+-%! tol = 0.00001;
+-%! x(5,5) = NaN;
+-%! assert (stk_isequal_tolabs ...
+-%! (quantile (x, p, 1), ...
+-%! [0.27950, 0.79780, 0.32960, 0.55670, 0.44460], tol));
+-%! x(1,1) = NaN;
+-%! assert (stk_isequal_tolabs ...
+-%! (quantile (x, p, 1), ...
+-%! [0.35415, 0.79780, 0.32960, 0.55670, 0.44460], tol));
+-%! x(3,3) = NaN;
+-%! assert (stk_isequal_tolabs ...
+-%! (quantile (x, p, 1), ...
+-%! [0.35415, 0.79780, 0.42590, 0.55670, 0.44460], tol));
+-
+-%!test
+-%! sx = [2, 3, 4];
+-%! x = rand (sx);
+-%! dim = 2;
+-%! p = 0.5;
+-%! yobs = quantile (x, p, dim);
+-%! yexp = median (x, dim);
+-%! assert (isequal (yobs, yexp));
+-
+-%% Test input validation
+-%!error quantile ()
+-%!error quantile (1, 2, 3, 4, 5)
+-%!error quantile (['A'; 'B'], 10)
+-%!error quantile (1:10, [true, false])
+-%!error quantile (1:10, ones (2,2))
+-%!error quantile (1, 1, 1.5)
+-%!error quantile (1, 1, 0)
+-%!error quantile (1, 1, 3)
+-%!error quantile ((1:5)', 0.5, 1, 0)
+-%!error quantile ((1:5)', 0.5, 1, 10)
+-
+-% ## For the cumulative probability values in @var{p}, compute the
+-% ## quantiles, @var{q} (the inverse of the cdf), for the sample, @var{x}.
+-% ##
+-% ## The optional input, @var{method}, refers to nine methods available in R
+-% ## (http://www.r-project.org/). The default is @var{method} = 7.
+-% ## @seealso{prctile, quantile, statistics}
+-%
+-% ## Author: Ben Abbott <bpabbott@mac.com>
+-% ## Vectorized version: Jaroslav Hajek <highegg@gmail.com>
+-% ## Description: Quantile function of empirical samples
+-
+-function inv = octave__quantile__ (x, p, method)
+-
+-if (isinteger (x) || islogical (x))
+- x = double (x);
+-end
+-
+-% set shape of quantiles to column vector.
+-p = p(:);
+-
+-% Save length and set shape of samples.
+-% FIXME: does sort guarantee that NaN's come at the end?
+-x = sort (x);
+-m = sum (~ isnan (x));
+-[xr, xc] = size (x);
+-
+-% Initialize output values.
+-inv = Inf (class (x)) * (-(p < 0) + (p > 1));
+-inv = repmat (inv, 1, xc);
+-
+-% Do the work.
+-k = find ((p >= 0) & (p <= 1));
+-if (any (k))
+- n = length (k);
+- p = p(k);
+- % Special case of 1 row.
+- if (xr == 1)
+- inv(k,:) = repmat (x, n, 1);
+- return;
+- end
+-
+- % The column-distribution indices.
+- pcd = kron (ones (n, 1), xr*(0:xc-1));
+- mm = kron (ones (n, 1), m);
+- switch (method)
+- case {1, 2, 3}
+- switch (method)
+- case 1
+- p = max (ceil (kron (p, m)), 1);
+- inv(k,:) = x(p + pcd);
+-
+- case 2
+- p = kron (p, m);
+- p_lr = max (ceil (p), 1);
+- p_rl = min (floor (p + 1), mm);
+- inv(k,:) = (x(p_lr + pcd) + x(p_rl + pcd))/2;
+-
+- case 3
+- % Used by SAS, method PCTLDEF=2.
+- % http://support.sas.com/onlinedoc/913/getDoc/en/statug.hlp/stdize_sect14.htm
+- t = max (kron (p, m), 1);
+- t = roundb (t);
+- inv(k,:) = x(t + pcd);
+- end
+-
+- otherwise
+- switch (method)
+- case 4
+- p = kron (p, m);
+-
+- case 5
+- % Used by Matlab.
+- p = kron (p, m) + 0.5;
+-
+- case 6
+- % Used by Minitab and SPSS.
+- p = kron (p, m+1);
+-
+- case 7
+- % Used by S and R.
+- p = kron (p, m-1) + 1;
+-
+- case 8
+- % Median unbiased.
+- p = kron (p, m+1/3) + 1/3;
+-
+- case 9
+- % Approximately unbiased respecting order statistics.
+- p = kron (p, m+0.25) + 0.375;
+-
+- otherwise
+- error ('quantile: Unknown METHOD, ''%d''', method);
+- end
+-
+- % Duplicate single values.
+- imm1 = (mm == 1);
+- x(2,imm1) = x(1,imm1);
+-
+- % Interval indices.
+- pi = max (min (floor (p), mm-1), 1);
+- pr = max (min (p - pi, 1), 0);
+- pi = pi + pcd;
+- inv(k,:) = (1-pr) .* x(pi) + pr .* x(pi+1);
+- end
+-end
+-
+-end % function
+--- a/inst/misc/mole/graphics_toolkit/graphics_toolkit.m
++++ /dev/null
+@@ -1,69 +0,0 @@
+-% GRAPHICS_TOOLKIT indicates which toolkit is assigned to new figures.
+-%
+-% This is a (partial) replacement for the graphics_toolkit function that is missing both
+-% from Matlab and from some old version f Octave.
+-%
+-% CALL: NAME = graphics_toolkit ()
+-%
+-% returns:
+-%
+-% * the result of get (0, 'defaultfigure__backend__') if you're running an old version
+-% of Octave that does not have graphics_toolkit,
+-%
+-% * 'matlab-nojvm' if running Matlab without the Java Virtual Machine,
+-%
+-% * 'matlab-jvm' if running Matlab with the Java Virtual Machine.
+-
+-% Copyright Notice
+-%
+-% Copyright (C) 2013, 2014 SUPELEC
+-%
+-% Author: Julien Bect <julien.bect@centralesupelec.fr>
+-
+-% Copying Permission Statement
+-%
+-% This file is part of
+-%
+-% STK: a Small (Matlab/Octave) Toolbox for Kriging
+-% (http://sourceforge.net/projects/kriging)
+-%
+-% STK 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 3 of the License, or (at your
+-% option) any later version.
+-%
+-% STK 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.
+-%
+-% You should have received a copy of the GNU General Public License
+-% along with STK. If not, see <http://www.gnu.org/licenses/>.
+-
+-function name = graphics_toolkit ()
+-
+-if exist ('OCTAVE_VERSION', 'builtin') == 5 % Octave
+-
+- try
+- % This should work on older versions of Octave, e.g., 3.2.4
+- % (there was no notion of a 'toolkit' at the time, but if gnuplot
+- % is reported as the backend, then it is also the toolkit)
+- name = get (0, 'defaultfigure__backend__');
+- catch
+- error ('Unable to determine which toolkit is being used.');
+- end
+-
+-else % Matlab
+-
+- try
+- assert (usejava ('jvm'));
+- name = 'matlab-jvm';
+- catch
+- name = 'matlab-nojvm';
+- end
+-
+-end
+-
+-end % function
+-
+-%#ok<*CTCH>
+--- a/post_install.m
++++ /dev/null
+@@ -1,42 +0,0 @@
+-# POST_INSTALL is run after the installation of the package
+-
+-# Copyright Notice
+-#
+-# Copyright (C) 2014 SUPELEC
+-# Copyright (C) 2015 CentraleSupelec
+-#
+-# Author: Julien Bect <julien.bect@centralesupelec.fr>
+-
+-# Copying Permission Statement
+-#
+-# This file is part of
+-#
+-# STK: a Small (Matlab/Octave) Toolbox for Kriging
+-# (http://sourceforge.net/projects/kriging)
+-#
+-# STK 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 3 of the License, or (at your
+-# option) any later version.
+-#
+-# STK 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.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with STK. If not, see <http://www.gnu.org/licenses/>.
+-
+-function post_install (desc)
+-
+- here = pwd ();
+-
+- # Prune unused functions from the MOLE
+- unwind_protect
+- cd (desc.dir);
+- stk_init prune_mole
+- unwind_protect_cleanup
+- cd (here);
+- end_unwind_protect
+-
+-endfunction
diff --git a/debian/patches/0003-Mark-expected-failure.patch b/debian/patches/0003-Mark-expected-failure.patch
new file mode 100644
index 0000000..f213e1e
--- /dev/null
+++ b/debian/patches/0003-Mark-expected-failure.patch
@@ -0,0 +1,21 @@
+Description: Mark one unit test as expected failure
+Author: Julien Bect <julien.bect@centralesupelec.fr>
+Bug-Debian: https://bugs.debian.org/876777
+Forwarded: not-needed
+Reviewed-By: Sébastien Villemot <sebastien@debian.org>
+Last-Update: 2019-10-24
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/inst/param/estim/stk_param_init.m
++++ b/inst/param/estim/stk_param_init.m
+@@ -408,7 +408,9 @@
+ %! xt = stk_sampling_regulargrid (NT, DIM, BOX); % Generate a regular grid
+ %! zt = stk_feval (f, xt); % Values of f on the grid
+
+-%!test
++%!xtest % This test is known to fail in Debian buster i386
++%! % because of a known problem in Octave's sqp/qp functions
++%! % http://savannah.gnu.org/bugs/?38875
+ %! model = stk_model ('stk_materncov_iso');
+ %! [param0, model.lognoisevariance] = stk_param_init (model, xi, zi, BOX);
+ %! model.param = stk_param_estim (model, xi, zi, param0);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e030d52
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0002-Remove-the-MOLE.patch
+0003-Mark-expected-failure.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..121f3c8
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,5 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+%:
+ dh $@ --buildsystem=octave --with=octave
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..46ebe02
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt) \ No newline at end of file
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..8a2989c
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,9 @@
+Reference:
+ Author: Bect, Julien and Vazquez, Emmanuel and others
+ Title: "STK: a Small (Matlab/Octave) Toolbox for Kriging. Release 2.6"
+ Year: 2019
+ Type: misc
+ URL: http://kriging.sourceforge.net
+Bug-Database: https://savannah.gnu.org/bugs/?group=octave
+Bug-Submit: https://savannah.gnu.org/bugs/?func=additem&group=octave
+Repository-Browse: https://octave.sourceforge.io/pkg-repository/stk/
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..348c1a6
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=4
+http://sf.net/octave/stk-(.+)\.tar\.gz