Compare commits
No commits in common. "master" and "f25" have entirely different histories.
8
.gitignore
vendored
8
.gitignore
vendored
@ -24,11 +24,3 @@ octave-3.2.4.tar.bz2
|
|||||||
/octave-4.0.1.tar.xz
|
/octave-4.0.1.tar.xz
|
||||||
/octave-4.0.2.tar.xz
|
/octave-4.0.2.tar.xz
|
||||||
/octave-4.0.3.tar.xz
|
/octave-4.0.3.tar.xz
|
||||||
/octave-4.2.0-rc1.tar.xz
|
|
||||||
/octave-4.2.0.tar.lz
|
|
||||||
/octave-4.2.1.tar.lz
|
|
||||||
/octave-4.2.2.tar.lz
|
|
||||||
/octave-4.4.1.tar.lz
|
|
||||||
/octave-4.4.1-docs.tar.gz
|
|
||||||
/octave-5.1.0.tar.lz
|
|
||||||
/octave-5.1.0-docs.tar.lz
|
|
||||||
|
@ -13,27 +13,8 @@
|
|||||||
# Run an octave command - quietly with no startup files
|
# Run an octave command - quietly with no startup files
|
||||||
%octave_cmd() octave -H -q --no-window-system --no-site-file --eval '%*';
|
%octave_cmd() octave -H -q --no-window-system --no-site-file --eval '%*';
|
||||||
|
|
||||||
# For compiled tarfile name
|
|
||||||
%octave_host %(octave-config -p CANONICAL_HOST_TYPE || echo 0)
|
|
||||||
|
|
||||||
# Build unpacked source directory into a package tar file in a temporary location
|
# Build unpacked source directory into a package tar file in a temporary location
|
||||||
# Pass -T to use source tarball
|
%octave_pkg_build %octave_cmd pkg build "-verbose" "-nodeps" %{_tmppath}/%{name}-%{version}-%{release}.%{_arch} %{_builddir}/%{buildsubdir}
|
||||||
%octave_pkg_build(T) %{lua:
|
|
||||||
if (rpm.expand("%{-T}") == "-T") then
|
|
||||||
octpkg_tarfile = rpm.expand("%{SOURCE0}")
|
|
||||||
else
|
|
||||||
octpkg_tarfile = rpm .expand("%{_tmppath}/%{octpkg}-%{version}.tar.gz")
|
|
||||||
print("tar czf "..octpkg_tarfile.." -C "..rpm.expand("%{_builddir} %{buildsubdir}").."\\n")
|
|
||||||
end
|
|
||||||
-- Avoid a warning from pkg build about making the build directory
|
|
||||||
-- and use a clean directory as octave pkg build will delete contents
|
|
||||||
print(rpm.expand("mkdir -p %{_builddir}/%{buildsubdir}/build\\n"))
|
|
||||||
-- This fails to keep the arguments to %octave_cmd for some reason
|
|
||||||
-- print(rpm.expand("%octave_cmd pkg build -verbose -nodeps %{_builddir}/%{buildsubdir} "..octpkg_tarfile).."\\n")
|
|
||||||
print(rpm.expand("octave -H -q --no-window-system --no-site-file --eval 'pkg build -verbose -nodeps %{_builddir}/%{buildsubdir}/build "..octpkg_tarfile).."'\\n")
|
|
||||||
-- Extract the source tarball for debuginfo generation
|
|
||||||
print(rpm.expand("tar xf "..octpkg_tarfile.." -C %{_builddir}/%{buildsubdir}/build\\n"))
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install a package. We use the octave pkg install command to install the
|
# Install a package. We use the octave pkg install command to install the
|
||||||
# built package into the buildroot. We also put a note to prevent the root
|
# built package into the buildroot. We also put a note to prevent the root
|
||||||
@ -43,7 +24,7 @@
|
|||||||
%octave_pkg_install \
|
%octave_pkg_install \
|
||||||
mkdir -p %{buildroot}%{octprefix} \
|
mkdir -p %{buildroot}%{octprefix} \
|
||||||
mkdir -p %{buildroot}%{octarchprefix} \
|
mkdir -p %{buildroot}%{octarchprefix} \
|
||||||
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose",glob("%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-*.tar.gz"){1,1});unlink(pkg("local_list"));unlink(pkg("global_list")); \
|
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose","%{_tmppath}/%{name}-%{version}-%{release}.%{_arch}/%{octpkg}-%{version}.tar.gz");unlink(pkg("local_list"));unlink(pkg("global_list")); \
|
||||||
if [ -e %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m ] \
|
if [ -e %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m ] \
|
||||||
then \
|
then \
|
||||||
mv %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m.orig \
|
mv %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m.orig \
|
||||||
@ -51,23 +32,12 @@ fi \
|
|||||||
echo "function on_uninstall (desc)" > %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
echo "function on_uninstall (desc)" > %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
||||||
echo " error ('Can not uninstall %s installed by the redhat package manager', desc.name);" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
echo " error ('Can not uninstall %s installed by the redhat package manager', desc.name);" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
||||||
echo "endfunction" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
echo "endfunction" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
||||||
if [ -e %{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}/*.metainfo.xml ] \
|
|
||||||
then \
|
|
||||||
echo "Found .metainfo.xml appdata file" \
|
|
||||||
mkdir -p %{buildroot}/%{_metainfodir} \
|
|
||||||
cp -p %{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}/*.metainfo.xml %{buildroot}/%{_metainfodir}/ \
|
|
||||||
appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml \
|
|
||||||
else \
|
|
||||||
echo "Did not find a .metainfo.xml appdata file" \
|
|
||||||
fi \
|
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
# Run pkg tests - We need to reinstall to recreate 'octave_packages' so that
|
# Run pkg tests - We need to reinstall to recreate 'octave_packages' so that
|
||||||
# octave can find the package, then remove 'octave_packages' again, and re-strip
|
# octave can find the package, then remove 'octave_packages' again.
|
||||||
# any shared objects.
|
|
||||||
%octave_pkg_check \
|
%octave_pkg_check \
|
||||||
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("list");pkg("install","-verbose",glob("%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-*.tar.gz"){1,1});pkg("load","%{octpkg}");pkg("list");runtests("%{buildroot}%{octpkgdir}");unlink(pkg("local_list")); \
|
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose","%{_tmppath}/%{name}-%{version}-%{release}.%{_arch}/%{octpkg}-%{version}.tar.gz");pkg("load","%{octpkg}");runtests("%{buildroot}%{octpkgdir}");unlink(pkg("local_list"));unlink(pkg("global_list")); \
|
||||||
/usr/lib/rpm/brp-strip-shared %{__strip} \
|
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
# preun script - we need to remove our uninstall protection and perhaps
|
# preun script - we need to remove our uninstall protection and perhaps
|
||||||
|
27
octave-abs.patch
Normal file
27
octave-abs.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff -up octave-4.0.0/libinterp/corefcn/pr-output.cc.abs octave-4.0.0/libinterp/corefcn/pr-output.cc
|
||||||
|
--- octave-4.0.0/libinterp/corefcn/pr-output.cc.abs 2015-05-23 08:21:53.000000000 -0600
|
||||||
|
+++ octave-4.0.0/libinterp/corefcn/pr-output.cc 2016-02-21 08:59:30.966291273 -0700
|
||||||
|
@@ -21,7 +21,7 @@ along with Octave; see the file COPYING.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
-#include <config.h>
|
||||||
|
+#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <cfloat>
|
||||||
|
@@ -3145,6 +3145,14 @@ PRINT_INT_SCALAR_INTERNAL (uint32_t)
|
||||||
|
PRINT_INT_SCALAR_INTERNAL (int64_t)
|
||||||
|
PRINT_INT_SCALAR_INTERNAL (uint64_t)
|
||||||
|
|
||||||
|
+inline unsigned int abs (unsigned int x) { return x; }
|
||||||
|
+inline long unsigned int abs (long unsigned int x) { return x; }
|
||||||
|
+inline long long unsigned int abs (long long unsigned int x) { return x; }
|
||||||
|
+inline short unsigned int abs (short unsigned int x) { return x; }
|
||||||
|
+inline unsigned char abs (unsigned char x) { return x; }
|
||||||
|
+inline signed char abs (signed char x) { return abs((int)x); }
|
||||||
|
+inline short int abs (short int x) { return abs((int)x); }
|
||||||
|
+
|
||||||
|
template <class T>
|
||||||
|
/* static */ inline void
|
||||||
|
octave_print_internal_template (std::ostream& os, const intNDArray<T>& nda,
|
9
octave-appdata.patch
Normal file
9
octave-appdata.patch
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
diff -up octave-4.0.0/etc/icons/octave.appdata.xml.in.appdata octave-4.0.0/etc/icons/octave.appdata.xml.in
|
||||||
|
--- octave-4.0.0/etc/icons/octave.appdata.xml.in.appdata 2015-05-23 08:21:53.000000000 -0600
|
||||||
|
+++ octave-4.0.0/etc/icons/octave.appdata.xml.in 2015-12-30 16:19:24.324969806 -0700
|
||||||
|
@@ -52,5 +52,4 @@
|
||||||
|
</screenshots>
|
||||||
|
<url type="homepage">http://www.octave.org</url>
|
||||||
|
<updatecontact>maintainers@octave.org</updatecontact>
|
||||||
|
- <project_group>GNU</project_group>
|
||||||
|
</application>
|
@ -1,12 +0,0 @@
|
|||||||
diff -up octave-4.4.1/libinterp/corefcn/input.cc.crash octave-4.4.1/libinterp/corefcn/input.cc
|
|
||||||
--- octave-4.4.1/libinterp/corefcn/input.cc.crash 2018-11-11 17:27:39.588037444 -0700
|
|
||||||
+++ octave-4.4.1/libinterp/corefcn/input.cc 2018-11-11 17:30:42.344208272 -0700
|
|
||||||
@@ -255,7 +255,7 @@ namespace octave
|
|
||||||
|
|
||||||
octave_diary << retval;
|
|
||||||
|
|
||||||
- if (retval.back () != '\n')
|
|
||||||
+ if (!retval.empty () && retval.back () != '\n')
|
|
||||||
octave_diary << "\n";
|
|
||||||
}
|
|
||||||
else
|
|
@ -1,28 +0,0 @@
|
|||||||
|
|
||||||
# HG changeset patch
|
|
||||||
# User Mike Miller <mtmiller@octave.org>
|
|
||||||
# Date 1554238576 25200
|
|
||||||
# Node ID c3716220d5b93c49e1c7cc8ebe0b76dd961f4ec7
|
|
||||||
# Parent fc73dafece570f201c18a4eb4a8729a654cfcfbb
|
|
||||||
fix pause and kbhit with glibc 2.28 end-of-file state behavior (bug #55029)
|
|
||||||
|
|
||||||
* sysdep.cc (octave::kbhit): Call "clearerr (stdin)" on end-of-file condition
|
|
||||||
in addition to "std::cin.clear ()". In glibc 2.28, end-of-file is persistent
|
|
||||||
and must be cleared by the application.
|
|
||||||
|
|
||||||
diff --git a/libinterp/corefcn/sysdep.cc b/libinterp/corefcn/sysdep.cc
|
|
||||||
--- a/libinterp/corefcn/sysdep.cc
|
|
||||||
+++ b/libinterp/corefcn/sysdep.cc
|
|
||||||
@@ -566,7 +566,10 @@
|
|
||||||
int c = std::cin.get ();
|
|
||||||
|
|
||||||
if (std::cin.fail () || std::cin.eof ())
|
|
||||||
- std::cin.clear ();
|
|
||||||
+ {
|
|
||||||
+ std::cin.clear ();
|
|
||||||
+ clearerr (stdin);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
// Restore it, enabling system call restarts (if possible).
|
|
||||||
octave::set_interrupt_handler (saved_interrupt_handler, true);
|
|
||||||
|
|
11
octave-gnulib.patch
Normal file
11
octave-gnulib.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -up octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh.gnulib octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh
|
||||||
|
--- octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh.gnulib 2015-05-23 08:21:53.000000000 -0600
|
||||||
|
+++ octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh 2016-02-19 19:50:04.693811663 -0700
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
#ifndef FADDEEVA_HH
|
||||||
|
#define FADDEEVA_HH 1
|
||||||
|
|
||||||
|
+#include <math.h>
|
||||||
|
#include <complex>
|
||||||
|
|
||||||
|
namespace Faddeeva {
|
41
octave-pkgbuilddir.patch
Normal file
41
octave-pkgbuilddir.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
diff -up octave-4.0.0-rc1/scripts/pkg/private/install.m.pkgbuilddir octave-4.0.0-rc1/scripts/pkg/private/install.m
|
||||||
|
--- octave-4.0.0-rc1/scripts/pkg/private/install.m.pkgbuilddir 2015-03-05 08:13:28.000000000 -0700
|
||||||
|
+++ octave-4.0.0-rc1/scripts/pkg/private/install.m 2015-03-05 20:43:45.762854275 -0700
|
||||||
|
@@ -62,7 +62,10 @@ function install (files, handle_deps, au
|
||||||
|
for i = 1:length (files)
|
||||||
|
tgz = files{i};
|
||||||
|
|
||||||
|
- if (exist (tgz, "file"))
|
||||||
|
+ ## The filename pointed to an uncompressed package to begin with.
|
||||||
|
+ if (exist (tgz, "dir"))
|
||||||
|
+ dirlist = {".", "..", tgz};
|
||||||
|
+ elseif (exist (tgz, "file"))
|
||||||
|
## Create a temporary directory.
|
||||||
|
tmpdir = tempname ();
|
||||||
|
tmpdirs{end+1} = tmpdir;
|
||||||
|
@@ -91,17 +94,16 @@ function install (files, handle_deps, au
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
- ## The filename pointed to an uncompressed package to begin with.
|
||||||
|
- if (exist (tgz, "dir"))
|
||||||
|
- dirlist = {".", "..", tgz};
|
||||||
|
- endif
|
||||||
|
-
|
||||||
|
- if (exist (tgz, "file") || exist (tgz, "dir"))
|
||||||
|
+ if (exist (tgz, "file"))
|
||||||
|
## The two first entries of dirlist are "." and "..".
|
||||||
|
- if (exist (tgz, "file"))
|
||||||
|
- packdir = fullfile (tmpdir, dirlist{3});
|
||||||
|
+ if (exist (tgz, "dir"))
|
||||||
|
+ if (tgz(1) == '/')
|
||||||
|
+ packdir = tgz;
|
||||||
|
+ else
|
||||||
|
+ packdir = fullfile (pwd (), dirlist{3});
|
||||||
|
+ endif
|
||||||
|
else
|
||||||
|
- packdir = fullfile (pwd (), dirlist{3});
|
||||||
|
+ packdir = fullfile (tmpdir, dirlist{3});
|
||||||
|
endif
|
||||||
|
packdirs{end+1} = packdir;
|
||||||
|
|
@ -1,504 +0,0 @@
|
|||||||
diff -up octave-5.0.91/configure.ac.sundials3 octave-5.0.91/configure.ac
|
|
||||||
--- octave-5.0.91/configure.ac.sundials3 2019-02-04 10:50:20.000000000 -0700
|
|
||||||
+++ octave-5.0.91/configure.ac 2019-02-05 22:05:44.096260529 -0700
|
|
||||||
@@ -2220,15 +2220,15 @@ OCTAVE_CHECK_LIB(sundials_ida, [SUNDIALS
|
|
||||||
[], [don't use SUNDIALS IDA library, solvers ode15i and ode15s will be disabled],
|
|
||||||
[warn_sundials_ida=
|
|
||||||
OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE
|
|
||||||
- OCTAVE_CHECK_SUNDIALS_IDA_DENSE
|
|
||||||
- OCTAVE_CHECK_SUNDIALS_IDAKLU])
|
|
||||||
+ OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE
|
|
||||||
+ OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU])
|
|
||||||
LIBS="$save_LIBS"
|
|
||||||
|
|
||||||
dnl Define this way instead of with an #if in oct-conf-post.h so that
|
|
||||||
dnl the build features script will get the correct value.
|
|
||||||
if test -n "$SUNDIALS_IDA_LIBS" \
|
|
||||||
&& test -n "$SUNDIALS_NVECSERIAL_LIBS" \
|
|
||||||
- && test $octave_cv_sundials_ida_dense = yes \
|
|
||||||
+ && test $octave_cv_sundials_sunlinsol_dense = yes \
|
|
||||||
&& test $octave_cv_sundials_realtype_is_double = yes; then
|
|
||||||
AC_DEFINE(HAVE_SUNDIALS, 1, [Define to 1 if SUNDIALS is available.])
|
|
||||||
fi
|
|
||||||
diff -up octave-5.0.91/libinterp/dldfcn/__ode15__.cc.sundials3 octave-5.0.91/libinterp/dldfcn/__ode15__.cc
|
|
||||||
--- octave-5.0.91/libinterp/dldfcn/__ode15__.cc.sundials3 2019-02-04 10:50:20.000000000 -0700
|
|
||||||
+++ octave-5.0.91/libinterp/dldfcn/__ode15__.cc 2019-02-05 22:06:48.074012827 -0700
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
/*
|
|
||||||
|
|
||||||
Copyright (C) 2016-2019 Francesco Faccio <francesco.faccio@mail.polimi.it>
|
|
||||||
+Copyright (C) 2018 William Greene <w.h.greene@gmail.com>
|
|
||||||
|
|
||||||
This file is part of Octave.
|
|
||||||
|
|
||||||
@@ -44,15 +45,34 @@ along with Octave; see the file COPYING.
|
|
||||||
# include <ida/ida.h>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
-# if defined (HAVE_IDA_IDA_DENSE_H)
|
|
||||||
-# include <ida/ida_dense.h>
|
|
||||||
+# if defined (HAVE_SUNDIALS_SUNDIALS_MATRIX_H)
|
|
||||||
+# include <sundials/sundials_matrix.h>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
-# if defined (HAVE_IDA_IDA_KLU_H)
|
|
||||||
-# include <ida/ida_klu.h>
|
|
||||||
+# if defined (HAVE_SUNDIALS_SUNDIALS_LINEARSOLVER_H)
|
|
||||||
+# include <sundials/sundials_linearsolver.h>
|
|
||||||
+# endif
|
|
||||||
+
|
|
||||||
+# if defined (HAVE_SUNLINSOL_SUNLINSOL_DENSE_H)
|
|
||||||
+# include <sunlinsol/sunlinsol_dense.h>
|
|
||||||
+# endif
|
|
||||||
+
|
|
||||||
+# if defined (HAVE_IDA_IDA_DIRECT_H)
|
|
||||||
+# include <ida/ida_direct.h>
|
|
||||||
+# endif
|
|
||||||
+
|
|
||||||
+# if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H)
|
|
||||||
# include <sundials/sundials_sparse.h>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
+# if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H)
|
|
||||||
+# include <sunlinsol/sunlinsol_klu.h>
|
|
||||||
+# endif
|
|
||||||
+
|
|
||||||
+# if defined (HAVE_SUNMATRIX_SUNMATRIX_SPARSE_H)
|
|
||||||
+# include <sunmatrix/sunmatrix_sparse.h>
|
|
||||||
+# endif
|
|
||||||
+
|
|
||||||
# if defined (HAVE_NVECTOR_NVECTOR_SERIAL_H)
|
|
||||||
# include <nvector/nvector_serial.h>
|
|
||||||
# endif
|
|
||||||
@@ -112,7 +132,8 @@ namespace octave
|
|
||||||
havejacsparse (false), mem (nullptr), num (), ida_fun (nullptr),
|
|
||||||
ida_jac (nullptr), dfdy (nullptr), dfdyp (nullptr), spdfdy (nullptr),
|
|
||||||
spdfdyp (nullptr), fun (nullptr), jacfun (nullptr), jacspfun (nullptr),
|
|
||||||
- jacdcell (nullptr), jacspcell (nullptr)
|
|
||||||
+ jacdcell (nullptr), jacspcell (nullptr),
|
|
||||||
+ sunJacMatrix (nullptr), sunLinearSolver (nullptr)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
@@ -122,11 +143,17 @@ namespace octave
|
|
||||||
havejacsparse (false), mem (nullptr), num (), ida_fun (ida_fcn),
|
|
||||||
ida_jac (nullptr), dfdy (nullptr), dfdyp (nullptr), spdfdy (nullptr),
|
|
||||||
spdfdyp (nullptr), fun (daefun), jacfun (nullptr), jacspfun (nullptr),
|
|
||||||
- jacdcell (nullptr), jacspcell (nullptr)
|
|
||||||
+ jacdcell (nullptr), jacspcell (nullptr),
|
|
||||||
+ sunJacMatrix (nullptr), sunLinearSolver (nullptr)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
- ~IDA (void) { IDAFree (&mem); }
|
|
||||||
+ ~IDA (void)
|
|
||||||
+ {
|
|
||||||
+ IDAFree (&mem);
|
|
||||||
+ SUNLinSolFree(sunLinearSolver);
|
|
||||||
+ SUNMatDestroy(sunJacMatrix);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
IDA&
|
|
||||||
set_jacobian (octave_function *jac, DAEJacFuncDense j)
|
|
||||||
@@ -184,7 +211,7 @@ namespace octave
|
|
||||||
static N_Vector ColToNVec (const ColumnVector& data, long int n);
|
|
||||||
|
|
||||||
void
|
|
||||||
- set_up (void);
|
|
||||||
+ set_up (const ColumnVector& y);
|
|
||||||
|
|
||||||
void
|
|
||||||
set_tolerance (ColumnVector& abstol, realtype reltol);
|
|
||||||
@@ -199,25 +226,24 @@ namespace octave
|
|
||||||
void
|
|
||||||
resfun_impl (realtype t, N_Vector& yy,
|
|
||||||
N_Vector& yyp, N_Vector& rr);
|
|
||||||
-
|
|
||||||
static int
|
|
||||||
- jacdense (long int Neq, realtype t, realtype cj, N_Vector yy,
|
|
||||||
- N_Vector yyp, N_Vector, DlsMat JJ, void *user_data,
|
|
||||||
+ jacdense (realtype t, realtype cj, N_Vector yy,
|
|
||||||
+ N_Vector yyp, N_Vector, SUNMatrix JJ, void *user_data,
|
|
||||||
N_Vector, N_Vector, N_Vector)
|
|
||||||
{
|
|
||||||
IDA *self = static_cast <IDA *> (user_data);
|
|
||||||
- self->jacdense_impl (Neq, t, cj, yy, yyp, JJ);
|
|
||||||
+ self->jacdense_impl (t, cj, yy, yyp, JJ);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
- jacdense_impl (long int Neq, realtype t, realtype cj,
|
|
||||||
- N_Vector& yy, N_Vector& yyp, DlsMat& JJ);
|
|
||||||
+ jacdense_impl (realtype t, realtype cj,
|
|
||||||
+ N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ);
|
|
||||||
|
|
||||||
-# if defined (HAVE_SUNDIALS_IDAKLU)
|
|
||||||
+# if defined (HAVE_SUNDIALS_SUNLINSOL_KLU)
|
|
||||||
static int
|
|
||||||
jacsparse (realtype t, realtype cj, N_Vector yy, N_Vector yyp,
|
|
||||||
- N_Vector, SlsMat Jac, void *user_data, N_Vector,
|
|
||||||
+ N_Vector, SUNMatrix Jac, void *user_data, N_Vector,
|
|
||||||
N_Vector, N_Vector)
|
|
||||||
{
|
|
||||||
IDA *self = static_cast <IDA *> (user_data);
|
|
||||||
@@ -227,7 +253,7 @@ namespace octave
|
|
||||||
|
|
||||||
void
|
|
||||||
jacsparse_impl (realtype t, realtype cj, N_Vector& yy,
|
|
||||||
- N_Vector& yyp, SlsMat& Jac);
|
|
||||||
+ N_Vector& yyp, SUNMatrix& Jac);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void set_maxstep (realtype maxstep);
|
|
||||||
@@ -291,6 +317,8 @@ namespace octave
|
|
||||||
DAEJacFuncSparse jacspfun;
|
|
||||||
DAEJacCellDense jacdcell;
|
|
||||||
DAEJacCellSparse jacspcell;
|
|
||||||
+ SUNMatrix sunJacMatrix;
|
|
||||||
+ SUNLinearSolver sunLinearSolver;
|
|
||||||
};
|
|
||||||
|
|
||||||
int
|
|
||||||
@@ -323,36 +351,61 @@ namespace octave
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
- IDA::set_up (void)
|
|
||||||
+ IDA::set_up (const ColumnVector& y)
|
|
||||||
{
|
|
||||||
+ N_Vector yy = ColToNVec(y, num);
|
|
||||||
+
|
|
||||||
if (havejacsparse)
|
|
||||||
{
|
|
||||||
-# if defined (HAVE_SUNDIALS_IDAKLU)
|
|
||||||
- if (IDAKLU (mem, num, num*num, CSC_MAT) != 0)
|
|
||||||
- error ("IDAKLU solver not initialized");
|
|
||||||
+#if defined (HAVE_SUNDIALS_SUNLINSOL_KLU)
|
|
||||||
+
|
|
||||||
+ sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
|
|
||||||
+ if (! sunJacMatrix)
|
|
||||||
+ error ("Unable to create sparse Jacobian for Sundials");
|
|
||||||
+
|
|
||||||
+ sunLinearSolver = SUNKLU (yy, sunJacMatrix);
|
|
||||||
+ if (! sunLinearSolver)
|
|
||||||
+ error ("Unable to create KLU sparse solver");
|
|
||||||
+
|
|
||||||
+ if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix))
|
|
||||||
+ error ("Unable to set sparse linear solver");
|
|
||||||
+
|
|
||||||
+ IDADlsSetJacFn(mem, IDA::jacsparse);
|
|
||||||
|
|
||||||
- IDASlsSetSparseJacFn (mem, IDA::jacsparse);
|
|
||||||
# else
|
|
||||||
- error ("IDAKLU is not available in this version of Octave");
|
|
||||||
+ error ("SUNDIALS SUNLINSOL KLU is not available in this version of Octave");
|
|
||||||
# endif
|
|
||||||
+
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- if (IDADense (mem, num) != 0)
|
|
||||||
- error ("IDADense solver not initialized");
|
|
||||||
|
|
||||||
- if (havejac && IDADlsSetDenseJacFn (mem, IDA::jacdense) != 0)
|
|
||||||
- error ("Dense Jacobian not set");
|
|
||||||
+ sunJacMatrix = SUNDenseMatrix (num, num);
|
|
||||||
+ if (! sunJacMatrix)
|
|
||||||
+ error ("Unable to create dense Jacobian for Sundials");
|
|
||||||
+
|
|
||||||
+ sunLinearSolver = SUNDenseLinearSolver(yy, sunJacMatrix);
|
|
||||||
+ if (! sunLinearSolver)
|
|
||||||
+ error ("Unable to create dense linear solver");
|
|
||||||
+
|
|
||||||
+ if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix))
|
|
||||||
+ error ("Unable to set dense linear solver");
|
|
||||||
+
|
|
||||||
+ if (havejac && IDADlsSetJacFn (mem, IDA::jacdense) != 0)
|
|
||||||
+ error("Unable to set dense Jacobian function");
|
|
||||||
+
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
- IDA::jacdense_impl (long int Neq, realtype t, realtype cj,
|
|
||||||
- N_Vector& yy, N_Vector& yyp, DlsMat& JJ)
|
|
||||||
+ IDA::jacdense_impl (realtype t, realtype cj,
|
|
||||||
+ N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ)
|
|
||||||
|
|
||||||
{
|
|
||||||
BEGIN_INTERRUPT_WITH_EXCEPTIONS;
|
|
||||||
|
|
||||||
+ long int Neq = NV_LENGTH_S(yy);
|
|
||||||
+
|
|
||||||
ColumnVector y = NVecToCol (yy, Neq);
|
|
||||||
|
|
||||||
ColumnVector yp = NVecToCol (yyp, Neq);
|
|
||||||
@@ -366,15 +419,15 @@ namespace octave
|
|
||||||
|
|
||||||
std::copy (jac.fortran_vec (),
|
|
||||||
jac.fortran_vec () + jac.numel (),
|
|
||||||
- JJ->data);
|
|
||||||
+ SUNDenseMatrix_Data(JJ));
|
|
||||||
|
|
||||||
END_INTERRUPT_WITH_EXCEPTIONS;
|
|
||||||
}
|
|
||||||
|
|
||||||
-# if defined (HAVE_SUNDIALS_IDAKLU)
|
|
||||||
+# if defined (HAVE_SUNDIALS_SUNLINSOL_KLU)
|
|
||||||
void
|
|
||||||
IDA::jacsparse_impl (realtype t, realtype cj, N_Vector& yy, N_Vector& yyp,
|
|
||||||
- SlsMat& Jac)
|
|
||||||
+ SUNMatrix& Jac)
|
|
||||||
|
|
||||||
{
|
|
||||||
BEGIN_INTERRUPT_WITH_EXCEPTIONS;
|
|
||||||
@@ -390,17 +443,18 @@ namespace octave
|
|
||||||
else
|
|
||||||
jac = (*jacspcell) (spdfdy, spdfdyp, cj);
|
|
||||||
|
|
||||||
- SparseSetMatToZero (Jac);
|
|
||||||
- int *colptrs = *(Jac->colptrs);
|
|
||||||
- int *rowvals = *(Jac->rowvals);
|
|
||||||
+ SUNMatZero_Sparse (Jac);
|
|
||||||
+ sunindextype *colptrs = SUNSparseMatrix_IndexPointers (Jac);
|
|
||||||
+ sunindextype *rowvals = SUNSparseMatrix_IndexValues (Jac);
|
|
||||||
|
|
||||||
for (int i = 0; i < num + 1; i++)
|
|
||||||
colptrs[i] = jac.cidx(i);
|
|
||||||
|
|
||||||
+ double *d = SUNSparseMatrix_Data (Jac);
|
|
||||||
for (int i = 0; i < jac.nnz (); i++)
|
|
||||||
{
|
|
||||||
rowvals[i] = jac.ridx(i);
|
|
||||||
- Jac->data[i] = jac.data(i);
|
|
||||||
+ d[i] = jac.data(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
END_INTERRUPT_WITH_EXCEPTIONS;
|
|
||||||
@@ -567,7 +621,7 @@ namespace octave
|
|
||||||
|
|
||||||
//main loop
|
|
||||||
while (((posdirection == 1 && tsol < tend)
|
|
||||||
- || (posdirection == 0 && tsol > tend))
|
|
||||||
+ || (posdirection == 0 && tsol > tend))
|
|
||||||
&& status == 0)
|
|
||||||
{
|
|
||||||
if (IDASolve (mem, tend, &tsol, yy, yyp, IDA_ONE_STEP) != 0)
|
|
||||||
@@ -692,7 +746,7 @@ namespace octave
|
|
||||||
// Linear interpolation
|
|
||||||
ie(0) = index(0);
|
|
||||||
te(0) = tsol - val (index(0)) * (tsol - told)
|
|
||||||
- / (val (index(0)) - oldval (index(0)));
|
|
||||||
+ / (val (index(0)) - oldval (index(0)));
|
|
||||||
|
|
||||||
ColumnVector ytemp
|
|
||||||
= y - ((tsol - te(0)) * (y - yold) / (tsol - told));
|
|
||||||
@@ -717,7 +771,7 @@ namespace octave
|
|
||||||
// Linear interpolation
|
|
||||||
ie(temp+i) = index(i);
|
|
||||||
te(temp+i) = tsol - val(index(i)) * (tsol - told)
|
|
||||||
- / (val(index(i)) - oldval(index(i)));
|
|
||||||
+ / (val(index(i)) - oldval(index(i)));
|
|
||||||
|
|
||||||
ColumnVector ytemp
|
|
||||||
= y - (tsol - te (temp + i)) * (y - yold) / (tsol - told);
|
|
||||||
@@ -1096,7 +1150,7 @@ namespace octave
|
|
||||||
event_fcn = options.getfield("Events").function_value ();
|
|
||||||
|
|
||||||
// Set up linear solver
|
|
||||||
- dae.set_up ();
|
|
||||||
+ dae.set_up (y0);
|
|
||||||
|
|
||||||
// Integrate
|
|
||||||
retval = dae.integrate (numt, tspan, y0, yp0, refine,
|
|
||||||
diff -up octave-5.0.91/m4/acinclude.m4.sundials3 octave-5.0.91/m4/acinclude.m4
|
|
||||||
--- octave-5.0.91/m4/acinclude.m4.sundials3 2019-02-04 10:50:20.000000000 -0700
|
|
||||||
+++ octave-5.0.91/m4/acinclude.m4 2019-02-05 22:05:44.100260576 -0700
|
|
||||||
@@ -2210,14 +2210,11 @@ dnl Check whether SUNDIALS IDA library i
|
|
||||||
dnl precision realtype.
|
|
||||||
dnl
|
|
||||||
AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE], [
|
|
||||||
- AC_CHECK_HEADERS([ida/ida.h ida.h])
|
|
||||||
AC_CACHE_CHECK([whether SUNDIALS IDA is configured with double precision realtype],
|
|
||||||
[octave_cv_sundials_realtype_is_double],
|
|
||||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
#if defined (HAVE_IDA_IDA_H)
|
|
||||||
#include <ida/ida.h>
|
|
||||||
- #else
|
|
||||||
- #include <ida.h>
|
|
||||||
#endif
|
|
||||||
#include <assert.h>
|
|
||||||
]], [[
|
|
||||||
@@ -2233,61 +2230,72 @@ AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_R
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
dnl
|
|
||||||
-dnl Check whether SUNDIALS IDA library is configured with IDAKLU
|
|
||||||
+dnl Check whether SUNDIALS IDA library is configured with SUNLINSOL_KLU
|
|
||||||
dnl enabled.
|
|
||||||
dnl
|
|
||||||
-AC_DEFUN([OCTAVE_CHECK_SUNDIALS_IDAKLU], [
|
|
||||||
- AC_CHECK_HEADERS([ida/ida_klu.h ida_klu.h])
|
|
||||||
- AC_CACHE_CHECK([whether SUNDIALS IDA is configured with IDAKLU enabled],
|
|
||||||
- [octave_cv_sundials_idaklu],
|
|
||||||
+AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU], [
|
|
||||||
+ AC_CHECK_HEADERS([sundials/sundials_sparse.h sunlinsol/sunlinsol_klu.h sunmatrix/sunmatrix_sparse.h])
|
|
||||||
+ AC_CACHE_CHECK([whether SUNDIALS IDA is configured with SUNLINSOL_KLU enabled],
|
|
||||||
+ [octave_cv_sundials_sunlinsol_klu],
|
|
||||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
- #if defined (HAVE_IDA_IDA_KLU_H)
|
|
||||||
- #include <ida/ida_klu.h>
|
|
||||||
- #else
|
|
||||||
- #include <ida_klu.h>
|
|
||||||
+ #if defined (HAVE_IDA_IDA_H)
|
|
||||||
+ #include <ida/ida.h>
|
|
||||||
+ #endif
|
|
||||||
+ #if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H)
|
|
||||||
+ #include <sundials/sundials_sparse.h>
|
|
||||||
+ #endif
|
|
||||||
+ #if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H)
|
|
||||||
+ #include <sunlinsol/sunlinsol_klu.h>
|
|
||||||
#endif
|
|
||||||
]], [[
|
|
||||||
- IDAKLU (0, 0, 0, 0);
|
|
||||||
+ SUNKLU (0, 0);
|
|
||||||
]])],
|
|
||||||
- octave_cv_sundials_idaklu=yes,
|
|
||||||
- octave_cv_sundials_idaklu=no)
|
|
||||||
+ octave_cv_sundials_sunlinsol_klu=yes,
|
|
||||||
+ octave_cv_sundials_sunlinsol_klu=no)
|
|
||||||
])
|
|
||||||
- if test $octave_cv_sundials_idaklu = yes; then
|
|
||||||
- AC_DEFINE(HAVE_SUNDIALS_IDAKLU, 1,
|
|
||||||
- [Define to 1 if SUNDIALS IDA is configured with IDAKLU enabled.])
|
|
||||||
+ if test $octave_cv_sundials_sunlinsol_klu = yes; then
|
|
||||||
+ AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_KLU, 1,
|
|
||||||
+ [Define to 1 if SUNDIALS IDA is configured with SUNLINSOL_KLU enabled.])
|
|
||||||
else
|
|
||||||
- warn_sundials_idaklu="SUNDIALS IDA library not configured with IDAKLU, ode15i and ode15s will not support the sparse Jacobian feature"
|
|
||||||
- OCTAVE_CONFIGURE_WARNING([warn_sundials_idaklu])
|
|
||||||
+ warn_sundials_idaklu="SUNDIALS IDA library not configured with SUNLINSOL_KLU, ode15i and ode15s will not support the sparse Jacobian feature"
|
|
||||||
+ OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_klu])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
dnl
|
|
||||||
-dnl Check whether SUNDIALS IDA library has the IDADENSE linear solver.
|
|
||||||
+dnl Check whether SUNDIALS IDA library has the SUNLINSOL_DENSE linear solver.
|
|
||||||
dnl The IDADENSE API was removed in SUNDIALS version 3.0.0.
|
|
||||||
dnl
|
|
||||||
-AC_DEFUN([OCTAVE_CHECK_SUNDIALS_IDA_DENSE], [
|
|
||||||
- AC_CHECK_HEADERS([ida/ida_dense.h ida_dense.h])
|
|
||||||
- AC_CACHE_CHECK([whether SUNDIALS IDA includes the IDADENSE linear solver],
|
|
||||||
- [octave_cv_sundials_ida_dense],
|
|
||||||
+AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE], [
|
|
||||||
+ AC_CHECK_HEADERS([sunlinsol/sunlinsol_dense.h sundials/sundials_matrix.h sundials/sundials_linearsolver.h ida/ida_direct.h])
|
|
||||||
+ AC_CACHE_CHECK([whether SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver],
|
|
||||||
+ [octave_cv_sundials_sunlinsol_dense],
|
|
||||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
- #if defined (HAVE_IDA_IDA_DENSE_H)
|
|
||||||
- #include <ida/ida_dense.h>
|
|
||||||
- #else
|
|
||||||
- #include <ida_dense.h>
|
|
||||||
+ #if defined (HAVE_IDA_IDA_H)
|
|
||||||
+ #include <ida/ida.h>
|
|
||||||
+ #endif
|
|
||||||
+ #if defined (HAVE_SUNDIALS_SUNDIALS_MATRIX_H)
|
|
||||||
+ #include <sundials/sundials_matrix.h>
|
|
||||||
+ #endif
|
|
||||||
+ #if defined (HAVE_SUNDIALS_SUNDIALS_LINEARSOLVER_H)
|
|
||||||
+ #include <sundials/sundials_linearsolver.h>
|
|
||||||
#endif
|
|
||||||
+ #if defined (HAVE_IDA_IDA_DIRECT_H)
|
|
||||||
+ #include <ida/ida_direct.h>
|
|
||||||
+ #endif
|
|
||||||
]], [[
|
|
||||||
void *mem = 0;
|
|
||||||
long int num = 0;
|
|
||||||
IDADense (mem, num);
|
|
||||||
]])],
|
|
||||||
- octave_cv_sundials_ida_dense=yes,
|
|
||||||
- octave_cv_sundials_ida_dense=no)
|
|
||||||
+ octave_cv_sundials_sunlinsol_dense=yes,
|
|
||||||
+ octave_cv_sundials_sunlinsol_dense=no)
|
|
||||||
])
|
|
||||||
- if test $octave_cv_sundials_ida_dense = yes; then
|
|
||||||
- AC_DEFINE(HAVE_SUNDIALS_IDADENSE, 1,
|
|
||||||
- [Define to 1 if SUNDIALS IDA includes the IDADENSE linear solver.])
|
|
||||||
+ if test $octave_cv_sundials_sunlinsol_dense = yes; then
|
|
||||||
+ AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_DENSE, 1,
|
|
||||||
+ [Define to 1 if SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver.])
|
|
||||||
else
|
|
||||||
- warn_sundials_ida_dense="SUNDIALS IDA library does not include the IDADENSE linear solver, ode15i and ode15s will be disabled"
|
|
||||||
- OCTAVE_CONFIGURE_WARNING([warn_sundials_ida_dense])
|
|
||||||
+ warn_sundials_ida_dense="SUNDIALS IDA library does not include the SUNLINSOL_DENSE linear solver, ode15i and ode15s will be disabled"
|
|
||||||
+ OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_dense])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
dnl
|
|
||||||
diff -up octave-5.0.91/scripts/ode/ode15i.m.sundials3 octave-5.0.91/scripts/ode/ode15i.m
|
|
||||||
--- octave-5.0.91/scripts/ode/ode15i.m.sundials3 2019-02-04 10:50:20.000000000 -0700
|
|
||||||
+++ octave-5.0.91/scripts/ode/ode15i.m 2019-02-05 22:05:44.101260588 -0700
|
|
||||||
@@ -452,7 +452,7 @@ endfunction
|
|
||||||
%! assert ([t(end), y(end,:)], fref, 1e-3);
|
|
||||||
|
|
||||||
## Jacobian fun sparse
|
|
||||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
|
||||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
|
||||||
%! opt = odeset ("Jacobian", @jacfunsparse, "AbsTol", 1e-7, "RelTol", 1e-7);
|
|
||||||
%! [t, y] = ode15i (@rob, [0, 100], [1; 0; 0], [-1e-4; 1e-4; 0], opt);
|
|
||||||
%! assert ([t(end), y(end,:)], fref, 1e-3);
|
|
||||||
@@ -545,7 +545,7 @@ endfunction
|
|
||||||
%! "invalid value assigned to field 'Jacobian'");
|
|
||||||
|
|
||||||
## Jacobian cell sparse wrong dimension
|
|
||||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
|
||||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
|
||||||
%! DFDY = sparse ([-0.04, 1;
|
|
||||||
%! 0.04, 1]);
|
|
||||||
%! DFDYP = sparse ([-1, 0, 0;
|
|
||||||
diff -up octave-5.0.91/scripts/ode/ode15s.m.sundials3 octave-5.0.91/scripts/ode/ode15s.m
|
|
||||||
--- octave-5.0.91/scripts/ode/ode15s.m.sundials3 2019-02-04 10:50:20.000000000 -0700
|
|
||||||
+++ octave-5.0.91/scripts/ode/ode15s.m 2019-02-05 22:05:44.102260599 -0700
|
|
||||||
@@ -545,21 +545,21 @@ endfunction
|
|
||||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
|
||||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
|
||||||
|
|
||||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
|
||||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
|
||||||
%! opt = odeset ("MStateDependence", "none",
|
|
||||||
%! "Mass", [1, 0, 0; 0, 1, 0; 0, 0, 0],
|
|
||||||
%! "Jacobian", @jacfunsparse);
|
|
||||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
|
||||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
|
||||||
|
|
||||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
|
||||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
|
||||||
%! opt = odeset ("MStateDependence", "none",
|
|
||||||
%! "Mass", sparse ([1, 0, 0; 0, 1, 0; 0, 0, 0]),
|
|
||||||
%! "Jacobian", @jacfunsparse);
|
|
||||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
|
||||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
|
||||||
|
|
||||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
|
||||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
|
||||||
%! warning ("off", "ode15s:mass_state_dependent_provided", "local");
|
|
||||||
%! opt = odeset ("MStateDependence", "none",
|
|
||||||
%! "Mass", @massdensefunstate,
|
|
||||||
@@ -575,14 +575,14 @@ endfunction
|
|
||||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
|
||||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
|
||||||
|
|
||||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
|
||||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
|
||||||
%! opt = odeset ("MStateDependence", "none",
|
|
||||||
%! "Mass", @massdensefuntime,
|
|
||||||
%! "Jacobian", @jacfunsparse);
|
|
||||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
|
||||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
|
||||||
|
|
||||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
|
||||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
|
||||||
%! opt = odeset ("MStateDependence", "none",
|
|
||||||
%! "Mass", @masssparsefuntime,
|
|
||||||
%! "Jacobian", @jacfunsparse);
|
|
41
octave-term.patch
Normal file
41
octave-term.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
# HG changeset patch
|
||||||
|
# User Mike Miller <mtmiller@octave.org>
|
||||||
|
# Date 1458325635 25200
|
||||||
|
# Node ID c64e57319f081803d4510a09478e853674e90625
|
||||||
|
# Parent eebbb80bf6d9fa7e5e0a75a4e0c3d589d9be55d9
|
||||||
|
octave-gui: Set TERM unconditionally to Octave's expected terminal type (bug #47449)
|
||||||
|
|
||||||
|
* octave-gui.cc (octave_start_gui): Set TERM unconditionally to the expected
|
||||||
|
terminal type for the host system.
|
||||||
|
|
||||||
|
diff --git a/libgui/src/octave-gui.cc b/libgui/src/octave-gui.cc
|
||||||
|
--- a/libgui/src/octave-gui.cc
|
||||||
|
+++ b/libgui/src/octave-gui.cc
|
||||||
|
@@ -160,20 +160,12 @@
|
||||||
|
// update network-settings
|
||||||
|
resource_manager::update_network_settings ();
|
||||||
|
|
||||||
|
-#if ! defined (__WIN32__) || defined (__CYGWIN__)
|
||||||
|
- // If we were started from a launcher, TERM might not be
|
||||||
|
- // defined, but we provide a terminal with xterm
|
||||||
|
- // capabilities.
|
||||||
|
-
|
||||||
|
- std::string term = octave_env::getenv ("TERM");
|
||||||
|
-
|
||||||
|
- if (term.empty ())
|
||||||
|
- octave_env::putenv ("TERM", "xterm");
|
||||||
|
+ // We provide specific terminal capabilities, so ensure that TERM is
|
||||||
|
+ // always set appropriately
|
||||||
|
+#if defined (__WIN32__) && ! defined (__CYGWIN__)
|
||||||
|
+ octave_env::putenv ("TERM", "cygwin");
|
||||||
|
#else
|
||||||
|
- std::string term = octave_env::getenv ("TERM");
|
||||||
|
-
|
||||||
|
- if (term.empty ())
|
||||||
|
- octave_env::putenv ("TERM", "cygwin");
|
||||||
|
+ octave_env::putenv ("TERM", "xterm");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// shortcut manager
|
||||||
|
|
12
octave-texinfo5.patch
Normal file
12
octave-texinfo5.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up octave-4.0.3/libinterp/dldfcn/dmperm.cc.texinfo5 octave-4.0.3/libinterp/dldfcn/dmperm.cc
|
||||||
|
--- octave-4.0.3/libinterp/dldfcn/dmperm.cc.texinfo5 2016-09-09 11:35:32.560355572 -0600
|
||||||
|
+++ octave-4.0.3/libinterp/dldfcn/dmperm.cc 2016-09-09 11:36:04.340209857 -0600
|
||||||
|
@@ -136,7 +136,7 @@ DEFUN_DLD (dmperm, args, nargout,
|
||||||
|
@deftypefn {Loadable Function} {@var{p} =} dmperm (@var{S})\n\
|
||||||
|
@deftypefnx {Loadable Function} {[@var{p}, @var{q}, @var{r}, @var{S}] =} dmperm (@var{S})\n\
|
||||||
|
\n\
|
||||||
|
-@cindex @nospell{Dulmage-Mendelsohn} decomposition\n\
|
||||||
|
+@cindex Dulmage-Mendelsohn decomposition\n\
|
||||||
|
Perform a @nospell{Dulmage-Mendelsohn} permutation of the sparse matrix\n\
|
||||||
|
@var{S}.\n\
|
||||||
|
\n\
|
362
octave.spec
362
octave.spec
@ -1,46 +1,51 @@
|
|||||||
# From src/version.h:#define OCTAVE_API_VERSION
|
# From src/version.h:#define OCTAVE_API_VERSION
|
||||||
%global octave_api api-v53
|
%global octave_api api-v50+
|
||||||
|
|
||||||
|
%{?!_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}}
|
||||||
|
|
||||||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||||
|
|
||||||
%global builddocs 1
|
%global builddocs 1
|
||||||
|
|
||||||
# Use Qt5 on F26+
|
|
||||||
%if 0%{?fedora}
|
|
||||||
%bcond_without qt5
|
|
||||||
%else
|
|
||||||
%bcond_with qt5
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# For rc versions, change release manually
|
# For rc versions, change release manually
|
||||||
#global rcver 2
|
#global rcver 2
|
||||||
%if 0%{?rcver:1}
|
%if 0%{?rcver:1}
|
||||||
%global rctag -rc%{?rcver}
|
%global rctag -rc%{?rcver}
|
||||||
%global relsuf .rc%{?rcver}
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: octave
|
Name: octave
|
||||||
Epoch: 6
|
Epoch: 6
|
||||||
Version: 5.1.0
|
Version: 4.0.3
|
||||||
Release: 2%{?rcver:.rc%{rcver}}%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A high-level language for numerical computations
|
Summary: A high-level language for numerical computations
|
||||||
|
Group: Applications/Engineering
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.octave.org
|
URL: http://www.octave.org
|
||||||
|
|
||||||
Source0: https://ftp.gnu.org/gnu/octave/octave-%{version}.tar.lz
|
%if 0%{!?rcver:1}
|
||||||
#Source0: https://alpha.gnu.org/gnu/octave/octave-%{version}%{?rctag}.tar.lz
|
Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.xz
|
||||||
|
%else
|
||||||
|
Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}%{rctag}.tar.gz
|
||||||
|
%endif
|
||||||
# RPM macros for helping to build Octave packages
|
# RPM macros for helping to build Octave packages
|
||||||
Source1: macros.octave
|
Source1: macros.octave
|
||||||
Source2: xorg.conf
|
Source2: xorg.conf
|
||||||
# Prebuilt docs from Fedora for EPEL
|
# Fix to allow pkg build to use a directory
|
||||||
Source3: octave-5.1.0-docs.tar.lz
|
# https://savannah.gnu.org/bugs/?func=detailitem&item_id=32839
|
||||||
# SUNDIALS 3 support
|
Patch0: octave-pkgbuilddir.patch
|
||||||
# https://savannah.gnu.org/bugs/?52475
|
# Remove project_group from appdata.xml file
|
||||||
Patch1: octave-sundials3.patch
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1293561
|
||||||
# Proper EOF handling
|
Patch2: octave-appdata.patch
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1705129
|
# Fix build with texinfo5 on <=EL7
|
||||||
# https://hg.savannah.gnu.org/hgweb/octave/rev/c3716220d5b9
|
# http://hg.savannah.gnu.org/hgweb/octave/rev/b602ce0b5acf
|
||||||
Patch2: octave-eof.patch
|
Patch3: octave-texinfo5.patch
|
||||||
|
# Add needed #include <math.h> to bring in gnulib
|
||||||
|
Patch4: octave-gnulib.patch
|
||||||
|
# Handle g++ 6 abs() change
|
||||||
|
Patch5: octave-abs.patch
|
||||||
|
# Make sure TERM variable is set correctly
|
||||||
|
# http://hg.savannah.gnu.org/hgweb/octave/raw-rev/c64e57319f08
|
||||||
|
Patch6: octave-term.patch
|
||||||
|
|
||||||
Provides: octave(api) = %{octave_api}
|
Provides: octave(api) = %{octave_api}
|
||||||
Provides: bundled(gnulib)
|
Provides: bundled(gnulib)
|
||||||
@ -60,11 +65,7 @@ Provides: bundled(ranlib)
|
|||||||
Provides: bundled(slatec-err)
|
Provides: bundled(slatec-err)
|
||||||
Provides: bundled(slatec-fn)
|
Provides: bundled(slatec-fn)
|
||||||
|
|
||||||
# For Source0
|
|
||||||
BuildRequires: lzip
|
|
||||||
|
|
||||||
# For autoreconf
|
# For autoreconf
|
||||||
BuildRequires: automake
|
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
# For validating desktop and appdata files
|
# For validating desktop and appdata files
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
@ -73,15 +74,13 @@ BuildRequires: libappstream-glib
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRequires: arpack-devel
|
BuildRequires: arpack-devel
|
||||||
BuildRequires: openblas-devel
|
BuildRequires: atlas-devel
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: bzip2-devel
|
|
||||||
BuildRequires: curl-devel
|
BuildRequires: curl-devel
|
||||||
BuildRequires: fftw-devel
|
BuildRequires: fftw-devel
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: fltk-devel
|
BuildRequires: fltk-devel
|
||||||
BuildRequires: ftgl-devel
|
BuildRequires: ftgl-devel
|
||||||
BuildRequires: gcc-c++
|
|
||||||
BuildRequires: gcc-gfortran
|
BuildRequires: gcc-gfortran
|
||||||
BuildRequires: ghostscript
|
BuildRequires: ghostscript
|
||||||
BuildRequires: gl2ps-devel
|
BuildRequires: gl2ps-devel
|
||||||
@ -91,9 +90,6 @@ BuildRequires: gperf
|
|||||||
BuildRequires: GraphicsMagick-c++-devel
|
BuildRequires: GraphicsMagick-c++-devel
|
||||||
BuildRequires: hdf5-devel
|
BuildRequires: hdf5-devel
|
||||||
BuildRequires: java-devel
|
BuildRequires: java-devel
|
||||||
%if 0%{?fedora}
|
|
||||||
BuildRequires: javapackages-local
|
|
||||||
%endif
|
|
||||||
BuildRequires: less
|
BuildRequires: less
|
||||||
BuildRequires: libsndfile-devel
|
BuildRequires: libsndfile-devel
|
||||||
BuildRequires: libX11-devel
|
BuildRequires: libX11-devel
|
||||||
@ -106,16 +102,9 @@ BuildRequires: pcre-devel
|
|||||||
BuildRequires: portaudio-devel
|
BuildRequires: portaudio-devel
|
||||||
BuildRequires: qhull-devel
|
BuildRequires: qhull-devel
|
||||||
BuildRequires: qrupdate-devel
|
BuildRequires: qrupdate-devel
|
||||||
%if %{with qt5}
|
|
||||||
BuildRequires: qscintilla-qt5-devel
|
|
||||||
BuildRequires: qt5-linguist
|
|
||||||
BuildRequires: qt5-qttools-devel
|
|
||||||
%else
|
|
||||||
BuildRequires: qscintilla-devel
|
BuildRequires: qscintilla-devel
|
||||||
%endif
|
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: suitesparse-devel
|
BuildRequires: suitesparse-devel
|
||||||
BuildRequires: sundials-devel
|
|
||||||
BuildRequires: tex(dvips)
|
BuildRequires: tex(dvips)
|
||||||
BuildRequires: texinfo
|
BuildRequires: texinfo
|
||||||
BuildRequires: texinfo-tex
|
BuildRequires: texinfo-tex
|
||||||
@ -135,31 +124,11 @@ BuildRequires: xorg-x11-drv-dummy
|
|||||||
%endif
|
%endif
|
||||||
BuildRequires: zip
|
BuildRequires: zip
|
||||||
|
|
||||||
Requires: epstool
|
Requires: epstool gnuplot gnuplot-common less info texinfo
|
||||||
Requires: gnuplot
|
|
||||||
Requires: gnuplot-common
|
|
||||||
Requires: hdf5 = %{_hdf5_version}
|
Requires: hdf5 = %{_hdf5_version}
|
||||||
Requires: hicolor-icon-theme
|
|
||||||
Requires: java-headless
|
Requires: java-headless
|
||||||
Requires: less
|
Requires(post): info
|
||||||
Requires: info
|
Requires(preun): info
|
||||||
Requires: texinfo
|
|
||||||
# Rrom scripts/general/private/__publish_latex_output__.m
|
|
||||||
Requires: tex(amssymb.sty)
|
|
||||||
Requires: tex(fontenc.sty)
|
|
||||||
Requires: tex(graphicx.sty)
|
|
||||||
Requires: tex(hyperref.sty)
|
|
||||||
Requires: tex(inputenc.sty)
|
|
||||||
Requires: tex(listings.sty)
|
|
||||||
Requires: tex(lmodern.sty)
|
|
||||||
Requires: tex(mathtools.sty)
|
|
||||||
Requires: tex(titlesec.sty)
|
|
||||||
Requires: tex(xcolor.sty)
|
|
||||||
# Rrom scripts/plot/util/print.m:
|
|
||||||
Requires: tex(color.sty)
|
|
||||||
Requires: tex(epsfig.sty)
|
|
||||||
Requires: tex(geometry.sty)
|
|
||||||
Requires: tex(graphicx.sty)
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -179,15 +148,10 @@ C++, C, Fortran, or other languages.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development headers and files for Octave
|
Summary: Development headers and files for Octave
|
||||||
|
Group: Development/Libraries
|
||||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||||
Requires: gcc-c++
|
Requires: readline-devel fftw-devel hdf5-devel zlib-devel
|
||||||
Requires: gcc-gfortran
|
Requires: atlas-devel gcc-c++ gcc-gfortran
|
||||||
Requires: fftw-devel%{?_isa}
|
|
||||||
Requires: hdf5-devel%{?_isa}
|
|
||||||
Requires: openblas-devel%{?_isa}
|
|
||||||
Requires: readline-devel%{?_isa}
|
|
||||||
Requires: zlib-devel
|
|
||||||
Requires: libappstream-glib
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
The octave-devel package contains files needed for developing
|
The octave-devel package contains files needed for developing
|
||||||
@ -196,6 +160,7 @@ applications which use GNU Octave.
|
|||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for Octave
|
Summary: Documentation for Octave
|
||||||
|
Group: Documentation
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
@ -203,20 +168,38 @@ This package contains documentation for Octave.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}%{?rctag}
|
%setup -q -n %{name}-%{version}%{?rctag}
|
||||||
%patch2 -p1 -b .eof
|
%patch0 -p1 -b .pkgbuilddir
|
||||||
# EPEL7's autoconf/automake is too old so don't do
|
%patch2 -p1 -b .appdata
|
||||||
# unneeded patches there
|
%patch3 -p1 -b .texinfo5
|
||||||
%if 0%{?fedora}
|
%patch4 -p1 -b .gnulib
|
||||||
%patch1 -p1 -b .sundials3
|
%patch5 -p1 -b .abs
|
||||||
autoreconf -i
|
%patch6 -p1 -b .term
|
||||||
|
# Explicitly use gnulib headers
|
||||||
|
%if 0%{?fedora} >= 24
|
||||||
|
find -name \*.cc -o -name \*.h -o -name \*.yy | xargs sed -i -e 's/#include <c\(math\|stdlib\)>/#include <\1.h>/'
|
||||||
%endif
|
%endif
|
||||||
|
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
|
||||||
|
find -name *.cc -exec chmod 644 {} \;
|
||||||
|
|
||||||
|
# Remove unused fftpack
|
||||||
|
sed -i -e '/fftpack/d' liboctave/cruft/module.mk
|
||||||
|
rm -r liboctave/cruft/fftpack
|
||||||
|
autoreconf
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%global enable64 no
|
%global enable64 no
|
||||||
export F77=gfortran
|
export F77=gfortran
|
||||||
# TODO: some items appear to be bundled in libcruft..
|
# TODO: some items appear to be bundled in libcruft..
|
||||||
# gl2ps.c is bundled. Anything else?
|
# gl2ps.c is bundled. Anything else?
|
||||||
|
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
|
||||||
|
%global atlasblaslib -ltatlas
|
||||||
|
%global atlaslapacklib -ltatlas
|
||||||
|
%else
|
||||||
|
%global atlasblaslib -lf77blas -latlas
|
||||||
|
%global atlaslapacklib -llapack
|
||||||
|
%endif
|
||||||
%if !%{builddocs}
|
%if !%{builddocs}
|
||||||
%global disabledocs --disable-docs
|
%global disabledocs --disable-docs
|
||||||
%endif
|
%endif
|
||||||
@ -225,16 +208,12 @@ libjvm=$(find /usr/lib/jvm/jre/lib -name libjvm.so -printf %h)
|
|||||||
export JAVA_HOME=%{java_home}
|
export JAVA_HOME=%{java_home}
|
||||||
# JIT support is still experimental, and causes a segfault on ARM.
|
# JIT support is still experimental, and causes a segfault on ARM.
|
||||||
# --enable-float-truncate - https://savannah.gnu.org/bugs/?40560
|
# --enable-float-truncate - https://savannah.gnu.org/bugs/?40560
|
||||||
# sundials headers need to know where to find suitesparse headers
|
|
||||||
export CPPFLAGS=-I%{_includedir}/suitesparse
|
|
||||||
# Disable _GLIBCXX_ASSERTIONS for now
|
|
||||||
# https://savannah.gnu.org/bugs/?55547
|
|
||||||
export CXXFLAGS="$(echo %optflags | sed s/-Wp,-D_GLIBCXX_ASSERTIONS//)"
|
|
||||||
%configure --enable-shared --disable-static --enable-64=%enable64 \
|
%configure --enable-shared --disable-static --enable-64=%enable64 \
|
||||||
--enable-float-truncate \
|
--enable-float-truncate \
|
||||||
%{?disabledocs} \
|
%{?disabledocs} \
|
||||||
--disable-silent-rules \
|
--disable-silent-rules \
|
||||||
--with-java-includedir=/usr/lib/jvm/java/include \
|
--with-blas="-L%{_libdir}/atlas %{atlasblaslib}" \
|
||||||
|
--with-lapack="-L%{_libdir}/atlas %{atlaslapacklib}" \
|
||||||
--with-java-libdir=$libjvm \
|
--with-java-libdir=$libjvm \
|
||||||
--with-qrupdate \
|
--with-qrupdate \
|
||||||
--with-amd --with-umfpack --with-colamd --with-ccolamd --with-cholmod \
|
--with-amd --with-umfpack --with-colamd --with-ccolamd --with-cholmod \
|
||||||
@ -242,20 +221,20 @@ export CXXFLAGS="$(echo %optflags | sed s/-Wp,-D_GLIBCXX_ASSERTIONS//)"
|
|||||||
--disable-jit
|
--disable-jit
|
||||||
|
|
||||||
# Check that octave_api is set correctly (autogenerated file)
|
# Check that octave_api is set correctly (autogenerated file)
|
||||||
make liboctave/version.h
|
make -C libinterp version.h
|
||||||
if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' liboctave/version.h
|
if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' libinterp/version.h
|
||||||
then
|
then
|
||||||
echo "octave_api variable in spec does not match liboctave/version.h"
|
echo "octave_api variable in spec does not match libinterp/version.h"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%make_build OCTAVE_RELEASE="Fedora %{version}%{?rctag}-%{release}"
|
make OCTAVE_RELEASE="Fedora %{version}%{?rctag}-%{release}" %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
# Docs - In case we didn't build them and to explicitly install pre-built docs
|
# Docs - In case we didn't build them and to explicitly install pre-built docs
|
||||||
make install-data install-html install-info install-pdf DESTDIR=%{buildroot}
|
make -C doc install-data install-html install-info install-pdf DESTDIR=%{buildroot}
|
||||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||||
cp -ar AUTHORS BUGS ChangeLog examples NEWS README %{buildroot}%{_pkgdocdir}/
|
cp -ar AUTHORS BUGS ChangeLog examples NEWS README %{buildroot}%{_pkgdocdir}/
|
||||||
cp -a doc/refcard/*.pdf %{buildroot}%{_pkgdocdir}/
|
cp -a doc/refcard/*.pdf %{buildroot}%{_pkgdocdir}/
|
||||||
@ -263,9 +242,6 @@ cp -a doc/refcard/*.pdf %{buildroot}%{_pkgdocdir}/
|
|||||||
# No info directory
|
# No info directory
|
||||||
rm -f %{buildroot}%{_infodir}/dir
|
rm -f %{buildroot}%{_infodir}/dir
|
||||||
|
|
||||||
# EL7's makeinfo doesn't support @sortas, so use prebuilt docs
|
|
||||||
%{?el7:tar xvf %SOURCE3 -C %{buildroot}}
|
|
||||||
|
|
||||||
# Make library links
|
# Make library links
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
||||||
echo "%{_libdir}/octave/%{version}%{?rctag}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/octave-%{_arch}.conf
|
echo "%{_libdir}/octave/%{version}%{?rctag}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/octave-%{_arch}.conf
|
||||||
@ -276,11 +252,9 @@ perl -pi -e "s,%{buildroot},," %{buildroot}%{_datadir}/%{name}/ls-R
|
|||||||
# Make sure ls-R exists
|
# Make sure ls-R exists
|
||||||
touch %{buildroot}%{_datadir}/%{name}/ls-R
|
touch %{buildroot}%{_datadir}/%{name}/ls-R
|
||||||
|
|
||||||
desktop-file-validate %{buildroot}%{_datadir}/applications/org.octave.Octave.desktop
|
desktop-file-validate %{buildroot}%{_datadir}/applications/www.octave.org-octave.desktop
|
||||||
# RHEL7 still doesn't like the GNU project_group
|
|
||||||
%{?el7:sed -i -e /project_group/d %{buildroot}/%{_datadir}/metainfo/org.octave.Octave.appdata.xml}
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/org.octave.Octave.appdata.xml
|
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Create directories for add-on packages
|
# Create directories for add-on packages
|
||||||
@ -292,7 +266,7 @@ mkdir -p %{buildroot}%{_libdir}/%{name}/packages
|
|||||||
touch %{buildroot}%{_datadir}/%{name}/octave_packages
|
touch %{buildroot}%{_datadir}/%{name}/octave_packages
|
||||||
|
|
||||||
# Fix multilib installs
|
# Fix multilib installs
|
||||||
for include in octave-config defaults
|
for include in config defaults oct-conf
|
||||||
do
|
do
|
||||||
mv %{buildroot}%{_includedir}/%{name}-%{version}%{?rctag}/%{name}/${include}.h \
|
mv %{buildroot}%{_includedir}/%{name}-%{version}%{?rctag}/%{name}/${include}.h \
|
||||||
%{buildroot}%{_includedir}/%{name}-%{version}%{?rctag}/%{name}/${include}-%{__isa_bits}.h
|
%{buildroot}%{_includedir}/%{name}-%{version}%{?rctag}/%{name}/${include}-%{__isa_bits}.h
|
||||||
@ -361,11 +335,36 @@ fi
|
|||||||
$Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf :99 &
|
$Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf :99 &
|
||||||
sleep 2
|
sleep 2
|
||||||
export DISPLAY=:99
|
export DISPLAY=:99
|
||||||
make check %{?el7:|| :}
|
make check
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
%if %{builddocs}
|
||||||
|
/sbin/install-info --info-dir=%{_infodir} --section="Programming" \
|
||||||
|
%{_infodir}/octave.info || :
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%if %{builddocs}
|
||||||
|
if [ "$1" = "0" ]; then
|
||||||
|
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/octave.info || :
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%postun
|
||||||
|
/sbin/ldconfig
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
||||||
|
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%posttrans
|
||||||
|
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%{!?_licensedir:%global license %%doc}
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_pkgdocdir}/AUTHORS
|
%{_pkgdocdir}/AUTHORS
|
||||||
%{_pkgdocdir}/BUGS
|
%{_pkgdocdir}/BUGS
|
||||||
@ -380,10 +379,10 @@ make check %{?el7:|| :}
|
|||||||
%{_mandir}/man1/octave*.1.*
|
%{_mandir}/man1/octave*.1.*
|
||||||
%{_infodir}/liboctave.info*
|
%{_infodir}/liboctave.info*
|
||||||
%{_infodir}/octave.info*
|
%{_infodir}/octave.info*
|
||||||
%{_datadir}/applications/org.octave.Octave.desktop
|
%{_datadir}/appdata/www.octave.org-octave.appdata.xml
|
||||||
|
%{_datadir}/applications/www.octave.org-octave.desktop
|
||||||
%{_datadir}/icons/hicolor/*/apps/octave.png
|
%{_datadir}/icons/hicolor/*/apps/octave.png
|
||||||
%{_datadir}/icons/hicolor/scalable/apps/octave.svg
|
%{_datadir}/icons/hicolor/scalable/apps/octave.svg
|
||||||
%{_datadir}/metainfo/org.octave.Octave.appdata.xml
|
|
||||||
# octave_packages is %ghost, so need to list everything else separately
|
# octave_packages is %ghost, so need to list everything else separately
|
||||||
%dir %{_datadir}/octave
|
%dir %{_datadir}/octave
|
||||||
%{_datadir}/octave/%{version}%{?rctag}/
|
%{_datadir}/octave/%{version}%{?rctag}/
|
||||||
@ -397,8 +396,6 @@ make check %{?el7:|| :}
|
|||||||
%{_bindir}/mkoctfile
|
%{_bindir}/mkoctfile
|
||||||
%{_bindir}/mkoctfile-%{version}%{?rctag}
|
%{_bindir}/mkoctfile-%{version}%{?rctag}
|
||||||
%{_includedir}/octave-%{version}%{?rctag}/
|
%{_includedir}/octave-%{version}%{?rctag}/
|
||||||
%{_libdir}/pkgconfig/octave.pc
|
|
||||||
%{_libdir}/pkgconfig/octinterp.pc
|
|
||||||
%{_mandir}/man1/mkoctfile.1.*
|
%{_mandir}/man1/mkoctfile.1.*
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
@ -410,167 +407,6 @@ make check %{?el7:|| :}
|
|||||||
%{_pkgdocdir}/refcard*.pdf
|
%{_pkgdocdir}/refcard*.pdf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jul 31 2019 Orion Poplawski <orion@nwra.com> - 6:5.1.0-2
|
|
||||||
- Drop use of %%buildarch in macros.octave (bugz#1733898)
|
|
||||||
|
|
||||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6:5.1.0-1.1
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Jun 16 2019 Orion Poplawski <orion@nwra.com> - 6:5.1.0-1
|
|
||||||
- Update to 5.1.0
|
|
||||||
|
|
||||||
* Mon May 6 2019 Orion Poplawski <orion@nwra.com> - 6:4.4.1-8
|
|
||||||
- Backport upstream patch for proper EOF handling (bugz#1705129)
|
|
||||||
|
|
||||||
* Tue Apr 23 2019 Björn Esser <besser82@fedoraproject.org> - 6:4.4.1-7
|
|
||||||
- rebuilt (sundials)
|
|
||||||
|
|
||||||
* Sat Mar 16 2019 Orion Poplawski <orion@nwra.com> - 6:4.4.1-6
|
|
||||||
- Rebuild for hdf5 1.10.5
|
|
||||||
|
|
||||||
* Thu Mar 7 2019 Tim Landscheidt <tim@tim-landscheidt.de> - 6:4.4.1-5
|
|
||||||
- Remove obsolete requirements for post/preun scriptlets
|
|
||||||
|
|
||||||
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 6:4.4.1-4
|
|
||||||
- Rebuild for readline 8.0
|
|
||||||
|
|
||||||
* Sat Feb 16 2019 Björn Esser <besser82@fedoraproject.org> - 6:4.4.1-3
|
|
||||||
- rebuilt (qscintilla)
|
|
||||||
|
|
||||||
* Tue Feb 12 2019 Björn Esser <besser82@fedoraproject.org> - 6:4.4.1-2
|
|
||||||
- rebuilt (qscintilla)
|
|
||||||
- Fix pre-release tag
|
|
||||||
|
|
||||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6:4.4.1-1.1
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Nov 11 2018 Orion Poplawski <orion@nwra.com> - 6:4.4.1-1
|
|
||||||
- Update to 4.4.1
|
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6:4.2.2-6.1
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jul 02 2018 Colin B. Macdonald <cbm@m.fsf.org> - 6:4.2.2-6
|
|
||||||
- macros: support other names for appdata .metainfo.xml files
|
|
||||||
|
|
||||||
* Thu Jun 28 2018 Colin B. Macdonald <cbm@m.fsf.org> - 6:4.2.2-5
|
|
||||||
- macros: support dependencies in octave_pkg_check
|
|
||||||
|
|
||||||
* Thu Jun 21 2018 Orion Poplawski <orion@nwra.com> - 6:4.2.2-4
|
|
||||||
- Add patch to fix crash with Ctrl-D (bug #1589460)
|
|
||||||
|
|
||||||
* Sun Jun 17 2018 Orion Poplawski <orion@nwra.com> - 6:4.2.2-3
|
|
||||||
- Add requires hicolor-icon-theme
|
|
||||||
- Use make macros
|
|
||||||
|
|
||||||
* Sat Jun 2 2018 Jerry James <loganjerry@gmail.com> - 6:4.2.2-2
|
|
||||||
- Rebuild for glpk 4.65
|
|
||||||
- Use ldconfig macros
|
|
||||||
- Add -qbuttongroup patch to fix FTBFS
|
|
||||||
|
|
||||||
* Wed Mar 14 2018 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.2-1
|
|
||||||
- Update to 4.2.2
|
|
||||||
- Fail build again if make check fails
|
|
||||||
|
|
||||||
* Wed Feb 21 2018 Orion Poplawski <orion@nwra.com> - 6:4.2.1-5
|
|
||||||
- Add BR gcc-c++
|
|
||||||
|
|
||||||
* Thu Feb 08 2018 Jitka Plesnikova <jplesnik@redhat.com> - 6:4.2.1-4.5
|
|
||||||
- Rebuild for hdf5 1.8.20
|
|
||||||
|
|
||||||
* Mon Feb 05 2018 Jitka Plesnikova <jplesnik@redhat.com> - 6:4.2.1-4.4
|
|
||||||
- Rebuild for new gfortran
|
|
||||||
|
|
||||||
* Fri Jan 05 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 6:4.2.1-4.3
|
|
||||||
- Remove obsolete scriptlets
|
|
||||||
|
|
||||||
* Sun Aug 13 2017 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.1-4.2
|
|
||||||
- Make octave-devel require libappstream-glib
|
|
||||||
|
|
||||||
* Sat Aug 12 2017 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.1-4.1
|
|
||||||
- Run appstream-util validate-relax on metainfo.xml files
|
|
||||||
|
|
||||||
* Fri Aug 11 2017 Orion Poplawski <orion@nwra.com> - 6:4.2.1-4
|
|
||||||
- Use openblas on Fedora 27+
|
|
||||||
|
|
||||||
* Thu Aug 10 2017 Orion Poplawski <orion@nwra.com> - 6:4.2.1-4
|
|
||||||
- Install metainfo.xml files in %%octave_pkg_install
|
|
||||||
|
|
||||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6:4.2.1-3.2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6:4.2.1-3.1
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jun 13 2017 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.1-3
|
|
||||||
- Use Qt5 on Fedora 26+
|
|
||||||
|
|
||||||
* Wed Apr 5 2017 Jerry James <loganjerry@gmail.com> - 6:4.2.1-2
|
|
||||||
- Rebuild for glpk 4.61
|
|
||||||
|
|
||||||
* Fri Feb 24 2017 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.1-1
|
|
||||||
- Update to 4.2.1
|
|
||||||
|
|
||||||
* Mon Feb 20 2017 Rex Dieter <rdieter@fedoraproject.org> - 6:4.2.0-16
|
|
||||||
- rebuild (qscintilla)
|
|
||||||
|
|
||||||
* Wed Feb 08 2017 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-15
|
|
||||||
- Have %%octave_pkg_check re-strip shared objects
|
|
||||||
|
|
||||||
* Tue Feb 07 2017 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-14
|
|
||||||
- Rebuild with fixed pkgconf (bug #1419685)
|
|
||||||
|
|
||||||
* Sat Jan 28 2017 Björn Esser <besser82@fedoraproject.org> - 6:4.2.0-13
|
|
||||||
- Rebuilt for GCC-7
|
|
||||||
|
|
||||||
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 6:4.2.0-12.1
|
|
||||||
- Rebuild for readline 7.x
|
|
||||||
|
|
||||||
* Thu Dec 29 2016 Kalev Lember <klember@redhat.com> - 6:4.2.0-12
|
|
||||||
- Fix license in appdata file (bug #1293561)
|
|
||||||
|
|
||||||
* Fri Dec 09 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-11
|
|
||||||
- Handle noarch package tarball names
|
|
||||||
|
|
||||||
* Fri Dec 09 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-10
|
|
||||||
- Patch gzip from upstream bug report
|
|
||||||
|
|
||||||
* Thu Dec 08 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-9
|
|
||||||
- Disable more segfaulting tests
|
|
||||||
|
|
||||||
* Thu Dec 08 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-8
|
|
||||||
- Add patch to prevent gzip from deleting target file, instead emit warning
|
|
||||||
- Drop debug code
|
|
||||||
- Disable segfaulting osmesa_print and pltopt tests
|
|
||||||
|
|
||||||
* Thu Dec 08 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-7
|
|
||||||
- Fix version option
|
|
||||||
|
|
||||||
* Wed Dec 07 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-6
|
|
||||||
- A desparate attempt to debug octave package building
|
|
||||||
|
|
||||||
* Wed Dec 07 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-5
|
|
||||||
- Build in a build sub-directory
|
|
||||||
|
|
||||||
* Wed Dec 07 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-4
|
|
||||||
- Use 'octave-config -p CANONICAL_HOST_TYPE' in macros
|
|
||||||
|
|
||||||
* Wed Dec 07 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-3
|
|
||||||
- Use %%_host in macros
|
|
||||||
|
|
||||||
* Tue Dec 06 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-2
|
|
||||||
- Rework pkg build/install macros
|
|
||||||
|
|
||||||
* Tue Dec 06 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-1
|
|
||||||
- Update to 4.2.0
|
|
||||||
- Drop texinfo5 patch
|
|
||||||
- Use autoreconf -i
|
|
||||||
- Add requires for latex packages
|
|
||||||
- Add implicit patch
|
|
||||||
|
|
||||||
* Tue Dec 06 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.0.3-3
|
|
||||||
- Rebuild for hdf5 1.8.18
|
|
||||||
|
|
||||||
* Fri Sep 9 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.0.3-2
|
* Fri Sep 9 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.0.3-2
|
||||||
- Add upstream patch to fix build with texinfo 5 on <=EL7
|
- Add upstream patch to fix build with texinfo 5 on <=EL7
|
||||||
|
|
||||||
|
3
sources
3
sources
@ -1,2 +1 @@
|
|||||||
SHA512 (octave-5.1.0.tar.lz) = 34facc20ffceaead05e62e16cc70bd603919c7e52c7489faa17b5c969a160c655f50c4aeb41ecee2e2d0a6245cc3364cf9009ddd3cecb17b9e06bbdacaa0a516
|
73b140bc69ac21cfaa3e473b91b6842b octave-4.0.3.tar.xz
|
||||||
SHA512 (octave-5.1.0-docs.tar.lz) = 6bf24ed95d5d2957271abb8902a156edc588962b95218b05936858fafe8205f4295f072388f7331ad5700946fbae701bd0c3f2a59c258f390ea92c85eb87fdd2
|
|
||||||
|
Loading…
Reference in New Issue
Block a user