summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-03-18 22:58:14 -0400
committerLeo Famulari <leo@famulari.name>2017-03-19 17:32:44 -0400
commit4c20b0bcf7c8396cadc618a3df0127b864fd10f2 (patch)
treedcfdd6c6e20a3aaa1e70b1a8f17310f313a5446a /gnu/packages
parent717c659630970982c06e4aeab684f41f724af2f9 (diff)
downloadguix-4c20b0bcf7c8396cadc618a3df0127b864fd10f2.tar.gz
gnu: graphite2: Fix test failure caused by rounding error on 32-bit CPUs.
* gnu/packages/patches/graphite2-ffloat-store.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/fontutils.scm (graphite2): Use it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/fontutils.scm2
-rw-r--r--gnu/packages/patches/graphite2-ffloat-store.patch34
2 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 46c658b667..7e7234960d 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
+;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -380,6 +381,7 @@ applications should be.")
        (method url-fetch)
        (uri (string-append "https://github.com/silnrsi/graphite/releases/"
                            "download/" version "/" name "-" version ".tgz"))
+       (patches (search-patches "graphite2-ffloat-store.patch"))
        (sha256
         (base32
          "0rs5h7m340z75kygx8d72cps0q6yvvqa9i788vym7585cfv8a0gc"))))
diff --git a/gnu/packages/patches/graphite2-ffloat-store.patch b/gnu/packages/patches/graphite2-ffloat-store.patch
new file mode 100644
index 0000000000..f6ee56973e
--- /dev/null
+++ b/gnu/packages/patches/graphite2-ffloat-store.patch
@@ -0,0 +1,34 @@
+Fix test failures of awamicmp1 and awamicmp2.
+
+Debian bug report:
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855814
+
+Patch adapted from upstream source repository:
+
+https://github.com/silnrsi/graphite/commit/f7bbdd87d510d587c872e314d6458160c0069c65
+
+From f7bbdd87d510d587c872e314d6458160c0069c65 Mon Sep 17 00:00:00 2001
+From: Martin Hosken <martin_hosken@sil.org>
+Date: Tue, 14 Feb 2017 17:00:03 +0000
+Subject: [PATCH] try -ffloat-store for fp stability. Remove nested const to
+ work around VS bug
+
+---
+ src/CMakeLists.txt    | 2 +-
+ src/inc/locale2lcid.h | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 4f1e7e5..5b61b5c 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -108,7 +108,7 @@ set_target_properties(graphite2 PROPERTIES  PUBLIC_HEADER "${GRAPHITE_HEADERS}"
+ 
+ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+     set_target_properties(graphite2 PROPERTIES 
+-        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
++        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector -ffloat-store"
+         LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" 
+         LINKER_LANGUAGE C)
+     if (CMAKE_COMPILER_IS_GNUCXX)