Update signbit patch from gnulib upstream to work with older compilers

- Only munge headers for gnulib on Fedora 24+
This commit is contained in:
Orion Poplawski 2016-03-23 19:37:55 -06:00
parent fe93f47194
commit 99d8de70d2
2 changed files with 21 additions and 6 deletions

View File

@ -1,12 +1,21 @@
diff -up octave-4.0.0/libgnu/math.in.h.signbit octave-4.0.0/libgnu/math.in.h
--- octave-4.0.0/libgnu/math.in.h.signbit 2016-02-19 19:16:24.525856660 -0700
+++ octave-4.0.0/libgnu/math.in.h 2016-02-19 19:32:27.001262926 -0700
@@ -2205,7 +2205,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
diff -up octave-4.0.1/libgnu/math.in.h.signbit octave-4.0.1/libgnu/math.in.h
--- octave-4.0.1/libgnu/math.in.h.signbit 2015-05-14 01:31:01.000000000 -0600
+++ octave-4.0.1/libgnu/math.in.h 2016-03-23 17:34:43.719131933 -0600
@@ -1,6 +1,6 @@
/* A GNU-like <math.h>.
- Copyright (C) 2002-2003, 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2205,7 +2205,8 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
#if @GNULIB_SIGNBIT@
-# if @REPLACE_SIGNBIT_USING_GCC@
+# if @REPLACE_SIGNBIT_USING_GCC@ && !defined(__cplusplus)
+# if (@REPLACE_SIGNBIT_USING_GCC@ \
+ && (!defined __cplusplus || __cplusplus < 201103L))
# undef signbit
/* GCC 4.0 and newer provides three built-ins for signbit. */
# define signbit(x) \

View File

@ -20,7 +20,7 @@
Name: octave
Epoch: 6
Version: 4.0.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A high-level language for numerical computations
Group: Applications/Engineering
License: GPLv3+
@ -171,7 +171,9 @@ This package contains documentation for Octave.
%patch4 -p1 -b .gnulib
%patch5 -p1 -b .abs
# Explicitly use gnulib headers
%if 0%{?fedora} >= 24
find -name \*.cc -o -name \*.h -o -name \*.yy | xargs sed -i -e 's/#include <c\(math\|stdlib\)>/#include <\1.h>/'
%endif
find -name \*.h -o -name \*.cc | xargs sed -i -e 's/<config.h>/"config.h"/' -e 's/<base-list.h>/"base-list.h"/'
# Check permissions
@ -407,6 +409,10 @@ fi
%{_pkgdocdir}/refcard*.pdf
%changelog
* Wed Mar 23 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.0.1-3
- Update signbit patch from gnulib upstream to work with older compilers
- Only munge headers for gnulib on Fedora 24+
* Tue Mar 22 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.0.1-2
- libappstream-glib is not in EL6