summaryrefslogtreecommitdiff
blob: 651fc611abcfdab603ed9a05298cbe97d80c02a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave-forge/octave-forge-2006.01.28.ebuild,v 1.3 2006/08/06 21:43:41 ticho Exp $

inherit eutils

DESCRIPTION="A collection of custom scripts, functions and extensions for GNU Octave"
HOMEPAGE="http://octave.sourceforge.net/"
SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"

LICENSE="as-is"
KEYWORDS="x86 ~ppc ~sparc ~amd64"
SLOT="0"
IUSE="ginac qhull X"

DEPEND="~sci-mathematics/octave-2.1.72
		sci-libs/netcdf
		media-libs/jpeg
		media-libs/libpng
		sci-libs/gsl
		dev-libs/libpcre
		sys-libs/readline
		sys-apps/texinfo
		sys-libs/libtermcap-compat
		virtual/lapack
		virtual/blas
		X? ( || ( x11-libs/libX11 virtual/x11 ) )
		!amd64? ( ginac? ( sci-mathematics/ginac ) )
		qhull? ( >=media-libs/qhull-3.1-r1 )"

src_compile() {
	econf $(use_with X) || die "econf failed"

	# patch Makefiles to avoid sandbox violations
	sed -e "s|\$(MPATH)|${D}/\$(MPATH)|" \
		-i ${S}/main/comm/Makefile \
		-i ${S}/main/comm/doc/Makefile \
		-i ${S}/main/fixed/Makefile \
		-i ${S}/main/fixed/doc/Makefile \
		|| die "failed to patch Makefiles"

	emake || die "emake failed"
}

src_install() {
	make DESTDIR="${D}" install || die "install failed"

	dodoc AUTHORS COPYING* ChangeLog RELEASE-NOTES TODO
}

pkg_postinst() {
	einfo "If you do not have GiNaC and Qhull installed, octave-forge did not"
	einfo "compile itself with support for the geometry and symbolic math"
	einfo "extensions. If you would like these features, please emerge ginac"
	einfo "and/or qhull and then re-emerge octave-forge. Alternately, you can"
	einfo "specify USE='ginac qhull' and re-emerge octave-forge; in that case"
	einfo "the ebuild will automatically install the additional packages."
}