From 94a7461fdd8f054964ae33007882822bd87bb12a Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sat, 13 Sep 2014 11:31:25 -0600 Subject: [PATCH] Add patch to allow octave compilation --- suitesparse-include.patch | 22 ++++++++++++++++++++++ suitesparse.spec | 9 ++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 suitesparse-include.patch diff --git a/suitesparse-include.patch b/suitesparse-include.patch new file mode 100644 index 0000000..ffcfc96 --- /dev/null +++ b/suitesparse-include.patch @@ -0,0 +1,22 @@ +diff -up SuiteSparse/SuiteSparse_config/SuiteSparse_config.h.include SuiteSparse/SuiteSparse_config/SuiteSparse_config.h +--- SuiteSparse/SuiteSparse_config/SuiteSparse_config.h.include 2014-07-16 15:35:20.000000000 -0600 ++++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.h 2014-09-13 11:28:42.480821742 -0600 +@@ -38,14 +38,14 @@ + #ifndef SUITESPARSE_CONFIG_H + #define SUITESPARSE_CONFIG_H + +-#ifdef __cplusplus +-extern "C" { +-#endif +- + #include + #include + #include + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + /* ========================================================================== */ + /* === SuiteSparse_long ===================================================== */ + /* ========================================================================== */ diff --git a/suitesparse.spec b/suitesparse.spec index b758a4e..b57e479 100644 --- a/suitesparse.spec +++ b/suitesparse.spec @@ -12,13 +12,16 @@ Name: suitesparse Version: 4.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A collection of sparse matrix libraries Group: System Environment/Libraries License: LGPLv2+ and GPLv2+ URL: http://www.cise.ufl.edu/research/sparse/SuiteSparse Source0: http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-%{version}.tar.gz +# Move includes out of extern "C" to allow octave compilation +# https://savannah.gnu.org/bugs/?43063 +Patch0: suitesparse-include.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{with atlas310} @@ -93,6 +96,7 @@ This package contains documentation files for %{name}. %prep %setup -q -n SuiteSparse +%patch0 -p1 -b .include %build %define amd_version 2.4.0 @@ -433,6 +437,9 @@ rm -rf ${RPM_BUILD_ROOT} %doc Doc/* %changelog +* Sat Sep 13 2014 Orion Poplawski - 4.3.1-2 +- Add patch to allow octave compilation + * Mon Sep 08 2014 Clément David - 4.3.1-1 - Update to release 4.3.1.