Merge remote-tracking branch 'remotes/github/pr/115'.
[gentoo.git] / sci-visualization / ggobi / ggobi-2.1.8.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=2
6 inherit eutils autotools
7
8 DESCRIPTION="Visualization program for exploring high-dimensional data"
9 HOMEPAGE="http://www.ggobi.org"
10 SRC_URI="http://www.ggobi.org/downloads/${P}.tar.bz2"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE="minimal nls"
16
17 RDEPEND="
18         >=media-gfx/graphviz-2.6
19         x11-libs/gtk+:2
20         dev-libs/libxml2:2"
21 DEPEND="${RDEPEND}
22         virtual/pkgconfig"
23
24 src_prepare() {
25         # build with external system libltdl
26         rm -rf libltdl
27
28         has_version ">=media-gfx/graphviz-2.22" && \
29                 epatch "${FILESDIR}"/${P}-graphviz.patch
30         epatch "${FILESDIR}"/${P}-syslibltdl.patch
31         epatch "${FILESDIR}"/${P}-plugindir.patch
32         for f in $(find "${S}" -name "configure.ac"); do
33                 sed -i -e '/AM_INIT/ a\AM_MAINTAINER_MODE' $f || die #342747
34         done
35         eautoreconf
36 }
37
38 src_configure() {
39         econf \
40                 --disable-maintainer-mode \
41                 --disable-rpath \
42                 $(use_enable nls) \
43                 $(use_with !minimal all-plugins)
44 }
45
46 src_compile() {
47         emake || die "emake failed"
48         # generate default configuration
49         emake ggobirc || die "ggobi configuration generation failed"
50 }
51
52 src_install() {
53         emake DESTDIR="${D}" install || die "emake install failed"
54         dodoc README AUTHORS NEWS ChangeLog
55         insinto /etc/xdg/ggobi
56         doins ggobirc || die
57 }