[packages/octave] - updated to 3.8.2 - added suitesparse patch (adjust code to current SuiteSparse, including AMD and

qboosh qboosh at pld-linux.org
Sat Nov 22 16:03:08 CET 2014


commit 94d732b6981d4e868cc26ceda4552fc38fbc8133
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Nov 22 16:03:54 2014 +0100

    - updated to 3.8.2
    - added suitesparse patch (adjust code to current SuiteSparse, including AMD and CHOLMOD modules)

 octave-suitesparse.patch | 247 +++++++++++++++++++++++++++++++++++++++++++++++
 octave.spec              |  18 ++--
 2 files changed, 259 insertions(+), 6 deletions(-)
---
diff --git a/octave.spec b/octave.spec
index ad90a93..f3bc5d7 100644
--- a/octave.spec
+++ b/octave.spec
@@ -22,21 +22,22 @@ Summary(ru.UTF-8):	GNU Octave - Язык высокого уровня для в
 Summary(sv.UTF-8):	GNU Octave - ett högninvåspråk för numeriska beräkningar
 Summary(zh_CN.UTF-8):	GNU Octave - 用于数字计算的高级语言。
 Name:		octave
-Version:	3.8.1
+Version:	3.8.2
 Release:	1
 Epoch:		2
 License:	GPL v3+
 Group:		Applications/Math
 Source0:	http://ftp.gnu.org/gnu/octave/%{name}-%{version}.tar.bz2
-# Source0-md5:	4c5b9bd6b82b7fa3191af9706e7204f8
+# Source0-md5:	188bd97e22054f9c62701ee0e6800dc1
 Source1:	%{name}.desktop
 Patch0:		%{name}-info.patch
 Patch1:		%{name}-build.patch
+Patch2:		%{name}-suitesparse.patch
 URL:		http://www.octave.org/
-BuildRequires:	AMD-devel
+BuildRequires:	AMD-devel >= 2.4.0
 BuildRequires:	CAMD-devel
 BuildRequires:	CCOLAMD-devel
-BuildRequires:	CHOLMOD-devel
+BuildRequires:	CHOLMOD-devel >= 2.2.0
 BuildRequires:	COLAMD-devel
 BuildRequires:	CXSparse-devel
 BuildRequires:	GraphicsMagick-c++-devel
@@ -56,7 +57,7 @@ BuildRequires:	fftw3-single-devel
 BuildRequires:	fltk-devel
 BuildRequires:	fltk-gl-devel
 BuildRequires:	fontconfig-devel
-BuildRequires:	freetype-devel >= 2.0
+BuildRequires:	freetype-devel >= 2.0.9
 BuildRequires:	gcc-fortran >= 6:4.0
 BuildRequires:	gl2ps-devel
 BuildRequires:	glpk-devel >= 4.14
@@ -74,7 +75,7 @@ BuildRequires:	pcre-devel
 BuildRequires:	pkgconfig
 BuildRequires:	qhull-devel >= 2011.1
 BuildRequires:	qrupdate-devel
-%{?with_gui:BuildRequires:	qscintilla2-devel >= 2.6.0}
+%{?with_gui:BuildRequires:	qscintilla2-qt4-devel >= 2.6.0}
 %{?with_gui:BuildRequires:	qt4-build >= 4}
 %{?with_gui:BuildRequires:	qt4-linguist >= 4}
 BuildRequires:	readline-devel
@@ -85,6 +86,9 @@ BuildRequires:	xorg-lib-libX11-devel
 BuildRequires:	xorg-lib-libXft-devel
 BuildRequires:	zlib-devel
 Requires(post,postun):	/sbin/ldconfig
+Requires:	AMD >= 2.4.0
+Requires:	CHOLMOD >= 2.2.0
+Requires:	freetype >= 2.0.9
 Requires:	gnuplot
 Suggests:	GraphicsMagick
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -320,6 +324,7 @@ Pliki nagłówkowe i dodatkowa dokumentacja Octave.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
@@ -506,6 +511,7 @@ rm -rf $RPM_BUILD_ROOT
 %lang(pt) %{_datadir}/octave/%{version}/locale/pt_PT.qm
 %lang(ru) %{_datadir}/octave/%{version}/locale/ru_RU.qm
 %lang(uk) %{_datadir}/octave/%{version}/locale/uk_UA.qm
+%lang(zh_CN) %{_datadir}/octave/%{version}/locale/zh_CN.qm
 %endif
 
 %if %{with java}
diff --git a/octave-suitesparse.patch b/octave-suitesparse.patch
new file mode 100644
index 0000000..723b25b
--- /dev/null
+++ b/octave-suitesparse.patch
@@ -0,0 +1,247 @@
+--- octave-3.8.2/liboctave/array/CSparse.cc.orig	2014-08-06 19:57:55.000000000 +0200
++++ octave-3.8.2/liboctave/array/CSparse.cc	2014-11-21 15:47:48.347974219 +0100
+@@ -5664,17 +5664,17 @@ SparseComplexMatrix::fsolve (MatrixType
+           if (spu == 0.)
+             {
+               cm->print = -1;
+-              cm->print_function = 0;
++              SuiteSparse_config.printf_func = 0;
+             }
+           else
+             {
+               cm->print = static_cast<int> (spu) + 2;
+-              cm->print_function =&SparseCholPrint;
++              SuiteSparse_config.printf_func =&SparseCholPrint;
+             }
+ 
+           cm->error_handler = &SparseCholError;
+-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-          cm->hypotenuse = CHOLMOD_NAME(hypot);
++          SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++          SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+           cm->final_ll = true;
+ 
+@@ -5907,17 +5907,17 @@ SparseComplexMatrix::fsolve (MatrixType
+           if (spu == 0.)
+             {
+               cm->print = -1;
+-              cm->print_function = 0;
++              SuiteSparse_config.printf_func = 0;
+             }
+           else
+             {
+               cm->print = static_cast<int> (spu) + 2;
+-              cm->print_function =&SparseCholPrint;
++              SuiteSparse_config.printf_func =&SparseCholPrint;
+             }
+ 
+           cm->error_handler = &SparseCholError;
+-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-          cm->hypotenuse = CHOLMOD_NAME(hypot);
++          SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++          SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+           cm->final_ll = true;
+ 
+@@ -6198,17 +6198,17 @@ SparseComplexMatrix::fsolve (MatrixType
+           if (spu == 0.)
+             {
+               cm->print = -1;
+-              cm->print_function = 0;
++              SuiteSparse_config.printf_func = 0;
+             }
+           else
+             {
+               cm->print = static_cast<int> (spu) + 2;
+-              cm->print_function =&SparseCholPrint;
++              SuiteSparse_config.printf_func =&SparseCholPrint;
+             }
+ 
+           cm->error_handler = &SparseCholError;
+-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-          cm->hypotenuse = CHOLMOD_NAME(hypot);
++          SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++          SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+           cm->final_ll = true;
+ 
+@@ -6420,17 +6420,17 @@ SparseComplexMatrix::fsolve (MatrixType
+           if (spu == 0.)
+             {
+               cm->print = -1;
+-              cm->print_function = 0;
++              SuiteSparse_config.printf_func = 0;
+             }
+           else
+             {
+               cm->print = static_cast<int> (spu) + 2;
+-              cm->print_function =&SparseCholPrint;
++              SuiteSparse_config.printf_func =&SparseCholPrint;
+             }
+ 
+           cm->error_handler = &SparseCholError;
+-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-          cm->hypotenuse = CHOLMOD_NAME(hypot);
++          SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++          SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+           cm->final_ll = true;
+ 
+--- octave-3.8.2/liboctave/array/dSparse.cc.orig	2014-08-06 19:57:55.000000000 +0200
++++ octave-3.8.2/liboctave/array/dSparse.cc	2014-11-21 15:55:05.871289187 +0100
+@@ -5866,17 +5866,17 @@ SparseMatrix::fsolve (MatrixType &mattyp
+           if (spu == 0.)
+             {
+               cm->print = -1;
+-              cm->print_function = 0;
++              SuiteSparse_config.printf_func = 0;
+             }
+           else
+             {
+               cm->print = static_cast<int> (spu) + 2;
+-              cm->print_function =&SparseCholPrint;
++              SuiteSparse_config.printf_func =&SparseCholPrint;
+             }
+ 
+           cm->error_handler = &SparseCholError;
+-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-          cm->hypotenuse = CHOLMOD_NAME(hypot);
++          SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++          SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+           cm->final_ll = true;
+ 
+@@ -6083,17 +6083,17 @@ SparseMatrix::fsolve (MatrixType &mattyp
+           if (spu == 0.)
+             {
+               cm->print = -1;
+-              cm->print_function = 0;
++              SuiteSparse_config.printf_func = 0;
+             }
+           else
+             {
+               cm->print = static_cast<int> (spu) + 2;
+-              cm->print_function =&SparseCholPrint;
++              SuiteSparse_config.printf_func =&SparseCholPrint;
+             }
+ 
+           cm->error_handler = &SparseCholError;
+-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-          cm->hypotenuse = CHOLMOD_NAME(hypot);
++          SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++          SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+           cm->final_ll = true;
+ 
+@@ -6345,17 +6345,17 @@ SparseMatrix::fsolve (MatrixType &mattyp
+           if (spu == 0.)
+             {
+               cm->print = -1;
+-              cm->print_function = 0;
++              SuiteSparse_config.printf_func = 0;
+             }
+           else
+             {
+               cm->print = static_cast<int> (spu) + 2;
+-              cm->print_function =&SparseCholPrint;
++              SuiteSparse_config.printf_func =&SparseCholPrint;
+             }
+ 
+           cm->error_handler = &SparseCholError;
+-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-          cm->hypotenuse = CHOLMOD_NAME(hypot);
++          SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++          SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+           cm->final_ll = true;
+ 
+@@ -6579,17 +6579,17 @@ SparseMatrix::fsolve (MatrixType &mattyp
+           if (spu == 0.)
+             {
+               cm->print = -1;
+-              cm->print_function = 0;
++              SuiteSparse_config.printf_func = 0;
+             }
+           else
+             {
+               cm->print = static_cast<int> (spu) + 2;
+-              cm->print_function =&SparseCholPrint;
++              SuiteSparse_config.printf_func =&SparseCholPrint;
+             }
+ 
+           cm->error_handler = &SparseCholError;
+-          cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-          cm->hypotenuse = CHOLMOD_NAME(hypot);
++          SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++          SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+           cm->final_ll = true;
+ 
+--- octave-3.8.2/liboctave/numeric/sparse-base-chol.cc.orig	2014-08-06 19:54:14.000000000 +0200
++++ octave-3.8.2/liboctave/numeric/sparse-base-chol.cc	2014-11-21 16:03:57.417933578 +0100
+@@ -105,17 +105,17 @@ sparse_base_chol<chol_type, chol_elt, p_
+   if (spu == 0.)
+     {
+       cm->print = -1;
+-      cm->print_function = 0;
++      SuiteSparse_config.printf_func = 0;
+     }
+   else
+     {
+       cm->print = static_cast<int> (spu) + 2;
+-      cm->print_function =&SparseCholPrint;
++      SuiteSparse_config.printf_func =&SparseCholPrint;
+     }
+ 
+   cm->error_handler = &SparseCholError;
+-  cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-  cm->hypotenuse = CHOLMOD_NAME(hypot);
++  SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++  SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+   cm->final_asis = false;
+   cm->final_super = false;
+--- octave-3.8.2/libinterp/dldfcn/amd.cc.orig	2014-08-06 19:57:55.000000000 +0200
++++ octave-3.8.2/libinterp/dldfcn/amd.cc	2014-11-21 22:38:29.540273455 +0100
+@@ -164,11 +164,11 @@ The author of the code itself is Timothy
+ 
+               // FIXME: how can we manage the memory allocation of amd
+               //        in a cleaner manner?
+-              amd_malloc = malloc;
+-              amd_free = free;
+-              amd_calloc = calloc;
+-              amd_realloc = realloc;
+-              amd_printf = printf;
++              SuiteSparse_config.malloc_func = malloc;
++              SuiteSparse_config.free_func = free;
++              SuiteSparse_config.calloc_func = calloc;
++              SuiteSparse_config.realloc_func = realloc;
++              SuiteSparse_config.printf_func = printf;
+ 
+               octave_idx_type result = AMD_NAME (_order) (n_col, cidx, ridx, P,
+                                                           Control, Info);
+--- octave-3.8.2/libinterp/dldfcn/symbfact.cc.orig	2014-08-06 19:54:15.000000000 +0200
++++ octave-3.8.2/libinterp/dldfcn/symbfact.cc	2014-11-21 22:46:15.546920474 +0100
+@@ -114,17 +114,17 @@ factorization as determined by @var{typ}
+   if (spu == 0.)
+     {
+       cm->print = -1;
+-      cm->print_function = 0;
++      SuiteSparse_config.printf_func = 0;
+     }
+   else
+     {
+       cm->print = static_cast<int> (spu) + 2;
+-      cm->print_function =&SparseCholPrint;
++      SuiteSparse_config.printf_func =&SparseCholPrint;
+     }
+ 
+   cm->error_handler = &SparseCholError;
+-  cm->complex_divide = CHOLMOD_NAME(divcomplex);
+-  cm->hypotenuse = CHOLMOD_NAME(hypot);
++  SuiteSparse_config.divcomplex_func = CHOLMOD_NAME(divcomplex);
++  SuiteSparse_config.hypot_func = CHOLMOD_NAME(hypot);
+ 
+   double dummy;
+   cholmod_sparse Astore;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/octave.git/commitdiff/94d732b6981d4e868cc26ceda4552fc38fbc8133



More information about the pld-cvs-commit mailing list