[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: gd: Fix failing test on i686.
From: |
Mark H. Weaver |
Subject: |
01/01: gnu: gd: Fix failing test on i686. |
Date: |
Mon, 18 Jul 2016 16:36:27 +0000 (UTC) |
mhw pushed a commit to branch master
in repository guix.
commit 273260646d90bbe78aaf2f07bc22723818201fe9
Author: Mark H Weaver <address@hidden>
Date: Mon Jul 18 12:32:19 2016 -0400
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/local.mk | 1 +
gnu/packages/gd.scm | 5 ++--
gnu/packages/patches/gd-fix-test-on-i686.patch | 34 ++++++++++++++++++++++++
3 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index ef2eb0b..3257a32 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -514,6 +514,7 @@ dist_patch_DATA =
\
%D%/packages/patches/gd-CVE-2016-6128.patch \
%D%/packages/patches/gd-CVE-2016-6132.patch \
%D%/packages/patches/gd-CVE-2016-6214.patch \
+ %D%/packages/patches/gd-fix-test-on-i686.patch \
%D%/packages/patches/gegl-CVE-2012-4433.patch \
%D%/packages/patches/geoclue-config.patch \
%D%/packages/patches/ghostscript-CVE-2015-3228.patch \
diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm
index 700de33..3313ee6 100644
--- a/gnu/packages/gd.scm
+++ b/gnu/packages/gd.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2016 Ludovic Courtès <address@hidden>
-;;; Copyright © 2015 Mark H Weaver <address@hidden>
+;;; Copyright © 2015, 2016 Mark H Weaver <address@hidden>
;;; Copyright © 2015 Eric Bavier <address@hidden>
;;; Copyright © 2016 Leo Famulari <address@hidden>
;;;
@@ -47,7 +47,8 @@
(uri (string-append
"https://github.com/libgd/libgd/releases/download/gd-"
version "/libgd-" version ".tar.xz"))
- (patches (search-patches "gd-CVE-2016-5766.patch"
+ (patches (search-patches "gd-fix-test-on-i686.patch"
+ "gd-CVE-2016-5766.patch"
"gd-CVE-2016-6128.patch"
"gd-CVE-2016-6132.patch"
"gd-CVE-2016-6214.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 0000000..6dd2e0f
--- /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 <address@hidden>.
+
+--- 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);
+ }