diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2010-10-03 23:45:04 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2010-10-03 23:45:04 +0000 |
commit | fc781d6d46e8fa1f04a40bf8b122991f79b5e6a5 (patch) | |
tree | 4ce0bc878b86e3e04386743a55b9dc65b6d6f496 /sci-mathematics/octave | |
parent | Error in previous patch, now installs all qhull headers to allow reverse depe... (diff) | |
download | historical-fc781d6d46e8fa1f04a40bf8b122991f79b5e6a5.tar.gz historical-fc781d6d46e8fa1f04a40bf8b122991f79b5e6a5.tar.bz2 historical-fc781d6d46e8fa1f04a40bf8b122991f79b5e6a5.zip |
Added a few patches from upstream and debian. Should pass tests now.
Package-Manager: portage-2.2_rc88/cvs/Linux x86_64
Diffstat (limited to 'sci-mathematics/octave')
-rw-r--r-- | sci-mathematics/octave/ChangeLog | 12 | ||||
-rw-r--r-- | sci-mathematics/octave/Manifest | 15 | ||||
-rw-r--r-- | sci-mathematics/octave/files/octave-3.2.4-addpath.patch | 20 | ||||
-rw-r--r-- | sci-mathematics/octave/files/octave-3.2.4-filter-empty-vector.patch | 17 | ||||
-rw-r--r-- | sci-mathematics/octave/files/octave-3.2.4-imshow.patch | 27 | ||||
-rw-r--r-- | sci-mathematics/octave/files/octave-3.2.4-interp2.patch | 160 | ||||
-rw-r--r-- | sci-mathematics/octave/files/octave-3.2.4-no-helvetica.patch | 25 | ||||
-rw-r--r-- | sci-mathematics/octave/files/octave-3.2.4-normal-marker-size.patch | 25 | ||||
-rw-r--r-- | sci-mathematics/octave/octave-3.2.4-r3.ebuild | 118 |
9 files changed, 414 insertions, 5 deletions
diff --git a/sci-mathematics/octave/ChangeLog b/sci-mathematics/octave/ChangeLog index 960c7acbbc1c..b5f6b5c0f193 100644 --- a/sci-mathematics/octave/ChangeLog +++ b/sci-mathematics/octave/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sci-mathematics/octave # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/ChangeLog,v 1.96 2010/09/14 16:45:35 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/ChangeLog,v 1.97 2010/10/03 23:45:04 bicatali Exp $ + +*octave-3.2.4-r3 (03 Oct 2010) + + 03 Oct 2010; SĂ©bastien Fabbro <bicatali@gentoo.org> + +octave-3.2.4-r3.ebuild, +files/octave-3.2.4-addpath.patch, + +files/octave-3.2.4-filter-empty-vector.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: + Added a few patches from upstream and debian. Should pass tests now. *octave-3.2.4-r2 (14 Sep 2010) diff --git a/sci-mathematics/octave/Manifest b/sci-mathematics/octave/Manifest index 9511813d542e..032e5680741f 100644 --- a/sci-mathematics/octave/Manifest +++ b/sci-mathematics/octave/Manifest @@ -3,19 +3,26 @@ Hash: SHA1 AUX octave-3.2.0_as_needed.patch 485 RMD160 6476d8af9ada03c4b169e87e65d674a3b4bb810b SHA1 f0af5b1435ae2ca9eee08e37de5f3dda0e662b26 SHA256 cd4e0d0299b487959396313a42fdc94b2f069dd99c3127789496cfa40da71e9e AUX octave-3.2.0_parallel_make.patch 374 RMD160 0e597204583c44c6c67aa5c5360a73f0f6bae298 SHA1 85170197541aa797ff41f7c46e1e3594dbf32fe4 SHA256 d2864f9b0dbea021120be04d16f57759d881bff11bf2b90e34c7b68c770adb23 +AUX octave-3.2.4-addpath.patch 645 RMD160 41e419f8cac00277107d96a38f865720d435f197 SHA1 292051d3463b51fbb48b62f81f55b00783993ef7 SHA256 1f6a3fd6abf44f0058b08276b74ea10649e3412c74a70dd424f4918165b983ff AUX octave-3.2.4-dlmread-speedup.patch 6100 RMD160 6e760e5cbf246c83667d2ecff7a8369dc9a4629c SHA1 30a72e1c810a9f532a35c35562ad001b55bdec27 SHA256 f54249a78a2250096d360a5c1fdd2187226388c29bd3f19db0c03f4592066474 +AUX octave-3.2.4-filter-empty-vector.patch 409 RMD160 163664d0b6d855f6f3a8ec448c4d163f61e56ee9 SHA1 288b67e74cce3fdf80ab0a0d444ffa98b0c404ff SHA256 d82f6cb5255fa556155c6c44cbf84a9fcb14d4cc484b2d322ab62de4df96c99c AUX octave-3.2.4-fltk-magic.patch 627 RMD160 f0b36faf95cf123e9a51d40555f9c4fe0b1f75d6 SHA1 819e3bc87998a3a8a803668bc865cef7e89b3e7a SHA256 0f2e265a5345409e8dce8071a7586e3addc113d1f89a96ed8c8d0d84efbdcbb8 AUX octave-3.2.4-imread.patch 684 RMD160 d3ccc76eabe52ed90d7b6d3e41d48e9871221f34 SHA1 b7384f4a2c2e5ca4dfacccce9a1ebdae844986aa SHA256 7133d8cab02f310270154aca272bc929b3507e2b20ffd6fc93603444019ce250 +AUX octave-3.2.4-imshow.patch 761 RMD160 0a266a093783a9b7d89debcae773b1fd7972e324 SHA1 b774000fc450680ad5fd5578e24c6a4b077edf5b SHA256 fcfbc186c7dafe88c371a25895295215ed3ea0dfc2b3e236382156130eddf7d0 +AUX octave-3.2.4-interp2.patch 5747 RMD160 8583bfd070cf1ef746bc954dadf54e1b48401dfb SHA1 d7aed0f711c6a7e2b79a231a5526da5b62a2d7df SHA256 2b6068db28c928c7bb98967bdd0273a87149b8944a1be875b9a0ec2987dc84a8 AUX octave-3.2.4-ldflags.patch 365 RMD160 65e753b086871b91e43995ce56491a2e057a020d SHA1 c70ae715234f737d6218b955748ecf65c56cf0be SHA256 55a3bd8cba99c9bc70cd2d7f40544beda9752df18ed681cf7fd44c4e4d937b80 +AUX octave-3.2.4-no-helvetica.patch 636 RMD160 fa10278332658633e89b0b44e75a82687a28194f SHA1 b0ef546e8505f13e97e57df918ecb5ec11a6ce13 SHA256 c448c5ac2af1dbd4dc93b08ac76276bbf530d83cc6b918cfdd7cc8b25b53d6df +AUX octave-3.2.4-normal-marker-size.patch 776 RMD160 f9c88f1e4eaa57dc4e344cfaa39b0db089c6d0bc SHA1 a4199e042a35609d7bf885f175da1ab6f4b8162f SHA256 4cec4c75303657b53caecba8a6f3ec8d9a806f6b21647c6c69dff81f6cd2c31b DIST octave-3.2.4.tar.bz2 12080959 RMD160 6dcdea7ef2431b8427da5e6b9d2113e0e5736f43 SHA1 7de078564027108f3436f3ba7bf5993a6b411a67 SHA256 48471d05c7ed9c0a5a4d5fa4ae8a857447ac3da1197f86cfe79b9d8f4fdfd147 EBUILD octave-3.2.4-r1.ebuild 2916 RMD160 b8e2702847466a31de7a319942bee14ef152e456 SHA1 5ffd2c5592fadf6fb82e7f059b94833b12410da9 SHA256 5af9b4269f7da8d4d70f4c9a5ef3e85525816ef70c8e8a95a002d292ae727848 EBUILD octave-3.2.4-r2.ebuild 2978 RMD160 a3fa8bd8941d2176387fba81a1faf2004880a737 SHA1 9f0b8e54ec366fcc71cbcf79141459f057d59722 SHA256 474c200dddb67b78e5951b0419851aeb8ef8fb369dc8a162c08cac715f1837bd -MISC ChangeLog 24141 RMD160 9c5c81e91216e9ee97a854d2e415ca158fd09a92 SHA1 ed1601f9a9c0f90fa51d6eaab38404a3972cf11a SHA256 83b46d75acd2d585db2bc57b713fbd551ecd1830f4d4e5140cc60251aa48489e +EBUILD octave-3.2.4-r3.ebuild 3293 RMD160 53a91adf82c43d33372ec598a10e0c1dfed190c6 SHA1 8403e5547a100a9ff102ed059689d8c2cd7cce11 SHA256 df8715ad025deccc75f9582d48806fbc6d986a12d68e7f880b3816417755e59d +MISC ChangeLog 24572 RMD160 080e1144148bb0224996a8117b5e37f9fe4fe6c5 SHA1 e602731c69f4dd7602a8ad4588b23281c936a604 SHA256 c231df3e95e5af291f432a5d491399b668fd25fc06141fad79d2bc42cff64b36 MISC metadata.xml 260 RMD160 27a4292b758e1199d0092b731cba79033f1b4167 SHA1 9997a99a4d6115f3b901208ba711d735ce9be36e SHA256 5fda55fd44bfec5755e1c3ac828887c37f0eebed6b3b972454e123ac2472d3ff -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) -iEYEARECAAYFAkyPprgACgkQ1ycZbhPLE2C73QCggYiW92aGEFPXPtXnNwPlQUaQ -YtAAn1Bk1cAypkRkDDQ8dcDJEcU5nit3 -=fSWR +iEYEARECAAYFAkypFYgACgkQ1ycZbhPLE2BqlACfRplLUebkkdsI3vDUkTx52Pt1 +2CcAoKtHthhEhCNgrDvojQhgnsoCbaU9 +=wnmT -----END PGP SIGNATURE----- diff --git a/sci-mathematics/octave/files/octave-3.2.4-addpath.patch b/sci-mathematics/octave/files/octave-3.2.4-addpath.patch new file mode 100644 index 000000000000..c3b208b764d1 --- /dev/null +++ b/sci-mathematics/octave/files/octave-3.2.4-addpath.patch @@ -0,0 +1,20 @@ +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-filter-empty-vector.patch b/sci-mathematics/octave/files/octave-3.2.4-filter-empty-vector.patch new file mode 100644 index 000000000000..f6cace5b15e3 --- /dev/null +++ b/sci-mathematics/octave/files/octave-3.2.4-filter-empty-vector.patch @@ -0,0 +1,17 @@ +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-imshow.patch b/sci-mathematics/octave/files/octave-3.2.4-imshow.patch new file mode 100644 index 000000000000..5b94e2589947 --- /dev/null +++ b/sci-mathematics/octave/files/octave-3.2.4-imshow.patch @@ -0,0 +1,27 @@ +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 new file mode 100644 index 000000000000..dae7db50ec7e --- /dev/null +++ b/sci-mathematics/octave/files/octave-3.2.4-interp2.patch @@ -0,0 +1,160 @@ +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 new file mode 100644 index 000000000000..62297c9806f3 --- /dev/null +++ b/sci-mathematics/octave/files/octave-3.2.4-no-helvetica.patch @@ -0,0 +1,25 @@ +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 new file mode 100644 index 000000000000..b263498b2afe --- /dev/null +++ b/sci-mathematics/octave/files/octave-3.2.4-normal-marker-size.patch @@ -0,0 +1,25 @@ +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/octave-3.2.4-r3.ebuild b/sci-mathematics/octave/octave-3.2.4-r3.ebuild new file mode 100644 index 000000000000..c1920bc59ba8 --- /dev/null +++ b/sci-mathematics/octave/octave-3.2.4-r3.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/octave-3.2.4-r3.ebuild,v 1.1 2010/10/03 23:45:04 bicatali Exp $ + +EAPI="2" +inherit flag-o-matic xemacs-elisp-common autotools + +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 emacs fltk fftw opengl readline sparse test xemacs zlib" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" + +RDEPEND="dev-libs/libpcre + media-gfx/graphicsmagick[cxx] + media-libs/qhull + sci-libs/qrupdate + sci-mathematics/glpk + sci-visualization/gnuplot + sys-libs/ncurses + virtual/lapack + x11-libs/libX11 + curl? ( net-misc/curl ) + fltk? ( x11-libs/fltk:1.1[opengl?] ) + fftw? ( sci-libs/fftw:3.0 ) + opengl? ( virtual/opengl media-libs/ftgl ) + sparse? ( sci-libs/arpack + sci-libs/camd + sci-libs/ccolamd + sci-libs/cholmod + sci-libs/colamd + sci-libs/cxsparse + sci-libs/umfpack ) + xemacs? ( app-editors/xemacs ) + zlib? ( sys-libs/zlib ) + !sci-mathematics/octave-forge" + +DEPEND="${RDEPEND} + virtual/latex-base + sys-apps/texinfo + || ( dev-texlive/texlive-genericrecommended + app-text/ptex ) + dev-util/gperf + dev-util/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.2.0_parallel_make.patch + epatch "${FILESDIR}"/${PN}-3.2.0_as_needed.patch + epatch "${FILESDIR}"/${PN}-3.2.4-imread.patch + epatch "${FILESDIR}"/${PN}-3.2.4-ldflags.patch + epatch "${FILESDIR}"/${PN}-3.2.4-fltk-magic.patch + epatch "${FILESDIR}"/${PN}-3.2.4-dlmread-speedup.patch + epatch "${FILESDIR}"/${PN}-3.2.4-addpath.patch + epatch "${FILESDIR}"/${PN}-3.2.4-filter-empty-vector.patch + epatch "${FILESDIR}"/${PN}-3.2.4-imshow.patch + epatch "${FILESDIR}"/${PN}-3.2.4-interp2.patch + epatch "${FILESDIR}"/${PN}-3.2.4-no-helvetica.patch + epatch "${FILESDIR}"/${PN}-3.2.4-normal-marker-size.patch + eautoreconf +} + +src_configure() { + # hdf5 disabled because not really useful (bug #299876) + econf \ + --localstatedir=/var/state/octave \ + --enable-shared \ + --without-hdf5 \ + --with-qrupdate \ + --with-blas="$(pkg-config --libs blas)" \ + --with-lapack="$(pkg-config --libs lapack)" \ + $(use_enable readline) \ + $(use_with curl) \ + $(use_with fftw) \ + $(use_with fltk) \ + $(use_with opengl framework-opengl) \ + $(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 zlib) +} + +src_compile() { + emake || die "emake failed" + if use xemacs; then + cd "${S}/emacs" + xemacs-elisp-comp *.el + fi +} + +src_install() { + emake install DESTDIR="${D}" || die "emake install failed" + + if use doc; then + einfo "Installing documentation..." + insinto /usr/share/doc/${PF} + doins $(find doc -name \*.pdf) + fi + + if use emacs || use xemacs; then + cd emacs + exeinto /usr/bin + doexe octave-tags || die "Failed to install octave-tags" + doman octave-tags.1 || die "Failed to install octave-tags.1" + if use xemacs; then + xemacs-elisp-install ${PN} *.el *.elc + fi + cd .. + fi + use test && dodoc test/fntests.log + echo "LDPATH=/usr/$(get_libdir)/octave-${PV}" > 99octave + doenvd 99octave || die +} |