1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # @ECLASS: clutter.eclass
7 # GNOME Herd <gnome@gentoo.org>
9 # Nirbheek Chauhan <nirbheek@gentoo.org>
10 # @BLURB: Sets SRC_URI, LICENSE, etc and exports src_install
14 HOMEPAGE="http://www.clutter-project.org/"
16 RV=($(get_version_components))
17 SRC_URI="http://www.clutter-project.org/sources/${PN}/${RV[0]}.${RV[1]}/${P}.tar.bz2"
19 # All official clutter packages use LGPL-2.1 or later
20 LICENSE="${LICENSE:-LGPL-2.1+}"
22 # This will be used by all clutter packages
23 DEPEND="virtual/pkgconfig"
25 # @ECLASS-VARIABLE: CLUTTER_LA_PUNT
27 # Set to anything except 'no' to remove *all* .la files before installing.
28 # Not to be used without due consideration, sometimes .la files *are* needed.
29 CLUTTER_LA_PUNT="${CLUTTER_LA_PUNT:-"no"}"
31 # @ECLASS-VARIABLE: DOCS
33 # This variable holds relative paths of files to be dodoc-ed.
34 # By default, it contains the standard list of autotools doc files
35 DOCS="${DOCS:-AUTHORS ChangeLog NEWS README TODO}"
37 # @ECLASS-VARIABLE: EXAMPLES
39 # This variable holds relative paths of files to be added as examples when the
40 # "examples" USE-flag exists, and is switched on. Bash expressions can be used
41 # since the variable is eval-ed before substitution. Empty by default.
42 EXAMPLES="${EXAMPLES:-""}"
44 # @FUNCTION: clutter_src_install
46 # Runs emake install, dodoc, and installs examples
47 clutter_src_install() {
48 emake DESTDIR="${D}" install || die "emake install failed"
49 dodoc ${DOCS} || die "dodoc failed"
52 if has examples ${IUSE} && use examples; then
53 insinto /usr/share/doc/${PF}/examples
55 # We use eval to be able to use globs and other bash expressions
56 for example in $(eval echo ${EXAMPLES}); do
58 if [[ ${example: -1} == "/" ]]; then
59 doins -r ${example} || die "doins ${example} failed!"
61 doins ${example} || die "doins ${example} failed!"
66 # Delete all .la files
67 if [[ "${CLUTTER_LA_PUNT}" != "no" ]]; then
68 find "${D}" -name '*.la' -exec rm -f '{}' + || die
72 EXPORT_FUNCTIONS src_install