[shogun] Add patch for octave 3.8.0 support

Orion Poplawski orion at fedoraproject.org
Wed Jan 8 20:26:40 UTC 2014


commit 6c679e53efc956b9cd61ffda0fb188870796c5c6
Author: Orion Poplawski <orion at nwra.com>
Date:   Wed Jan 8 13:26:47 2014 -0700

    Add patch for octave 3.8.0 support

 shogun-octave38.patch |   26 ++++++++++++++++++++++++++
 shogun.spec           |    9 ++++++++-
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/shogun-octave38.patch b/shogun-octave38.patch
new file mode 100644
index 0000000..9dee36e
--- /dev/null
+++ b/shogun-octave38.patch
@@ -0,0 +1,26 @@
+diff -up shogun-3.1.1/cmake/FindOctave.cmake.octave38 shogun-3.1.1/cmake/FindOctave.cmake
+--- shogun-3.1.1/cmake/FindOctave.cmake.octave38	2014-01-05 13:16:46.000000000 -0700
++++ shogun-3.1.1/cmake/FindOctave.cmake	2014-01-08 13:16:54.298238049 -0700
+@@ -119,14 +119,16 @@ find_library( OCTAVE_OCTAVE_LIBRARY
+               NAMES octave liboctave
+               HINTS ${OCTAVE_LIBRARIES_PATHS}
+             )
+-find_library( OCTAVE_CRUFT_LIBRARY
+-              NAMES cruft libcruft
+-              HINTS ${OCTAVE_LIBRARIES_PATHS}
+-            )
+-
+ set ( OCTAVE_LIBRARIES ${OCTAVE_OCTINTERP_LIBRARY} )
+ list ( APPEND OCTAVE_LIBRARIES ${OCTAVE_OCTAVE_LIBRARY} )
+-list ( APPEND OCTAVE_LIBRARIES ${OCTAVE_CRUFT_LIBRARY} )
++
++if ( ${OCTAVE_VERSION_STRING} LESS 3.8.0 )
++  find_library( OCTAVE_CRUFT_LIBRARY
++                NAMES cruft libcruft
++                HINTS ${OCTAVE_LIBRARIES_PATHS}
++              )
++  list ( APPEND OCTAVE_LIBRARIES ${OCTAVE_CRUFT_LIBRARY} )
++endif ()
+ 
+ find_path ( OCTAVE_INCLUDE_DIR
+             NAMES mex.h
diff --git a/shogun.spec b/shogun.spec
index 163c2ed..c8ba3af 100644
--- a/shogun.spec
+++ b/shogun.spec
@@ -86,7 +86,7 @@ of it's 'no-redistribute', 'no-commercial-use' license.
 
 Name:			shogun
 Version:		%{branch}.1
-Release:		1%{?gitrel}%{?dist}
+Release:		2%{?gitrel}%{?dist}
 Summary:		Large Scale Machine Learning Toolbox
 
 # ===== License-breakdown =====
@@ -150,6 +150,9 @@ URL:			http://%{name}-toolbox.org
 # Sources for snapshot-builds.
 %{!?rel_build:Source0:	https://github.com/%{name}-toolbox/%{name}/archive/%{commit}.tar.gz#/%{gittar}}
 Source99:		http://googlemock.googlecode.com/files/gmock-1.7.0.zip
+# Fix for octave 3.8 support
+# https://github.com/shogun-toolbox/shogun/pull/1812
+Patch0:                 shogun-octave38.patch
 
 BuildRequires:		arpack-devel
 BuildRequires:		arprec-devel
@@ -578,6 +581,7 @@ This package contains the Ruby-plugin for %{name}.
 
 %prep
 %setup -q%{!?rel_build:n %{name}-%{commit}}
+%patch0 -p1 -b .octave38
 
 # Scrub stuff that needs linking to license encumbered libs, which we can't
 # ship.  Thanks to Dr. Sören Sonnenburg (sonney2k), the upstream author, for
@@ -942,6 +946,9 @@ popd
 ###############################################################################
 
 %changelog
+* Wed Jan 08 2014 Orion Poplawski <orion at cora.nwra.com> - 3.1.1-2
+- Add patch for octave 3.8.0 support
+
 * Mon Jan 06 2014 Björn Esser <bjoern.esser at gmail.com> - 3.1.1-1
 - new upstream release: v3.1.1
 - data-files are now moved into a separate package


More information about the scm-commits mailing list