aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gd-fix-test-on-i686.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-07-20 11:42:02 +0200
committerLudovic Courtès <ludo@gnu.org>2016-07-20 11:42:17 +0200
commit7575655212ecfbcd1f04e429c8a7a41f8720d027 (patch)
tree558982d3cf50ef6b19ef293850de1f485fde66a6 /gnu/packages/patches/gd-fix-test-on-i686.patch
parent5d4c90ae02f1e0b42d575bba2d828d63aaf79be5 (diff)
parent5f01078129f4eaa4760a14f22761cf357afb6738 (diff)
downloadguix-7575655212ecfbcd1f04e429c8a7a41f8720d027.tar
guix-7575655212ecfbcd1f04e429c8a7a41f8720d027.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/gd-fix-test-on-i686.patch')
-rw-r--r--gnu/packages/patches/gd-fix-test-on-i686.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/patches/gd-fix-test-on-i686.patch b/gnu/packages/patches/gd-fix-test-on-i686.patch
new file mode 100644
index 0000000000..6dd2e0fb03
--- /dev/null
+++ b/gnu/packages/patches/gd-fix-test-on-i686.patch
@@ -0,0 +1,34 @@
+Disable part of the gdimagerotate test on architectures such as i686
+where intermediate floating-point operations are done with 80-bit long
+doubles, and typically later rounded to 64-bit doubles. This double
+rounding causes small differences in the resulting pixel values
+compared with other architectures, causing the image comparison to
+fail.
+
+Patch by Mark H Weaver <mhw@netris.org>.
+
+--- libgd-2.2.2/tests/gdimagerotate/bug00067.c 1969-12-31 19:00:00.000000000 -0500
++++ libgd-2.2.2/tests/gdimagerotate/bug00067.c 2016-07-18 12:19:19.885423132 -0400
+@@ -1,5 +1,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <float.h>
+ #include "gd.h"
+
+ #include "gdtest.h"
+@@ -41,6 +42,7 @@
+ return 1;
+ }
+
++#if FLT_EVAL_METHOD != 2
+ sprintf(filename, "bug00067_%03d_exp.png", angle);
+ path = gdTestFilePath2("gdimagerotate", filename);
+ if (!gdAssertImageEqualsToFile(path, exp)) {
+@@ -48,6 +50,7 @@
+ error += 1;
+ }
+ free(path);
++#endif
+
+ gdImageDestroy(exp);
+ }