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

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.37 - (hide annotations) (download)
Sat Oct 15 21:08:59 2011 UTC (2 years, 8 months ago) by ssuominen
Branch: MAIN
Changes since 1.36: +2 -2 lines
Remove support for deprecated EAPI=3.

1 ssuominen 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.37 # $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.36 2011/06/13 18:01:11 angelos 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 angelos 1.36 unset _xfconf_live
25     [[ $PV == *9999* ]] && _xfconf_live=git-2
26    
27     inherit ${_xfconf_live} autotools base eutils fdo-mime gnome2-utils libtool
28 ssuominen 1.1
29 angelos 1.36 EGIT_BOOTSTRAP="autogen.sh"
30     EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}"
31 ssuominen 1.1
32 angelos 1.36 _xfconf_deps=""
33     _xfconf_m4=">=dev-util/xfce4-dev-tools-4.8.0"
34 ssuominen 1.1
35 angelos 1.36 [[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}"
36     [[ -n $EINTLTOOLIZE ]] && _xfconf_deps+=" dev-util/intltool"
37     [[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}"
38 ssuominen 1.1
39     RDEPEND=""
40 angelos 1.36 DEPEND="${_xfconf_deps}"
41 ssuominen 1.1
42 angelos 1.36 unset _xfconf_deps
43     unset _xfconf_m4
44 ssuominen 1.1
45     case ${EAPI:-0} in
46 ssuominen 1.37 4) ;;
47 ssuominen 1.1 *) die "Unknown EAPI." ;;
48     esac
49 ssuominen 1.23
50 angelos 1.36 [[ -n $_xfconf_live ]] && _xfconf_live=src_unpack
51    
52     EXPORT_FUNCTIONS ${_xfconf_live} src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
53 ssuominen 1.1
54 ssuominen 1.11 # @FUNCTION: xfconf_use_debug
55 ssuominen 1.14 # @DESCRIPTION:
56 ssuominen 1.25 # If IUSE has debug, return --enable-debug=minimum.
57 angelos 1.31 # If USE debug is enabled, return --enable-debug which is the same as --enable-debug=yes.
58     # If USE debug is enabled and the XFCONF_FULL_DEBUG variable is set, return --enable-debug=full.
59 ssuominen 1.11 xfconf_use_debug() {
60 ssuominen 1.12 if has debug ${IUSE}; then
61     if use debug; then
62 ssuominen 1.13 if [[ -n $XFCONF_FULL_DEBUG ]]; then
63 ssuominen 1.12 echo "--enable-debug=full"
64     else
65     echo "--enable-debug"
66     fi
67 ssuominen 1.11 else
68 ssuominen 1.25 echo "--enable-debug=minimum"
69 ssuominen 1.11 fi
70 angelos 1.35 else
71     ewarn "${FUNCNAME} called without debug in IUSE"
72 ssuominen 1.11 fi
73     }
74    
75 angelos 1.36 # @FUNCTION: xfconf_src_unpack
76     # @DESCRIPTION:
77     # Run git-2_src_unpack if required
78     xfconf_src_unpack() {
79     NOCONFIGURE=1 git-2_src_unpack
80     }
81    
82 ssuominen 1.1 # @FUNCTION: xfconf_src_prepare
83     # @DESCRIPTION:
84 ssuominen 1.32 # Run base_src_prepare and eautoreconf or elibtoolize
85 ssuominen 1.1 xfconf_src_prepare() {
86 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
87 scarabeus 1.4 base_src_prepare
88 ssuominen 1.1
89 ssuominen 1.30 if [[ -n $EINTLTOOLIZE ]]; then
90 ssuominen 1.33 local _intltoolize="intltoolize --force --copy --automake"
91     ebegin "Running ${_intltoolize}"
92     ${_intltoolize} || die
93     eend $?
94 ssuominen 1.1 fi
95    
96 ssuominen 1.30 if [[ -n $EAUTORECONF ]]; then
97 ssuominen 1.32 AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf
98 ssuominen 1.1 else
99     elibtoolize
100     fi
101     }
102    
103     # @FUNCTION: xfconf_src_configure
104     # @DESCRIPTION:
105 angelos 1.31 # Run econf with opts from the XFCONF array
106 ssuominen 1.1 xfconf_src_configure() {
107 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
108 angelos 1.36 [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
109 ssuominen 1.32 econf "${XFCONF[@]}"
110 ssuominen 1.1 }
111    
112     # @FUNCTION: xfconf_src_install
113     # @DESCRIPTION:
114 ssuominen 1.34 # Run emake install and install documentation in the DOCS array
115 ssuominen 1.1 xfconf_src_install() {
116 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
117 ssuominen 1.1
118 angelos 1.36 # FIXME
119     if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
120     touch ChangeLog
121     fi
122    
123     base_src_install "$@" || die
124 ssuominen 1.17
125     find "${ED}" -name '*.la' -exec rm -f {} +
126 ssuominen 1.18
127     validate_desktop_entries
128 ssuominen 1.1 }
129    
130     # @FUNCTION: xfconf_pkg_preinst
131     # @DESCRIPTION:
132     # Run gnome2_icon_savelist
133     xfconf_pkg_preinst() {
134 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
135 ssuominen 1.1 gnome2_icon_savelist
136     }
137    
138     # @FUNCTION: xfconf_pkg_postinst
139     # @DESCRIPTION:
140     # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
141     xfconf_pkg_postinst() {
142 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
143 ssuominen 1.1 fdo-mime_desktop_database_update
144     fdo-mime_mime_database_update
145     gnome2_icon_cache_update
146     }
147    
148     # @FUNCTION: xfconf_pkg_postrm
149     # @DESCRIPTION:
150     # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
151     xfconf_pkg_postrm() {
152 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
153 ssuominen 1.1 fdo-mime_desktop_database_update
154     fdo-mime_mime_database_update
155     gnome2_icon_cache_update
156     }

  ViewVC Help
Powered by ViewVC 1.1.20