x11-misc/alock: Take ownership of package
[gentoo.git] / eclass / clutter.eclass
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 # @DEAD
6
7 # @ECLASS: clutter.eclass
8 # @MAINTAINER:
9 # GNOME Herd <gnome@gentoo.org>
10 # @AUTHOR:
11 # Nirbheek Chauhan <nirbheek@gentoo.org>
12 # @BLURB: Sets SRC_URI, LICENSE, etc and exports src_install
13
14 inherit versionator
15
16 HOMEPAGE="http://www.clutter-project.org/"
17
18 RV=($(get_version_components))
19 SRC_URI="http://www.clutter-project.org/sources/${PN}/${RV[0]}.${RV[1]}/${P}.tar.bz2"
20
21 eqawarn "emul-linux-x86.eclass is last rited and will be removed on 2016-01-29."
22
23 # All official clutter packages use LGPL-2.1 or later
24 LICENSE="${LICENSE:-LGPL-2.1+}"
25
26 # This will be used by all clutter packages
27 DEPEND="virtual/pkgconfig"
28
29 # @ECLASS-VARIABLE: CLUTTER_LA_PUNT
30 # @DESCRIPTION:
31 # Set to anything except 'no' to remove *all* .la files before installing.
32 # Not to be used without due consideration, sometimes .la files *are* needed.
33 CLUTTER_LA_PUNT="${CLUTTER_LA_PUNT:-"no"}"
34
35 # @ECLASS-VARIABLE: DOCS
36 # @DESCRIPTION:
37 # This variable holds relative paths of files to be dodoc-ed.
38 # By default, it contains the standard list of autotools doc files
39 DOCS="${DOCS:-AUTHORS ChangeLog NEWS README TODO}"
40
41 # @ECLASS-VARIABLE: EXAMPLES
42 # @DESCRIPTION:
43 # This variable holds relative paths of files to be added as examples when the
44 # "examples" USE-flag exists, and is switched on. Bash expressions can be used
45 # since the variable is eval-ed before substitution. Empty by default.
46 EXAMPLES="${EXAMPLES:-""}"
47
48 # @FUNCTION: clutter_src_install
49 # @DESCRIPTION:
50 # Runs emake install, dodoc, and installs examples
51 clutter_src_install() {
52         emake DESTDIR="${D}" install || die "emake install failed"
53         dodoc ${DOCS} || die "dodoc failed"
54
55         # examples
56         if has examples ${IUSE} && use examples; then
57                 insinto /usr/share/doc/${PF}/examples
58
59                 # We use eval to be able to use globs and other bash expressions
60                 for example in $(eval echo ${EXAMPLES}); do
61                         # If directory
62                         if [[ ${example: -1} == "/" ]]; then
63                                 doins -r ${example} || die "doins ${example} failed!"
64                         else
65                                 doins ${example} || die "doins ${example} failed!"
66                         fi
67                 done
68         fi
69
70         # Delete all .la files
71         if [[ "${CLUTTER_LA_PUNT}" != "no" ]]; then
72                 find "${D}" -name '*.la' -exec rm -f '{}' + || die
73         fi
74 }
75
76 EXPORT_FUNCTIONS src_install