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

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.47 - (hide annotations) (download)
Sat Nov 15 07:49:11 2014 UTC (15 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.46: +8 -4 lines
set AUTOTOOLS_AUTO_DEPEND based on EAUTORECONF so that we do not clobber earlier settings #409611 by Michał Górny

1 ssuominen 1.40 # Copyright 1999-2012 Gentoo Foundation
2 ssuominen 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.47 # $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.46 2014/02/27 17:12:01 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 vapier 1.47 if [[ -n ${EAUTORECONF} ]] ; then
17     AUTOTOOLS_AUTO_DEPEND=yes
18     else
19     : ${AUTOTOOLS_AUTO_DEPEND:=no}
20     fi
21    
22 angelos 1.36 # @ECLASS-VARIABLE: XFCONF
23 ssuominen 1.1 # @DESCRIPTION:
24 angelos 1.36 # This should be an array defining arguments for econf
25 ssuominen 1.1
26 angelos 1.36 unset _xfconf_live
27     [[ $PV == *9999* ]] && _xfconf_live=git-2
28    
29 ssuominen 1.46 inherit ${_xfconf_live} autotools eutils fdo-mime gnome2-utils libtool
30 ssuominen 1.1
31 ssuominen 1.42 EGIT_BOOTSTRAP=autogen.sh
32 angelos 1.36 EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}"
33 ssuominen 1.1
34 angelos 1.36 _xfconf_deps=""
35 vapier 1.47 _xfconf_m4=">=dev-util/xfce4-dev-tools-4.10"
36 ssuominen 1.1
37 angelos 1.36 [[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}"
38     [[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}"
39 ssuominen 1.1
40     RDEPEND=""
41 angelos 1.36 DEPEND="${_xfconf_deps}"
42 ssuominen 1.1
43 angelos 1.36 unset _xfconf_deps
44     unset _xfconf_m4
45 ssuominen 1.1
46     case ${EAPI:-0} in
47 ssuominen 1.45 5) ;;
48 ssuominen 1.1 *) die "Unknown EAPI." ;;
49     esac
50 ssuominen 1.23
51 angelos 1.36 [[ -n $_xfconf_live ]] && _xfconf_live=src_unpack
52    
53     EXPORT_FUNCTIONS ${_xfconf_live} src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
54 ssuominen 1.1
55 ssuominen 1.11 # @FUNCTION: xfconf_use_debug
56 ssuominen 1.14 # @DESCRIPTION:
57 ssuominen 1.25 # If IUSE has debug, return --enable-debug=minimum.
58 angelos 1.31 # If USE debug is enabled, return --enable-debug which is the same as --enable-debug=yes.
59     # If USE debug is enabled and the XFCONF_FULL_DEBUG variable is set, return --enable-debug=full.
60 ssuominen 1.11 xfconf_use_debug() {
61 ssuominen 1.12 if has debug ${IUSE}; then
62     if use debug; then
63 ssuominen 1.13 if [[ -n $XFCONF_FULL_DEBUG ]]; then
64 ssuominen 1.12 echo "--enable-debug=full"
65     else
66     echo "--enable-debug"
67     fi
68 ssuominen 1.11 else
69 ssuominen 1.25 echo "--enable-debug=minimum"
70 ssuominen 1.11 fi
71 angelos 1.35 else
72     ewarn "${FUNCNAME} called without debug in IUSE"
73 ssuominen 1.11 fi
74     }
75    
76 angelos 1.36 # @FUNCTION: xfconf_src_unpack
77     # @DESCRIPTION:
78     # Run git-2_src_unpack if required
79     xfconf_src_unpack() {
80     NOCONFIGURE=1 git-2_src_unpack
81     }
82    
83 ssuominen 1.1 # @FUNCTION: xfconf_src_prepare
84     # @DESCRIPTION:
85 ssuominen 1.46 # Process PATCHES with epatch and run epatch_user followed by run of
86     # elibtoolize, or eautoreconf if EAUTORECONF is set.
87 ssuominen 1.1 xfconf_src_prepare() {
88 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
89 ssuominen 1.46
90     [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
91     epatch_user
92 ssuominen 1.1
93 ssuominen 1.30 if [[ -n $EAUTORECONF ]]; then
94 ssuominen 1.32 AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf
95 ssuominen 1.1 else
96     elibtoolize
97     fi
98     }
99    
100     # @FUNCTION: xfconf_src_configure
101     # @DESCRIPTION:
102 angelos 1.31 # Run econf with opts from the XFCONF array
103 ssuominen 1.1 xfconf_src_configure() {
104 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
105 angelos 1.36 [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
106 ssuominen 1.32 econf "${XFCONF[@]}"
107 ssuominen 1.1 }
108    
109     # @FUNCTION: xfconf_src_install
110     # @DESCRIPTION:
111 ssuominen 1.46 # Run emake install to DESTDIR, einstalldocs to process DOCS and
112     # prune_libtool_files --all to always remove libtool files (.la)
113 ssuominen 1.1 xfconf_src_install() {
114 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
115 ssuominen 1.1
116 angelos 1.36 # FIXME
117     if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
118     touch ChangeLog
119     fi
120    
121 ssuominen 1.46 emake DESTDIR="${D}" "$@" install
122    
123     einstalldocs
124 ssuominen 1.17
125 ssuominen 1.43 prune_libtool_files --all
126 ssuominen 1.1 }
127    
128     # @FUNCTION: xfconf_pkg_preinst
129     # @DESCRIPTION:
130     # Run gnome2_icon_savelist
131     xfconf_pkg_preinst() {
132 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
133 ssuominen 1.1 gnome2_icon_savelist
134     }
135    
136     # @FUNCTION: xfconf_pkg_postinst
137     # @DESCRIPTION:
138     # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
139     xfconf_pkg_postinst() {
140 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
141 ssuominen 1.1 fdo-mime_desktop_database_update
142     fdo-mime_mime_database_update
143     gnome2_icon_cache_update
144     }
145    
146     # @FUNCTION: xfconf_pkg_postrm
147     # @DESCRIPTION:
148     # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
149     xfconf_pkg_postrm() {
150 ssuominen 1.15 debug-print-function ${FUNCNAME} "$@"
151 ssuominen 1.1 fdo-mime_desktop_database_update
152     fdo-mime_mime_database_update
153     gnome2_icon_cache_update
154     }

  ViewVC Help
Powered by ViewVC 1.1.20