/[gentoo-x86]/sci-libs/geos/geos-3.2.2.ebuild
Gentoo

Contents of /sci-libs/geos/geos-3.2.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Mon Feb 20 15:27:40 2012 UTC (2 years, 6 months ago) by patrick
Branch: MAIN
Changes since 1.11: +3 -3 lines
Restricting pypy #403809

(Portage version: 2.2.0_alpha87/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/geos/geos-3.2.2.ebuild,v 1.11 2011/06/11 13:43:29 scarabeus Exp $
4
5 EAPI="3"
6
7 PYTHON_DEPEND="python? 2"
8 SUPPORT_PYTHON_ABIS="1"
9 RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
10
11 inherit autotools eutils python
12
13 DESCRIPTION="Geometry engine library for Geographic Information Systems"
14 HOMEPAGE="http://trac.osgeo.org/geos/"
15 SRC_URI="http://download.osgeo.org/geos/${P}.tar.bz2"
16
17 LICENSE="LGPL-2.1"
18 SLOT="0"
19 KEYWORDS="amd64 ppc ppc64 x86 ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris"
20 IUSE="doc python ruby static-libs"
21
22 RDEPEND="ruby? ( dev-lang/ruby:1.8 )"
23 DEPEND="${RDEPEND}
24 doc? ( app-doc/doxygen )
25 ruby? ( dev-lang/swig )
26 python? ( dev-lang/swig )"
27
28 pkg_setup() {
29 use python && python_pkg_setup
30 }
31
32 src_prepare() {
33 epatch \
34 "${FILESDIR}"/3.2.0-multipy.patch \
35 "${FILESDIR}"/3.2.0-swig2.0.patch \
36 "${FILESDIR}"/3.2.0-python.patch \
37 "${FILESDIR}"/3.2.0-darwin.patch \
38 "${FILESDIR}"/${PV}-disable_static_modules.patch \
39 "${FILESDIR}"/${PV}-gcc46.patch
40 eautoreconf
41 echo "#!${EPREFIX}/bin/bash" > py-compile
42 }
43
44 src_configure() {
45 econf \
46 $(use_enable python) \
47 $(use_enable ruby) \
48 $(use_enable static-libs static)
49 }
50
51 src_compile() {
52 emake || die "emake failed"
53 if use python; then
54 python_copy_sources swig/python
55 building() {
56 emake \
57 PYTHON_CPPFLAGS="-I${EPREFIX}$(python_get_includedir)" \
58 PYTHON_LDFLAGS="$(python_get_library -l)" \
59 SWIG_PYTHON_CPPFLAGS="-I${EPREFIX}$(python_get_includedir)" \
60 pyexecdir="${EPREFIX}$(python_get_sitedir)" \
61 pythondir="${EPREFIX}$(python_get_sitedir)"
62 }
63 python_execute_function -s --source-dir swig/python building
64 fi
65 if use doc; then
66 cd "${S}/doc"
67 emake doxygen-html || die "doc generation failed"
68 fi
69 }
70
71 src_install() {
72 emake DESTDIR="${D}" install || die "emake install failed"
73 if use python; then
74 python_copy_sources swig/python
75 installation() {
76 emake \
77 DESTDIR="${D}" \
78 pythondir="${EPREFIX}$(python_get_sitedir)" \
79 pyexecdir="${EPREFIX}$(python_get_sitedir)" \
80 install
81 }
82 python_execute_function -s --source-dir swig/python installation
83 python_clean_installation_image
84 fi
85
86 dodoc AUTHORS NEWS README TODO || die
87 if use doc; then
88 cd "${S}/doc"
89 dohtml -r doxygen_docs/html/* || die
90 fi
91
92 find "${ED}" -name '*.la' -exec rm -f {} +
93 }
94
95 pkg_postinst() {
96 use python && python_mod_optimize geos/geos.py
97 }
98
99 pkg_postrm() {
100 use python && python_mod_cleanup geos/geos.py
101 }

  ViewVC Help
Powered by ViewVC 1.1.20