diff --git a/.gitignore b/.gitignore index 2bef977..5f9c591 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,7 @@ octave-3.2.4.tar.bz2 /octave-3.6.2-rc2.tar.bz2 /octave-3.6.2.tar.bz2 /octave-3.6.3.tar.bz2 +/octave-3.6.4-rc0.tar.bz2 +/octave-3.6.4-rc1.tar.gz +/octave-3.6.4-rc2.tar.gz +/octave-3.6.4.tar.bz2 diff --git a/octave-sparse.patch b/octave-sparse.patch deleted file mode 100644 index a12038d..0000000 --- a/octave-sparse.patch +++ /dev/null @@ -1,171 +0,0 @@ - -# HG changeset patch -# User David Bateman -# Date 1337385561 -7200 -# Node ID f2e72944847b9ec7cec586faa4c72ea91eb53881 -# Parent 997e05334f71269f16017ceb06a52cf33feced18 -Ensure sparse constructors have valid ridx and data indices even if they are zero matrices (bug #36104) - -diff --git a/liboctave/Sparse.cc b/liboctave/Sparse.cc ---- a/liboctave/Sparse.cc -+++ b/liboctave/Sparse.cc -@@ -235,7 +235,7 @@ - (*current_liboctave_error_handler) - ("Sparse::Sparse (const dim_vector&): dimension mismatch"); - else -- rep = new typename Sparse::SparseRep (dv(0), dv(1)); -+ rep = new typename Sparse::SparseRep (dv(0), dv(1), 0); - } - - template -@@ -301,11 +301,10 @@ - (*current_liboctave_error_handler) - ("sparse: column index %d out of bound %d", r.extent (nc), nc); - -- rep = new SparseRep (nr, nc); -+ rep = new typename Sparse::SparseRep (nr, nc, (nzm > 0 ? nzm : 0)); - - dimensions = dim_vector (nr, nc); - -- - octave_idx_type n = a.numel (), rl = r.length (nr), cl = c.length (nc); - bool a_scalar = n == 1; - if (a_scalar) -@@ -324,6 +323,7 @@ - if (n == 1 && a(0) != T ()) - { - change_capacity (nzm > 1 ? nzm : 1); -+ xcidx(0) = 0; - xridx(0) = r(0); - xdata(0) = a(0); - for (octave_idx_type j = 0; j < nc; j++) -@@ -352,6 +352,7 @@ - new_nz += rd[i-1] != rd[i]; - // Allocate result. - change_capacity (nzm > new_nz ? nzm : new_nz); -+ xcidx (0) = 0; - xcidx (1) = new_nz; - octave_idx_type *rri = ridx (); - T *rrd = data (); -@@ -494,6 +495,7 @@ - new_nz += rd[i-1] != rd[i]; - // Allocate result. - change_capacity (nzm > new_nz ? nzm : new_nz); -+ xcidx(0) = 0; - xcidx(1) = new_nz; - octave_idx_type *rri = ridx (); - T *rrd = data (); - - -# HG changeset patch -# User John W. Eaton -# Date 1340304125 14400 -# Node ID 4663cc835c65873fe12b599bcab11ba4a8f5fb87 -# Parent f2e72944847b9ec7cec586faa4c72ea91eb53881 -Special-case removing rows or columns from empty sparse matrices - -* Sparse.cc (Sparse::delete_elements): Don't attempt to preserve - elements if nnz = 0; simply reshape if number of rows or columns is zero. - -diff --git a/liboctave/Sparse.cc b/liboctave/Sparse.cc ---- a/liboctave/Sparse.cc -+++ b/liboctave/Sparse.cc -@@ -1240,16 +1240,31 @@ - gripe_del_index_out_of_range (false, idx_j.extent (nc), nc); - else if (idx_j.is_cont_range (nc, lb, ub)) - { -- const Sparse tmp = *this; -- octave_idx_type lbi = tmp.cidx(lb), ubi = tmp.cidx(ub), new_nz = nz - (ubi - lbi); -- *this = Sparse (nr, nc - (ub - lb), new_nz); -- copy_or_memcpy (lbi, tmp.data (), data ()); -- copy_or_memcpy (lbi, tmp.ridx (), ridx ()); -- copy_or_memcpy (nz - ubi, tmp.data () + ubi, xdata () + lbi); -- copy_or_memcpy (nz - ubi, tmp.ridx () + ubi, xridx () + lbi); -- copy_or_memcpy (lb, tmp.cidx () + 1, cidx () + 1); -- mx_inline_sub (nc - ub, xcidx () + lb + 1, -- tmp.cidx () + ub + 1, ubi - lbi); -+ if (lb == 0 && ub == nc) -+ { -+ // Delete all rows and columns. -+ *this = Sparse (nr, 0); -+ } -+ else if (nz == 0) -+ { -+ // No elements to preserve; adjust dimensions. -+ *this = Sparse (nr, nc - (ub - lb)); -+ } -+ else -+ { -+ const Sparse tmp = *this; -+ octave_idx_type lbi = tmp.cidx(lb), ubi = tmp.cidx(ub), -+ new_nz = nz - (ubi - lbi); -+ -+ *this = Sparse (nr, nc - (ub - lb), new_nz); -+ copy_or_memcpy (lbi, tmp.data (), data ()); -+ copy_or_memcpy (lbi, tmp.ridx (), ridx ()); -+ copy_or_memcpy (nz - ubi, tmp.data () + ubi, xdata () + lbi); -+ copy_or_memcpy (nz - ubi, tmp.ridx () + ubi, xridx () + lbi); -+ copy_or_memcpy (lb, tmp.cidx () + 1, cidx () + 1); -+ mx_inline_sub (nc - ub, xcidx () + lb + 1, -+ tmp.cidx () + ub + 1, ubi - lbi); -+ } - } - else - *this = index (idx_i, idx_j.complement (nc)); -@@ -1262,24 +1277,40 @@ - gripe_del_index_out_of_range (false, idx_i.extent (nr), nr); - else if (idx_i.is_cont_range (nr, lb, ub)) - { -- // This is more memory-efficient than the approach below. -- const Sparse tmpl = index (idx_vector (0, lb), idx_j); -- const Sparse tmpu = index (idx_vector (ub, nr), idx_j); -- *this = Sparse (nr - (ub - lb), nc, tmpl.nnz () + tmpu.nnz ()); -- for (octave_idx_type j = 0, k = 0; j < nc; j++) -+ if (lb == 0 && ub == nr) - { -- for (octave_idx_type i = tmpl.cidx(j); i < tmpl.cidx(j+1); i++) -+ // Delete all rows and columns. -+ *this = Sparse (0, nc); -+ } -+ else if (nz == 0) -+ { -+ // No elements to preserve; adjust dimensions. -+ *this = Sparse (nr - (ub - lb), nc); -+ } -+ else -+ { -+ // This is more memory-efficient than the approach below. -+ const Sparse tmpl = index (idx_vector (0, lb), idx_j); -+ const Sparse tmpu = index (idx_vector (ub, nr), idx_j); -+ *this = Sparse (nr - (ub - lb), nc, -+ tmpl.nnz () + tmpu.nnz ()); -+ for (octave_idx_type j = 0, k = 0; j < nc; j++) - { -- xdata(k) = tmpl.data(i); -- xridx(k++) = tmpl.ridx(i); -+ for (octave_idx_type i = tmpl.cidx(j); i < tmpl.cidx(j+1); -+ i++) -+ { -+ xdata(k) = tmpl.data(i); -+ xridx(k++) = tmpl.ridx(i); -+ } -+ for (octave_idx_type i = tmpu.cidx(j); i < tmpu.cidx(j+1); -+ i++) -+ { -+ xdata(k) = tmpu.data(i); -+ xridx(k++) = tmpu.ridx(i) + lb; -+ } -+ -+ xcidx(j+1) = k; - } -- for (octave_idx_type i = tmpu.cidx(j); i < tmpu.cidx(j+1); i++) -- { -- xdata(k) = tmpu.data(i); -- xridx(k++) = tmpu.ridx(i) + lb; -- } -- -- xcidx(j+1) = k; - } - } - else - diff --git a/octave.spec b/octave.spec index be629d7..91f691f 100644 --- a/octave.spec +++ b/octave.spec @@ -2,14 +2,14 @@ %global octave_api api-v48+ # For rc versions, change release manually -#global rcver 2 +#global rcver %{nil} %if 0%{?rcver:1} %global rctag -rc%{?rcver} %endif Name: octave -Version: 3.6.3 -Release: 2%{?dist}.2 +Version: 3.6.4 +Release: 1%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering @@ -17,7 +17,7 @@ License: GPLv3+ %if 0%{!?rcver:1} Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.bz2 %else -Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}%{rctag}.tar.bz2 +Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}%{rctag}.tar.gz %endif # RPM macros for helping to build Octave packages Source1: macros.octave @@ -26,8 +26,6 @@ Patch1: octave-pkgbuilddeps.patch # https://savannah.gnu.org/bugs/index.php?32839 # Fix building packages from directories Patch2: octave-3.4.0-pkgbuilddir.patch -# Upstream patches to fix spase matrix handling -Patch3: octave-sparse.patch URL: http://www.octave.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -89,7 +87,6 @@ This package contains documentation for Octave. %setup -q -n %{name}-%{version}%{?rctag} %patch1 -p1 -b .pkgbuilddeps %patch2 -p1 -b .pkgbuilddir -%patch3 -p1 -b .sparse # Check permissions find -name *.cc -exec chmod 644 {} \; @@ -134,7 +131,7 @@ touch %{buildroot}%{_datadir}/%{name}/ls-R # Create desktop file rm %{buildroot}%{_datadir}/applications/www.octave.org-octave.desktop -desktop-file-install --vendor fedora --remove-category Development --add-category "Education" \ +desktop-file-install --remove-category Development --add-category "Education" \ --add-category "DataVisualization" --add-category "NumericalAnalysis" --add-category "Engineering" --add-category "Physics" \ --dir %{buildroot}%{_datadir}/applications doc/icons/octave.desktop @@ -235,7 +232,7 @@ fi %{_infodir}/liboctave.info* %{_infodir}/octave.info* %{_infodir}/OctaveFAQ.info* -%{_datadir}/applications/fedora-octave.desktop +%{_datadir}/applications/octave.desktop # octave_packages is %ghost, so need to list everything else separately %dir %{_datadir}/octave %{_datadir}/octave/%{version}%{?rctag}/ @@ -261,6 +258,10 @@ fi %changelog +* Sat Feb 23 2013 Orion Poplawski - 6:3.6.4-1 +- Update to 3.6.4 final +- Drop sparse patch applied upstream + * Fri Dec 21 2012 Orion Poplawski - 6:3.6.3-2.2 - Add patch to ignore deps when building packages for now (bug 733615) diff --git a/sources b/sources index bfa783a..5ac0302 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -29ab7e502e5c963c058906f788670245 octave-3.6.3.tar.bz2 +e0d3e5e3d38a66d3f8593ba065c6e2fd octave-3.6.4.tar.bz2