/[gentoo-x86]/sci-mathematics/fann/fann-2.0.0.ebuild
Gentoo

Contents of /sci-mathematics/fann/fann-2.0.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Tue May 8 18:18:55 2012 UTC (2 years, 3 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Version bump. Optimize python module only when python is selected (bug #356975)

(Portage version: 2.1.10.56/cvs/Linux x86_64)

1 patrick 1.8 # Copyright 1999-2012 Gentoo Foundation
2 markusle 1.1 # Distributed under the terms of the GNU General Public License v2
3 bicatali 1.9 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/fann/fann-2.0.0.ebuild,v 1.8 2012/02/25 03:24:24 patrick Exp $
4 markusle 1.1
5 jlec 1.7 EAPI=2
6 markusle 1.1
7 jlec 1.7 PYTHON_DEPEND="python? 2"
8     SUPPORT_PYTHON_ABIS="1"
9 patrick 1.8 RESTRICT_PYTHON_ABIS="3.* *-jython"
10 jlec 1.7
11     inherit eutils python
12    
13     MY_P=${P/_/}
14    
15     DESCRIPTION="Fast Artificial Neural Network Library"
16 markusle 1.1 HOMEPAGE="http://leenissen.dk/fann/"
17 jlec 1.7 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
18 markusle 1.1
19     LICENSE="LGPL-2.1"
20     SLOT="0"
21 josejx 1.3 KEYWORDS="~amd64 ~ppc ~x86"
22 markusle 1.1 IUSE="doc python"
23    
24 jlec 1.7 RDEPEND=""
25     DEPEND="
26     ${RDEPEND}
27     python? ( dev-lang/swig )"
28    
29     src_prepare() {
30     epatch \
31     "${FILESDIR}"/${P}-shared-libs-gentoo.patch \
32     "${FILESDIR}"/${P}-benchmark.patch
33     use python && python_copy_sources python
34 markusle 1.1 }
35    
36     src_compile() {
37     emake || die "failed to build src"
38 jlec 1.7 compilation() {
39     emake PYTHON_VERSION="$(python_get_version)" || die "emake python failed"
40     }
41     use python && python_execute_function -s --source-dir python compilation
42 markusle 1.1 }
43    
44     src_install() {
45 jlec 1.7 emake install DESTDIR="${D}" || die "install failed"
46     dodoc AUTHORS ChangeLog NEWS README TODO || die
47 markusle 1.1
48     if use doc; then
49     dodoc doc/*.txt || \
50     die "failed to install docs"
51 jlec 1.7 insinto /usr/share/doc/${PF}
52 markusle 1.1 doins doc/fann_en.pdf || \
53     die "failed to install reference manual"
54 jlec 1.7 insinto /usr/share/${PN}
55     doins -r benchmarks || \
56 markusle 1.1 die "failed to install benchmarks"
57 jlec 1.7 doins -r examples || \
58 markusle 1.1 die "failed to install examples"
59     fi
60    
61 jlec 1.7 installation() {
62     emake install ROOT="${D}" || die "failed to install python wrappers"
63 markusle 1.1 if use doc; then
64 jlec 1.7 insinto /usr/share/doc/${PF}/examples/python
65     doins -r examples || die "failed to install python examples"
66 markusle 1.1 fi
67 jlec 1.7 }
68     use python && python_execute_function -s --source-dir python installation
69     }
70    
71     pkg_postinst() {
72     python_mod_optimize py${PN}
73     }
74    
75     pkg_postrm() {
76     python_mod_cleanup py${PN}
77 markusle 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20