summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-01-19 15:06:57 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-01-19 15:06:57 +0000
commit6ea2f5e162d1d0e60a1f6b5f3f6404bfe9e3bc6b (patch)
treeeb3142b794049fd41fcecbc9385544907906c80c /sci-mathematics
parentStable for HPPA (bug #398947). (diff)
downloadgentoo-2-6ea2f5e162d1d0e60a1f6b5f3f6404bfe9e3bc6b.tar.gz
gentoo-2-6ea2f5e162d1d0e60a1f6b5f3f6404bfe9e3bc6b.tar.bz2
gentoo-2-6ea2f5e162d1d0e60a1f6b5f3f6404bfe9e3bc6b.zip
Version bump. Fixed configure option for imagemagick/graphicsmagick
(Portage version: 2.1.10.41/cvs/Linux x86_64)
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/octave/ChangeLog16
-rw-r--r--sci-mathematics/octave/files/octave-3.2.4-addpath.patch20
-rw-r--r--sci-mathematics/octave/files/octave-3.2.4-dlmread-speedup.patch258
-rw-r--r--sci-mathematics/octave/files/octave-3.2.4-filter-empty-vector.patch17
-rw-r--r--sci-mathematics/octave/files/octave-3.2.4-fltk-1.3.patch32
-rw-r--r--sci-mathematics/octave/files/octave-3.2.4-imshow.patch27
-rw-r--r--sci-mathematics/octave/files/octave-3.2.4-interp2.patch160
-rw-r--r--sci-mathematics/octave/files/octave-3.2.4-no-helvetica.patch25
-rw-r--r--sci-mathematics/octave/files/octave-3.2.4-normal-marker-size.patch25
-rw-r--r--sci-mathematics/octave/files/octave-3.4.0-curl-headers.patch12
-rw-r--r--sci-mathematics/octave/files/octave-3.4.0-fftshift.patch19
-rw-r--r--sci-mathematics/octave/files/octave-3.4.0-fltk.patch24
-rw-r--r--sci-mathematics/octave/files/octave-3.4.0-gcc46.patch24
-rw-r--r--sci-mathematics/octave/files/octave-3.4.3-help.patch13
-rw-r--r--sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch41
-rw-r--r--sci-mathematics/octave/octave-3.4.3-r1.ebuild28
-rw-r--r--sci-mathematics/octave/octave-3.6.0.ebuild108
17 files changed, 199 insertions, 650 deletions
diff --git a/sci-mathematics/octave/ChangeLog b/sci-mathematics/octave/ChangeLog
index 4aac4b130d97..aaf83b7e26e2 100644
--- a/sci-mathematics/octave/ChangeLog
+++ b/sci-mathematics/octave/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for sci-mathematics/octave
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/ChangeLog,v 1.110 2012/01/17 17:17:12 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/ChangeLog,v 1.111 2012/01/19 15:06:57 bicatali Exp $
+
+*octave-3.6.0 (19 Jan 2012)
+
+ 19 Jan 2012; Sébastien Fabbro <bicatali@gentoo.org>
+ -files/octave-3.2.4-addpath.patch, -files/octave-3.2.4-dlmread-speedup.patch,
+ -files/octave-3.2.4-filter-empty-vector.patch,
+ -files/octave-3.2.4-fltk-1.3.patch, -files/octave-3.2.4-imshow.patch,
+ -files/octave-3.2.4-interp2.patch, -files/octave-3.2.4-no-helvetica.patch,
+ -files/octave-3.2.4-normal-marker-size.patch,
+ -files/octave-3.4.0-curl-headers.patch, -files/octave-3.4.0-fftshift.patch,
+ -files/octave-3.4.0-fltk.patch, -files/octave-3.4.0-gcc46.patch,
+ octave-3.4.3-r1.ebuild, +files/octave-3.4.3-help.patch,
+ +files/octave-3.4.3-pkgbuilddir.patch, +octave-3.6.0.ebuild:
+ Version bump. Fixed configure option for imagemagick/graphicsmagick
17 Jan 2012; Kacper Kowalik <xarthisius@gentoo.org> octave-3.4.3-r1.ebuild:
Add prefix keywords
diff --git a/sci-mathematics/octave/files/octave-3.2.4-addpath.patch b/sci-mathematics/octave/files/octave-3.2.4-addpath.patch
deleted file mode 100644
index c3b208b764d1..000000000000
--- a/sci-mathematics/octave/files/octave-3.2.4-addpath.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From: "Thomas Weber" <tweber@debian.org>
-Subject: Don't crash on calling addpath('./')
-Description: Octave 3.2 crashes when calling something like
- echo "addpath('./'); addpath('./')" | octave
- This patch originates from a larger patch from upstreams's development version.
-Origin: partly upstream, http://hg.savannah.gnu.org/hgweb/octave/rev/4acae5e46738
-Bug-Debian: http://bugs.debian.org/592517
-Applied-Upstream: http://hg.savannah.gnu.org/hgweb/octave/rev/4acae5e46738
-
---- a/src/load-path.cc
-+++ b/src/load-path.cc
-@@ -653,8 +653,6 @@
-
- if (i != dir_info_list.end ())
- move (i, false);
-- else
-- panic_impossible ();
- }
-
- void
diff --git a/sci-mathematics/octave/files/octave-3.2.4-dlmread-speedup.patch b/sci-mathematics/octave/files/octave-3.2.4-dlmread-speedup.patch
deleted file mode 100644
index 3379a3de8f75..000000000000
--- a/sci-mathematics/octave/files/octave-3.2.4-dlmread-speedup.patch
+++ /dev/null
@@ -1,258 +0,0 @@
---- src/DLD-FUNCTIONS/dlmread.cc.orig 2010-09-07 14:41:40.991671995 +0200
-+++ src/DLD-FUNCTIONS/dlmread.cc 2010-09-07 14:50:50.715672000 +0200
-@@ -1,6 +1,7 @@
- /*
-
- Copyright (C) 2008, 2009 Jonathan Stickel
-+Copyright (C) 2010 Jaroslav Hajek
-
- This file is part of Octave.
-
-@@ -29,6 +30,7 @@
-
- #include <cctype>
- #include <fstream>
-+#include <limits>
-
- #include "file-ops.h"
- #include "lo-ieee.h"
-@@ -38,8 +40,10 @@
- #include "oct-obj.h"
- #include "utils.h"
-
-+static const octave_idx_type idx_max = std::numeric_limits<octave_idx_type>::max ();
-+
- static bool
--read_cell_spec (std::istream& is, unsigned long& row, unsigned long& col)
-+read_cell_spec (std::istream& is, octave_idx_type& row, octave_idx_type& col)
- {
- bool stat = false;
-
-@@ -75,8 +79,8 @@
-
- static bool
- parse_range_spec (const octave_value& range_spec,
-- unsigned long& rlo, unsigned long& clo,
-- unsigned long& rup, unsigned long& cup)
-+ octave_idx_type& rlo, octave_idx_type& clo,
-+ octave_idx_type& rup, octave_idx_type& cup)
- {
- bool stat = true;
-
-@@ -115,8 +119,8 @@
- stat = false;
- }
-
-- rup = ULONG_MAX - 1;
-- cup = ULONG_MAX - 1;
-+ rup = idx_max - 1;
-+ cup = idx_max - 1;
- }
- else
- {
-@@ -138,10 +142,10 @@
- {
- ColumnVector range(range_spec.vector_value ());
- // double --> unsigned int
-- rlo = static_cast<unsigned long> (range(0));
-- clo = static_cast<unsigned long> (range(1));
-- rup = static_cast<unsigned long> (range(2));
-- cup = static_cast<unsigned long> (range(3));
-+ rlo = static_cast<octave_idx_type> (range(0));
-+ clo = static_cast<octave_idx_type> (range(1));
-+ rup = static_cast<octave_idx_type> (range(2));
-+ cup = static_cast<octave_idx_type> (range(3));
- }
- else
- stat = false;
-@@ -211,7 +215,7 @@
- }
-
- // Take a subset if a range was given.
-- unsigned long r0 = 0, c0 = 0, r1 = ULONG_MAX-1, c1 = ULONG_MAX-1;
-+ octave_idx_type r0 = 0, c0 = 0, r1 = idx_max-1, c1 = idx_max-1;
- if (nargin > 2)
- {
- if (nargin == 3)
-@@ -221,17 +225,20 @@
- }
- else if (nargin == 4)
- {
-- r0 = args(2).ulong_value ();
-- c0 = args(3).ulong_value ();
-+ r0 = args(2).idx_type_value ();
-+ c0 = args(3).idx_type_value ();
-
- if (error_state)
- return retval;
- }
-+
-+ if (r0 < 0 || c0 < 0)
-+ error ("dlmread: left & top must not be negative");
- }
-
- if (!error_state)
- {
-- unsigned long i = 0, j = 0, r = 1, c = 1, rmax = 0, cmax = 0;
-+ octave_idx_type i = 0, j = 0, r = 1, c = 1, rmax = 0, cmax = 0;
-
- Matrix rdata;
- ComplexMatrix cdata;
-@@ -239,15 +246,17 @@
- bool iscmplx = false;
- bool sepflag = false;
-
-- unsigned long maxrows = r1 - r0;
-+ octave_idx_type maxrows = r1 - r0;
-
- std::string line;
-
- // Skip the r0 leading lines as these might be a header.
-- for (unsigned long m = 0; m < r0; m++)
-+ for (octave_idx_type m = 0; m < r0; m++)
- getline (file, line);
- r1 -= r0;
-
-+ std::istringstream tmp_stream;
-+
- // Read in the data one field at a time, growing the data matrix
- // as needed.
- while (getline (file, line))
-@@ -286,11 +295,47 @@
- }
- }
-
-+ if (cmax == 0)
-+ {
-+ // Try to estimate the number of columns.
-+ size_t pos1 = 0;
-+ do
-+ {
-+ size_t pos2 = line.find_first_of (sep, pos1);
-+
-+ if (sepflag && pos2 != std::string::npos)
-+ // Treat consecutive separators as one.
-+ {
-+ pos2 = line.find_first_not_of (sep, pos2);
-+ if (pos2 != std::string::npos)
-+ pos2 -= 1;
-+ else
-+ pos2 = line.length () - 1;
-+ }
-+
-+ cmax++;
-+
-+ if (pos2 != std::string::npos)
-+ pos1 = pos2 + 1;
-+ else
-+ pos1 = std::string::npos;
-+
-+ }
-+ while (pos1 != std::string::npos);
-+
-+ if (iscmplx)
-+ cdata.resize (rmax, cmax);
-+ else
-+ rdata.resize (rmax, cmax);
-+ }
-+
- r = (r > i + 1 ? r : i + 1);
- j = 0;
- size_t pos1 = 0;
- do
- {
-+ OCTAVE_QUIT;
-+
- size_t pos2 = line.find_first_of (sep, pos1);
- std::string str = line.substr (pos1, pos2 - pos1);
-
-@@ -303,23 +348,35 @@
- {
- // Use resize_and_fill for the case of not-equal
- // length rows.
-+ rmax = 2*r;
-+ cmax = c;
- if (iscmplx)
-- cdata.resize_fill (r, c, 0);
-+ cdata.resize (rmax, cmax);
- else
-- rdata.resize_fill (r, c, 0);
-- rmax = r;
-- cmax = c;
-+ rdata.resize (rmax, cmax);
- }
-
-- std::istringstream tmp_stream (str);
-+ tmp_stream.str (str);
-+ tmp_stream.clear ();
-+
- double x = octave_read_double (tmp_stream);
- if (tmp_stream)
- {
- if (tmp_stream.eof ())
-- if (iscmplx)
-- cdata(i,j++) = x;
-- else
-- rdata(i,j++) = x;
-+ {
-+ if (iscmplx)
-+ cdata(i,j++) = x;
-+ else
-+ rdata(i,j++) = x;
-+ }
-+ else if (std::toupper (tmp_stream.peek ()) == 'I')
-+ {
-+ // This is to allow pure imaginary numbers.
-+ if (iscmplx)
-+ cdata(i,j++) = x;
-+ else
-+ rdata(i,j++) = x;
-+ }
- else
- {
- double y = octave_read_double (tmp_stream);
-@@ -355,35 +412,16 @@
- i++;
- }
-
-- if (nargin > 2)
-- {
-- if (nargin == 3)
-- {
-- if (r1 >= r)
-- r1 = r - 1;
-- if (c1 >= c)
-- c1 = c - 1;
-- }
-- else if (nargin == 4)
-- {
-- // If r1 and c1 are not given, use what was found to be
-- // the maximum.
-- r1 = r - 1;
-- c1 = c - 1;
-- }
-+ if (r1 >= r)
-+ r1 = r - 1;
-+ if (c1 >= c)
-+ c1 = c - 1;
-
-- // Now take the subset of the matrix.
-- if (iscmplx)
-- {
-- cdata = cdata.extract (0, c0, r1, c1);
-- cdata.resize (r1 + 1, c1 - c0 + 1);
-- }
-- else
-- {
-- rdata = rdata.extract (0, c0, r1, c1);
-- rdata.resize (r1 + 1, c1 - c0 + 1);
-- }
-- }
-+ // Now take the subset of the matrix.
-+ if (iscmplx)
-+ cdata = cdata.extract (0, c0, r1, c1);
-+ else
-+ rdata = rdata.extract (0, c0, r1, c1);
-
- if (iscmplx)
- retval(0) = cdata;
diff --git a/sci-mathematics/octave/files/octave-3.2.4-filter-empty-vector.patch b/sci-mathematics/octave/files/octave-3.2.4-filter-empty-vector.patch
deleted file mode 100644
index f6cace5b15e3..000000000000
--- a/sci-mathematics/octave/files/octave-3.2.4-filter-empty-vector.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-From: "John W. Eaton" <jwe@octave.org>
-Subject: Don't crash on filtering an empty vector
-Origin: upstream, http://hg.savannah.gnu.org/hgweb/octave/rev/a277ba5da4dc
-Bug-Debian: http://bugs.debian.org/567975
-
---- a/src/DLD-FUNCTIONS/filter.cc
-+++ b/src/DLD-FUNCTIONS/filter.cc
-@@ -117,6 +117,9 @@
- }
- }
-
-+ if (x_len == 0)
-+ return x;
-+
- if (norm != static_cast<T>(1.0))
- {
- a = a / norm;
diff --git a/sci-mathematics/octave/files/octave-3.2.4-fltk-1.3.patch b/sci-mathematics/octave/files/octave-3.2.4-fltk-1.3.patch
deleted file mode 100644
index 59177a95bc28..000000000000
--- a/sci-mathematics/octave/files/octave-3.2.4-fltk-1.3.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -urN octave-3.2.4/src/DLD-FUNCTIONS/fltk_backend.cc octave-3.2.4_new/src/DLD-FUNCTIONS/fltk_backend.cc
---- octave-3.2.4/src/DLD-FUNCTIONS/fltk_backend.cc 2009-05-25 10:05:00.000000000 +0400
-+++ octave-3.2.4_new/src/DLD-FUNCTIONS/fltk_backend.cc 2010-06-30 12:23:38.000000000 +0400
-@@ -40,6 +40,14 @@
- #include <sstream>
- #include <iostream>
-
-+#include "cmd-edit.h"
-+#include "defun-dld.h"
-+#include "error.h"
-+#include "gl-render.h"
-+#include "graphics.h"
-+#include "parse.h"
-+#include "variables.h"
-+
- #include <FL/Fl.H>
- #include <FL/Fl_Window.H>
- #include <FL/Fl_Output.H>
-@@ -54,13 +62,6 @@
- #undef max
- #endif
-
--#include "cmd-edit.h"
--#include "defun-dld.h"
--#include "error.h"
--#include "gl-render.h"
--#include "graphics.h"
--#include "parse.h"
--#include "variables.h"
-
- #define FLTK_BACKEND_NAME "fltk"
-
diff --git a/sci-mathematics/octave/files/octave-3.2.4-imshow.patch b/sci-mathematics/octave/files/octave-3.2.4-imshow.patch
deleted file mode 100644
index 5b94e2589947..000000000000
--- a/sci-mathematics/octave/files/octave-3.2.4-imshow.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Rik <octave@nomad.inbox5.com>
-Subject: Scale image point color according to colormap.
-
-Origin: upstream, http://hg.savannah.gnu.org/hgweb/octave/rev/bc4eb29e0cb4
-Bug: http://savannah.gnu.org/bugs/?29926
-Bug-Debian: http://bugs.debian.org/581998
-
---- a/scripts/image/imshow.m
-+++ b/scripts/image/imshow.m
-@@ -64,7 +64,6 @@
-
- ## Get the image.
- if (ischar (im))
-- ## Eventually, this should be imread.
- [im, map] = imread (im);
- indexed = true;
- colormap (map);
-@@ -163,7 +162,8 @@
- if (true_color || indexed)
- tmp = image ([], [], im);
- else
-- tmp = image (round ((rows (colormap ()) - 1) * im));
-+ tmp = image (im);
-+ set (tmp, "cdatamapping", "scaled");
- endif
- set (gca (), "visible", "off");
- axis ("image");
diff --git a/sci-mathematics/octave/files/octave-3.2.4-interp2.patch b/sci-mathematics/octave/files/octave-3.2.4-interp2.patch
deleted file mode 100644
index dae7db50ec7e..000000000000
--- a/sci-mathematics/octave/files/octave-3.2.4-interp2.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From: various upstream authors authors
-Description: Implement bicubic interpolation correctly
- This patch fixes a bug triggered by octave-image's test suite.
-
-Origin: upstream, http://hg.savannah.gnu.org/hgweb/octave/file/62bb59f927b1/scripts/general/interp2.m
-Bug-Debian: http://bugs.debian.org/582276
-
---- a/scripts/general/interp2.m
-+++ b/scripts/general/interp2.m
-@@ -57,7 +57,7 @@
- ## @item 'linear'
- ## Linear interpolation from nearest neighbors.
- ## @item 'pchip'
--## Piece-wise cubic hermite interpolating polynomial (not implemented yet).
-+## Piece-wise cubic hermite interpolating polynomial.
- ## @item 'cubic'
- ## Cubic interpolation from four nearest neighbors.
- ## @item 'spline'
-@@ -218,18 +218,21 @@
- c = Z(2:zr, 1:(zc - 1)) - a;
- d = Z(2:zr, 2:zc) - a - b - c;
-
-- idx = sub2ind (size (a), yidx, xidx);
--
- ## scale XI, YI values to a 1-spaced grid
-- Xsc = (XI - X(xidx)) ./ (X(xidx + 1) - X(xidx));
-- Ysc = (YI - Y(yidx)) ./ (Y(yidx + 1) - Y(yidx));
-+ Xsc = (XI - X(xidx)) ./ (diff (X)(xidx));
-+ Ysc = (YI - Y(yidx)) ./ (diff (Y)(yidx));
-+
-+ ## Get 2D index.
-+ idx = sub2ind (size (a), yidx, xidx);
-+ ## We can dispose of the 1D indices at this point to save memory.
-+ clear xidx yidx
-
- ## apply plane equation
- ZI = a(idx) + b(idx).*Xsc + c(idx).*Ysc + d(idx).*Xsc.*Ysc;
-
- elseif (strcmp (method, "nearest"))
-- ii = (XI - X(xidx) > X(xidx + 1) - XI);
-- jj = (YI - Y(yidx) > Y(yidx + 1) - YI);
-+ ii = (XI - X(xidx) >= X(xidx + 1) - XI);
-+ jj = (YI - Y(yidx) >= Y(yidx + 1) - YI);
- idx = sub2ind (size (Z), yidx+jj, xidx+ii);
- ZI = Z(idx);
-
-@@ -339,11 +342,64 @@
-
- ## FIXME bicubic/__splinen__ don't handle arbitrary XI, YI
- if (strcmp (method, "cubic"))
-- ZI = bicubic (X, Y, Z, XI(1,:), YI(:,1), extrapval);
-+ if (isgriddata (XI) && isgriddata (YI'))
-+ ZI = bicubic (X, Y, Z, XI (1, :), YI (:, 1), extrapval);
-+ elseif (isgriddata (X) && isgriddata (Y'))
-+ ## Allocate output
-+ ZI = zeros (size (X));
-+
-+ ## Find inliers
-+ inside = !(XI < X (1) | XI > X (end) | YI < Y (1) | YI > Y (end));
-+
-+ ## Scale XI and YI to match indices of Z
-+ XI = (columns (Z) - 1) * (XI - X (1)) / (X (end) - X (1)) + 1;
-+ YI = (rows (Z) - 1) * (YI - Y (1)) / (Y (end) - Y (1)) + 1;
-+
-+ ## Start the real work
-+ K = floor (XI);
-+ L = floor (YI);
-+
-+ ## Coefficients
-+ AY1 = bc ((YI - L + 1));
-+ AX1 = bc ((XI - K + 1));
-+ AY0 = bc ((YI - L + 0));
-+ AX0 = bc ((XI - K + 0));
-+ AY_1 = bc ((YI - L - 1));
-+ AX_1 = bc ((XI - K - 1));
-+ AY_2 = bc ((YI - L - 2));
-+ AX_2 = bc ((XI - K - 2));
-+
-+ ## Perform interpolation
-+ sz = size(Z);
-+ ZI = AY_2 .* AX_2 .* Z (sym_sub2ind (sz, L+2, K+2)) ...
-+ + AY_2 .* AX_1 .* Z (sym_sub2ind (sz, L+2, K+1)) ...
-+ + AY_2 .* AX0 .* Z (sym_sub2ind (sz, L+2, K)) ...
-+ + AY_2 .* AX1 .* Z (sym_sub2ind (sz, L+2, K-1)) ...
-+ + AY_1 .* AX_2 .* Z (sym_sub2ind (sz, L+1, K+2)) ...
-+ + AY_1 .* AX_1 .* Z (sym_sub2ind (sz, L+1, K+1)) ...
-+ + AY_1 .* AX0 .* Z (sym_sub2ind (sz, L+1, K)) ...
-+ + AY_1 .* AX1 .* Z (sym_sub2ind (sz, L+1, K-1)) ...
-+ + AY0 .* AX_2 .* Z (sym_sub2ind (sz, L, K+2)) ...
-+ + AY0 .* AX_1 .* Z (sym_sub2ind (sz, L, K+1)) ...
-+ + AY0 .* AX0 .* Z (sym_sub2ind (sz, L, K)) ...
-+ + AY0 .* AX1 .* Z (sym_sub2ind (sz, L, K-1)) ...
-+ + AY1 .* AX_2 .* Z (sym_sub2ind (sz, L-1, K+2)) ...
-+ + AY1 .* AX_1 .* Z (sym_sub2ind (sz, L-1, K+1)) ...
-+ + AY1 .* AX0 .* Z (sym_sub2ind (sz, L-1, K)) ...
-+ + AY1 .* AX1 .* Z (sym_sub2ind (sz, L-1, K-1));
-+ ZI (!inside) = extrapval;
-+
-+ else
-+ error ("interp2: input data must have `meshgrid' format");
-+ endif
-
- elseif (strcmp (method, "spline"))
-- ZI = __splinen__ ({Y(:,1).', X(1,:)}, Z, {YI(:,1), XI(1,:)}, extrapval,
-+ if (isgriddata (XI) && isgriddata (YI'))
-+ ZI = __splinen__ ({Y(:,1).', X(1,:)}, Z, {YI(:,1), XI(1,:)}, extrapval,
- "spline");
-+ else
-+ error ("interp2: input data must have `meshgrid' format");
-+ endif
- else
- error ("interpolation method not recognized");
- endif
-@@ -351,6 +407,38 @@
- endif
- endfunction
-
-+function b = isgriddata (X)
-+ d1 = diff (X, 1, 1);
-+ d2 = diff (X, 1, 2);
-+ b = all (d1 (:) == 0) & all (d2 (:) == d2 (1));
-+endfunction
-+
-+## Compute the bicubic interpolation coefficients
-+function o = bc(x)
-+ x = abs(x);
-+ o = zeros(size(x));
-+ idx1 = (x < 1);
-+ idx2 = !idx1 & (x < 2);
-+ o(idx1) = 1 - 2.*x(idx1).^2 + x(idx1).^3;
-+ o(idx2) = 4 - 8.*x(idx2) + 5.*x(idx2).^2 - x(idx2).^3;
-+endfunction
-+
-+## This version of sub2ind behaves as if the data was symmetrically padded
-+function ind = sym_sub2ind(sz, Y, X)
-+ Y (Y < 1) = 1 - Y (Y < 1);
-+ while (any (Y (:) > 2 * sz (1)))
-+ Y (Y > 2 * sz (1)) = round (Y (Y > 2 * sz (1)) / 2);
-+ endwhile
-+ Y (Y > sz (1)) = 1 + 2 * sz (1) - Y (Y > sz (1));
-+ X (X < 1) = 1 - X (X < 1);
-+ while (any (X (:) > 2 * sz (2)))
-+ X (X > 2 * sz (2)) = round (X (X > 2 * sz (2)) / 2);
-+ endwhile
-+ X (X > sz (2)) = 1 + 2 * sz (2) - X (X > sz (2));
-+ ind = sub2ind(sz, Y, X);
-+endfunction
-+
-+
- %!demo
- %! A=[13,-1,12;5,4,3;1,6,2];
- %! x=[0,1,4]; y=[10,11,12];
-@@ -493,3 +581,7 @@
- %! assert(interp2(x,y,A,x,y,'linear'), A);
- %! assert(interp2(x,y,A,x,y,'nearest'), A);
-
-+%!test % for Matlab-compatible rounding for 'nearest'
-+%! X = meshgrid (1:4);
-+%! assert (interp2 (X, 2.5, 2.5, 'nearest'), 3);
-+
diff --git a/sci-mathematics/octave/files/octave-3.2.4-no-helvetica.patch b/sci-mathematics/octave/files/octave-3.2.4-no-helvetica.patch
deleted file mode 100644
index 62297c9806f3..000000000000
--- a/sci-mathematics/octave/files/octave-3.2.4-no-helvetica.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Don't set Helvetica as default font, it's not available as TrueType
-font. Fixes Bug#477688.
-
- -- Rafael Laboissiere <rafael@debian.org> Sat, 19 Jul 2008 10:27:26 +0200
-
---- a/scripts/plot/__go_draw_axes__.m
-+++ b/scripts/plot/__go_draw_axes__.m
-@@ -1751,7 +1751,7 @@
-
- function [f, s, fnt, it, bld] = get_fontname_and_size (t)
- if (isempty (t.fontname))
-- fnt = "Helvetica";
-+ fnt = "*";
- else
- fnt = t.fontname;
- endif
-@@ -1789,7 +1789,7 @@
- if (strcmp (fld, "string"))
- [f, s, fnt, it, bld] = get_fontname_and_size (obj);
- else
-- f = "Helvetica";
-+ f = "*";
- s = 10;
- fnt = f;
- it = false;
diff --git a/sci-mathematics/octave/files/octave-3.2.4-normal-marker-size.patch b/sci-mathematics/octave/files/octave-3.2.4-normal-marker-size.patch
deleted file mode 100644
index b263498b2afe..000000000000
--- a/sci-mathematics/octave/files/octave-3.2.4-normal-marker-size.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Revert the symbol markers in plots to their normal size. Thanks to
-Francesco Potorti for the patch.
-
- -- Rafael Laboissiere <rafael@debian.org> Tue, 24 Feb 2009 11:40:01 +0100
-
---- a/scripts/plot/__go_draw_axes__.m
-+++ b/scripts/plot/__go_draw_axes__.m
-@@ -689,7 +689,7 @@
- usingclause{data_idx} = sprintf ("record=%d", numel (obj.xdata));
-
- if (isfield (obj, "markersize"))
-- mdat = obj.markersize / 3;
-+ mdat = obj.markersize / 6;
- endif
-
- if (isfield (obj, "edgecolor"))
-@@ -1471,7 +1471,7 @@
- endif
-
- if (isfield (obj, "markersize"))
-- fprintf (plot_stream, " pointsize %f", obj.markersize / 3);
-+ fprintf (plot_stream, " pointsize %f", obj.markersize / 6);
- found_style = true;
- endif
- else
diff --git a/sci-mathematics/octave/files/octave-3.4.0-curl-headers.patch b/sci-mathematics/octave/files/octave-3.4.0-curl-headers.patch
deleted file mode 100644
index b9e0ae6b51b7..000000000000
--- a/sci-mathematics/octave/files/octave-3.4.0-curl-headers.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/src/DLD-FUNCTIONS/urlwrite.cc b/src/DLD-FUNCTIONS/urlwrite.cc
-index 83927b1..8c41d38 100644
---- a/src/DLD-FUNCTIONS/urlwrite.cc
-+++ b/src/DLD-FUNCTIONS/urlwrite.cc
-@@ -52,7 +52,6 @@ along with Octave; see the file COPYING. If not, see
-
- #include <curl/curl.h>
- #include <curl/curlver.h>
--#include <curl/types.h>
- #include <curl/easy.h>
-
- static int
diff --git a/sci-mathematics/octave/files/octave-3.4.0-fftshift.patch b/sci-mathematics/octave/files/octave-3.4.0-fftshift.patch
deleted file mode 100644
index bf163dede1d2..000000000000
--- a/sci-mathematics/octave/files/octave-3.4.0-fftshift.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Reference: http://hg.savannah.gnu.org/hgweb/octave/rev/189baf055143
-
-diff -r e4dbfe3019b1 -r 189baf055143 scripts/signal/fftshift.m
---- a/scripts/signal/fftshift.m Sat Feb 19 18:21:58 2011 -0800
-+++ b/scripts/signal/fftshift.m Sun Feb 20 17:53:41 2011 -0800
-@@ -65,9 +65,9 @@
- retval = x(idx{:});
- else
- if (isvector (x))
-- x = length (x);
-- xx = ceil (x/2);
-- retval = x([xx+1:x, 1:xx]);
-+ xl = length (x);
-+ xx = ceil (xl/2);
-+ retval = x([xx+1:xl, 1:xx]);
- elseif (ismatrix (x))
- nd = ndims (x);
- sz = size (x);
-
diff --git a/sci-mathematics/octave/files/octave-3.4.0-fltk.patch b/sci-mathematics/octave/files/octave-3.4.0-fltk.patch
deleted file mode 100644
index eff3642542c6..000000000000
--- a/sci-mathematics/octave/files/octave-3.4.0-fltk.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -up octave-3.4.0/src/DLD-FUNCTIONS/__fltk_uigetfile__.cc.fltk octave-3.4.0/src/DLD-FUNCTIONS/__fltk_uigetfile__.cc
---- octave-3.4.0/src/DLD-FUNCTIONS/__fltk_uigetfile__.cc.fltk 2011-02-08 03:00:52.000000000 -0700
-+++ octave-3.4.0/src/DLD-FUNCTIONS/__fltk_uigetfile__.cc 2011-05-26 14:09:51.277484258 -0600
-@@ -27,7 +27,7 @@ along with Octave; see the file COPYING.
- #if defined (HAVE_FLTK)
-
- #include <FL/Fl.H>
--#include <Fl/Fl_File_Chooser.H>
-+#include <FL/Fl_File_Chooser.H>
-
- // FLTK headers may include X11/X.h which defines Complex, and that
- // conflicts with Octave's Complex typedef. We don't need the X11
-diff -up octave-3.4.0/src/DLD-FUNCTIONS/__init_fltk__.cc.fltk octave-3.4.0/src/DLD-FUNCTIONS/__init_fltk__.cc
---- octave-3.4.0/src/DLD-FUNCTIONS/__init_fltk__.cc.fltk 2011-05-26 14:10:40.447667595 -0600
-+++ octave-3.4.0/src/DLD-FUNCTIONS/__init_fltk__.cc 2011-05-26 14:10:14.456627808 -0600
-@@ -44,7 +44,7 @@ To initialize:
- #include <FL/Fl_Box.H>
- #include <FL/Fl_Button.H>
- #include <FL/Fl_Choice.H>
--#include <Fl/Fl_File_Chooser.H>
-+#include <FL/Fl_File_Chooser.H>
- #include <FL/Fl_Gl_Window.H>
- #include <FL/Fl_Menu_Bar.H>
- #include <FL/Fl_Menu_Button.H>
diff --git a/sci-mathematics/octave/files/octave-3.4.0-gcc46.patch b/sci-mathematics/octave/files/octave-3.4.0-gcc46.patch
deleted file mode 100644
index c174204acedb..000000000000
--- a/sci-mathematics/octave/files/octave-3.4.0-gcc46.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -up octave-3.4.0/liboctave/oct-alloc.h.gcc46 octave-3.4.0/liboctave/oct-alloc.h
---- octave-3.4.0/liboctave/oct-alloc.h.gcc46 2011-02-08 03:00:51.000000000 -0700
-+++ octave-3.4.0/liboctave/oct-alloc.h 2011-02-08 09:41:23.984081687 -0700
-@@ -23,6 +23,8 @@ along with Octave; see the file COPYING.
- #if !defined (octave_oct_alloc_h)
- #define octave_oct_alloc_h 1
-
-+#include <cstddef>
-+
- class
- OCTAVE_API
- octave_allocator
-diff -up octave-3.4.0/src/pr-output.cc.gcc46 octave-3.4.0/src/pr-output.cc
---- octave-3.4.0/src/pr-output.cc.gcc46 2011-02-08 03:00:52.000000000 -0700
-+++ octave-3.4.0/src/pr-output.cc 2011-02-08 09:55:16.149662744 -0700
-@@ -3024,7 +3024,7 @@ abs (T x)
- }
-
- #define INSTANTIATE_ABS(T) \
-- template /* static */ inline T abs (T)
-+ template /* static */ T abs (T)
-
- INSTANTIATE_ABS(signed char);
- INSTANTIATE_ABS(short);
diff --git a/sci-mathematics/octave/files/octave-3.4.3-help.patch b/sci-mathematics/octave/files/octave-3.4.3-help.patch
new file mode 100644
index 000000000000..c0e693abc4a2
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.4.3-help.patch
@@ -0,0 +1,13 @@
+Help parallel compilation
+patch by Sebastien Fabbro
+--- scripts/Makefile.am.orig 2011-06-09 22:27:22.688268651 +0100
++++ scripts/Makefile.am 2011-02-08 10:00:51.000000000 +0000
+@@ -316,7 +316,7 @@
+
+ gethelp_SOURCES = gethelp.cc
+
+-.DOCSTRINGS: $(FCN_FILES) $(GEN_FCN_FILES) mkdoc $(gethelp_SOURCES) Makefile
++.DOCSTRINGS: $(FCN_FILES) $(GEN_FCN_FILES) mkdoc $(gethelp_SOURCES) Makefile gethelp
+ @$(MAKE) $(AM_MAKEFLAGS) gethelp$(BUILD_EXEEXT)
+ if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/DOCSTRINGS ] && [ ! -f DOCSTRINGS ]; then \
+ cp $(srcdir)/DOCSTRINGS DOCSTRINGS; \
diff --git a/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch b/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch
new file mode 100644
index 000000000000..895fa4932a12
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch
@@ -0,0 +1,41 @@
+--- scripts/pkg/pkg.m.orig 2011-02-08 03:00:51.000000000 -0700
++++ scripts/pkg/pkg.m 2011-03-18 09:31:24.670165643 -0600
+@@ -644,7 +644,14 @@
+ 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"))
++ if (tgz(1) == '/')
++ packdir = tgz;
++ else
++ packdir = fullfile (pwd(), tgz);
++ endif
++ elseif (exist (tgz, "file"))
+ ## Create a temporary directory.
+ tmpdir = tmpnam ();
+ tmpdirs{end+1} = tmpdir;
+@@ -671,20 +678,12 @@
+ if (length (dirlist) > 3)
+ error ("bundles of packages are not allowed");
+ endif
+- endif
+
+- ## The filename pointed to an uncompressed package to begin with.
+- if (exist (tgz, "dir"))
+- dirlist = {".", "..", tgz};
++ ## The two first entries of dirlist are "." and "..".
++ packdir = fullfile (tmpdir, dirlist{3});
+ endif
+
+ if (exist (tgz, "file") || exist (tgz, "dir"))
+- ## The two first entries of dirlist are "." and "..".
+- if (exist (tgz, "file"))
+- packdir = fullfile (tmpdir, dirlist{3});
+- else
+- packdir = fullfile (pwd(), dirlist{3});
+- endif
+ packdirs{end+1} = packdir;
+
+ ## Make sure the package contains necessary files.
diff --git a/sci-mathematics/octave/octave-3.4.3-r1.ebuild b/sci-mathematics/octave/octave-3.4.3-r1.ebuild
index 559671233f4b..906d5112fad0 100644
--- a/sci-mathematics/octave/octave-3.4.3-r1.ebuild
+++ b/sci-mathematics/octave/octave-3.4.3-r1.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/octave-3.4.3-r1.ebuild,v 1.2 2012/01/17 17:17:12 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/octave-3.4.3-r1.ebuild,v 1.3 2012/01/19 15:06:57 bicatali Exp $
EAPI=4
-inherit eutils base autotools
+inherit eutils base autotools toolchain-funcs
DESCRIPTION="High-level interactive language for numerical computations"
LICENSE="GPL-3"
@@ -11,7 +11,8 @@ HOMEPAGE="http://www.octave.org/"
SRC_URI="ftp://ftp.gnu.org/pub/gnu/${PN}/${P}.tar.bz2"
SLOT="0"
-IUSE="curl doc fftw +glpk +imagemagick opengl +qhull +qrupdate readline +sparse X zlib"
+IUSE="curl doc fftw +glpk +imagemagick opengl openmp +qhull +qrupdate
+ readline +sparse static-libs X zlib"
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
RDEPEND="dev-libs/libpcre
@@ -45,15 +46,30 @@ DEPEND="${RDEPEND}
virtual/latex-base
dev-texlive/texlive-genericrecommended
sys-apps/texinfo )
+ dev-util/gperf
dev-util/pkgconfig"
+pkg_pretend() {
+ use openmp && [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp && \
+ die "You have openmp enabled but your current gcc does not support it"
+}
+
src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.4.0-{pkgbuilddir,help}.patch
+ epatch "${FILESDIR}"/${P}-{pkgbuilddir,help}.patch
eautoreconf
}
src_configure() {
# hdf5 disabled because not really useful (bug #299876)
+ local myconf="--without-magick"
+ if use imagemagick; then
+ if has_version media-gfx/graphicsmagick[cxx]; then
+ myconf="--with-magick=GraphicsMagick"
+ else
+ myconf="--with-magick=ImageMagick"
+ fi
+ fi
+
econf \
--localstatedir="${EPREFIX}/var/state/octave" \
--enable-shared \
@@ -66,7 +82,6 @@ src_configure() {
$(use_with fftw fftw3) \
$(use_with fftw fftw3f) \
$(use_with glpk) \
- $(use_with imagemagick magick) \
$(use_with opengl) \
$(use_with qhull) \
$(use_with qrupdate) \
@@ -76,7 +91,8 @@ src_configure() {
$(use_with sparse cholmod) \
$(use_with sparse cxsparse) \
$(use_with X x) \
- $(use_with zlib z)
+ $(use_with zlib z) \
+ ${myconf}
}
src_install() {
diff --git a/sci-mathematics/octave/octave-3.6.0.ebuild b/sci-mathematics/octave/octave-3.6.0.ebuild
new file mode 100644
index 000000000000..767cbdf28dba
--- /dev/null
+++ b/sci-mathematics/octave/octave-3.6.0.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/octave-3.6.0.ebuild,v 1.1 2012/01/19 15:06:57 bicatali Exp $
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=yes
+inherit autotools-utils toolchain-funcs
+
+DESCRIPTION="High-level interactive language for numerical computations"
+LICENSE="GPL-3"
+HOMEPAGE="http://www.octave.org/"
+SRC_URI="ftp://ftp.gnu.org/pub/gnu/${PN}/${P}.tar.bz2"
+
+SLOT="0"
+IUSE="curl doc fftw +glpk +imagemagick opengl openmp +qhull +qrupdate
+ readline +sparse static-libs X zlib"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="dev-libs/libpcre
+ app-text/ghostscript-gpl
+ sys-libs/ncurses
+ virtual/lapack
+ curl? ( net-misc/curl )
+ fftw? ( sci-libs/fftw:3.0 )
+ glpk? ( sci-mathematics/glpk )
+ imagemagick? ( || (
+ media-gfx/graphicsmagick[cxx]
+ media-gfx/imagemagick[cxx] ) )
+ opengl? (
+ media-libs/freetype:2
+ media-libs/fontconfig
+ >=x11-libs/fltk-1.3:1[opengl] )
+ qhull? ( media-libs/qhull )
+ qrupdate? ( sci-libs/qrupdate )
+ sparse? (
+ sci-libs/arpack
+ sci-libs/camd
+ sci-libs/ccolamd
+ sci-libs/cholmod
+ sci-libs/colamd
+ sci-libs/cxsparse
+ sci-libs/umfpack )
+ X? ( x11-libs/libX11 )
+ zlib? ( sys-libs/zlib )"
+
+DEPEND="${RDEPEND}
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-genericrecommended
+ sys-apps/texinfo )
+ dev-util/gperf
+ dev-util/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.4.3-{pkgbuilddir,help}.patch )
+
+pkg_pretend() {
+ use openmp && [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp && \
+ die "You have openmp enabled but your current gcc does not support it"
+}
+
+src_configure() {
+ # hdf5 disabled because not really useful (bug #299876)
+ local myconf="--without-magick"
+ if use imagemagick; then
+ if has_version media-gfx/graphicsmagick[cxx]; then
+ myconf="--with-magick=GraphicsMagick"
+ else
+ myconf="--with-magick=ImageMagick"
+ fi
+ fi
+
+ myeconfargs+=(
+ --localstatedir="${EPREFIX}/var/state/octave"
+ --disable-rpath
+ --without-hdf5
+ --with-blas="$(pkg-config --libs blas)"
+ --with-lapack="$(pkg-config --libs lapack)"
+ $(use_enable doc docs)
+ $(use_enable openmp)
+ $(use_enable readline)
+ $(use_with curl)
+ $(use_with fftw fftw3)
+ $(use_with fftw fftw3f)
+ $(use_with glpk)
+ $(use_with opengl)
+ $(use_with qhull)
+ $(use_with qrupdate)
+ $(use_with sparse arpack)
+ $(use_with sparse umfpack)
+ $(use_with sparse colamd)
+ $(use_with sparse ccolamd)
+ $(use_with sparse cholmod)
+ $(use_with sparse cxsparse)
+ $(use_with X x)
+ $(use_with zlib z)
+ ${myconf}
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dodoc $(find doc -name \*.pdf)
+ [[ -e test/fntests.log ]] && dodoc test/fntests.log
+ echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${P}" > 99octave
+ doenvd 99octave
+}