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

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.23 - (show annotations) (download)
Thu Feb 10 18:14:53 2011 UTC (3 years, 5 months ago) by ssuominen
Branch: MAIN
Changes since 1.22: +4 -26 lines
Remove support for deprecated EAPIs 0 1 and 2

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.22 2011/02/04 17:23:35 ssuominen Exp $
4
5 # @ECLASS: xfconf.eclass
6 # @MAINTAINER:
7 # XFCE maintainers <xfce@gentoo.org>
8 # @BLURB: Default XFCE ebuild layout
9 # @DESCRIPTION:
10 # Default XFCE ebuild layout
11
12 # @ECLASS-VARIABLE: EAUTORECONF
13 # @DESCRIPTION:
14 # Run eautoreconf instead of elibtoolize if set "yes"
15
16 # @ECLASS-VARIABLE: EINTLTOOLIZE
17 # @DESCRIPTION:
18 # Run intltoolize --force --copy --automake if set "yes"
19
20 # @ECLASS-VARIABLE: DOCS
21 # @DESCRIPTION:
22 # Define documentation to install
23
24 # @ECLASS-VARIABLE: PATCHES
25 # @DESCRIPTION:
26 # Define patches to apply
27
28 # @ECLASS-VARIABLE: XFCONF
29 # @DESCRIPTION:
30 # Define options for econf
31
32 inherit autotools base eutils fdo-mime gnome2-utils libtool
33
34 if ! [[ ${MY_P} ]]; then
35 MY_P=${P}
36 else
37 S=${WORKDIR}/${MY_P}
38 fi
39
40 SRC_URI="mirror://xfce/xfce/${PV}/src/${MY_P}.tar.bz2"
41
42 if [[ "${EINTLTOOLIZE}" == "yes" ]]; then
43 _xfce4_intltool="dev-util/intltool"
44 fi
45
46 if [[ "${EAUTORECONF}" == "yes" ]]; then
47 _xfce4_m4=">=dev-util/xfce4-dev-tools-4.7.0"
48 fi
49
50 RDEPEND=""
51 DEPEND="${_xfce4_intltool}
52 ${_xfce4_m4}"
53
54 unset _xfce4_intltool
55 unset _xfce4_m4
56
57 case ${EAPI:-0} in
58 4|3) ;;
59 *) die "Unknown EAPI." ;;
60 esac
61
62 EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
63
64 # @FUNCTION: xfconf_use_debug
65 # @DESCRIPTION:
66 # Return --enable-debug, null, --enable-debug=full or --disable-debug based on
67 # XFCONF_FULL_DEBUG variable and USE debug
68 xfconf_use_debug() {
69 if has debug ${IUSE}; then
70 if use debug; then
71 if [[ -n $XFCONF_FULL_DEBUG ]]; then
72 echo "--enable-debug=full"
73 else
74 echo "--enable-debug"
75 fi
76 else
77 if [[ -n $XFCONF_FULL_DEBUG ]]; then
78 echo "--disable-debug"
79 fi
80 fi
81 fi
82 }
83
84 # @FUNCTION: xfconf_src_prepare
85 # @DESCRIPTION:
86 # Run base_src_util autopatch and eautoreconf or elibtoolize
87 xfconf_src_prepare() {
88 debug-print-function ${FUNCNAME} "$@"
89 base_src_prepare
90
91 if [[ "${EINTLTOOLIZE}" == "yes" ]]; then
92 intltoolize --force --copy --automake || die
93 fi
94
95 if [[ "${EAUTORECONF}" == "yes" ]]; then
96 AT_M4DIR="${EPREFIX}/usr/share/xfce4/dev-tools/m4macros" eautoreconf
97 else
98 elibtoolize
99 fi
100 }
101
102 # @FUNCTION: xfconf_src_configure
103 # @DESCRIPTION:
104 # Run econf with opts in XFCONF array
105 xfconf_src_configure() {
106 debug-print-function ${FUNCNAME} "$@"
107
108 # Convert XFCONF to an array, see base.eclass for original code
109 if [[ "$(declare -p XFCONF 2>/dev/null 2>&1)" != "declare -a"* ]]; then
110 XFCONF=( ${XFCONF} )
111 fi
112
113 econf ${XFCONF[@]}
114 }
115
116 # @FUNCTION: xfconf_src_install
117 # @DESCRIPTION:
118 # Run emake install and install documentation in DOCS variable
119 xfconf_src_install() {
120 debug-print-function ${FUNCNAME} "$@"
121 emake DESTDIR="${D}" "$@" install || die
122
123 if [[ -n ${DOCS} ]]; then
124 dodoc ${DOCS} || die
125 fi
126
127 find "${ED}" -name '*.la' -exec rm -f {} +
128
129 validate_desktop_entries
130 }
131
132 # @FUNCTION: xfconf_pkg_preinst
133 # @DESCRIPTION:
134 # Run gnome2_icon_savelist
135 xfconf_pkg_preinst() {
136 debug-print-function ${FUNCNAME} "$@"
137 gnome2_icon_savelist
138 }
139
140 # @FUNCTION: xfconf_pkg_postinst
141 # @DESCRIPTION:
142 # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
143 xfconf_pkg_postinst() {
144 debug-print-function ${FUNCNAME} "$@"
145 fdo-mime_desktop_database_update
146 fdo-mime_mime_database_update
147 gnome2_icon_cache_update
148 }
149
150 # @FUNCTION: xfconf_pkg_postrm
151 # @DESCRIPTION:
152 # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
153 xfconf_pkg_postrm() {
154 debug-print-function ${FUNCNAME} "$@"
155 fdo-mime_desktop_database_update
156 fdo-mime_mime_database_update
157 gnome2_icon_cache_update
158 }

  ViewVC Help
Powered by ViewVC 1.1.20