| 1 |
jdhore |
1.6 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
nirbheek |
1.1 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
jdhore |
1.6 |
# $Header: /var/cvsroot/gentoo-x86/eclass/clutter.eclass,v 1.5 2011/08/22 04:46:31 vapier Exp $ |
| 4 |
nirbheek |
1.1 |
|
| 5 |
|
|
# @ECLASS: clutter.eclass |
| 6 |
vapier |
1.5 |
# @MAINTAINER: |
| 7 |
|
|
# GNOME Herd <gnome@gentoo.org> |
| 8 |
|
|
# @AUTHOR: |
| 9 |
|
|
# Nirbheek Chauhan <nirbheek@gentoo.org> |
| 10 |
nirbheek |
1.1 |
# @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 |
nirbheek |
1.2 |
# All official clutter packages use LGPL-2.1 |
| 20 |
|
|
LICENSE="${LICENSE:-LGPL-2.1}" |
| 21 |
nirbheek |
1.1 |
|
| 22 |
|
|
# This will be used by all clutter packages |
| 23 |
jdhore |
1.6 |
DEPEND="virtual/pkgconfig" |
| 24 |
nirbheek |
1.1 |
|
| 25 |
nirbheek |
1.3 |
# @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 |
nirbheek |
1.1 |
# @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 |
vapier |
1.5 |
# @DESCRIPTION: |
| 46 |
|
|
# Runs emake install, dodoc, and installs examples |
| 47 |
nirbheek |
1.1 |
clutter_src_install() { |
| 48 |
|
|
emake DESTDIR="${D}" install || die "emake install failed" |
| 49 |
|
|
dodoc ${DOCS} || die "dodoc failed" |
| 50 |
|
|
|
| 51 |
|
|
# examples |
| 52 |
ssuominen |
1.4 |
if has examples ${IUSE} && use examples; then |
| 53 |
nirbheek |
1.1 |
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 |
nirbheek |
1.3 |
|
| 66 |
|
|
# Delete all .la files |
| 67 |
|
|
if [[ "${CLUTTER_LA_PUNT}" != "no" ]]; then |
| 68 |
|
|
find "${D}" -name '*.la' -exec rm -f '{}' + || die |
| 69 |
|
|
fi |
| 70 |
nirbheek |
1.1 |
} |
| 71 |
|
|
|
| 72 |
|
|
EXPORT_FUNCTIONS src_install |