[Pkg-octave-commit] [octave-image] 01/03: Replace workaround bwdist-noopt.patch by upstream fix.
Thomas Weber
tweber at moszumanska.debian.org
Tue Mar 11 22:57:32 UTC 2014
This is an automated email from the git hooks/post-receive script.
tweber pushed a commit to branch master
in repository octave-image.
commit fb5033636ee5222752ee4674cc094379b8d3fdd2
Author: Thomas Weber <tweber at debian.org>
Date: Tue Mar 11 18:55:27 2014 +0100
Replace workaround bwdist-noopt.patch by upstream fix.
---
debian/patches/bwdist-noopt.patch | 20 ---------
debian/patches/prevent-endless-loop-on-i386.diff | 52 ++++++++++++++++++++++++
debian/patches/series | 2 +-
3 files changed, 53 insertions(+), 21 deletions(-)
diff --git a/debian/patches/bwdist-noopt.patch b/debian/patches/bwdist-noopt.patch
deleted file mode 100644
index 19af21e..0000000
--- a/debian/patches/bwdist-noopt.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Description: Disable optimization when compiling bwdist
- As of g++-4.8 4.8.2-16, if bwdist is compiled with optimization, then its
- testsuite enters an infinite loop on i386.
-Author: Sébastien Villemot <sebastien at debian.org>
-Forwarded: not-needed
-Bug: https://savannah.gnu.org/bugs/index.php?41831
-Last-Update: 2014-03-11
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -13,5 +13,8 @@ bwlabeln.oct: bwlabeln.cc union-find.h++
- imerode.oct: imerode.cc strel.cc
- $(MKOCTFILE) $^ -o $@
-
-+bwdist.oct: bwdist.cc
-+ CXXFLAGS="$(shell env DEB_BUILD_OPTIONS=noopt dpkg-buildflags --get CXXFLAGS)" $(MKOCTFILE) $<
-+
- clean:
- rm -f *.o octave-core core *.oct *~
diff --git a/debian/patches/prevent-endless-loop-on-i386.diff b/debian/patches/prevent-endless-loop-on-i386.diff
new file mode 100644
index 0000000..7061f11
--- /dev/null
+++ b/debian/patches/prevent-endless-loop-on-i386.diff
@@ -0,0 +1,52 @@
+Description: Prevent endless loop in bwdist on i386
+ bwdist's test suite looped endlessly on i386 when compiled with optimization.
+ The reason seems to be a lack of machine precision.
+Author: Carnë Draug <carandraug at octave.org>
+Origin: <upstream>, http://sourceforge.net/p/octave/image/ci/43cd1c5e095503a52866dbcfb35f6a4a43a431cb/
+Bug: https://savannah.gnu.org/bugs/index.php?41831
+Forwarded: not-needed
+Applied-Upstream: http://sourceforge.net/p/octave/image/ci/43cd1c5e095503a52866dbcfb35f6a4a43a431cb/
+Last-Update: 2014-03-11
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/bwdist.cc
++++ b/src/bwdist.cc
+@@ -65,7 +65,7 @@
+ }
+ }
+
+- float olddist2, newdist2, newdistx, newdisty;
++ double olddist2, newdist2, newdistx, newdisty;
+ bool changed;
+
+ // Initialize index offsets for the current image width
+@@ -641,5 +641,29 @@
+ %! assert (dout, dist)
+ %! assert (cout, c)
+
++## The quasi-euclidean method is apparently sensitive to a machine precision
++## error that happens in x86 systems only. This test will cause an endless
++## loop in case of a regression.
++%!test
++%! bw = [ 0 1 1 0 0 0 1 0
++%! 0 0 0 0 0 0 0 0
++%! 1 1 0 0 0 0 0 0
++%! 0 0 0 0 0 0 1 0
++%! 0 0 0 0 1 0 0 1
++%! 0 0 0 0 0 0 0 0
++%! 1 0 0 0 0 0 0 0
++%! 0 0 1 0 0 1 1 0];
++%! out = single ([
++%! 1.00000 0.00000 0.00000 1.00000 2.00000 1.00000 0.00000 1.00000
++%! 1.00000 1.00000 1.00000 sqrt(2) sqrt(2)+1 sqrt(2) 1.00000 sqrt(2)
++%! 0.00000 0.00000 1.00000 2.00000 2.00000 sqrt(2) 1.00000 sqrt(2)
++%! 1.00000 1.00000 sqrt(2) sqrt(2) 1.00000 1.00000 0.00000 1.00000
++%! 2.00000 2.00000 2.00000 1.00000 0.00000 1.00000 1.00000 0.00000
++%! 1.00000 sqrt(2) 2.00000 sqrt(2) 1.00000 sqrt(2) sqrt(2) 1.00000
++%! 0.00000 1.00000 1.00000 sqrt(2) sqrt(2) 1.00000 1.00000 sqrt(2)
++%! 1.00000 1.00000 0.00000 1.00000 1.00000 0.00000 0.00000 1.00000
++%! ]);
++%! assert (bwdist (bw, "quasi-euclidean"), out);
++
+ %!error <unknown METHOD> bwdist (bw, "not a valid method");
+ */
diff --git a/debian/patches/series b/debian/patches/series
index 149d584..e3c866e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
autoload-yes.patch
use-dpkg-buildflags.patch
-bwdist-noopt.patch
+prevent-endless-loop-on-i386.diff
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-image.git
More information about the Pkg-octave-commit
mailing list