/[gentoo-x86]/sci-mathematics/gretl/gretl-1.8.2.ebuild
Gentoo

Contents of /sci-mathematics/gretl/gretl-1.8.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Aug 7 15:42:18 2009 UTC (3 years, 10 months ago) by bicatali
Branch: MAIN
Version bump. More flags fixes
(Portage version: 2.2_rc36/cvs/Linux x86_64)

1 bicatali 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gretl/gretl-1.8.1.ebuild,v 1.1 2009/06/22 18:53:19 bicatali Exp $
4    
5     USE_EINSTALL=true
6     EAPI=2
7     inherit eutils gnome2 elisp-common
8    
9     DESCRIPTION="Regression, econometrics and time-series library"
10     HOMEPAGE="http://gretl.sourceforge.net/"
11     SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
12    
13     LICENSE="GPL-3"
14     SLOT="0"
15     KEYWORDS="~amd64 ~x86"
16    
17     IUSE="accessibility emacs gmp gnome gtk nls odbc readline sourceview"
18    
19     RDEPEND="dev-libs/libxml2
20     dev-libs/glib:2
21     sci-visualization/gnuplot
22     virtual/lapack
23     virtual/latex-base
24     sci-libs/fftw:3.0
25     dev-libs/mpfr
26     readline? ( sys-libs/readline )
27     gmp? ( dev-libs/gmp )
28     accessibility? ( app-accessibility/flite )
29     gtk? ( sci-visualization/gnuplot[gd]
30     media-libs/gd[png]
31     x11-libs/gtk+:2 )
32     gnome? ( sci-visualization/gnuplot[gd]
33     media-libs/gd[png]
34     gnome-base/libgnomeui
35     gnome-base/libgnomeprint:2.2
36     gnome-base/libgnomeprintui:2.2
37     gnome-base/gconf:2 )
38     sourceview? ( x11-libs/gtksourceview )
39     odbc? ( dev-db/unixODBC )
40     emacs? ( virtual/emacs )"
41    
42     DEPEND="${RDEPEND}
43     dev-util/pkgconfig"
44    
45     SITEFILE=50${PN}-gentoo.el
46    
47     src_prepare() {
48     epatch "${FILESDIR}"/${PN}-1.7.5-locale.patch
49     epatch "${FILESDIR}"/${PN}-1.7.9-nls.patch
50     epatch "${FILESDIR}"/${PN}-1.8.2-ldflags.patch
51     }
52    
53     src_configure() {
54     local myconf
55     if use gtk; then
56     myconf="--enable-gui"
57     myconf="${myconf} $(use_with sourceview gtksourceview)"
58     myconf="${myconf} $(use_with gnome)"
59     else
60     myconf="--disable-gui --without-gnome --without-gtksourceview"
61     fi
62    
63     econf \
64     --with-mpfr \
65     $(use_enable nls) \
66     $(use_with readline) \
67     $(use_with gmp) \
68     $(use_with odbc) \
69     $(use_with accessibility audio) \
70     ${myconf} \
71     LAPACK_LIBS="$(pkg-config --libs lapack)"
72     }
73    
74     src_compile() {
75     emake || die "emake failed"
76     if use emacs; then
77     elisp-compile utils/emacs/gretl.el || die "elisp-compile failed"
78     fi
79     }
80    
81     src_install() {
82     if use gnome; then
83     gnome2_src_install gnome_prefix="${D}"/usr svprefix="${D}usr"
84     else
85     einstall svprefix="${D}usr"
86     fi
87     if use gtk && ! use gnome; then
88     doicon gnome/gretl.png
89     make_desktop_entry gretl_x11 gretl
90     fi
91     if use emacs; then
92     elisp-install ${PN} utils/emacs/gretl.{el,elc} \
93     || die "elisp-install failed"
94     elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
95     || die "elisp-site-file-install failed"
96     fi
97     dodoc README README.audio ChangeLog CompatLog TODO \
98     || die "dodoc failed"
99     }
100    
101     pkg_postinst() {
102     if use emacs; then
103     elisp-site-regen
104     elog "To begin using gretl-mode for all \".inp\" files that you edit,"
105     elog "add the following line to your \"~/.emacs\" file:"
106     elog " (add-to-list 'auto-mode-alist '(\"\\\\.inp\\\\'\" . gretl-mode))"
107     fi
108     }
109    
110     pkg_postrm() {
111     use emacs && elisp-site-regen
112     }

  ViewVC Help
Powered by ViewVC 1.1.20