| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/clutter.eclass,v 1.4 2011/07/08 11:35:01 ssuominen Exp $
|
| 4 |
|
| 5 |
# @ECLASS: clutter.eclass
|
| 6 |
# @MAINTAINER:
|
| 7 |
# GNOME Herd <gnome@gentoo.org>
|
| 8 |
# @AUTHOR:
|
| 9 |
# Nirbheek Chauhan <nirbheek@gentoo.org>
|
| 10 |
# @BLURB: Sets SRC_URI, LICENSE, etc and exports src_install
|
| 11 |
|
| 12 |
inherit versionator
|
| 13 |
|
| 14 |
HOMEPAGE="http://www.clutter-project.org/"
|
| 15 |
|
| 16 |
RV=($(get_version_components))
|
| 17 |
SRC_URI="http://www.clutter-project.org/sources/${PN}/${RV[0]}.${RV[1]}/${P}.tar.bz2"
|
| 18 |
|
| 19 |
# All official clutter packages use LGPL-2.1
|
| 20 |
LICENSE="${LICENSE:-LGPL-2.1}"
|
| 21 |
|
| 22 |
# This will be used by all clutter packages
|
| 23 |
DEPEND="dev-util/pkgconfig"
|
| 24 |
|
| 25 |
# @ECLASS-VARIABLE: CLUTTER_LA_PUNT
|
| 26 |
# @DESCRIPTION:
|
| 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"}"
|
| 30 |
|
| 31 |
# @ECLASS-VARIABLE: DOCS
|
| 32 |
# @DESCRIPTION:
|
| 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}"
|
| 36 |
|
| 37 |
# @ECLASS-VARIABLE: EXAMPLES
|
| 38 |
# @DESCRIPTION:
|
| 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:-""}"
|
| 43 |
|
| 44 |
# @FUNCTION: clutter_src_install
|
| 45 |
# @DESCRIPTION:
|
| 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"
|
| 50 |
|
| 51 |
# examples
|
| 52 |
if has examples ${IUSE} && use examples; then
|
| 53 |
insinto /usr/share/doc/${PF}/examples
|
| 54 |
|
| 55 |
# We use eval to be able to use globs and other bash expressions
|
| 56 |
for example in $(eval echo ${EXAMPLES}); do
|
| 57 |
# If directory
|
| 58 |
if [[ ${example: -1} == "/" ]]; then
|
| 59 |
doins -r ${example} || die "doins ${example} failed!"
|
| 60 |
else
|
| 61 |
doins ${example} || die "doins ${example} failed!"
|
| 62 |
fi
|
| 63 |
done
|
| 64 |
fi
|
| 65 |
|
| 66 |
# Delete all .la files
|
| 67 |
if [[ "${CLUTTER_LA_PUNT}" != "no" ]]; then
|
| 68 |
find "${D}" -name '*.la' -exec rm -f '{}' + || die
|
| 69 |
fi
|
| 70 |
}
|
| 71 |
|
| 72 |
EXPORT_FUNCTIONS src_install
|