dev-libs/libusb: stable 1.0.21 for sparc, bug #630342
[gentoo.git] / eclass / gnome-games.eclass
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: gnome-games.eclass
5 # @MAINTAINER:
6 # Gnome team <gnome@gentoo.org>
7 # @AUTHOR:
8 # Author: Pacho Ramos <pacho@gentoo.org>
9 # @BLURB: An eclass to build gnome-games.
10 # @DESCRIPTION:
11 # An eclass to build gnome-games using proper phases from gnome2 and
12 # games eclasses.
13
14 case "${EAPI:-0}" in
15         0|1)
16                 die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
17                 ;;
18         2|3|4|5)
19                 ;;
20         *)
21                 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
22                 ;;
23 esac
24
25 inherit autotools games gnome2
26
27 EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
28
29 if [[ ! ${_GNOME_GAMES} ]]; then
30
31 DEPEND=">=dev-util/intltool-0.50.2-r1"
32 RDEPEND="!gnome-extra/gnome-games"
33
34 # @FUNCTION: gnome-games_pkg_setup
35 # @DESCRIPTION:
36 # Set proper phase defaults
37 gnome-games_pkg_setup() {
38         debug-print-function ${FUNCNAME} "${@}"
39         games_pkg_setup
40 }
41
42 # @FUNCTION: gnome-games_src_prepare
43 # @DESCRIPTION:
44 # Set proper phase defaults
45 gnome-games_src_prepare() {
46         debug-print-function ${FUNCNAME} "${@}"
47
48         # Fix intltoolize broken file:
49         # https://bugs.launchpad.net/intltool/+bug/398571
50         intltoolize --force --copy --automake || die "intltoolize failed"
51         eautoreconf
52
53         gnome2_src_prepare
54 }
55
56 # @FUNCTION: gnome-games_src_configure
57 # @DESCRIPTION:
58 # Set proper phase defaults, relying on gnome2_src_configure
59 # and passing extra arguments from egamesconf (games.eclass)
60 gnome-games_src_configure() {
61         debug-print-function ${FUNCNAME} "${@}"
62         gnome2_src_configure \
63                 --prefix="${GAMES_PREFIX}" \
64                 --libdir="$(games_get_libdir)" \
65                 --sysconfdir="${GAMES_SYSCONFDIR}" \
66                 --localstatedir=/var \
67                 --localedir=/usr/share/locale \
68                 "$@"
69 }
70
71 # @FUNCTION: gnome-games_src_compile
72 # @DESCRIPTION:
73 # Set proper phase defaults
74 gnome-games_src_compile() {
75         debug-print-function ${FUNCNAME} "${@}"
76         gnome2_src_compile
77 }
78
79 # @FUNCTION: gnome-games_src_install
80 # @DESCRIPTION:
81 # Set proper phase defaults
82 gnome-games_src_install() {
83         debug-print-function ${FUNCNAME} "${@}"
84         gnome2_src_install
85         prepgamesdirs
86 }
87
88 # @FUNCTION: gnome-games_pkg_preinst
89 # @DESCRIPTION:
90 # Set proper phase defaults
91 gnome-games_pkg_preinst() {
92         debug-print-function ${FUNCNAME} "${@}"
93         gnome2_pkg_preinst
94         games_pkg_preinst
95 }
96
97 # @FUNCTION: gnome-games_pkg_postinst
98 # @DESCRIPTION:
99 # Set proper phase defaults
100 gnome-games_pkg_postinst() {
101         debug-print-function ${FUNCNAME} "${@}"
102         gnome2_pkg_postinst
103         games_pkg_postinst
104 }
105
106 # @FUNCTION: gnome-games_pkg_postrm
107 # @DESCRIPTION:
108 # Set proper phase defaults
109 gnome-games_pkg_postrm() {
110         debug-print-function ${FUNCNAME} "${@}"
111         gnome2_pkg_postrm
112 }
113
114 _GNOME_GAMES=1
115 fi