Sunday, April 16, 2006

Ebuild for gretl


Gnu Library gretl is a cross-platform software package for econometric analysis, written in the C programming language, http://gretl.sourceforge.net/. It is not in portage yet, and for a long time I couldn't get it installed on my Gentoo system (which is why I had that Debian excursion). Now finally I did it and with an ebuild!

The ebuild is based on Dan's attempt (http://bugs.gentoo.org/show_bug.cgi?id=39966) and should work on a stable Gentoo system. Here's the content:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils gnome2
DESCRIPTION="gretl is a cross-platform software package for econometric analysis"
HOMEPAGE="http://gretl.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="gmp gnome gtk2 gtkextra ole2 readline sourceview"
DEPEND="x11-libs/gtk+
dev-libs/libxml2
sci-visualization/gnuplot
sci-libs/lapack
media-libs/gdk-pixbuf
sourceview? (x11-libs/gtksourceview)
readline? (sys-libs/readline)
gnome? (gnome-base/gnome)
gmp? (dev-libs/gmp)
!gtk2 (
ole2? (dev-libs/libole2)
)"
RDEPEND=""

src_compile() {
local myconf
if ! use gtk2 ; then
ewarn "Running ${PN} without GTK+-2.0 reduces functionality"
myconf="${myconf} --without-gtk2"
if ! use ole2 ; then
myconf="${myconf} --without-libole2"
fi
if ! use gtkextra ; then
myconf="${myconf} --without-gtkextra"
fi
fi
if ! use gnome ; then
myconf="${myconf} --without-gnome"
fi
econf || die "configure failed"
emake || die "emake failed"
}

src_install() {
make check
if use gnome ; then
gnome2_src_install gnome_prefix=${D}/usr langdir=${D}/usr/share/gtksourceview-1.0/language-specs
else
make prefix=${D}/usr bindir=${D}/usr/bin mandir=${D}/usr/share/man infodir=${D}/usr/share/info datadir=${D}/usr/share gretldir=${D}/usr/share/gretl localedir=${D}/usr/share/locale langdir=${D}/usr/share/gtksourceview-1.0/language-specs libdir=${D}/usr/$(get_libdir) sysconfdir=${D}/etc install || die
fi
}


Before you install it, don't forget to:
Code:
# ebuild /usr/local/portage/sci-mathematics/gretl/gretl-1.5.1.ebuild digest


first.

0 Comments:

Post a Comment

<< Home