[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
53/63: gnu: rapicorn: Add patch to handle isnan.
From: |
Mark H. Weaver |
Subject: |
53/63: gnu: rapicorn: Add patch to handle isnan. |
Date: |
Thu, 4 Aug 2016 07:44:58 +0000 (UTC) |
mhw pushed a commit to branch core-updates-2016-08-01
in repository guix.
commit 42bf34298eec19b37e276e49074113f29c494aed
Author: Andreas Enge <address@hidden>
Date: Sun Jul 31 18:16:25 2016 +0200
gnu: rapicorn: Add patch to handle isnan.
* gnu/packages/patches/rapicorn-isnan.patch: New file.
* gnu/packages/graphics.scm (rapicorn)[source]: Add patch.
* gnu/local.mk (dist_patch_DATA): Register patch.
---
gnu/local.mk | 1 +
gnu/packages/graphics.scm | 4 +-
gnu/packages/patches/rapicorn-isnan.patch | 87 +++++++++++++++++++++++++++++
3 files changed, 91 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 0ee096a..b91a925 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -749,6 +749,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-paste-remove-timing-test.patch \
%D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
%D%/packages/patches/qt4-ldflags.patch \
+ %D%/packages/patches/rapicorn-isnan.patch \
%D%/packages/patches/ratpoison-shell.patch \
%D%/packages/patches/readline-link-ncurses.patch \
%D%/packages/patches/ripperx-missing-file.patch \
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index f6298ce..d0df830 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2016 Leo Famulari <address@hidden>
;;; Copyright © 2016 Ricardo Wurmus <address@hidden>
;;; Copyright © 2016 Efraim Flashner <address@hidden>
+;;; Copyright © 2016 Andreas Enge <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -300,7 +301,8 @@ visual effects work for film.")
"rapicorn-" version ".tar.xz"))
(sha256
(base32
- "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))))
+ "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d"))
+ (patches (search-patches "rapicorn-isnan.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases
diff --git a/gnu/packages/patches/rapicorn-isnan.patch
b/gnu/packages/patches/rapicorn-isnan.patch
new file mode 100644
index 0000000..b0e7819
--- /dev/null
+++ b/gnu/packages/patches/rapicorn-isnan.patch
@@ -0,0 +1,87 @@
+From e0c8341b3e4e13778bcde00d477e461ea8e94306 Mon Sep 17 00:00:00 2001
+From: Stefan Westerfeld <address@hidden>
+Date: Fri, 22 Apr 2016 18:03:37 +0200
+Subject: [PATCH 031/176] RCORE: compile fixes for KUbuntu 16.04/gcc
+ 5.3.1-14ubuntu2
+
+Rapicorn uses isnan(...) and isinf(...) from cmath.h, however on KUbuntu 16.04
+it should use std::isnan(...) and std::isinf(...) instead. Patch below.
+
+Acked-by: Tim Janik <address@hidden>
+---
+ rcore/strings.cc | 10 +++++-----
+ rcore/tests/benchrcore.cc | 4 ++--
+ rcore/tests/strings.cc | 4 ++--
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/rcore/strings.cc b/rcore/strings.cc
+index d5b0216..8b3bc3f 100644
+--- a/rcore/strings.cc
++++ b/rcore/strings.cc
+@@ -437,7 +437,7 @@ static long double
+ libc_strtold (const char *nptr, char **endptr)
+ {
+ const long double result = strtold (nptr, endptr);
+- if (isnan (result) && std::signbit (result) == 0)
++ if (std::isnan (result) && std::signbit (result) == 0)
+ {
+ const char *p = nptr;
+ while (isspace (*p))
+@@ -500,9 +500,9 @@ string_to_double (const char *dblstring, const char
**endptr)
+ String
+ string_from_float (float value)
+ {
+- if (isnan (value))
++ if (std::isnan (value))
+ return std::signbit (value) ? "-NaN" : "+NaN";
+- if (isinf (value))
++ if (std::isinf (value))
+ return std::signbit (value) ? "-Infinity" : "+Infinity";
+ return string_format ("%.7g", value);
+ }
+@@ -511,9 +511,9 @@ string_from_float (float value)
+ String
+ string_from_double (double value)
+ {
+- if (isnan (value))
++ if (std::isnan (value))
+ return std::signbit (value) ? "-NaN" : "+NaN";
+- if (isinf (value))
++ if (std::isinf (value))
+ return std::signbit (value) ? "-Infinity" : "+Infinity";
+ return string_format ("%.17g", value);
+ }
+diff --git a/rcore/tests/benchrcore.cc b/rcore/tests/benchrcore.cc
+index 3899a08..12fde16 100644
+--- a/rcore/tests/benchrcore.cc
++++ b/rcore/tests/benchrcore.cc
+@@ -188,8 +188,8 @@ test_random_numbers()
+ const double rf = random_frange (989617512, 9876547656);
+ TASSERT (rf >= 989617512 && rf < 9876547656);
+ }
+- TASSERT (isnan (random_frange (NAN, 1)));
+- TASSERT (isnan (random_frange (0, NAN)));
++ TASSERT (std::isnan (random_frange (NAN, 1)));
++ TASSERT (std::isnan (random_frange (0, NAN)));
+ #if 0 // example penalty paid in random_int64()
+ size_t i, j = 0;
+ for (i = 0; i < 100; i++)
+diff --git a/rcore/tests/strings.cc b/rcore/tests/strings.cc
+index 468a6e6..dae3e3d 100644
+--- a/rcore/tests/strings.cc
++++ b/rcore/tests/strings.cc
+@@ -311,9 +311,9 @@ string_conversions (void)
+ TCMP (string_to_double ("-0.5"), ==, -0.5);
+ double tfloat;
+ tfloat = string_to_double ("+NAN");
+- assert (isnan (tfloat) && std::signbit (tfloat) == 0);
++ assert (std::isnan (tfloat) && std::signbit (tfloat) == 0);
+ tfloat = string_to_double ("-NAN");
+- assert (isnan (tfloat) && std::signbit (tfloat) == 1);
++ assert (std::isnan (tfloat) && std::signbit (tfloat) == 1);
+ TCMP (string_capitalize ("fOO bar"), ==, "Foo Bar");
+ TCMP (string_capitalize ("foo BAR BAZ", 2), ==, "Foo Bar BAZ");
+ }
+--
+2.9.1
+
- 55/63: download: Add mirror.hydra.gnu.org as a content-addressed mirror., (continued)
- 55/63: download: Add mirror.hydra.gnu.org as a content-addressed mirror., Mark H. Weaver, 2016/08/04
- 59/63: gnu: unison: Add input ghostscript., Mark H. Weaver, 2016/08/04
- 41/63: Merge branch 'master' into core-updates, Mark H. Weaver, 2016/08/04
- 39/63: Merge branch 'master' into core-updates, Mark H. Weaver, 2016/08/04
- 37/63: gnu: dico: Patch 'idxgcide' bug., Mark H. Weaver, 2016/08/04
- 49/63: gnu: dealii: Unregister deleted patch., Mark H. Weaver, 2016/08/04
- 57/63: gnu: ecl: Use "kernel-headers" instead of "linux-headers" to designate input., Mark H. Weaver, 2016/08/04
- 56/63: tests: 'guix-environment-container.sh' works when run from a tmpfs., Mark H. Weaver, 2016/08/04
- 62/63: build: Set XDG_CACHE_HOME to avoid loading stale .go files., Mark H. Weaver, 2016/08/04
- 63/63: install: Add nvi to the image., Mark H. Weaver, 2016/08/04
- 53/63: gnu: rapicorn: Add patch to handle isnan.,
Mark H. Weaver <=
- 40/63: Merge branch 'master' into core-updates, Mark H. Weaver, 2016/08/04
- 61/63: Update NEWS., Mark H. Weaver, 2016/08/04
- 44/63: gnu: glibc-locales: Fix build., Mark H. Weaver, 2016/08/04