/[gentoo-x86]/eclass/clutter.eclass
Gentoo

Contents of /eclass/clutter.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Feb 7 16:50:42 2011 UTC (3 years, 9 months ago) by nirbheek
Branch: MAIN
Changes since 1.2: +12 -1 lines
Add a variable to remove all .la files if requested

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

  ViewVC Help
Powered by ViewVC 1.1.20