1 |
commit: f41b572c1cafbfef54548d6359d1f609ef014601 |
2 |
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 26 22:46:04 2015 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 26 22:46:04 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gnome.git/commit/?id=f41b572c |
7 |
|
8 |
*.eclass: sync with gentoo-x86 |
9 |
|
10 |
eclass/gnome2-utils.eclass | 38 ++++++++++------ |
11 |
eclass/gnome2.eclass | 4 +- |
12 |
eclass/vala.eclass | 4 +- |
13 |
eclass/xdg-utils.eclass | 111 --------------------------------------------- |
14 |
eclass/xdg.eclass | 68 --------------------------- |
15 |
5 files changed, 27 insertions(+), 198 deletions(-) |
16 |
|
17 |
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass |
18 |
index 7df00ae..83a3610 100644 |
19 |
--- a/eclass/gnome2-utils.eclass |
20 |
+++ b/eclass/gnome2-utils.eclass |
21 |
@@ -15,7 +15,7 @@ |
22 |
# * GConf schemas management |
23 |
# * scrollkeeper (old Gnome help system) management |
24 |
|
25 |
-inherit multilib |
26 |
+inherit eutils multilib xdg-utils |
27 |
|
28 |
case "${EAPI:-0}" in |
29 |
0|1|2|3|4|5) ;; |
30 |
@@ -90,6 +90,8 @@ DEPEND=">=sys-apps/sed-4" |
31 |
# Reset various variables inherited from root's evironment to a reasonable |
32 |
# default for ebuilds to help avoid access violations and test failures. |
33 |
gnome2_environment_reset() { |
34 |
+ xdg_environment_reset |
35 |
+ |
36 |
# Respected by >=glib-2.30.1-r1 |
37 |
export G_HOME="${T}" |
38 |
|
39 |
@@ -104,9 +106,9 @@ gnome2_environment_reset() { |
40 |
# This function should be called from pkg_preinst. |
41 |
gnome2_gconf_savelist() { |
42 |
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" |
43 |
- pushd "${ED}" &> /dev/null |
44 |
+ pushd "${ED}" > /dev/null || die |
45 |
export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null) |
46 |
- popd &> /dev/null |
47 |
+ popd > /dev/null || die |
48 |
} |
49 |
|
50 |
# @FUNCTION: gnome2_gconf_install |
51 |
@@ -198,9 +200,9 @@ gnome2_gconf_uninstall() { |
52 |
# This function should be called from pkg_preinst. |
53 |
gnome2_icon_savelist() { |
54 |
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" |
55 |
- pushd "${ED}" &> /dev/null |
56 |
+ pushd "${ED}" > /dev/null || die |
57 |
export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
58 |
- popd &> /dev/null |
59 |
+ popd > /dev/null || die |
60 |
} |
61 |
|
62 |
# @FUNCTION: gnome2_icon_cache_update |
63 |
@@ -319,9 +321,9 @@ gnome2_omf_fix() { |
64 |
# This function should be called from pkg_preinst. |
65 |
gnome2_scrollkeeper_savelist() { |
66 |
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" |
67 |
- pushd "${ED}" &> /dev/null |
68 |
+ pushd "${ED}" > /dev/null || die |
69 |
export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null) |
70 |
- popd &> /dev/null |
71 |
+ popd > /dev/null || die |
72 |
} |
73 |
|
74 |
# @FUNCTION: gnome2_scrollkeeper_update |
75 |
@@ -354,9 +356,9 @@ gnome2_scrollkeeper_update() { |
76 |
# This function should be called from pkg_preinst. |
77 |
gnome2_schemas_savelist() { |
78 |
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" |
79 |
- pushd "${ED}" &>/dev/null |
80 |
+ pushd "${ED}" > /dev/null || die |
81 |
export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null) |
82 |
- popd &>/dev/null |
83 |
+ popd > /dev/null || die |
84 |
} |
85 |
|
86 |
# @FUNCTION: gnome2_schemas_update |
87 |
@@ -390,9 +392,9 @@ gnome2_schemas_update() { |
88 |
# This function should be called from pkg_preinst. |
89 |
gnome2_gdk_pixbuf_savelist() { |
90 |
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" |
91 |
- pushd "${ED}" 1>/dev/null |
92 |
+ pushd "${ED}" > /dev/null || die |
93 |
export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0 -type f 2>/dev/null) |
94 |
- popd 1>/dev/null |
95 |
+ popd > /dev/null || die |
96 |
} |
97 |
|
98 |
# @FUNCTION: gnome2_gdk_pixbuf_update |
99 |
@@ -419,7 +421,7 @@ gnome2_gdk_pixbuf_update() { |
100 |
fi |
101 |
|
102 |
ebegin "Updating gdk-pixbuf loader cache" |
103 |
- local tmp_file=$(mktemp -t tmp.XXXXXXXXXX_gdkpixbuf) |
104 |
+ local tmp_file=$(emktemp) |
105 |
${updater} 1> "${tmp_file}" && |
106 |
chmod 0644 "${tmp_file}" && |
107 |
cp -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" && |
108 |
@@ -435,7 +437,10 @@ gnome2_query_immodules_gtk2() { |
109 |
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-2.0 |
110 |
[[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-2.0 |
111 |
|
112 |
- "${updater}" --update-cache |
113 |
+ ebegin "Updating gtk2 input method module cache" |
114 |
+ GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ |
115 |
+ "${updater}" --update-cache |
116 |
+ eend $? |
117 |
} |
118 |
|
119 |
# @FUNCTION: gnome2_query_immodules_gtk3 |
120 |
@@ -446,7 +451,10 @@ gnome2_query_immodules_gtk3() { |
121 |
local updater=${EPREFIX}/usr/bin/${CHOST}-gtk-query-immodules-3.0 |
122 |
[[ ! -x ${updater} ]] && updater=${EPREFIX}/usr/bin/gtk-query-immodules-3.0 |
123 |
|
124 |
- "${updater}" --update-cache |
125 |
+ ebegin "Updating gtk3 input method module cache" |
126 |
+ GTK_IM_MODULE_FILE="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \ |
127 |
+ "${updater}" --update-cache |
128 |
+ eend $? |
129 |
} |
130 |
|
131 |
# @FUNCTION: gnome2_disable_deprecation_warning |
132 |
@@ -478,7 +486,7 @@ gnome2_disable_deprecation_warning() { |
133 |
fi |
134 |
done < <(find "${S}" -name "Makefile.in" \ |
135 |
-o -name "Makefile.am" -o -name "Makefile.decl" \ |
136 |
- | sort; echo configure) |
137 |
+ | sort; [[ -f "${S}"/configure ]] && echo configure) |
138 |
# TODO: sedding configure.ac can trigger maintainer mode; bug #439602 |
139 |
# -o -name "configure.ac" -o -name "configure.in" \ |
140 |
# | sort; echo configure) |
141 |
|
142 |
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass |
143 |
index bb33bce..ed233b0 100644 |
144 |
--- a/eclass/gnome2.eclass |
145 |
+++ b/eclass/gnome2.eclass |
146 |
@@ -21,9 +21,9 @@ esac |
147 |
|
148 |
# @ECLASS-VARIABLE: G2CONF |
149 |
# @DEFAULT_UNSET |
150 |
-# @DEPRECATED |
151 |
# @DESCRIPTION: |
152 |
-# Extra configure opts passed to econf |
153 |
+# Extra configure opts passed to econf. |
154 |
+# Deprecated, pass extra arguments to gnome2_src_configure. |
155 |
G2CONF=${G2CONF:-""} |
156 |
|
157 |
# @ECLASS-VARIABLE: GNOME2_LA_PUNT |
158 |
|
159 |
diff --git a/eclass/vala.eclass b/eclass/vala.eclass |
160 |
index a90d4bf..895743b 100644 |
161 |
--- a/eclass/vala.eclass |
162 |
+++ b/eclass/vala.eclass |
163 |
@@ -31,8 +31,8 @@ VALA_MIN_API_VERSION=${VALA_MIN_API_VERSION:-0.20} |
164 |
|
165 |
# @ECLASS-VARIABLE: VALA_MAX_API_VERSION |
166 |
# @DESCRIPTION: |
167 |
-# Maximum vala API version (e.g. 0.26). |
168 |
-VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.28} |
169 |
+# Maximum vala API version (e.g. 0.30). |
170 |
+VALA_MAX_API_VERSION=${VALA_MAX_API_VERSION:-0.30} |
171 |
|
172 |
# @ECLASS-VARIABLE: VALA_USE_DEPEND |
173 |
# @DEFAULT_UNSET |
174 |
|
175 |
diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass |
176 |
deleted file mode 100644 |
177 |
index 779a413..0000000 |
178 |
--- a/eclass/xdg-utils.eclass |
179 |
+++ /dev/null |
180 |
@@ -1,111 +0,0 @@ |
181 |
-# Copyright 1999-2015 Gentoo Foundation |
182 |
-# Distributed under the terms of the GNU General Public License v2 |
183 |
-# $Id$ |
184 |
- |
185 |
-# @ECLASS: xdg-utils.eclass |
186 |
-# @MAINTAINER: |
187 |
-# gnome@g.o |
188 |
-# @AUTHOR: |
189 |
-# Original author: Gilles Dartiguelongue <eva@g.o> |
190 |
-# @BLURB: Auxiliary functions commonly used by XDG compliant packages. |
191 |
-# @DESCRIPTION: |
192 |
-# This eclass provides a set of auxiliary functions needed by most XDG |
193 |
-# compliant packages. |
194 |
-# It provides XDG stack related functions such as: |
195 |
-# * XDG .desktop files cache management |
196 |
-# * XDG mime information database management |
197 |
- |
198 |
-case "${EAPI:-0}" in |
199 |
- 4|5) ;; |
200 |
- *) die "EAPI=${EAPI} is not supported" ;; |
201 |
-esac |
202 |
- |
203 |
-# @ECLASS-VARIABLE: DESKTOP_DATABASE_UPDATE_BIN |
204 |
-# @INTERNAL |
205 |
-# @DESCRIPTION: |
206 |
-# Path to update-desktop-database |
207 |
-: ${DESKTOP_DATABASE_UPDATE_BIN:="/usr/bin/update-desktop-database"} |
208 |
- |
209 |
-# @ECLASS-VARIABLE: DESKTOP_DATABASE_DIR |
210 |
-# @INTERNAL |
211 |
-# @DESCRIPTION: |
212 |
-# Directory where .desktop files database is stored |
213 |
-: ${DESKTOP_DATABASE_DIR="/usr/share/applications"} |
214 |
- |
215 |
-# @ECLASS-VARIABLE: MIMEINFO_DATABASE_UPDATE_BIN |
216 |
-# @INTERNAL |
217 |
-# @DESCRIPTION: |
218 |
-# Path to update-desktop-database |
219 |
-: ${MIMEINFO_DATABASE_UPDATE_BIN:="/usr/bin/update-mime-database"} |
220 |
- |
221 |
-# @ECLASS-VARIABLE: MIMEINFO_DATABASE_DIR |
222 |
-# @INTERNAL |
223 |
-# @DESCRIPTION: |
224 |
-# Directory where .desktop files database is stored |
225 |
-: ${MIMEINFO_DATABASE_DIR:="/usr/share/mime"} |
226 |
- |
227 |
-# @FUNCTION: xdg_desktopfiles_savelist |
228 |
-# @DESCRIPTION: |
229 |
-# Find the .desktop files about to be installed and save their location |
230 |
-# in the XDG_ECLASS_DESKTOPFILES environment variable. |
231 |
-# This function should be called from pkg_preinst. |
232 |
-xdg_desktopfiles_savelist() { |
233 |
- pushd "${D}" &> /dev/null |
234 |
- export XDG_ECLASS_DESKTOPFILES=$(find 'usr/share/applications' -type f 2> /dev/null) |
235 |
- popd &> /dev/null |
236 |
-} |
237 |
- |
238 |
-# @FUNCTION: fdo-xdg_desktop_database_update |
239 |
-# @DESCRIPTION: |
240 |
-# Updates the .desktop files database. |
241 |
-# Generates a list of mimetypes linked to applications that can handle them |
242 |
-xdg_desktop_database_update() { |
243 |
- local updater="${EROOT}${DESKTOP_DATABASE_UPDATE_BIN}" |
244 |
- |
245 |
- if [[ ! -x "${updater}" ]] ; then |
246 |
- debug-print "${updater} is not executable" |
247 |
- return |
248 |
- fi |
249 |
- |
250 |
- if [[ -z "${XDG_ECLASS_DESKTOPFILES}" ]]; then |
251 |
- debug-print "No .desktop files to add to database" |
252 |
- return |
253 |
- fi |
254 |
- |
255 |
- ebegin "Updating .desktop files database ..." |
256 |
- "${updater}" -q "${EROOT}${DESKTOP_DATABASE_DIR}" |
257 |
- eend $? |
258 |
-} |
259 |
- |
260 |
-# @FUNCTION: xdg_mimeinfo_savelist |
261 |
-# @DESCRIPTION: |
262 |
-# Find the mime information files about to be installed and save their location |
263 |
-# in the XDG_ECLASS_MIMEINFOFILES environment variable. |
264 |
-# This function should be called from pkg_preinst. |
265 |
-xdg_mimeinfo_savelist() { |
266 |
- pushd "${D}" &> /dev/null |
267 |
- export XDG_ECLASS_MIMEINFOFILES=$(find 'usr/share/mime' -type f 2> /dev/null) |
268 |
- popd &> /dev/null |
269 |
-} |
270 |
- |
271 |
-# @FUNCTION: xdg_mimeinfo_database_update |
272 |
-# @DESCRIPTION: |
273 |
-# Update the mime database. |
274 |
-# Creates a general list of mime types from several sources |
275 |
-xdg_mimeinfo_database_update() { |
276 |
- local updater="${EROOT}${MIMEINFO_DATABASE_UPDATE_BIN}" |
277 |
- |
278 |
- if [[ ! -x "${updater}" ]] ; then |
279 |
- debug-print "${updater} is not executable" |
280 |
- return |
281 |
- fi |
282 |
- |
283 |
- if [[ -z "${XDG_ECLASS_MIMEINFOFILES}" ]]; then |
284 |
- debug-print "No mime info files to add to database" |
285 |
- return |
286 |
- fi |
287 |
- |
288 |
- ebegin "Updating shared mime info database ..." |
289 |
- "${updater}" "${EROOT}${MIMEINFO_DATABASE_DIR}" |
290 |
- eend $? |
291 |
-} |
292 |
|
293 |
diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass |
294 |
deleted file mode 100644 |
295 |
index 8b9de2b..0000000 |
296 |
--- a/eclass/xdg.eclass |
297 |
+++ /dev/null |
298 |
@@ -1,68 +0,0 @@ |
299 |
-# Copyright 1999-2015 Gentoo Foundation |
300 |
-# Distributed under the terms of the GNU General Public License v2 |
301 |
-# $Id$ |
302 |
- |
303 |
-# @ECLASS: xdg.eclass |
304 |
-# @MAINTAINER: |
305 |
-# freedesktop-bugs@g.o |
306 |
-# @AUTHOR: |
307 |
-# Original author: Gilles Dartiguelongue <eva@g.o> |
308 |
-# @BLURB: Provides phases for XDG compliant packages. |
309 |
-# @DESCRIPTION: |
310 |
-# Utility eclass to update the desktop and shared mime info as laid |
311 |
-# out in the freedesktop specs & implementations |
312 |
- |
313 |
-inherit xdg-utils |
314 |
- |
315 |
-case "${EAPI:-0}" in |
316 |
- 4|5) |
317 |
- EXPORT_FUNCTIONS src_prepare pkg_preinst pkg_postinst pkg_postrm |
318 |
- ;; |
319 |
- *) die "EAPI=${EAPI} is not supported" ;; |
320 |
-esac |
321 |
- |
322 |
-DEPEND=" |
323 |
- dev-util/desktop-file-utils |
324 |
- x11-misc/shared-mime-info |
325 |
-" |
326 |
- |
327 |
-# @FUNCTION: xdg_src_prepare |
328 |
-# @DESCRIPTION: |
329 |
-# Prepare sources to work with XDG standards. |
330 |
-xdg_src_prepare() { |
331 |
- # Prepare XDG base directories |
332 |
- export XDG_DATA_HOME="${T}/.local/share" |
333 |
- export XDG_CONFIG_HOME="${T}/.config" |
334 |
- export XDG_CACHE_HOME="${T}/.cache" |
335 |
- export XDG_RUNTIME_DIR="${T}/run" |
336 |
- mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \ |
337 |
- "${XDG_RUNTIME_DIR}" |
338 |
- # This directory needs to be owned by the user, and chmod 0700 |
339 |
- # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html |
340 |
- chmod 0700 "${XDG_RUNTIME_DIR}" |
341 |
-} |
342 |
- |
343 |
-# @FUNCTION: xdg_pkg_preinst |
344 |
-# @DESCRIPTION: |
345 |
-# Finds .desktop and mime info files for later handling in pkg_postinst |
346 |
-xdg_pkg_preinst() { |
347 |
- xdg_desktopfiles_savelist |
348 |
- xdg_mimeinfo_savelist |
349 |
-} |
350 |
- |
351 |
-# @FUNCTION: xdg_pkg_postinst |
352 |
-# @DESCRIPTION: |
353 |
-# Handle desktop and mime info database updates. |
354 |
-xdg_pkg_postinst() { |
355 |
- xdg_desktop_database_update |
356 |
- xdg_mimeinfo_database_update |
357 |
-} |
358 |
- |
359 |
-# @FUNCTION: xdg_pkg_postrm |
360 |
-# @DESCRIPTION: |
361 |
-# Handle desktop and mime info database updates. |
362 |
-xdg_pkg_postrm() { |
363 |
- xdg_desktop_database_update |
364 |
- xdg_mimeinfo_database_update |
365 |
-} |
366 |
- |