From 273260646d90bbe78aaf2f07bc22723818201fe9 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 18 Jul 2016 12:32:19 -0400 Subject: gnu: gd: Fix failing test on i686. * gnu/packages/patches/gd-fix-test-on-i686.patch: New file. * gnu/local.mk (dist_PATCH_DATA): Add it. * gnu/packages/gd.scm (gd)[source]: Add the patch. --- gnu/packages/patches/gd-fix-test-on-i686.patch | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gnu/packages/patches/gd-fix-test-on-i686.patch (limited to 'gnu/packages/patches/gd-fix-test-on-i686.patch') 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 . + +--- 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 + #include ++#include + #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); + } -- cgit v1.2.3