Hello community,
here is the log from the commit of package octave-forge-image for openSUSE:Factory checked in at 2015-06-23 11:58:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-image (Old)
and /work/SRC/openSUSE:Factory/.octave-forge-image.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave-forge-image"
Changes:
--------
--- /work/SRC/openSUSE:Factory/octave-forge-image/octave-forge-image.changes 2015-06-16 15:11:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.octave-forge-image.new/octave-forge-image.changes 2015-06-23 11:58:40.000000000 +0200
@@ -1,0 +2,6 @@
+Sat Jun 20 08:22:07 UTC 2015 - dmitry_r@opensuse.org
+
+- Fix build with GCC5
+ * workaround_gcc_65843.patch
+
+-------------------------------------------------------------------
New:
----
workaround_gcc_65843.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ octave-forge-image.spec ++++++
--- /var/tmp/diff_new_pack.BUG7vW/_old 2015-06-23 11:58:41.000000000 +0200
+++ /var/tmp/diff_new_pack.BUG7vW/_new 2015-06-23 11:58:41.000000000 +0200
@@ -25,6 +25,12 @@
Group: Productivity/Scientific/Math
Url: http://octave.sourceforge.net
Source0: http://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM workaround_gcc_65843.patch -- https://savannah.gnu.org/bugs/?45096
+Patch1: workaround_gcc_65843.patch
+%if 0%{?suse_version} > 1320
+BuildRequires: autoconf
+BuildRequires: automake
+%endif
BuildRequires: gcc-c++
BuildRequires: hdf5-devel
BuildRequires: octave-devel
@@ -38,6 +44,12 @@
%prep
%setup -q -c %{name}-%{version}
+%if 0%{?suse_version} > 1320
+%patch1 -p1 -d %{octpkg}-%{version}
+pushd %{octpkg}-%{version}/src
+autoreconf -fi
+popd
+%endif
%octave_pkg_src
%build
++++++ workaround_gcc_65843.patch ++++++
# HG changeset patch
# User Carnë Draug
# Date 1433513310 -3600
# Fri Jun 05 15:08:30 2015 +0100
# Branch stable
# Node ID e1a242fb2d2a040f5fb3c1cd4e4677c9cd8785e8
# Parent 3a088259e1678db32e73ca184ea3aa09a4c9f42e
imreconstruct: workaround gcc bug #65843 for gcc 5.0 and 5.1 (bug #45096)
* src/imreconstruct.cc: gcc 5.0 and gcc 5.1 have a regression where use of
a reference to a const int in a lambda template function caused compile error.
Check for presence of the bug and workaround by not making it const.
diff -r 3a088259e167 -r e1a242fb2d2a src/Makefile.in
--- a/src/Makefile.in Sun May 24 17:19:16 2015 +0100
+++ b/src/Makefile.in Fri Jun 05 15:08:30 2015 +0100
@@ -1,7 +1,7 @@
MKOCTFILE ?= mkoctfile -Wall
OCTAVE ?= octave
-FLAGGED_MKOCTFILE = CXXFLAGS="@CXXFLAGS@" $(MKOCTFILE)
+FLAGGED_MKOCTFILE = CXXFLAGS="@CXXFLAGS@ @DEFS@" $(MKOCTFILE)
## We can't link oct files, and Octave's package system does not handle
## shared libraries. Because of this, we need to create object files for
diff -r 3a088259e167 -r e1a242fb2d2a src/configure.ac
--- a/src/configure.ac Sun May 24 17:19:16 2015 +0100
+++ b/src/configure.ac Fri Jun 05 15:08:30 2015 +0100
@@ -6,6 +6,27 @@
AX_CXX_COMPILE_STDCXX_11()
+## Test for gcc bug #65843 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65843
+## which shows up as Octave bug #45096 https://savannah.gnu.org/bugs/?45096
+AC_CACHE_CHECK([whether templated lambda functions accept '&const int'],
+ [_cv_template_lambda_accepts_ref_const_inst],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ template<class T>
+ void test (T b)
+ {
+ const int a = b;
+ [&] () { return a, a; }();
+ }
+ ]], [[ test (1); ]])],
+ [_cv_template_lambda_accepts_ref_const_inst=yes],
+ [_cv_template_lambda_accepts_ref_const_inst=no])
+])
+if test $_cv_template_lambda_accepts_ref_const_inst = no; then
+ AC_DEFINE(HAVE_GCC_BUG_658433, 1,
+ [Define to 1 if compiler shows gcc bug #65843.])
+fi
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff -r 3a088259e167 -r e1a242fb2d2a src/imreconstruct.cc
--- a/src/imreconstruct.cc Sun May 24 17:19:16 2015 +0100
+++ b/src/imreconstruct.cc Fri Jun 05 15:08:30 2015 +0100
@@ -100,7 +100,11 @@
const octave_idx_type* pads = padding_lengths.fortran_vec ();
const octave_idx_type* neighbours = raster_neighbours.fortran_vec ();
+#ifdef HAVE_GCC_BUG_658433
+ octave_idx_type n_neighbours = raster_neighbours.numel ();
+#else
const octave_idx_type n_neighbours = raster_neighbours.numel ();
+#endif
// We probably should not be using this but converting to Array
// just to have fortran_vec seems a bit too much.
@@ -151,7 +155,11 @@
const octave_idx_type* pads = padding_lengths.fortran_vec ();
const octave_idx_type* neighbours = antiraster_neighbours.fortran_vec ();
+#ifdef HAVE_GCC_BUG_658433
+ octave_idx_type n_neighbours = antiraster_neighbours.numel ();
+#else
const octave_idx_type n_neighbours = antiraster_neighbours.numel ();
+#endif
// We probably should not be using this but converting to Array
// just to have fortran_vec seems a bit too much.