diff --git a/.gitignore b/.gitignore index 40e02f8..ad6f47d 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ octave-3.2.4.tar.bz2 /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 diff --git a/octave-sundials3.patch b/octave-sundials3.patch index 8f8cedf..f5110ee 100644 --- a/octave-sundials3.patch +++ b/octave-sundials3.patch @@ -1,7 +1,7 @@ -diff -up octave-4.4.1/configure.ac.sundials3 octave-4.4.1/configure.ac ---- octave-4.4.1/configure.ac.sundials3 2018-08-09 12:20:32.000000000 -0600 -+++ octave-4.4.1/configure.ac 2018-10-28 14:06:56.907293616 -0600 -@@ -2315,15 +2315,15 @@ OCTAVE_CHECK_LIB(sundials_ida, [SUNDIALS +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 @@ -20,18 +20,18 @@ diff -up octave-4.4.1/configure.ac.sundials3 octave-4.4.1/configure.ac && 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-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libinterp/dldfcn/__ode15__.cc ---- octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 2018-08-09 12:20:32.000000000 -0600 -+++ octave-4.4.1/libinterp/dldfcn/__ode15__.cc 2018-10-28 14:26:11.482248630 -0600 +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-2018 Francesco Faccio + Copyright (C) 2016-2019 Francesco Faccio +Copyright (C) 2018 William Greene This file is part of Octave. -@@ -43,15 +44,34 @@ along with Octave; see the file COPYING. +@@ -44,15 +45,34 @@ along with Octave; see the file COPYING. # include # endif @@ -70,7 +70,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin # if defined (HAVE_NVECTOR_NVECTOR_SERIAL_H) # include # endif -@@ -111,7 +131,8 @@ namespace octave +@@ -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), @@ -80,7 +80,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin { } -@@ -121,11 +142,17 @@ namespace octave +@@ -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), @@ -100,7 +100,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin IDA& set_jacobian (octave_function *jac, DAEJacFuncDense j) -@@ -183,7 +210,7 @@ namespace octave +@@ -184,7 +211,7 @@ namespace octave static N_Vector ColToNVec (const ColumnVector& data, long int n); void @@ -109,7 +109,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin void set_tolerance (ColumnVector& abstol, realtype reltol); -@@ -198,25 +225,24 @@ namespace octave +@@ -199,25 +226,24 @@ namespace octave void resfun_impl (realtype t, N_Vector& yy, N_Vector& yyp, N_Vector& rr); @@ -142,7 +142,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin N_Vector, N_Vector) { IDA *self = static_cast (user_data); -@@ -226,7 +252,7 @@ namespace octave +@@ -227,7 +253,7 @@ namespace octave void jacsparse_impl (realtype t, realtype cj, N_Vector& yy, @@ -151,7 +151,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin #endif void set_maxstep (realtype maxstep); -@@ -290,6 +316,8 @@ namespace octave +@@ -291,6 +317,8 @@ namespace octave DAEJacFuncSparse jacspfun; DAEJacCellDense jacdcell; DAEJacCellSparse jacspcell; @@ -160,7 +160,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin }; int -@@ -322,36 +350,61 @@ namespace octave +@@ -323,36 +351,61 @@ namespace octave } void @@ -234,7 +234,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin ColumnVector y = NVecToCol (yy, Neq); ColumnVector yp = NVecToCol (yyp, Neq); -@@ -365,15 +418,15 @@ namespace octave +@@ -366,15 +419,15 @@ namespace octave std::copy (jac.fortran_vec (), jac.fortran_vec () + jac.numel (), @@ -253,7 +253,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin { BEGIN_INTERRUPT_WITH_EXCEPTIONS; -@@ -389,17 +442,18 @@ namespace octave +@@ -390,17 +443,18 @@ namespace octave else jac = (*jacspcell) (spdfdy, spdfdyp, cj); @@ -276,7 +276,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin } END_INTERRUPT_WITH_EXCEPTIONS; -@@ -566,7 +620,7 @@ namespace octave +@@ -567,7 +621,7 @@ namespace octave //main loop while (((posdirection == 1 && tsol < tend) @@ -285,7 +285,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin && status == 0) { if (IDASolve (mem, tend, &tsol, yy, yyp, IDA_ONE_STEP) != 0) -@@ -691,7 +745,7 @@ namespace octave +@@ -692,7 +746,7 @@ namespace octave // Linear interpolation ie(0) = index(0); te(0) = tsol - val (index(0)) * (tsol - told) @@ -294,7 +294,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin ColumnVector ytemp = y - ((tsol - te(0)) * (y - yold) / (tsol - told)); -@@ -716,7 +770,7 @@ namespace octave +@@ -717,7 +771,7 @@ namespace octave // Linear interpolation ie(temp+i) = index(i); te(temp+i) = tsol - val(index(i)) * (tsol - told) @@ -303,7 +303,7 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin ColumnVector ytemp = y - (tsol - te (temp + i)) * (y - yold) / (tsol - told); -@@ -1095,7 +1149,7 @@ namespace octave +@@ -1096,7 +1150,7 @@ namespace octave event_fcn = options.getfield("Events").function_value (); // Set up linear solver @@ -312,10 +312,10 @@ diff -up octave-4.4.1/libinterp/dldfcn/__ode15__.cc.sundials3 octave-4.4.1/libin // Integrate retval = dae.integrate (numt, tspan, y0, yp0, refine, -diff -up octave-4.4.1/m4/acinclude.m4.sundials3 octave-4.4.1/m4/acinclude.m4 ---- octave-4.4.1/m4/acinclude.m4.sundials3 2018-08-09 12:20:32.000000000 -0600 -+++ octave-4.4.1/m4/acinclude.m4 2018-10-28 14:06:56.909293633 -0600 -@@ -2174,14 +2174,11 @@ dnl Check whether SUNDIALS IDA library i +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], [ @@ -330,7 +330,7 @@ diff -up octave-4.4.1/m4/acinclude.m4.sundials3 octave-4.4.1/m4/acinclude.m4 #endif #include ]], [[ -@@ -2197,61 +2194,72 @@ AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_R +@@ -2233,61 +2230,72 @@ AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_R fi ]) dnl @@ -436,9 +436,9 @@ diff -up octave-4.4.1/m4/acinclude.m4.sundials3 octave-4.4.1/m4/acinclude.m4 fi ]) dnl -diff -up octave-4.4.1/scripts/ode/ode15i.m.sundials3 octave-4.4.1/scripts/ode/ode15i.m ---- octave-4.4.1/scripts/ode/ode15i.m.sundials3 2018-08-09 12:20:32.000000000 -0600 -+++ octave-4.4.1/scripts/ode/ode15i.m 2018-10-28 14:06:56.909293633 -0600 +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); @@ -457,9 +457,9 @@ diff -up octave-4.4.1/scripts/ode/ode15i.m.sundials3 octave-4.4.1/scripts/ode/od %! DFDY = sparse ([-0.04, 1; %! 0.04, 1]); %! DFDYP = sparse ([-1, 0, 0; -diff -up octave-4.4.1/scripts/ode/ode15s.m.sundials3 octave-4.4.1/scripts/ode/ode15s.m ---- octave-4.4.1/scripts/ode/ode15s.m.sundials3 2018-08-09 12:20:32.000000000 -0600 -+++ octave-4.4.1/scripts/ode/ode15s.m 2018-10-28 14:06:56.910293641 -0600 +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); diff --git a/octave.spec b/octave.spec index d776a60..6f79ca5 100644 --- a/octave.spec +++ b/octave.spec @@ -1,12 +1,12 @@ # From src/version.h:#define OCTAVE_API_VERSION -%global octave_api api-v52 +%global octave_api api-v53 %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) %global builddocs 1 # Use Qt5 on F26+ -%if 0%{?fedora} >= 26 +%if 0%{?fedora} %bcond_without qt5 %else %bcond_with qt5 @@ -21,25 +21,19 @@ Name: octave Epoch: 6 -Version: 4.4.1 -Release: 5%{?relsuf}%{?dist} +Version: 5.1.0 +Release: 1%{?rcver:.rc%{rcver}}%{?dist} Summary: A high-level language for numerical computations License: GPLv3+ URL: http://www.octave.org -%if 0%{!?rcver:1} -Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.lz -%else -Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}%{rctag}.tar.lz -%endif +Source0: https://ftp.gnu.org/gnu/octave/octave-%{version}.tar.lz +#Source0: https://alpha.gnu.org/gnu/octave/octave-%{version}%{?rctag}.tar.lz # RPM macros for helping to build Octave packages Source1: macros.octave Source2: xorg.conf # Prebuilt docs from Fedora for EPEL -Source3: octave-4.4.1-docs.tar.gz -# Fix crash with Ctrl-D -# https://bugzilla.redhat.com/show_bug.cgi?id=1589460 -Patch0: octave-crash.patch +Source3: octave-5.1.0-docs.tar.lz # SUNDIALS 3 support # https://savannah.gnu.org/bugs/?52475 Patch1: octave-sundials3.patch @@ -75,11 +69,7 @@ BuildRequires: libappstream-glib %endif BuildRequires: arpack-devel -%if 0%{?fedora} >= 27 BuildRequires: openblas-devel -%else -BuildRequires: atlas-devel -%endif BuildRequires: bison BuildRequires: bzip2-devel BuildRequires: curl-devel @@ -186,13 +176,13 @@ C++, C, Fortran, or other languages. %package devel Summary: Development headers and files for Octave Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: readline-devel fftw-devel hdf5-devel zlib-devel -Requires: gcc-c++ gcc-gfortran -%if 0%{?fedora} >= 27 -Requires: openblas-devel -%else -Requires: atlas-devel -%endif +Requires: gcc-c++ +Requires: 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 @@ -209,17 +199,10 @@ This package contains documentation for Octave. %prep %setup -q -n %{name}-%{version}%{?rctag} -%patch0 -p1 -b .crash # EPEL7's autoconf/automake is too old so don't do # unneeded patches there %if 0%{?fedora} %patch1 -p1 -b .sundials3 - -# Remove unused fftpack -sed -i -e '/fftpack/d' liboctave/external/module.mk -rm -r liboctave/external/fftpack - -# Touching module.mk appears to trigger the need for this autoreconf -i %endif @@ -229,13 +212,6 @@ autoreconf -i export F77=gfortran # TODO: some items appear to be bundled in libcruft.. # 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} %global disabledocs --disable-docs %endif @@ -246,14 +222,13 @@ export JAVA_HOME=%{java_home} # --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 \ --enable-float-truncate \ %{?disabledocs} \ --disable-silent-rules \ -%if 0%{?fedora} < 27 - --with-blas="-L%{_libdir}/atlas %{atlasblaslib}" \ - --with-lapack="-L%{_libdir}/atlas %{atlaslapacklib}" \ -%endif --with-java-includedir=/usr/lib/jvm/java/include \ --with-java-libdir=$libjvm \ --with-qrupdate \ @@ -262,10 +237,10 @@ export CPPFLAGS=-I%{_includedir}/suitesparse --disable-jit # Check that octave_api is set correctly (autogenerated file) -make libinterp/version.h -if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' libinterp/version.h +make liboctave/version.h +if ! grep -q '^#define OCTAVE_API_VERSION "%{octave_api}"' liboctave/version.h then - echo "octave_api variable in spec does not match libinterp/version.h" + echo "octave_api variable in spec does not match liboctave/version.h" exit 1 fi @@ -381,7 +356,7 @@ fi $Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf :99 & sleep 2 export DISPLAY=:99 -make check +make check %{?el7:|| :} %ldconfig_scriptlets @@ -417,6 +392,8 @@ make check %{_bindir}/mkoctfile %{_bindir}/mkoctfile-%{version}%{?rctag} %{_includedir}/octave-%{version}%{?rctag}/ +%{_libdir}/pkgconfig/octave.pc +%{_libdir}/pkgconfig/octinterp.pc %{_mandir}/man1/mkoctfile.1.* %files doc diff --git a/sources b/sources index adf3a39..804aa6b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (octave-4.4.1.tar.lz) = 8fbc6d35ae2bcd14b5cd52c30f761c87940c25ad514984fdb4baa6c99d6d371cb76e07cc50b020eb19470348674b3cd7069ed0eb20010dc3826a6e78781c0fa0 -SHA512 (octave-4.4.1-docs.tar.gz) = e970d512bb036f5954e3b8c9ac246c1624e9964fa2aeadc0f84dac01cc37af7f8fe5e93329d11ccc9ae442bfbaa1625dd2a21bc157c99d0992f5e1feada6f620 +SHA512 (octave-5.1.0.tar.lz) = 34facc20ffceaead05e62e16cc70bd603919c7e52c7489faa17b5c969a160c655f50c4aeb41ecee2e2d0a6245cc3364cf9009ddd3cecb17b9e06bbdacaa0a516