# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Giac is a free computer algebra system" HOMEPAGE="http://xcas.sourceforge.net" SRC_URI="mirror://sourceforge/xcas/${P}.tar.gz http://www-fourier.ujf-grenoble.fr/~parisse/giacshare.tgz" LICENSE="GPL-2" KEYWORDS="~x86 ~ppc ~ia64 ~amd64 ~arm" IUSE="debug doc mpfr ntl gsl gslcblas" DEPEND=">=dev-util/bakefile-0.1.8 >=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_unpack() { unpack ${A} } 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. local myconf myconf="${myconf} -DUSE_MPFI=no -DUSE_PARI=no -DUSE_READLINE=yes" use debug && myconf="${myconf} -DBUILD=debug" use mpfr && myconf="${myconf} -DUSE_MPFR=yes" use ntl && myconf="${myconf} -DUSE_NTL=yes" use gsl && myconf="${myconf} -DUSE_GSL=yes" use gslcblas && myconf="${myconf} -DUSE_GSLCBLAS=yes" bakefile -f gnu giac.bkl ${myconf} -DCXXFLAGS="${CXXFLAGS}" -DLDFLAGS="${LDFLAGS}" -o Makefile || die emake || die } src_install() { einstall || die dosym cas /usr/bin/giac use doc && insinto /usr/share/giac/doc use doc && doins -r ${WORKDIR}/giac/doc/* dodoc README* AUTHORS COPYING NEWS }