dev-ruby/capybara: fix slot dependencies
[gentoo.git] / app-i18n / zinnia / zinnia-0.06-r3.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 PERL_EXPORT_PHASE_FUNCTIONS=no
7 inherit perl-module eutils flag-o-matic toolchain-funcs autotools-utils
8
9 DESCRIPTION="Online hand recognition system with machine learning"
10 HOMEPAGE="http://zinnia.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/zinnia/${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 # Package warrants IUSE doc
17 IUSE="perl static-libs"
18 DOCS=( AUTHORS ChangeLog NEWS README )
19 PATCHES=(
20         "${FILESDIR}/${P}-ricedown.patch"
21         "${FILESDIR}/${P}-perl.patch"
22 )
23 AUTOTOOLS_AUTORECONF=yes
24
25 src_prepare() {
26         autotools-utils_src_prepare
27         if use perl ; then
28                         pushd "${S}/perl" >/dev/null
29                         PATCHES=()
30                         perl-module_src_prepare
31                         popd >/dev/null
32         fi
33 }
34
35 src_compile() {
36         autotools-utils_src_compile
37         if use perl ; then
38                         pushd "${S}"/perl >/dev/null
39
40                         # We need to run this here as otherwise it won't pick up the
41                         # just-built -lzinnia and cause the extension to have
42                         # undefined symbols.
43                         perl-module_src_configure
44
45                         append-cppflags "-I${S}"
46                         append-ldflags "-L${S}/.libs"
47
48                         emake \
49                                 LDDLFLAGS="-shared" \
50                                 OTHERLDFLAGS="${LDFLAGS}" \
51                                 CC="$(tc-getCXX)" LD="$(tc-getCXX)" \
52                                 OPTIMIZE="${CPPFLAGS} ${CXXFLAGS}"
53                         popd >/dev/null
54         fi
55 }
56
57 src_install() {
58         autotools-utils_src_install
59
60         if use perl ; then
61                         pushd "${S}/perl" >/dev/null
62                         perl-module_src_install
63                         popd >/dev/null
64         fi
65
66         # Curiously ChangeLog & NEWS are left uncompressed
67         dohtml doc/*.html doc/*.css
68 }