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

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.43 - (show annotations) (download)
Sun Sep 2 07:58:15 2012 UTC (2 years ago) by ssuominen
Branch: MAIN
Changes since 1.42: +2 -4 lines
Drop desktop file validate foo and let the PM handle it as the best it can. It was really here for the 4.10 bumping period for QA anyways, and the time has passed. Convert to prune_libtool_files and use the --all argument since we always want all, Xfce never installs any static archives nor uses libltdl

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.42 2012/07/02 08:43:37 ssuominen Exp $
4
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 the variable is set
15
16 # @ECLASS-VARIABLE: XFCONF
17 # @DESCRIPTION:
18 # This should be an array defining arguments for econf
19
20 AUTOTOOLS_AUTO_DEPEND=no
21
22 unset _xfconf_live
23 [[ $PV == *9999* ]] && _xfconf_live=git-2
24
25 inherit ${_xfconf_live} autotools base eutils fdo-mime gnome2-utils libtool
26
27 EGIT_BOOTSTRAP=autogen.sh
28 EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}"
29
30 _xfconf_deps=""
31 _xfconf_m4=">=dev-util/xfce4-dev-tools-4.10 ${AUTOTOOLS_DEPEND}"
32
33 [[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}"
34 [[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}"
35
36 RDEPEND=""
37 DEPEND="${_xfconf_deps}"
38
39 unset _xfconf_deps
40 unset _xfconf_m4
41
42 case ${EAPI:-0} in
43 4) ;;
44 *) die "Unknown EAPI." ;;
45 esac
46
47 [[ -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
51 # @FUNCTION: xfconf_use_debug
52 # @DESCRIPTION:
53 # If IUSE has debug, return --enable-debug=minimum.
54 # 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 xfconf_use_debug() {
57 if has debug ${IUSE}; then
58 if use debug; then
59 if [[ -n $XFCONF_FULL_DEBUG ]]; then
60 echo "--enable-debug=full"
61 else
62 echo "--enable-debug"
63 fi
64 else
65 echo "--enable-debug=minimum"
66 fi
67 else
68 ewarn "${FUNCNAME} called without debug in IUSE"
69 fi
70 }
71
72 # @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 # @FUNCTION: xfconf_src_prepare
80 # @DESCRIPTION:
81 # Run base_src_prepare and eautoreconf or elibtoolize
82 xfconf_src_prepare() {
83 debug-print-function ${FUNCNAME} "$@"
84 base_src_prepare
85
86 if [[ -n $EAUTORECONF ]]; then
87 AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf
88 else
89 elibtoolize
90 fi
91 }
92
93 # @FUNCTION: xfconf_src_configure
94 # @DESCRIPTION:
95 # Run econf with opts from the XFCONF array
96 xfconf_src_configure() {
97 debug-print-function ${FUNCNAME} "$@"
98 [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
99 econf "${XFCONF[@]}"
100 }
101
102 # @FUNCTION: xfconf_src_install
103 # @DESCRIPTION:
104 # Run emake install and install documentation in the DOCS array
105 xfconf_src_install() {
106 debug-print-function ${FUNCNAME} "$@"
107
108 # FIXME
109 if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
110 touch ChangeLog
111 fi
112
113 base_src_install "$@" || die
114
115 prune_libtool_files --all
116 }
117
118 # @FUNCTION: xfconf_pkg_preinst
119 # @DESCRIPTION:
120 # Run gnome2_icon_savelist
121 xfconf_pkg_preinst() {
122 debug-print-function ${FUNCNAME} "$@"
123 gnome2_icon_savelist
124 }
125
126 # @FUNCTION: xfconf_pkg_postinst
127 # @DESCRIPTION:
128 # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
129 xfconf_pkg_postinst() {
130 debug-print-function ${FUNCNAME} "$@"
131 fdo-mime_desktop_database_update
132 fdo-mime_mime_database_update
133 gnome2_icon_cache_update
134 }
135
136 # @FUNCTION: xfconf_pkg_postrm
137 # @DESCRIPTION:
138 # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
139 xfconf_pkg_postrm() {
140 debug-print-function ${FUNCNAME} "$@"
141 fdo-mime_desktop_database_update
142 fdo-mime_mime_database_update
143 gnome2_icon_cache_update
144 }

  ViewVC Help
Powered by ViewVC 1.1.20