Hello community, here is the log from the commit of package octave for openSUSE:Factory checked in at 2016-06-21 11:30:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/octave (Old) and /work/SRC/openSUSE:Factory/.octave.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave" Changes: -------- --- /work/SRC/openSUSE:Factory/octave/octave.changes 2016-06-14 23:07:24.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.octave.new/octave.changes 2016-06-21 12:29:16.000000000 +0200 @@ -1,0 +2,6 @@ +Sat Jun 18 16:52:58 UTC 2016 - dmitr...@opensuse.org + +- Fix build with GCC6 [boo#985363] + * octave-gcc6.patch + +------------------------------------------------------------------- New: ---- octave-gcc6.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ octave.spec ++++++ --- /var/tmp/diff_new_pack.q8qBOA/_old 2016-06-21 12:29:17.000000000 +0200 +++ /var/tmp/diff_new_pack.q8qBOA/_new 2016-06-21 12:29:17.000000000 +0200 @@ -57,6 +57,7 @@ Source: ftp://ftp.gnu.org/gnu/octave/%{name}-%{src_ver}.tar.xz Source2: octave.pc.in Source3: octave.macros +Patch1: octave-gcc6.patch BuildRequires: arpack-ng-devel BuildRequires: bison BuildRequires: blas-devel @@ -200,8 +201,19 @@ This package contains documentation for Octave. +%if 0%{?suse_version} > 1320 +%if %( echo `rpm -q --queryformat %%{version} gcc` ) > 5 +%define with_gcc6 1 +%endif +%endif + %prep %setup -q -n %{name}-%{src_ver} +%if 0%{?with_gcc6} +%patch1 -p1 +find -name \*.cc -o -name \*.h -o -name \*.yy | xargs sed -i -e 's/#include <c\(math\|stdlib\)>/#include <\1.h>/' +find -name \*.h -o -name \*.cc | xargs sed -i -e 's/<config.h>/"config.h"/' -e 's/<base-list.h>/"base-list.h"/' +%endif %build export CPPFLAGS="-DH5_USE_16_API" ++++++ octave-gcc6.patch ++++++ diff -up octave-4.0.0/libinterp/corefcn/pr-output.cc.abs octave-4.0.0/libinterp/corefcn/pr-output.cc --- octave-4.0.0/libinterp/corefcn/pr-output.cc.abs 2015-05-23 08:21:53.000000000 -0600 +++ octave-4.0.0/libinterp/corefcn/pr-output.cc 2016-02-21 08:59:30.966291273 -0700 @@ -21,7 +21,7 @@ along with Octave; see the file COPYING. */ #ifdef HAVE_CONFIG_H -#include <config.h> +#include "config.h" #endif #include <cfloat> @@ -3145,6 +3145,14 @@ PRINT_INT_SCALAR_INTERNAL (uint32_t) PRINT_INT_SCALAR_INTERNAL (int64_t) PRINT_INT_SCALAR_INTERNAL (uint64_t) +inline unsigned int abs (unsigned int x) { return x; } +inline long unsigned int abs (long unsigned int x) { return x; } +inline long long unsigned int abs (long long unsigned int x) { return x; } +inline short unsigned int abs (short unsigned int x) { return x; } +inline unsigned char abs (unsigned char x) { return x; } +inline signed char abs (signed char x) { return abs((int)x); } +inline short int abs (short int x) { return abs((int)x); } + template <class T> /* static */ inline void octave_print_internal_template (std::ostream& os, const intNDArray<T>& nda, diff -up octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh.gnulib octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh --- octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh.gnulib 2015-05-23 08:21:53.000000000 -0600 +++ octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh 2016-02-19 19:50:04.693811663 -0700 @@ -27,6 +27,7 @@ #ifndef FADDEEVA_HH #define FADDEEVA_HH 1 +#include <math.h> #include <complex> namespace Faddeeva { 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 || __cplusplus < 201103L)) # undef signbit /* GCC 4.0 and newer provides three built-ins for signbit. */ # define signbit(x) \