| 1 |
# Copyright 1999-2007 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave-forge/octave-forge-2005.06.13-r1.ebuild,v 1.4 2007/07/13 15:35:23 markusle Exp $
|
| 4 |
|
| 5 |
inherit eutils
|
| 6 |
|
| 7 |
DESCRIPTION="A collection of custom scripts, functions and extensions for GNU Octave"
|
| 8 |
HOMEPAGE="http://octave.sourceforge.net/"
|
| 9 |
SRC_URI="mirror://sourceforge/octave/${P}.tar.gz"
|
| 10 |
|
| 11 |
LICENSE="as-is"
|
| 12 |
KEYWORDS="~x86 ~ppc ~sparc ~amd64"
|
| 13 |
SLOT="0"
|
| 14 |
IUSE="ginac qhull"
|
| 15 |
|
| 16 |
DEPEND="=sci-mathematics/octave-2.1.69*
|
| 17 |
>=sys-apps/sed-4
|
| 18 |
sys-libs/ncurses
|
| 19 |
!amd64? ( ginac? ( sci-mathematics/ginac ) )
|
| 20 |
qhull? ( >=media-libs/qhull-3.1-r1 )"
|
| 21 |
|
| 22 |
src_unpack() {
|
| 23 |
unpack ${A}
|
| 24 |
cd ${S}
|
| 25 |
epatch ${FILESDIR}/${PN}-mex.patch
|
| 26 |
epatch ${FILESDIR}/${PN}-randmtzig.patch
|
| 27 |
|
| 28 |
# make it compile when X isn't installed. The source file there really
|
| 29 |
# doesn't need X at all.
|
| 30 |
# 02 Feb 2005, Robin H. Johnson <robbat2@gentoo.org>
|
| 31 |
sed -e '/#include <X11/d' -i ${S}/main/audio/aurecord.cc
|
| 32 |
}
|
| 33 |
|
| 34 |
src_compile() {
|
| 35 |
econf --enable-shared || die "econf failed"
|
| 36 |
|
| 37 |
# this must be done before the *PATH variables are changed
|
| 38 |
cd extra/graceplot && make grace_octave_path.m
|
| 39 |
cd ${S}
|
| 40 |
|
| 41 |
# The *PATH variables need to be changed, or they will
|
| 42 |
# cause Portage access violations. They cannot be easily set just using
|
| 43 |
# arguments passed to ./configure (at least, they can not easily be set
|
| 44 |
# correctly)
|
| 45 |
echo -en "Modifying paths..."
|
| 46 |
for path in M O X ALTM ALTO; do
|
| 47 |
sed -i "s|^\(${path}PATH = \)|\1${D}|" Makeconf || \
|
| 48 |
die "failed to modify ${path}PATH"
|
| 49 |
done
|
| 50 |
echo -e "done.\n"
|
| 51 |
|
| 52 |
emake || die "emake failed"
|
| 53 |
}
|
| 54 |
|
| 55 |
src_install() {
|
| 56 |
make DESTDIR="${D}" install || die "install failed"
|
| 57 |
|
| 58 |
# strip the fudged install paths
|
| 59 |
sed -i "s|${D}||g" ${D}/usr/bin/mex || die "sed failed"
|
| 60 |
|
| 61 |
dodoc AUTHORS COPYING* ChangeLog INDEX RELEASE-NOTES TODO
|
| 62 |
}
|
| 63 |
|
| 64 |
pkg_postinst() {
|
| 65 |
einfo "If you do not have GiNaC and Qhull installed, octave-forge did not"
|
| 66 |
einfo "compile itself with support for the geometry and symbolic math"
|
| 67 |
einfo "extensions. If you would like these features, please emerge ginac"
|
| 68 |
einfo "and/or qhull and then re-emerge octave-forge. Alternately, you can"
|
| 69 |
einfo "specify USE='ginac qhull' and re-emerge octave-forge; in that case"
|
| 70 |
einfo "the ebuild will automatically install the additional packages."
|
| 71 |
}
|