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

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.23 - (hide 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 ssuominen 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.23 # $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.22 2011/02/04 17:23:35 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     # 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 ssuominen 1.18 inherit autotools base eutils fdo-mime gnome2-utils libtool
33 ssuominen 1.1
34 ssuominen 1.2 if ! [[ ${MY_P} ]]; then
35     MY_P=${P}
36     else
37     S=${WORKDIR}/${MY_P}
38     fi
39    
40 angelos 1.7 SRC_URI="mirror://xfce/xfce/${PV}/src/${MY_P}.tar.bz2"
41 ssuominen 1.1
42     if [[ "${EINTLTOOLIZE}" == "yes" ]]; then
43     _xfce4_intltool="dev-util/intltool"
44     fi
45    
46     if [[ "${EAUTORECONF}" == "yes" ]]; then
47 ssuominen 1.10 _xfce4_m4=">=dev-util/xfce4-dev-tools-4.7.0"
48 ssuominen 1.1 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 ssuominen 1.23 4|3) ;;
59 ssuominen 1.1 *) die "Unknown EAPI." ;;
60     esac
61 ssuominen 1.23
62     EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
63 ssuominen 1.1
64 ssuominen 1.11 # @FUNCTION: xfconf_use_debug
65 ssuominen 1.14 # @DESCRIPTION:
66 ssuominen 1.12 # Return --enable-debug, null, --enable-debug=full or --disable-debug based on
67 ssuominen 1.13 # XFCONF_FULL_DEBUG variable and USE debug
68 ssuominen 1.11 xfconf_use_debug() {
69 ssuominen 1.12 if has debug ${IUSE}; then
70     if use debug; then
71 ssuominen 1.13 if [[ -n $XFCONF_FULL_DEBUG ]]; then
72 ssuominen 1.12 echo "--enable-debug=full"
73     else
74     echo "--enable-debug"
75     fi
76 ssuominen 1.11 else
77 ssuominen 1.13 if [[ -n $XFCONF_FULL_DEBUG ]]; then
78 ssuominen 1.12 echo "--disable-debug"
79     fi
80 ssuominen 1.11 fi
81     fi
82     }
83    
84 ssuominen 1.1 # @FUNCTION: xfconf_src_prepare
85     # @DESCRIPTION:
86     # Run base_src_util autopatch and eautoreconf or elibtoolize
87     xfconf_src_prepare() {
88 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
89 scarabeus 1.4 base_src_prepare
90 ssuominen 1.1
91     if [[ "${EINTLTOOLIZE}" == "yes" ]]; then
92 ssuominen 1.22 intltoolize --force --copy --automake || die
93 ssuominen 1.1 fi
94    
95     if [[ "${EAUTORECONF}" == "yes" ]]; then
96 darkside 1.8 AT_M4DIR="${EPREFIX}/usr/share/xfce4/dev-tools/m4macros" eautoreconf
97 ssuominen 1.1 else
98     elibtoolize
99     fi
100     }
101    
102     # @FUNCTION: xfconf_src_configure
103     # @DESCRIPTION:
104 ssuominen 1.20 # Run econf with opts in XFCONF array
105 ssuominen 1.1 xfconf_src_configure() {
106 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
107 ssuominen 1.19
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 ssuominen 1.22
113 ssuominen 1.19 econf ${XFCONF[@]}
114 ssuominen 1.1 }
115    
116     # @FUNCTION: xfconf_src_install
117     # @DESCRIPTION:
118     # Run emake install and install documentation in DOCS variable
119     xfconf_src_install() {
120 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
121 ssuominen 1.22 emake DESTDIR="${D}" "$@" install || die
122 ssuominen 1.1
123     if [[ -n ${DOCS} ]]; then
124 ssuominen 1.22 dodoc ${DOCS} || die
125 ssuominen 1.1 fi
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