From 99d8de70d2da5a0b4186e95f12da449cf5c60cd8 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 23 Mar 2016 19:37:55 -0600 Subject: [PATCH] Update signbit patch from gnulib upstream to work with older compilers - Only munge headers for gnulib on Fedora 24+ --- octave-signbit.patch | 19 ++++++++++++++----- octave.spec | 8 +++++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/octave-signbit.patch b/octave-signbit.patch index 522f42a..00d4df8 100644 --- a/octave-signbit.patch +++ b/octave-signbit.patch @@ -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 . + +- 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) \ diff --git a/octave.spec b/octave.spec index 6387319..32cd871 100644 --- a/octave.spec +++ b/octave.spec @@ -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 /#include <\1.h>/' +%endif find -name \*.h -o -name \*.cc | xargs sed -i -e 's//"config.h"/' -e 's//"base-list.h"/' # Check permissions @@ -407,6 +409,10 @@ fi %{_pkgdocdir}/refcard*.pdf %changelog +* Wed Mar 23 2016 Orion Poplawski - 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 - 6:4.0.1-2 - libappstream-glib is not in EL6