Compare commits

...

20 Commits

Author SHA1 Message Date
Orion Poplawski c3ed09b520 Use versioned doc dir again 2017-02-24 21:13:59 -07:00
Rex Dieter 1f7619e8f2 rebuild (GraphicsMagick) 2016-02-08 12:18:54 -06:00
Orion Poplawski de23297ae7 Fix doc install (bug #799662) 2015-05-29 11:04:06 -06:00
Orion Poplawski 2abd97e80f Rebuild for hdf5 1.8.15 2015-05-29 11:04:06 -06:00
Rex Dieter 72818c9417 rebuild (qscintilla) 2015-05-29 11:04:06 -06:00
Richard Hughes a4f06b526c Add an AppData file for the software center 2015-05-29 11:04:06 -06:00
Orion Poplawski 59a373cfb2 Build with --enable-float-truncate (https://savannah.gnu.org/bugs/?40560)
- Re-enable parallel builds
2015-05-29 11:04:06 -06:00
Rex Dieter 1359cde265 fix changelog style 2015-05-29 11:04:06 -06:00
Rex Dieter 61d293a078 rebuild (GraphicsMagick) 2015-05-29 11:04:06 -06:00
Orion Poplawski 50a1ec0a92 Rebuild for rebuilt swig 2015-05-29 11:04:06 -06:00
Orion Poplawski 6a34fbaee4 Rebuild for fltk 1.3.3 2015-05-29 11:04:06 -06:00
Orion Poplawski d8848f157d Rebuild for gcc 5 C++11 ABI 2015-05-29 11:04:05 -06:00
Orion Poplawski 8c0d4a0b92 Use a generic location for libjvm.so, require java-headless (bug #1190523) 2015-05-29 11:04:05 -06:00
Orion Poplawski 86601d7d03 Rebuild for hdf5 1.8.14 2015-05-29 11:04:05 -06:00
Orion Poplawski 2d8333805a Disable test failure on arm for now (bug #1149953) 2015-05-29 11:04:05 -06:00
Orion Poplawski 13c70ada9f Fix suitesparse patch 2015-05-29 11:04:05 -06:00
Orion Poplawski 89ffeffefd Add patch for suitesparse 4.3.1 support 2015-05-29 11:04:05 -06:00
Orion Poplawski 791d1e3f1d Rebuild for libcholmod soname bump 2015-05-29 11:04:05 -06:00
Orion Poplawski 2047e3183f No info scripts when not building docs 2014-08-23 12:50:34 -06:00
Orion Poplawski 1765489d5d Install macros.texi by hand if not building docs 2014-08-22 15:31:20 -06:00
2 changed files with 427 additions and 17 deletions

293
octave-suitesparse.patch Normal file
View File

@ -0,0 +1,293 @@
diff -up octave-3.8.2/libinterp/dldfcn/amd.cc.suitesparse octave-3.8.2/libinterp/dldfcn/amd.cc
--- octave-3.8.2/libinterp/dldfcn/amd.cc.suitesparse 2014-08-06 11:57:55.000000000 -0600
+++ octave-3.8.2/libinterp/dldfcn/amd.cc 2014-09-16 15:14:12.538123673 -0600
@@ -24,7 +24,7 @@ along with Octave; see the file COPYING.
// in the help of the functions.
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <cstdlib>
@@ -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_assign_function(malloc_func, amd_malloc, malloc);
+ suitesparse_assign_function(free_func, amd_free, free);
+ suitesparse_assign_function(calloc_func, amd_calloc, calloc);
+ suitesparse_assign_function(realloc_func, amd_realloc, realloc);
+ suitesparse_assign_function(printf_func, amd_printf, printf);
octave_idx_type result = AMD_NAME (_order) (n_col, cidx, ridx, P,
Control, Info);
diff -up octave-3.8.2/libinterp/dldfcn/symbfact.cc.suitesparse octave-3.8.2/libinterp/dldfcn/symbfact.cc
--- octave-3.8.2/libinterp/dldfcn/symbfact.cc.suitesparse 2014-08-06 11:54:15.000000000 -0600
+++ octave-3.8.2/libinterp/dldfcn/symbfact.cc 2014-09-16 15:22:41.924557046 -0600
@@ -22,7 +22,7 @@ along with Octave; see the file COPYING.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include "SparseCmplxCHOL.h"
@@ -114,17 +114,15 @@ factorization as determined by @var{typ}
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
double dummy;
cholmod_sparse Astore;
diff -up octave-3.8.2/liboctave/array/CSparse.cc.suitesparse octave-3.8.2/liboctave/array/CSparse.cc
--- octave-3.8.2/liboctave/array/CSparse.cc.suitesparse 2014-08-06 11:57:55.000000000 -0600
+++ octave-3.8.2/liboctave/array/CSparse.cc 2014-09-16 15:22:16.310677157 -0600
@@ -23,7 +23,7 @@ along with Octave; see the file COPYING.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <cfloat>
@@ -5664,17 +5664,15 @@ SparseComplexMatrix::fsolve (MatrixType
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_ll = true;
@@ -5907,17 +5905,15 @@ SparseComplexMatrix::fsolve (MatrixType
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_ll = true;
@@ -6198,17 +6194,15 @@ SparseComplexMatrix::fsolve (MatrixType
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_ll = true;
@@ -6420,17 +6414,15 @@ SparseComplexMatrix::fsolve (MatrixType
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_ll = true;
diff -up octave-3.8.2/liboctave/array/dSparse.cc.suitesparse octave-3.8.2/liboctave/array/dSparse.cc
--- octave-3.8.2/liboctave/array/dSparse.cc.suitesparse 2014-08-06 11:57:55.000000000 -0600
+++ octave-3.8.2/liboctave/array/dSparse.cc 2014-09-16 15:22:01.253747787 -0600
@@ -23,7 +23,7 @@ along with Octave; see the file COPYING.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <cfloat>
@@ -5866,17 +5866,15 @@ SparseMatrix::fsolve (MatrixType &mattyp
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_ll = true;
@@ -6083,17 +6081,15 @@ SparseMatrix::fsolve (MatrixType &mattyp
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_ll = true;
@@ -6345,17 +6341,15 @@ SparseMatrix::fsolve (MatrixType &mattyp
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_ll = true;
@@ -6579,17 +6573,15 @@ SparseMatrix::fsolve (MatrixType &mattyp
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_ll = true;
diff -up octave-3.8.2/liboctave/numeric/sparse-base-chol.cc.suitesparse octave-3.8.2/liboctave/numeric/sparse-base-chol.cc
--- octave-3.8.2/liboctave/numeric/sparse-base-chol.cc.suitesparse 2014-08-06 11:54:14.000000000 -0600
+++ octave-3.8.2/liboctave/numeric/sparse-base-chol.cc 2014-09-16 15:23:24.252358549 -0600
@@ -22,7 +22,7 @@ along with Octave; see the file COPYING.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include "sparse-base-chol.h"
@@ -105,17 +105,15 @@ sparse_base_chol<chol_type, chol_elt, p_
if (spu == 0.)
{
cm->print = -1;
- cm->print_function = 0;
+ suitesparse_assign_function(printf_func, cm->print_function, 0);
}
else
{
cm->print = static_cast<int> (spu) + 2;
- cm->print_function =&SparseCholPrint;
+ suitesparse_assign_function(printf_func, cm->print_function, &SparseCholPrint);
}
cm->error_handler = &SparseCholError;
- cm->complex_divide = CHOLMOD_NAME(divcomplex);
- cm->hypotenuse = CHOLMOD_NAME(hypot);
cm->final_asis = false;
cm->final_super = false;
diff -up octave-3.8.2/liboctave/util/oct-sparse.h.suitesparse octave-3.8.2/liboctave/util/oct-sparse.h
--- octave-3.8.2/liboctave/util/oct-sparse.h.suitesparse 2014-08-06 11:54:15.000000000 -0600
+++ octave-3.8.2/liboctave/util/oct-sparse.h 2014-09-16 15:14:13.417119567 -0600
@@ -94,4 +94,12 @@ along with Octave; see the file COPYING.
#endif
#endif
+// Cope with new suitesparse versions
+//
+#if defined( SUITESPARSE_VERSION ) && SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE(4,3)
+#define suitesparse_assign_function(f_name,f_var,f_assign) (SuiteSparse_config.f_name = f_assign)
+#else
+#define suitesparse_assign_function(f_name,f_var,f_assign) (f_var = f_assign)
+#endif
+
#endif

View File

@ -16,7 +16,7 @@
Name: octave
Epoch: 6
Version: 3.8.2
Release: 4%{?dist}
Release: 20%{?dist}
Summary: A high-level language for numerical computations
Group: Applications/Engineering
License: GPLv3+
@ -32,6 +32,9 @@ Source1: macros.octave
# Fix to allow pkg build to use a directory
# https://savannah.gnu.org/bugs/?func=detailitem&item_id=32839
Patch0: octave-3.8.0-pkgbuilddir.patch
# Patch to compile with suitesparse 4.3.1
# https://savannah.gnu.org/bugs/?func=detailitem&item_id=43063
Patch1: octave-suitesparse.patch
Provides: octave(api) = %{octave_api}
Provides: bundled(gnulib)
@ -73,6 +76,7 @@ BuildRequires: zlib-devel
Requires: epstool gnuplot gnuplot-common less info texinfo
Requires: hdf5 = %{_hdf5_version}
Requires: java-headless
Requires(post): info
Requires(preun): info
@ -115,6 +119,7 @@ This package contains documentation for Octave.
%prep
%setup -q -n %{name}-%{version}%{?rctag}
%patch0 -p1 -b .pkgbuilddir
%patch1 -p1 -b .suitesparse
find -name \*.h -o -name \*.cc | xargs sed -i -e 's/<config.h>/"config.h"/' -e 's/<base-list.h>/"base-list.h"/'
# Check permissions
@ -135,11 +140,17 @@ export F77=gfortran
%if !%{builddocs}
%global disabledocs --disable-docs
%endif
# Find libjvm.so for this architecture in generic location
libjvm=$(find /usr/lib/jvm/jre/lib -name libjvm.so -printf %h)
export JAVA_HOME=%{java_home}
# JIT support is still experimental, and causes a segfault on ARM.
# --enable-float-truncate - https://savannah.gnu.org/bugs/?40560
%configure --enable-shared --disable-static --enable-64=%enable64 \
--enable-float-truncate \
%{?disabledocs} \
--with-blas="-L%{_libdir}/atlas %{atlasblaslib}" \
--with-lapack="-L%{_libdir}/atlas %{atlaslapacklib}" \
--with-java-libdir=$libjvm \
--with-qrupdate \
--with-amd --with-umfpack --with-colamd --with-ccolamd --with-cholmod \
--with-cxsparse \
@ -153,12 +164,19 @@ then
exit 1
fi
# SMP make still not working in Octave 3.6.0
#make OCTAVE_RELEASE="Fedora %{version}-%{release}" %{?_smp_mflags}
make OCTAVE_RELEASE="Fedora %{version}%{?rctag}-%{release}"
make OCTAVE_RELEASE="Fedora %{version}%{?rctag}-%{release}" %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
# Docs - In case we didn't build them and to explicitly install pre-built docs
make -C doc install-data install-html install-info install-pdf DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_pkgdocdir}
cp -ar AUTHORS BUGS ChangeLog examples NEWS README %{buildroot}%{_pkgdocdir}/
cp -a doc/refcard/*.pdf %{buildroot}%{_pkgdocdir}/
mv %{buildroot}%{_docdir}/%{name}/* %{buildroot}%{_pkgdocdir}/
# No info directory
rm -f %{buildroot}%{_infodir}/dir
# Make library links
@ -247,8 +265,57 @@ cp -p doc/interpreter/macros.texi %{buildroot}%{_datadir}/%{name}/%{version}/etc
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
cp -p %SOURCE1 %{buildroot}%{_rpmconfigdir}/macros.d/
# Register as an application to be visible in the software center
#
# NOTE: It would be *awesome* if this file was maintained by the upstream
# project, translated and installed into the right place during `make install`.
#
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
#
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Richard Hughes <richard@hughsie.com> -->
<!--
BugReportURL: https://savannah.gnu.org/bugs/index.php?43279
SentUpstream: 2014-09-22
-->
<application>
<id type="desktop">octave.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<summary>Interactive programming environment for numerical computations</summary>
<description>
<p>
GNU Octave is a high-level interpreted language, primarily intended for
numerical computations.
It provides capabilities for the numerical solution of linear and
nonlinear problems, and for performing other numerical experiments.
It also provides extensive graphics capabilities for data visualization
and manipulation.
</p>
<p>
Octave is normally used through its interactive command line interface,
but it can also be used to write non-interactive programs.
The Octave language is quite similar to Matlab so that most programs are
easily portable.
</p>
</description>
<url type="homepage">http://www.octave.org</url>
<screenshots>
<screenshot type="default">http://www.gnu.org/software/octave/images/screenshot.png</screenshot>
</screenshots>
<updatecontact>octave-maintainers@octave.org</updatecontact>
</application>
EOF
%check
# Tests are currently segfaulting on arm
# https://bugzilla.redhat.com/show_bug.cgi?id=1149953
%ifarch %{arm}
make check || :
%else
make check
%endif
%post
/sbin/ldconfig
@ -267,17 +334,21 @@ fi
%postun -p /sbin/ldconfig
%files
%doc AUTHORS BUGS ChangeLog COPYING NEWS README
%license COPYING
%{_pkgdocdir}/AUTHORS
%{_pkgdocdir}/BUGS
%{_pkgdocdir}/ChangeLog
%{_pkgdocdir}/NEWS
%{_pkgdocdir}/README
# FIXME: Create an -emacs package that has the emacs addon
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/octave-*.conf
%{_bindir}/octave*
%{_libdir}/octave/
%{_libexecdir}/octave/
%if %{builddocs}
%{_mandir}/man1/octave*.1.*
%{_infodir}/liboctave.info*
%{_infodir}/octave.info*
%endif
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/octave.desktop
# octave_packages is %ghost, so need to list everything else separately
%dir %{_datadir}/octave
@ -293,26 +364,72 @@ fi
%{_bindir}/mkoctfile
%{_bindir}/mkoctfile-%{version}%{?rctag}
%{_includedir}/octave-%{version}%{?rctag}/
%if %{builddocs}
%{_mandir}/man1/mkoctfile.1.*
%endif
%files doc
%doc doc/liboctave/liboctave.html doc/liboctave/liboctave.pdf
%doc doc/refcard/*.pdf
%doc examples/
%{_pkgdocdir}/examples/
%{_pkgdocdir}/liboctave.html/
%{_pkgdocdir}/liboctave.pdf
%{_pkgdocdir}/octave.html
%{_pkgdocdir}/octave.pdf
%{_pkgdocdir}/refcard*.pdf
%changelog
* Fri Feb 24 2017 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-20
- Use versioned doc dir again
* Mon Feb 08 2016 Rex Dieter <rdieter@fedoraproject.org> - 6:3.8.2-19
- rebuild (GraphicsMagick)
* Thu May 28 2015 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-18
- Fix doc install (bug #799662)
* Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-17
- Rebuild for hdf5 1.8.15
* Mon Apr 20 2015 Rex Dieter <rdieter@fedoraproject.org> - 6:3.8.2-16
- rebuild (qscintilla)
* Thu Mar 26 2015 Richard Hughes <rhughes@redhat.com> - 6:3.8.2-15
- Add an AppData file for the software center
* Tue Mar 10 2015 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-14
- Build with --enable-float-truncate (https://savannah.gnu.org/bugs/?40560)
- Re-enable parallel builds
* Mon Mar 09 2015 Rex Dieter <rdieter@fedoraproject.org> - 6:3.8.2-13
- rebuild (GraphicsMagick)
* Fri Feb 20 2015 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-12
- Rebuild for rebuilt swig
* Wed Feb 18 2015 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-11
- Rebuild for fltk 1.3.3
* Tue Feb 17 2015 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-10
- Rebuild for gcc 5 C++11 ABI
* Sun Feb 08 2015 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-9
- Use a generic location for libjvm.so, require java-headless (bug #1190523)
* Wed Jan 07 2015 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-8
- Rebuild for hdf5 1.8.14
* Mon Oct 6 2014 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-7
- Disable test failure on arm for now (bug #1149953)
* Mon Sep 15 2014 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-6
- Add patch for suitesparse 4.3.1 support
* Fri Sep 12 2014 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-5
- Rebuild for libcholmod soname bump
* Sat Aug 23 2014 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-4
- No info scripts when not building docs
* Fri Aug 22 2014 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-3
* Fri Aug 22 2014 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-2
- Install macros.texi by hand if not building docs
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6:3.8.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Thu Aug 14 2014 Orion Poplawski <orion@cora.nwra.com> - 6:3.8.2-1
- Update to 3.8.2 final