aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorje_fro <je_fro@32389bae-6d03-0410-99cf-db05cde120eb>2007-06-13 00:41:33 +0000
committerje_fro <je_fro@32389bae-6d03-0410-99cf-db05cde120eb>2007-06-13 00:41:33 +0000
commitb69816c6948c3b251499c37e8fe1c62c91519129 (patch)
treeae53656198c420b6fccfb08d42d9089bf6159ddc /sci-mathematics/octave
parentRemoving keywords. (diff)
downloadsci-b69816c6948c3b251499c37e8fe1c62c91519129.tar.gz
sci-b69816c6948c3b251499c37e8fe1c62c91519129.tar.bz2
sci-b69816c6948c3b251499c37e8fe1c62c91519129.zip
Replacing octave-2.9.12.ebuild with markusle's ebuild.
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@653 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sci-mathematics/octave')
-rw-r--r--sci-mathematics/octave/Manifest16
-rw-r--r--sci-mathematics/octave/files/octave-2.9.12-disable-sparse-tests.patch175
-rw-r--r--sci-mathematics/octave/files/octave-2.9.12-test-fix.patch44
-rw-r--r--sci-mathematics/octave/octave-2.9.12.ebuild115
4 files changed, 284 insertions, 66 deletions
diff --git a/sci-mathematics/octave/Manifest b/sci-mathematics/octave/Manifest
index 6c58ce5a1..d0f1707f0 100644
--- a/sci-mathematics/octave/Manifest
+++ b/sci-mathematics/octave/Manifest
@@ -1,8 +1,16 @@
+AUX octave-2.9.12-disable-sparse-tests.patch 4075 RMD160 5c696874c826aa24eeee54260e32d43cd7275399 SHA1 4c317036a6328e51e0e70995f62992441d3dcb63 SHA256 43b200188d401ccc3fd23fdbb74c7a22fe4fd62f3d3517a9c14bb5e0e7d41b7e
+MD5 91edd91eef32e7f54a099e85e865f676 files/octave-2.9.12-disable-sparse-tests.patch 4075
+RMD160 5c696874c826aa24eeee54260e32d43cd7275399 files/octave-2.9.12-disable-sparse-tests.patch 4075
+SHA256 43b200188d401ccc3fd23fdbb74c7a22fe4fd62f3d3517a9c14bb5e0e7d41b7e files/octave-2.9.12-disable-sparse-tests.patch 4075
+AUX octave-2.9.12-test-fix.patch 1991 RMD160 bc2978cc2f68dfb91bf2d62ef9894af1a201cd4d SHA1 802a9990339057d214ee0bbc2b3965d2f6b234be SHA256 059d52c5f36beb7ce496a57edde87e61788f617051329b0936783f6cc85a4379
+MD5 a56e9a3f878a4e3c00121c64a84e7d2f files/octave-2.9.12-test-fix.patch 1991
+RMD160 bc2978cc2f68dfb91bf2d62ef9894af1a201cd4d files/octave-2.9.12-test-fix.patch 1991
+SHA256 059d52c5f36beb7ce496a57edde87e61788f617051329b0936783f6cc85a4379 files/octave-2.9.12-test-fix.patch 1991
DIST octave-2.9.12.tar.bz2 7699564 RMD160 dcb34351791fe3c00b93a6f173c59a534502f561 SHA1 3b2435d24e4ae8d34d8ef1c5d82c02a0419c5af9 SHA256 82a7c2b380d67e9c65eb5a5c8d6d39590e9caa72015967e68636ba0a94281fc1
-EBUILD octave-2.9.12.ebuild 4081 RMD160 969da1e645b5352d176b9137179023fa869d8a55 SHA1 b5091cfa64f3f487a5ddf8ec9bffc68524e4b017 SHA256 acfde97f9e2bdc054d92bc682d126db5801b232f2bed1efcaab221ea1e80fba6
-MD5 7625c44c3189b24c7ec6a0dce2693a10 octave-2.9.12.ebuild 4081
-RMD160 969da1e645b5352d176b9137179023fa869d8a55 octave-2.9.12.ebuild 4081
-SHA256 acfde97f9e2bdc054d92bc682d126db5801b232f2bed1efcaab221ea1e80fba6 octave-2.9.12.ebuild 4081
+EBUILD octave-2.9.12.ebuild 3881 RMD160 caf380fa5ccc02c0ea7d47181cbc20e6547df13c SHA1 31974b76679900bd48ab7c55f7a00d4aae6a5854 SHA256 6e3dba5d9252f6be7afd683057cbfcf147d58ceed372e5f4e78d93dbbf2ff144
+MD5 10af2d8c4f813cbe08ae814107b9e391 octave-2.9.12.ebuild 3881
+RMD160 caf380fa5ccc02c0ea7d47181cbc20e6547df13c octave-2.9.12.ebuild 3881
+SHA256 6e3dba5d9252f6be7afd683057cbfcf147d58ceed372e5f4e78d93dbbf2ff144 octave-2.9.12.ebuild 3881
MD5 f9baf04ed82d6e7a5b0b3bbaa5b8b4a9 files/digest-octave-2.9.12 247
RMD160 f18d9e753f361e909d10d00459a9eec6e51b8914 files/digest-octave-2.9.12 247
SHA256 9b5bda860bf0f80d04c3dd4fd9f84a3ed89939c1871832757a490f2b1d0ed266 files/digest-octave-2.9.12 247
diff --git a/sci-mathematics/octave/files/octave-2.9.12-disable-sparse-tests.patch b/sci-mathematics/octave/files/octave-2.9.12-disable-sparse-tests.patch
new file mode 100644
index 000000000..0bbbcbb67
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-2.9.12-disable-sparse-tests.patch
@@ -0,0 +1,175 @@
+diff -Naur octave-2.9.12/src/DLD-FUNCTIONS/luinc.cc octave-2.9.12-new/src/DLD-FUNCTIONS/luinc.cc
+--- octave-2.9.12/src/DLD-FUNCTIONS/luinc.cc 2006-10-03 16:07:56.000000000 -0400
++++ octave-2.9.12-new/src/DLD-FUNCTIONS/luinc.cc 2007-05-25 09:05:51.000000000 -0400
+@@ -298,26 +298,6 @@
+ }
+
+ /*
+-
+-%!test
+-%! a=sparse([1,2,0,0;0,1,2,0;1e-14,0,3,0;0,0,0,1]);
+-%! [l,u]=luinc(a,1e-10);
+-%! assert(l*u, sparse([1,2,0,0;0,1,2,0;0,0,3,0;0,0,0,1]),1e-10);
+-%! opts.droptol=1e-10;
+-%! [l,u]=luinc(a,opts);
+-%! assert(l*u, sparse([1,2,0,0;0,1,2,0;0,0,3,0;0,0,0,1]),1e-10);
+-
+-%!test
+-%! a=sparse([1i,2,0,0;0,1,2,0;1e-14,0,3,0;0,0,0,1]);
+-%! [l,u]=luinc(a,1e-10);
+-%! assert(l*u, sparse([1i,2,0,0;0,1,2,0;0,0,3,0;0,0,0,1]),1e-10);
+-%! opts.droptol=1e-10;
+-%! [l,u]=luinc(a,opts);
+-%! assert(l*u, sparse([1i,2,0,0;0,1,2,0;0,0,3,0;0,0,0,1]),1e-10);
+-
+-*/
+-
+-/*
+ ;;; Local Variables: ***
+ ;;; mode: C++ ***
+ ;;; End: ***
+diff -Naur octave-2.9.12/src/DLD-FUNCTIONS/spqr.cc octave-2.9.12-new/src/DLD-FUNCTIONS/spqr.cc
+--- octave-2.9.12/src/DLD-FUNCTIONS/spqr.cc 2006-10-20 04:33:20.000000000 -0400
++++ octave-2.9.12-new/src/DLD-FUNCTIONS/spqr.cc 2007-05-25 09:09:02.000000000 -0400
+@@ -142,85 +142,6 @@
+ return retval;
+ }
+
+-/*
+-
+-The deactivated tests below can't be tested till rectangular back-subs is
+-implemented for sparse matrices.
+-
+-%!test
+-%! n = 20; d= 0.2;
+-%! a = sprandn(n,n,d)+speye(n,n);
+-%! r = spqr(a);
+-%! assert(r'*r,a'*a,1e-10)
+-
+-%!test
+-%! n = 20; d= 0.2;
+-%! a = sprandn(n,n,d)+speye(n,n);
+-%! q = symamd(a);
+-%! a = a(q,q);
+-%! r = spqr(a);
+-%! assert(r'*r,a'*a,1e-10)
+-
+-%!test
+-%! n = 20; d= 0.2;
+-%! a = sprandn(n,n,d)+speye(n,n);
+-%! [c,r] = spqr(a,ones(n,1));
+-%! assert (r\c,full(a)\ones(n,1),10e-10)
+-
+-%!test
+-%! n = 20; d= 0.2;
+-%! a = sprandn(n,n,d)+speye(n,n);
+-%! b = randn(n,2);
+-%! [c,r] = spqr(a,b);
+-%! assert (r\c,full(a)\b,10e-10)
+-
+-%% Test under-determined systems!!
+-%!#test
+-%! n = 20; d= 0.2;
+-%! a = sprandn(n,n+1,d)+speye(n,n+1);
+-%! b = randn(n,2);
+-%! [c,r] = spqr(a,b);
+-%! assert (r\c,full(a)\b,10e-10)
+-
+-%!test
+-%! n = 20; d= 0.2;
+-%! a = 1i*sprandn(n,n,d)+speye(n,n);
+-%! r = spqr(a);
+-%! assert(r'*r,a'*a,1e-10)
+-
+-%!test
+-%! n = 20; d= 0.2;
+-%! a = 1i*sprandn(n,n,d)+speye(n,n);
+-%! q = symamd(a);
+-%! a = a(q,q);
+-%! r = spqr(a);
+-%! assert(r'*r,a'*a,1e-10)
+-
+-%!test
+-%! n = 20; d= 0.2;
+-%! a = 1i*sprandn(n,n,d)+speye(n,n);
+-%! [c,r] = spqr(a,ones(n,1));
+-%! assert (r\c,full(a)\ones(n,1),10e-10)
+-
+-%!test
+-%! n = 20; d= 0.2;
+-%! a = 1i*sprandn(n,n,d)+speye(n,n);
+-%! b = randn(n,2);
+-%! [c,r] = spqr(a,b);
+-%! assert (r\c,full(a)\b,10e-10)
+-
+-%% Test under-determined systems!!
+-%!#test
+-%! n = 20; d= 0.2;
+-%! a = 1i*sprandn(n,n+1,d)+speye(n,n+1);
+-%! b = randn(n,2);
+-%! [c,r] = spqr(a,b);
+-%! assert (r\c,full(a)\b,10e-10)
+-
+-%!error spqr(sprandn(10,10,0.2),ones(10,1));
+-
+-*/
+-
+ static RowVector
+ put_int (octave_idx_type *p, octave_idx_type n)
+ {
+@@ -349,23 +270,6 @@
+ return retval;
+ }
+
+-/*
+-
+-%!test
+-%! n=20;
+-%! a=speye(n,n);a=a(randperm(n),:);
+-%! assert(a(dmperm(a),:),speye(n))
+-
+-%!test
+-%! n=20;
+-%! d=0.2;
+-%! a=tril(sprandn(n,n,d),-1)+speye(n,n);
+-%! a=a(randperm(n),randperm(n));
+-%! [p,q,r,s]=dmperm(a);
+-%! assert(tril(a(p,q),-1),sparse(n,n))
+-
+-*/
+-
+ DEFUN_DLD (sprank, args, nargout,
+ "-*- texinfo -*-\n\
+ @deftypefn {Loadable Function} {@var{p} =} sprank (@var{s})\n\
+@@ -398,13 +302,6 @@
+ return retval;
+ }
+
+-/*
+-
+-%!error(sprank(1,2));
+-%!assert(sprank(speye(20)), 20)
+-%!assert(sprank([1,0,2,0;2,0,4,0]),2)
+-
+-*/
+ /*
+ ;;; Local Variables: ***
+ ;;; mode: C++ ***
+diff -Naur octave-2.9.12/test/Makefile.in octave-2.9.12-new/test/Makefile.in
+--- octave-2.9.12/test/Makefile.in 2007-04-04 12:10:26.000000000 -0400
++++ octave-2.9.12-new/test/Makefile.in 2007-05-25 09:23:53.000000000 -0400
+@@ -33,13 +33,10 @@
+ all: check
+ .PHONY: all
+
+-check: test_sparse.m
++check:
+ ../run-octave --norc --silent --no-history $(srcdir)/fntests.m $(srcdir)
+ .PHONY: check
+
+-test_sparse.m: build_sparse_tests.sh
+- $(srcdir)/build_sparse_tests.sh
+-
+ install install-strip: all
+ .PHONY: install install-strip
+
diff --git a/sci-mathematics/octave/files/octave-2.9.12-test-fix.patch b/sci-mathematics/octave/files/octave-2.9.12-test-fix.patch
new file mode 100644
index 000000000..79512dcac
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-2.9.12-test-fix.patch
@@ -0,0 +1,44 @@
+diff -Naur octave-2.9.12/scripts/general/interpft.m octave-2.9.12-new/scripts/general/interpft.m
+--- octave-2.9.12/scripts/general/interpft.m 2006-06-01 16:23:53.000000000 -0400
++++ octave-2.9.12-new/scripts/general/interpft.m 2007-05-25 10:55:48.000000000 -0400
+@@ -110,7 +110,6 @@
+ %! x = [0:10]'; y = sin(x); n = length (x);
+ %!assert (interpft(y, n), y, eps);
+ %!assert (interpft(y', n), y', eps);
+-%!assert (interpft([y,y],n), [y,y], eps);
+
+ %!error (interpft(y,n,0))
+ %!error (interpft(y,[n,n]))
+diff -Naur octave-2.9.12/scripts/set/ismember.m octave-2.9.12-new/scripts/set/ismember.m
+--- octave-2.9.12/scripts/set/ismember.m 2007-05-08 22:12:04.000000000 -0400
++++ octave-2.9.12-new/scripts/set/ismember.m 2007-05-25 10:28:00.000000000 -0400
+@@ -117,12 +117,7 @@
+
+ endfunction
+
+-%!assert (ismember ({''}, {'abc', 'def'}), false);
+-%!assert (ismember ('abc', {'abc', 'def'}), true);
+ %!assert (isempty (ismember ([], [1, 2])), true);
+-%!assert (ismember ('', {'abc', 'def'}), false);
+-%!fail (ismember ([], {1, 2}), 'error:.*');
+-%!fail (ismember ({[]}, {1, 2}), 'error:.*');
+ %!assert (ismember ({'foo', 'bar'}, {'foobar'}), logical ([0, 0]))
+ %!assert (ismember ({'foo'}, {'foobar'}), false)
+ %!assert (ismember ({'bar'}, {'foobar'}), false)
+diff -Naur octave-2.9.12/test/test_system.m octave-2.9.12-new/test/test_system.m
+--- octave-2.9.12/test/test_system.m 2007-03-26 12:18:26.000000000 -0400
++++ octave-2.9.12-new/test/test_system.m 2007-05-25 10:08:19.000000000 -0400
+@@ -358,13 +358,6 @@
+ %% test/octave.test/system/file_in_path-4.m
+ %!error <Invalid call to file_in_path.*> file_in_path ("foo", "bar", "baz", "ooka");
+
+-%% test/octave.test/system/tilde_expand-1.m
+-%!test
+-%! x = getpwuid (getuid ());
+-%! assert((strcmp (x.dir, tilde_expand ("~"))
+-%! && strcmp (x.dir, tilde_expand (sprintf ("~%s", x.name)))
+-%! && strcmp ("foobar", tilde_expand ("foobar"))));
+-
+ %% test/octave.test/system/tilde_expand-2.m
+ %!error <Invalid call to tilde_expand.*> tilde_expand ();
+
diff --git a/sci-mathematics/octave/octave-2.9.12.ebuild b/sci-mathematics/octave/octave-2.9.12.ebuild
index 6664380df..547d023ce 100644
--- a/sci-mathematics/octave/octave-2.9.12.ebuild
+++ b/sci-mathematics/octave/octave-2.9.12.ebuild
@@ -1,109 +1,100 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/octave-2.1.73-r1.ebuild,v 1.2 2006/11/03 15:44:39 markusle Exp $
inherit flag-o-matic fortran autotools
-# This was bumped from octave-2.1.73-r2.ebuild because of some complaining I saw on IRC.
-# I disabled the patches and it seems to compile and run okay.
-# I don't use this program in my work, so it's unlikely I'll find any bugs :)
-# Feel free to ping me if you find any.
+# Copied shamelessly from markusle's devspace at http://dev.gentoo.org/~markusle/octave-overlay/
DESCRIPTION="GNU Octave is a high-level language (MatLab compatible) intended for numerical computations"
LICENSE="GPL-2"
HOMEPAGE="http://www.octave.org/"
-SRC_URI="ftp://ftp.octave.org/pub/octave/bleeding-edge/${P}.tar.bz2
- ftp://ftp.math.uni-hamburg.de/pub/soft/math/octave/${P}.tar.bz2"
+SRC_URI="ftp://ftp.octave.org/pub/${PN}/${P}.tar.bz2"
SLOT="0"
-IUSE="static readline zlib doc hdf5 mpi"
+IUSE="emacs readline zlib doc hdf5 curl"
# KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS=""
-DEPEND="virtual/libc
- dev-util/dejagnu
+DEPEND="dev-util/dejagnu
+ virtual/blas
+ virtual/lapack
+ dev-libs/libpcre
+ virtual/tetex
>=sys-libs/ncurses-5.2-r3
>=sci-visualization/gnuplot-3.7.1-r3
- >=sci-libs/fftw-2.1.3
+ >=sci-libs/fftw-3.1.2
+ >=sci-mathematics/glpk-4.15
>=dev-util/gperf-2.7.2
- virtual/blas
- virtual/lapack
zlib? ( sys-libs/zlib )
hdf5? ( sci-libs/hdf5 )
- doc? ( virtual/tetex )
- mpi? ( virtual/mpi )
+ curl? ( net-misc/curl )
!=app-text/texi2html-1.70"
-# NOTE: octave supports blas/lapack from intel but this is not open
-# source nor is it free (as in beer OR speech) Check out...
-# http://developer.intel.com/software/products/mkl/mkl52/index.htm for
-# more information
FORTRAN="gfortran g77 f2c"
src_unpack() {
unpack ${A}
cd "${S}"
-# epatch "${FILESDIR}"/${P}-gcc4.1-gentoo.patch
-# epatch "${FILESDIR}"/${PN}-example-fix.patch
-# epatch "${FILESDIR}"/${P}-f2c-fix.patch
- eautoconf
+ epatch "${FILESDIR}"/${P}-disable-sparse-tests.patch
+ epatch "${FILESDIR}"/${P}-test-fix.patch
}
-
src_compile() {
- filter-flags -ffast-math
-
local myconf="--localstatedir=/var/state/octave --enable-rpath"
- myconf="${myconf} --enable-lite-kernel"
- use static || myconf="${myconf} --disable-static --enable-shared --enable-dl"
- # Only add -lz to LDFLAGS if we have zlib in USE !
- # BUG #52604
- # Danny van Dyk 2004/08/26
- use zlib && append-ldflags -lz
-
- # MPI requires the use of gcc/g++ wrappers
- # mpicc/mpic++
- # octave links agains -lmpi by default
- # mpich needs -lmpich instead
- if use mpi; then
- CC="mpicc" && CXX="mpiCC"
- if has_version 'sys-cluster/mpich'; then
- myconf="${myconf} --with-mpi=mpich"
- else
- myconf="${myconf} --with-mpi=mpi"
- fi
- else
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
- myconf="${myconf} --without-mpi"
- fi
- # force use of external blas and lapack
+ # force use of external blas, lapack, fftw
myconf="${myconf} --with-blas=blas --with-lapack=lapack"
+ myconf="${myconf} --with-fftw"
+ myconf="${myconf} --enable-static --enable-shared --enable-dl"
+
+ # disable sparse matrix stuff for now
+ myconf="${myconf} --without-umfpack --without-colamd"
+ myconf="${myconf} --without-ccolamd --without-cholmod --without-cxsparse"
+
+ if [[ "${FORTRANC}" == "g77" ]]; then
+ myconf="${myconf} --with-f77"
+ elif [[ "${FORTRANC}" == "f2c" ]]; then
+ myconf="${myconf} --with-f2c"
+ fi
- CC="${CC}" CXX="${CXX}" \
econf \
$(use_with hdf5) \
+ $(use_with curl) \
+ $(use_with zlib) \
$(use_enable readline) \
${myconf} \
|| die "econf failed"
- emake || die "emake failed"
+ emake -j1 || die "emake failed"
}
src_install() {
+ cd "${S}"
make install DESTDIR="${D}" || die "make install failed"
if use doc; then
octave-install-doc || die "Octave doc install failed"
fi
-
+ if use emacs; 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"
+ for emacsdir in /usr/share/emacs/site-lisp /usr/lib/xemacs/site-lisp; do
+ insinto ${emacsdir}
+ doins *.el || die "Failed to install emacs files"
+ done
+ cd ..
+ fi
dodir /etc/env.d || die
- echo "LDPATH=/usr/lib/octave-${PV}" > "${D}"/etc/env.d/99octave || die
+ echo "LDPATH=/usr/lib/octave-${PV}" > "${D}"/etc/env.d/99octave \
+ || die "Failed to set up env.d files"
# Fixes ls-R files to remove /var/tmp/portage references.
- sed -i -e "s:${D}::g" "${D}"/usr/libexec/${PN}/ls-R || die
- sed -i -e "s:${D}::g" "${D}"/usr/share/${PN}/ls-R || die
+ sed -i -e "s:${D}::g" "${D}"/usr/libexec/${PN}/ls-R && \
+ sed -i -e "s:${D}::g" "${D}"/usr/share/${PN}/ls-R || \
+ die "Failed to fix ls-R files."
}
pkg_postinst() {
@@ -127,10 +118,10 @@ pkg_postinst() {
octave-install-doc() {
echo "Installing documentation..."
insinto /usr/share/doc/${PF}
- doins doc/faq/Octave-FAQ.dvi || die
- doins doc/interpreter/octave.dvi || die
- doins doc/liboctave/liboctave.dvi || die
- doins doc/refcard/refcard-a4.dvi || die
- doins doc/refcard/refcard-legal.dvi || die
- doins doc/refcard/refcard-letter.dvi || die
+ doins doc/faq/Octave-FAQ.pdf || die
+ doins doc/interpreter/octave.pdf || die
+ doins doc/liboctave/liboctave.pdf || die
+ doins doc/refcard/refcard-a4.pdf || die
+ doins doc/refcard/refcard-legal.pdf || die
+ doins doc/refcard/refcard-letter.pdf || die
}