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

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.39 - (hide annotations) (download)
Tue Dec 27 17:55:13 2011 UTC (2 years, 6 months ago) by fauli
Branch: MAIN
Changes since 1.38: +2 -2 lines
Update copyright years in headers

1 fauli 1.39 # Copyright 1999-2011 Gentoo Foundation
2 ssuominen 1.1 # Distributed under the terms of the GNU General Public License v2
3 fauli 1.39 # $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.38 2011/12/03 16:54:44 ssuominen Exp $
4 ssuominen 1.1
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 angelos 1.31 # Run eautoreconf instead of elibtoolize if the variable is set
15 ssuominen 1.1
16     # @ECLASS-VARIABLE: EINTLTOOLIZE
17     # @DESCRIPTION:
18 angelos 1.31 # Run intltoolize --force --copy --automake if the variable is set
19 ssuominen 1.1
20 angelos 1.36 # @ECLASS-VARIABLE: XFCONF
21 ssuominen 1.1 # @DESCRIPTION:
22 angelos 1.36 # This should be an array defining arguments for econf
23 ssuominen 1.1
24 ssuominen 1.38 AUTOTOOLS_AUTO_DEPEND="no"
25    
26 angelos 1.36 unset _xfconf_live
27     [[ $PV == *9999* ]] && _xfconf_live=git-2
28    
29     inherit ${_xfconf_live} autotools base eutils fdo-mime gnome2-utils libtool
30 ssuominen 1.1
31 angelos 1.36 EGIT_BOOTSTRAP="autogen.sh"
32     EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}"
33 ssuominen 1.1
34 angelos 1.36 _xfconf_deps=""
35 ssuominen 1.38 _xfconf_m4=">=dev-util/xfce4-dev-tools-4.8.0 ${AUTOTOOLS_DEPEND}"
36 ssuominen 1.1
37 angelos 1.36 [[ -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 ssuominen 1.1
41     RDEPEND=""
42 angelos 1.36 DEPEND="${_xfconf_deps}"
43 ssuominen 1.1
44 angelos 1.36 unset _xfconf_deps
45     unset _xfconf_m4
46 ssuominen 1.1
47     case ${EAPI:-0} in
48 ssuominen 1.37 4) ;;
49 ssuominen 1.1 *) die "Unknown EAPI." ;;
50     esac
51 ssuominen 1.23
52 angelos 1.36 [[ -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 ssuominen 1.1
56 ssuominen 1.11 # @FUNCTION: xfconf_use_debug
57 ssuominen 1.14 # @DESCRIPTION:
58 ssuominen 1.25 # If IUSE has debug, return --enable-debug=minimum.
59 angelos 1.31 # 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 ssuominen 1.11 xfconf_use_debug() {
62 ssuominen 1.12 if has debug ${IUSE}; then
63     if use debug; then
64 ssuominen 1.13 if [[ -n $XFCONF_FULL_DEBUG ]]; then
65 ssuominen 1.12 echo "--enable-debug=full"
66     else
67     echo "--enable-debug"
68     fi
69 ssuominen 1.11 else
70 ssuominen 1.25 echo "--enable-debug=minimum"
71 ssuominen 1.11 fi
72 angelos 1.35 else
73     ewarn "${FUNCNAME} called without debug in IUSE"
74 ssuominen 1.11 fi
75     }
76    
77 angelos 1.36 # @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 ssuominen 1.1 # @FUNCTION: xfconf_src_prepare
85     # @DESCRIPTION:
86 ssuominen 1.32 # Run base_src_prepare and eautoreconf or elibtoolize
87 ssuominen 1.1 xfconf_src_prepare() {
88 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
89 scarabeus 1.4 base_src_prepare
90 ssuominen 1.1
91 ssuominen 1.30 if [[ -n $EINTLTOOLIZE ]]; then
92 ssuominen 1.33 local _intltoolize="intltoolize --force --copy --automake"
93     ebegin "Running ${_intltoolize}"
94     ${_intltoolize} || die
95     eend $?
96 ssuominen 1.1 fi
97    
98 ssuominen 1.30 if [[ -n $EAUTORECONF ]]; then
99 ssuominen 1.32 AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf
100 ssuominen 1.1 else
101     elibtoolize
102     fi
103     }
104    
105     # @FUNCTION: xfconf_src_configure
106     # @DESCRIPTION:
107 angelos 1.31 # Run econf with opts from the XFCONF array
108 ssuominen 1.1 xfconf_src_configure() {
109 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
110 angelos 1.36 [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
111 ssuominen 1.32 econf "${XFCONF[@]}"
112 ssuominen 1.1 }
113    
114     # @FUNCTION: xfconf_src_install
115     # @DESCRIPTION:
116 ssuominen 1.34 # Run emake install and install documentation in the DOCS array
117 ssuominen 1.1 xfconf_src_install() {
118 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
119 ssuominen 1.1
120 angelos 1.36 # FIXME
121     if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
122     touch ChangeLog
123     fi
124    
125     base_src_install "$@" || die
126 ssuominen 1.17
127     find "${ED}" -name '*.la' -exec rm -f {} +
128 ssuominen 1.18
129     validate_desktop_entries
130 ssuominen 1.1 }
131    
132     # @FUNCTION: xfconf_pkg_preinst
133     # @DESCRIPTION:
134     # Run gnome2_icon_savelist
135     xfconf_pkg_preinst() {
136 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
137 ssuominen 1.1 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 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
145 ssuominen 1.1 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 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
155 ssuominen 1.1 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