Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 11 May 2019 11:47:59
Message-Id: 1557575254.657beb02435fab00d95a69b274c77bf7de928fa3.zlogene@gentoo
1 commit: 657beb02435fab00d95a69b274c77bf7de928fa3
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 11 11:47:08 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Sat May 11 11:47:34 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=657beb02
7
8 Revert "eclass: kill xfconf.eclass" (too early)
9
10 This reverts commit 1eb8e53d64f2ebaf8145e65eaefc9bd625d01c4b.
11
12 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
13
14 eclass/xfconf.eclass | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++
15 1 file changed, 161 insertions(+)
16
17 diff --git a/eclass/xfconf.eclass b/eclass/xfconf.eclass
18 new file mode 100644
19 index 00000000000..57bb96db229
20 --- /dev/null
21 +++ b/eclass/xfconf.eclass
22 @@ -0,0 +1,161 @@
23 +# Copyright 1999-2012 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +# @DEAD
27 +# Removal on 2019-06-02.
28 +
29 +# @ECLASS: xfconf.eclass
30 +# @MAINTAINER:
31 +# XFCE maintainers <xfce@g.o>
32 +# @SUPPORTED_EAPIS: 5
33 +# @BLURB: Default XFCE ebuild layout
34 +# @DESCRIPTION:
35 +# Default XFCE ebuild layout
36 +
37 +# @ECLASS-VARIABLE: EAUTORECONF
38 +# @DESCRIPTION:
39 +# Run eautoreconf instead of elibtoolize if the variable is set
40 +
41 +if [[ -n ${EAUTORECONF} ]] ; then
42 + AUTOTOOLS_AUTO_DEPEND=yes
43 +else
44 + : ${AUTOTOOLS_AUTO_DEPEND:=no}
45 +fi
46 +
47 +# @ECLASS-VARIABLE: XFCONF
48 +# @DESCRIPTION:
49 +# This should be an array defining arguments for econf
50 +
51 +unset _xfconf_live
52 +[[ $PV == *9999* ]] && _xfconf_live=git-2
53 +
54 +inherit ${_xfconf_live} autotools eutils gnome2-utils libtool xdg-utils
55 +
56 +EGIT_BOOTSTRAP=autogen.sh
57 +EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}"
58 +
59 +_xfconf_deps=""
60 +_xfconf_m4=">=dev-util/xfce4-dev-tools-4.10"
61 +
62 +[[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}"
63 +[[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}"
64 +
65 +RDEPEND=""
66 +DEPEND="${_xfconf_deps}"
67 +
68 +unset _xfconf_deps
69 +unset _xfconf_m4
70 +
71 +case ${EAPI:-0} in
72 + 5) ;;
73 + *) die "Unknown EAPI." ;;
74 +esac
75 +
76 +[[ -n $_xfconf_live ]] && _xfconf_live=src_unpack
77 +
78 +EXPORT_FUNCTIONS ${_xfconf_live} src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
79 +
80 +# @FUNCTION: xfconf_use_debug
81 +# @DESCRIPTION:
82 +# If IUSE has debug, return --enable-debug=minimum.
83 +# If USE debug is enabled, return --enable-debug which is the same as --enable-debug=yes.
84 +# If USE debug is enabled and the XFCONF_FULL_DEBUG variable is set, return --enable-debug=full.
85 +xfconf_use_debug() {
86 + if has debug ${IUSE}; then
87 + if use debug; then
88 + if [[ -n $XFCONF_FULL_DEBUG ]]; then
89 + echo "--enable-debug=full"
90 + else
91 + echo "--enable-debug"
92 + fi
93 + else
94 + echo "--enable-debug=minimum"
95 + fi
96 + else
97 + ewarn "${FUNCNAME} called without debug in IUSE"
98 + fi
99 +}
100 +
101 +# @FUNCTION: xfconf_src_unpack
102 +# @DESCRIPTION:
103 +# Run git-2_src_unpack if required
104 +xfconf_src_unpack() {
105 + NOCONFIGURE=1 git-2_src_unpack
106 +}
107 +
108 +# @FUNCTION: xfconf_src_prepare
109 +# @DESCRIPTION:
110 +# Process PATCHES with epatch and run epatch_user followed by run of
111 +# elibtoolize, or eautoreconf if EAUTORECONF is set.
112 +xfconf_src_prepare() {
113 + debug-print-function ${FUNCNAME} "$@"
114 +
115 + [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
116 + epatch_user
117 +
118 + if [[ -n $EAUTORECONF ]]; then
119 + AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf
120 + else
121 + elibtoolize
122 + fi
123 +}
124 +
125 +# @FUNCTION: xfconf_src_configure
126 +# @DESCRIPTION:
127 +# Run econf with opts from the XFCONF array
128 +xfconf_src_configure() {
129 + debug-print-function ${FUNCNAME} "$@"
130 + [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
131 + econf "${XFCONF[@]}"
132 +}
133 +
134 +# @FUNCTION: xfconf_src_install
135 +# @DESCRIPTION:
136 +# Run emake install to DESTDIR, einstalldocs to process DOCS and
137 +# prune_libtool_files --all to always remove libtool files (.la)
138 +xfconf_src_install() {
139 + debug-print-function ${FUNCNAME} "$@"
140 +
141 + # FIXME
142 + if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
143 + touch ChangeLog
144 + fi
145 +
146 + emake DESTDIR="${D}" "$@" install
147 +
148 + einstalldocs
149 +
150 + prune_libtool_files --all
151 +}
152 +
153 +# @FUNCTION: xfconf_pkg_preinst
154 +# @DESCRIPTION:
155 +# Run gnome2_icon_savelist
156 +xfconf_pkg_preinst() {
157 + debug-print-function ${FUNCNAME} "$@"
158 + gnome2_icon_savelist
159 +}
160 +
161 +# @FUNCTION: xfconf_pkg_postinst
162 +# @DESCRIPTION:
163 +# Run xdg_{desktop,mimeinfo}_database_update and gnome2_icon_cache_update
164 +xfconf_pkg_postinst() {
165 + debug-print-function ${FUNCNAME} "$@"
166 + xdg_desktop_database_update
167 + xdg_mimeinfo_database_update
168 + if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
169 + gnome2_icon_cache_update
170 + fi
171 +}
172 +
173 +# @FUNCTION: xfconf_pkg_postrm
174 +# @DESCRIPTION:
175 +# Run xdg_{desktop,mimeinfo}_database_update and gnome2_icon_cache_update
176 +xfconf_pkg_postrm() {
177 + debug-print-function ${FUNCNAME} "$@"
178 + xdg_desktop_database_update
179 + xdg_mimeinfo_database_update
180 + if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
181 + gnome2_icon_cache_update
182 + fi
183 +}