diff --git a/macros.octave b/macros.octave index 531b7cd..76e4c13 100644 --- a/macros.octave +++ b/macros.octave @@ -11,7 +11,7 @@ %octpkglibdir %{octarchprefix}/%{octpkg}-%{version} # Run an octave command - quietly with no startup files -%octave_cmd() octave -H -q --no-site-file --eval "%*"; +%octave_cmd() octave -H -q --no-window-system --no-site-file --eval "%*"; # Build Source0 into a package tar file in a temporary location %octave_pkg_build %octave_cmd pkg build '-verbose' %{_tmppath}/%{name}-%{version}-%{release}.%{_arch} %{_builddir}/%{buildsubdir} diff --git a/octave-3.6.0-loadsave.patch b/octave-3.6.0-loadsave.patch new file mode 100644 index 0000000..925650f --- /dev/null +++ b/octave-3.6.0-loadsave.patch @@ -0,0 +1,24 @@ +diff --git a/src/load-save.cc b/src/load-save.cc +--- a/src/load-save.cc ++++ b/src/load-save.cc +@@ -649,7 +649,7 @@ + std::string orig_fname = ""; + + // Function called with Matlab-style ["filename", options] syntax +- if (argc > 1 && argv[1].at(0) != '-') ++ if (argc > 1 && ! argv[1].empty () && argv[1].at(0) != '-') + { + orig_fname = argv[1]; + i++; +diff --git a/test/test_io.m b/test/test_io.m +--- a/test/test_io.m ++++ b/test/test_io.m +@@ -227,6 +227,8 @@ + %! + %! delete matrix.ascii; + ++%!error load ("") ++ + %% FIXME: This test is disabled as it writes to stdout and there is no easy + %% way to recover output. Need to spawn new octave process and pipe stdout + %% somewhere to treat this case. diff --git a/octave.spec b/octave.spec index 353eea4..40523b3 100644 --- a/octave.spec +++ b/octave.spec @@ -1,18 +1,21 @@ # From src/version.h:#define OCTAVE_API_VERSION -%global octave_api api-v45+ +%global octave_api api-v48+ Name: octave -Version: 3.4.3 -Release: 3%{?dist} +Version: 3.6.0 +Release: 1%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.bz2 +# RPM macros for helping to build Octave packages Source1: macros.octave # https://savannah.gnu.org/bugs/index.php?32839 # Fix building packages from directories Patch2: octave-3.4.0-pkgbuilddir.patch +# Fix load-save +Patch3: octave-3.6.0-loadsave.patch URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -26,7 +29,7 @@ BuildRequires: suitesparse-devel glpk-devel gnuplot desktop-file-utils BuildRequires: GraphicsMagick-c++-devel fltk-devel ftgl-devel qrupdate-devel BuildRequires: tex(dvips) -Requires: gnuplot gnuplot-common less info texinfo +Requires: epstool gnuplot gnuplot-common less info texinfo Requires: hdf5 = %{_hdf5_version} Requires(post): info Requires(preun): info @@ -72,6 +75,7 @@ This package contains documentation for Octave. %prep %setup -q %patch2 -p1 -b .pkgbuilddir +%patch3 -p1 -b .loadsave # Check permissions find -name *.cc -exec chmod 644 {} \; @@ -96,8 +100,7 @@ then exit 1 fi -# smp builds failing as of 3.4.2 -make OCTAVE_RELEASE="Fedora %{version}-%{release}" +make OCTAVE_RELEASE="Fedora %{version}-%{release}" %{?_smp_mflags} %install rm -rf %{buildroot} @@ -243,6 +246,9 @@ fi %changelog +* Sun Jan 15 2012 Jussi Lehtola - 6:3.6.0-1 +- Update to 3.6.0. + * Fri Jan 13 2012 Fedora Release Engineering - 6:3.4.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild