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

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.46 - (hide annotations) (download)
Thu Feb 27 17:12:01 2014 UTC (6 months, 3 weeks ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.45: +12 -6 lines
get rid of base.eclass, mostly thanks to einstalldocs introduction to eutils, thanks to creffert for some hints

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

  ViewVC Help
Powered by ViewVC 1.1.20