sci-libs/armadillo: Version bump
[gentoo.git] / sci-libs / geos / geos-3.4.2-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python2_7 )
8 inherit autotools eutils python-single-r1 python-utils-r1
9
10 DESCRIPTION="Geometry engine library for Geographic Information Systems"
11 HOMEPAGE="http://trac.osgeo.org/geos/"
12 SRC_URI="http://download.osgeo.org/geos/${P}.tar.bz2"
13
14 LICENSE="LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris"
17 IUSE="doc php python ruby static-libs"
18
19 RDEPEND="
20         php? ( >=dev-lang/php-5.3[-threads] )
21         ruby? ( dev-lang/ruby )
22 "
23 DEPEND="${RDEPEND}
24         doc? ( app-doc/doxygen )
25         php? ( dev-lang/swig )
26         python? ( dev-lang/swig ${PYTHON_DEPS} )
27         ruby? ( dev-lang/swig )
28 "
29
30 src_prepare() {
31         epatch "${FILESDIR}"/3.4.2-solaris-isnan.patch \
32                 "${FILESDIR}"/3.4.2-ruby_so_name.patch
33         eautoreconf
34         echo "#!${EPREFIX}/bin/bash" > py-compile
35 }
36
37 src_configure() {
38         econf \
39                 $(use_enable python) \
40                 $(use_enable ruby) \
41                 $(use_enable php) \
42                 $(use_enable static-libs static)
43 }
44
45 src_compile() {
46         emake
47
48         use doc && emake -C "${S}/doc" doxygen-html
49 }
50
51 src_install() {
52         emake DESTDIR="${D}" install
53
54         use doc && dohtml -r doc/doxygen_docs/html/*
55         use python && python_optimize "${D}$(python_get_sitedir)"/geos/
56
57         find "${ED}" -name '*.la' -exec rm -f {} +
58 }