# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit python DESCRIPTION="Giac is a free computer algebra system" HOMEPAGE="http://xcas.sourceforge.net" SRC_URI="mirror://sourceforge/xcas/${P}.tar.bz2 doc? ( http://www-fourier.ujf-grenoble.fr/~parisse/giac/giacshare.tgz )" RESTRICT="nomirror" LICENSE="GPL-2" KEYWORDS="~x86" IUSE="debug doc mpfr ntl gsl gslcblas" DEPEND=">=dev-libs/gmp-4.0 >=sys-libs/readline-4.3 ntl? ( >=dev-libs/ntl-5.3.2 ) gsl? ( >=sci-libs/gsl-1.4 ) gslcblas? ( >=sci-libs/gsl-1.4 )" src_compile() { # For pari to work along with giac, one has to copy pariinl.h from giac to /usr/.../include/pari # so that it does not redefine things like abs()... # That's why pari is not supported by default. myconf="USE_MPFI=no USE_PARI=no USE_READLINE=yes" use debug && myconf="${myconf} BUILD=debug" use mpfr && myconf="${myconf} USE_MPFR=yes" use ntl && myconf="${myconf} USE_NTL=yes" use gsl && myconf="${myconf} USE_GSL=yes" use gslcblas && myconf="${myconf} USE_GSLCBLAS=yes" emake -f GNUmakefile ${myconf} CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" || die } src_install() { einstall ${myconf} || die dosym cas /usr/bin/giac use doc && insinto /usr/share/giac/doc use doc && doins -r ${WORKDIR}/giac/doc/* dodoc README* AUTHORS NEWS }