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

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.38 - (show annotations) (download)
Sat Dec 3 16:54:44 2011 UTC (2 years, 7 months ago) by ssuominen
Branch: MAIN
Changes since 1.37: +4 -2 lines
Only depend on AUTOTOOLS_DEPEND when pulling xfce4-dev-tools, so use AUTOTOOLS_AUTO_DEPEND=no

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.37 2011/10/15 21:08:59 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 the variable is set
15
16 # @ECLASS-VARIABLE: EINTLTOOLIZE
17 # @DESCRIPTION:
18 # Run intltoolize --force --copy --automake if the variable is set
19
20 # @ECLASS-VARIABLE: XFCONF
21 # @DESCRIPTION:
22 # This should be an array defining arguments for econf
23
24 AUTOTOOLS_AUTO_DEPEND="no"
25
26 unset _xfconf_live
27 [[ $PV == *9999* ]] && _xfconf_live=git-2
28
29 inherit ${_xfconf_live} autotools base eutils fdo-mime gnome2-utils libtool
30
31 EGIT_BOOTSTRAP="autogen.sh"
32 EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}"
33
34 _xfconf_deps=""
35 _xfconf_m4=">=dev-util/xfce4-dev-tools-4.8.0 ${AUTOTOOLS_DEPEND}"
36
37 [[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}"
38 [[ -n $EINTLTOOLIZE ]] && _xfconf_deps+=" dev-util/intltool"
39 [[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}"
40
41 RDEPEND=""
42 DEPEND="${_xfconf_deps}"
43
44 unset _xfconf_deps
45 unset _xfconf_m4
46
47 case ${EAPI:-0} in
48 4) ;;
49 *) die "Unknown EAPI." ;;
50 esac
51
52 [[ -n $_xfconf_live ]] && _xfconf_live=src_unpack
53
54 EXPORT_FUNCTIONS ${_xfconf_live} src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
55
56 # @FUNCTION: xfconf_use_debug
57 # @DESCRIPTION:
58 # If IUSE has debug, return --enable-debug=minimum.
59 # If USE debug is enabled, return --enable-debug which is the same as --enable-debug=yes.
60 # If USE debug is enabled and the XFCONF_FULL_DEBUG variable is set, return --enable-debug=full.
61 xfconf_use_debug() {
62 if has debug ${IUSE}; then
63 if use debug; then
64 if [[ -n $XFCONF_FULL_DEBUG ]]; then
65 echo "--enable-debug=full"
66 else
67 echo "--enable-debug"
68 fi
69 else
70 echo "--enable-debug=minimum"
71 fi
72 else
73 ewarn "${FUNCNAME} called without debug in IUSE"
74 fi
75 }
76
77 # @FUNCTION: xfconf_src_unpack
78 # @DESCRIPTION:
79 # Run git-2_src_unpack if required
80 xfconf_src_unpack() {
81 NOCONFIGURE=1 git-2_src_unpack
82 }
83
84 # @FUNCTION: xfconf_src_prepare
85 # @DESCRIPTION:
86 # Run base_src_prepare and eautoreconf or elibtoolize
87 xfconf_src_prepare() {
88 debug-print-function ${FUNCNAME} "$@"
89 base_src_prepare
90
91 if [[ -n $EINTLTOOLIZE ]]; then
92 local _intltoolize="intltoolize --force --copy --automake"
93 ebegin "Running ${_intltoolize}"
94 ${_intltoolize} || die
95 eend $?
96 fi
97
98 if [[ -n $EAUTORECONF ]]; then
99 AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf
100 else
101 elibtoolize
102 fi
103 }
104
105 # @FUNCTION: xfconf_src_configure
106 # @DESCRIPTION:
107 # Run econf with opts from the XFCONF array
108 xfconf_src_configure() {
109 debug-print-function ${FUNCNAME} "$@"
110 [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
111 econf "${XFCONF[@]}"
112 }
113
114 # @FUNCTION: xfconf_src_install
115 # @DESCRIPTION:
116 # Run emake install and install documentation in the DOCS array
117 xfconf_src_install() {
118 debug-print-function ${FUNCNAME} "$@"
119
120 # FIXME
121 if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
122 touch ChangeLog
123 fi
124
125 base_src_install "$@" || die
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