/[gentoo-x86]/eclass/gnome2-utils.eclass
Gentoo

Contents of /eclass/gnome2-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.33 - (hide annotations) (download)
Sun Sep 15 19:29:11 2013 UTC (6 months, 4 weeks ago) by pacho
Branch: MAIN
Changes since 1.32: +25 -21 lines
Support gtk+-2.24.20 query immodules (#476100)

1 eva 1.32 # Copyright 1999-2013 Gentoo Foundation
2 leonardop 1.1 # Distributed under the terms of the GNU General Public License v2
3 pacho 1.33 # $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.32 2013/09/03 21:54:38 eva Exp $
4 leonardop 1.1
5 eva 1.22 # @ECLASS: gnome2-utils.eclass
6 vapier 1.23 # @MAINTAINER:
7 eva 1.22 # gnome@gentoo.org
8     # @BLURB: Auxiliary functions commonly used by Gnome packages.
9     # @DESCRIPTION:
10     # This eclass provides a set of auxiliary functions needed by most Gnome
11     # packages. It may be used by non-Gnome packages as needed for handling various
12     # Gnome stack related functions such as:
13     # * Gtk+ icon cache management
14     # * GSettings schemas management
15     # * GConf schemas management
16     # * scrollkeeper (old Gnome help system) management
17 leonardop 1.1
18 eva 1.32 inherit multilib
19    
20 eva 1.18 case "${EAPI:-0}" in
21 axs 1.29 0|1|2|3|4|5) ;;
22 eva 1.18 *) die "EAPI=${EAPI} is not supported" ;;
23     esac
24 leonardop 1.1
25 eva 1.22 # @ECLASS-VARIABLE: GCONFTOOL_BIN
26     # @INTERNAL
27     # @DESCRIPTION:
28 leonardop 1.1 # Path to gconftool-2
29 eva 1.16 : ${GCONFTOOL_BIN:="/usr/bin/gconftool-2"}
30 leonardop 1.1
31 eva 1.22 # @ECLASS-VARIABLE: SCROLLKEEPER_DIR
32     # @INTERNAL
33     # @DESCRIPTION:
34 leonardop 1.1 # Directory where scrollkeeper-update should do its work
35 eva 1.16 : ${SCROLLKEEPER_DIR:="/var/lib/scrollkeeper"}
36 leonardop 1.1
37 eva 1.22 # @ECLASS-VARIABLE: SCROLLKEEPER_UPDATE_BIN
38     # @INTERNAL
39     # @DESCRIPTION:
40 leonardop 1.1 # Path to scrollkeeper-update
41 eva 1.16 : ${SCROLLKEEPER_UPDATE_BIN:="/usr/bin/scrollkeeper-update"}
42 leonardop 1.1
43 eva 1.22 # @ECLASS-VARIABLE: GTK_UPDATE_ICON_CACHE
44     # @INTERNAL
45     # @DESCRIPTION:
46 eva 1.15 # Path to gtk-update-icon-cache
47     : ${GTK_UPDATE_ICON_CACHE:="/usr/bin/gtk-update-icon-cache"}
48    
49 eva 1.22 # @ECLASS-VARIABLE: GLIB_COMPILE_SCHEMAS
50     # @INTERNAL
51     # @DESCRIPTION:
52 eva 1.15 # Path to glib-compile-schemas
53     : ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"}
54    
55 eva 1.32 # @ECLASS-VARIABLE: GDK_PIXBUF_UPDATE_BIN
56     # @INTERNAL
57     # @DESCRIPTION:
58     # Path to gdk-pixbuf-query-loaders
59     : ${GDK_PIXBUF_UPDATE_BIN:="/usr/bin/gdk-pixbuf-query-loaders"}
60    
61 eva 1.22 # @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS
62     # @INTERNAL
63     # @DEFAULT_UNSET
64     # @DESCRIPTION:
65     # List of GConf schemas provided by the package
66    
67     # @ECLASS-VARIABLE: GNOME2_ECLASS_ICONS
68     # @INTERNAL
69     # @DEFAULT_UNSET
70     # @DESCRIPTION:
71     # List of icons provided by the package
72    
73 eva 1.27 # @ECLASS-VARIABLE: GNOME2_ECLASS_SCROLLS
74     # @INTERNAL
75     # @DEFAULT_UNSET
76     # @DESCRIPTION:
77     # List of scrolls (documentation files) provided by the package
78    
79 eva 1.22 # @ECLASS-VARIABLE: GNOME2_ECLASS_GLIB_SCHEMAS
80     # @INTERNAL
81     # @DEFAULT_UNSET
82     # @DESCRIPTION:
83     # List of GSettings schemas provided by the package
84 leonardop 1.1
85 eva 1.32 # @ECLASS-VARIABLE: GNOME2_ECLASS_GDK_PIXBUF_LOADERS
86     # @INTERNAL
87     # @DEFAULT_UNSET
88     # @DESCRIPTION:
89     # List of gdk-pixbuf loaders provided by the package
90    
91 leonardop 1.1 DEPEND=">=sys-apps/sed-4"
92    
93    
94 tetromino 1.24 # @FUNCTION: gnome2_environment_reset
95     # @DESCRIPTION:
96     # Reset various variables inherited from root's evironment to a reasonable
97     # default for ebuilds to help avoid access violations and test failures.
98     gnome2_environment_reset() {
99     # Respected by >=glib-2.30.1-r1
100     export G_HOME="${T}"
101    
102     # GST_REGISTRY is to work around gst utilities trying to read/write /root
103     export GST_REGISTRY="${T}/registry.xml"
104    
105     # XXX: code for resetting XDG_* directories should probably be moved into
106     # a separate function in a non-gnome eclass
107     export XDG_DATA_HOME="${T}/.local/share"
108     export XDG_CONFIG_HOME="${T}/.config"
109     export XDG_CACHE_HOME="${T}/.cache"
110     export XDG_RUNTIME_DIR="${T}/run"
111     mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" \
112     "${XDG_RUNTIME_DIR}"
113     # This directory needs to be owned by the user, and chmod 0700
114     # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
115     chmod 0700 "${XDG_RUNTIME_DIR}"
116     }
117    
118 eva 1.22 # @FUNCTION: gnome2_gconf_savelist
119     # @DESCRIPTION:
120 remi 1.8 # Find the GConf schemas that are about to be installed and save their location
121 eva 1.22 # in the GNOME2_ECLASS_SCHEMAS environment variable.
122     # This function should be called from pkg_preinst.
123 remi 1.8 gnome2_gconf_savelist() {
124 eva 1.18 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
125     pushd "${ED}" &> /dev/null
126 remi 1.10 export GNOME2_ECLASS_SCHEMAS=$(find 'etc/gconf/schemas/' -name '*.schemas' 2> /dev/null)
127 remi 1.8 popd &> /dev/null
128     }
129    
130 eva 1.22 # @FUNCTION: gnome2_gconf_install
131     # @DESCRIPTION:
132 leonardop 1.1 # Applies any schema files installed by the current ebuild to Gconf's database
133 eva 1.22 # using gconftool-2.
134     # This function should be called from pkg_postinst.
135 leonardop 1.1 gnome2_gconf_install() {
136 eva 1.18 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
137     local updater="${EROOT}${GCONFTOOL_BIN}"
138 remi 1.8
139 eva 1.16 if [[ ! -x "${updater}" ]]; then
140 eva 1.17 debug-print "${updater} is not executable"
141 remi 1.8 return
142     fi
143    
144     if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
145 eva 1.17 debug-print "No GNOME 2 GConf schemas found"
146 leonardop 1.1 return
147     fi
148    
149     # We are ready to install the GCONF Scheme now
150     unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
151 abcd 1.19 export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
152 leonardop 1.1
153     einfo "Installing GNOME 2 GConf schemas"
154    
155 eva 1.17 local F
156 remi 1.8 for F in ${GNOME2_ECLASS_SCHEMAS}; do
157 eva 1.18 if [[ -e "${EROOT}${F}" ]]; then
158 eva 1.17 debug-print "Installing schema: ${F}"
159 eva 1.18 "${updater}" --makefile-install-rule "${EROOT}${F}" 1>/dev/null
160 leonardop 1.1 fi
161     done
162    
163     # have gconf reload the new schemas
164 dang 1.6 pids=$(pgrep -x gconfd-2)
165 compnerd 1.3 if [[ $? == 0 ]] ; then
166     ebegin "Reloading GConf schemas"
167     kill -HUP ${pids}
168     eend $?
169     fi
170 leonardop 1.1 }
171    
172 eva 1.22 # @FUNCTION: gnome2_gconf_uninstall
173     # @DESCRIPTION:
174 leonardop 1.1 # Removes schema files previously installed by the current ebuild from Gconf's
175     # database.
176     gnome2_gconf_uninstall() {
177 eva 1.18 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
178     local updater="${EROOT}${GCONFTOOL_BIN}"
179 remi 1.8
180 eva 1.16 if [[ ! -x "${updater}" ]]; then
181 eva 1.17 debug-print "${updater} is not executable"
182 remi 1.8 return
183     fi
184    
185     if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
186 eva 1.17 debug-print "No GNOME 2 GConf schemas found"
187 leonardop 1.1 return
188     fi
189    
190     unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
191 abcd 1.19 export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
192 leonardop 1.1
193     einfo "Uninstalling GNOME 2 GConf schemas"
194    
195 eva 1.17 local F
196 remi 1.8 for F in ${GNOME2_ECLASS_SCHEMAS}; do
197 eva 1.18 if [[ -e "${EROOT}${F}" ]]; then
198 eva 1.17 debug-print "Uninstalling gconf schema: ${F}"
199 eva 1.18 "${updater}" --makefile-uninstall-rule "${EROOT}${F}" 1>/dev/null
200 remi 1.8 fi
201     done
202    
203     # have gconf reload the new schemas
204     pids=$(pgrep -x gconfd-2)
205     if [[ $? == 0 ]] ; then
206     ebegin "Reloading GConf schemas"
207     kill -HUP ${pids}
208     eend $?
209     fi
210     }
211    
212 eva 1.22 # @FUNCTION: gnome2_icon_savelist
213     # @DESCRIPTION:
214 remi 1.8 # Find the icons that are about to be installed and save their location
215 eva 1.22 # in the GNOME2_ECLASS_ICONS environment variable.
216     # This function should be called from pkg_preinst.
217 remi 1.9 gnome2_icon_savelist() {
218 eva 1.18 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
219     pushd "${ED}" &> /dev/null
220 remi 1.10 export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
221 remi 1.8 popd &> /dev/null
222 leonardop 1.1 }
223    
224 eva 1.22 # @FUNCTION: gnome2_icon_cache_update
225     # @DESCRIPTION:
226 leonardop 1.1 # Updates Gtk+ icon cache files under /usr/share/icons if the current ebuild
227     # have installed anything under that location.
228 eva 1.22 # This function should be called from pkg_postinst and pkg_postrm.
229 leonardop 1.1 gnome2_icon_cache_update() {
230 eva 1.18 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
231     local updater="${EROOT}${GTK_UPDATE_ICON_CACHE}"
232 leonardop 1.1
233 remi 1.8 if [[ ! -x "${updater}" ]] ; then
234 leonardop 1.1 debug-print "${updater} is not executable"
235 remi 1.8 return
236     fi
237 leonardop 1.1
238 remi 1.8 if [[ -z "${GNOME2_ECLASS_ICONS}" ]]; then
239 eva 1.17 debug-print "No icon cache to update"
240 leonardop 1.1 return
241     fi
242    
243     ebegin "Updating icons cache"
244    
245     local retval=0
246     local fails=( )
247    
248 remi 1.8 for dir in ${GNOME2_ECLASS_ICONS}
249 leonardop 1.1 do
250 abcd 1.20 if [[ -f "${EROOT}${dir}/index.theme" ]] ; then
251 leonardop 1.1 local rv=0
252    
253 eva 1.18 "${updater}" -qf "${EROOT}${dir}"
254 leonardop 1.1 rv=$?
255    
256     if [[ ! $rv -eq 0 ]] ; then
257 eva 1.18 debug-print "Updating cache failed on ${EROOT}${dir}"
258 leonardop 1.1
259     # Add to the list of failures
260 eva 1.18 fails[$(( ${#fails[@]} + 1 ))]="${EROOT}${dir}"
261 leonardop 1.1
262     retval=2
263     fi
264 tetromino 1.26 elif [[ $(ls "${EROOT}${dir}") = "icon-theme.cache" ]]; then
265     # Clear stale cache files after theme uninstallation
266     rm "${EROOT}${dir}/icon-theme.cache"
267     fi
268    
269     if [[ -z $(ls "${EROOT}${dir}") ]]; then
270     # Clear empty theme directories after theme uninstallation
271     rmdir "${EROOT}${dir}"
272 leonardop 1.1 fi
273     done
274    
275     eend ${retval}
276    
277 remi 1.8 for f in "${fails[@]}" ; do
278     eerror "Failed to update cache with icon $f"
279 leonardop 1.1 done
280     }
281    
282 eva 1.22 # @FUNCTION: gnome2_omf_fix
283     # @DESCRIPTION:
284 leonardop 1.1 # Workaround applied to Makefile rules in order to remove redundant
285     # calls to scrollkeeper-update and sandbox violations.
286 eva 1.22 # This function should be called from src_prepare.
287 leonardop 1.1 gnome2_omf_fix() {
288     local omf_makefiles filename
289    
290     omf_makefiles="$@"
291    
292     if [[ -f ${S}/omf.make ]] ; then
293     omf_makefiles="${omf_makefiles} ${S}/omf.make"
294     fi
295    
296 eva 1.27 if [[ -f ${S}/gnome-doc-utils.make ]] ; then
297     omf_makefiles="${omf_makefiles} ${S}/gnome-doc-utils.make"
298     fi
299    
300 leonardop 1.1 # testing fixing of all makefiles found
301 leio 1.11 # The sort is important to ensure .am is listed before the respective .in for
302     # maintainer mode regeneration not kicking in due to .am being newer than .in
303 eva 1.27 for filename in $(find "${S}" -name "Makefile.in" -o -name "Makefile.am" |sort) ; do
304 leonardop 1.1 omf_makefiles="${omf_makefiles} ${filename}"
305     done
306    
307     ebegin "Fixing OMF Makefiles"
308    
309     local retval=0
310     local fails=( )
311    
312     for omf in ${omf_makefiles} ; do
313 remi 1.8 sed -i -e 's:scrollkeeper-update:true:' "${omf}"
314 leonardop 1.1 retval=$?
315    
316 eva 1.27 if [[ $retval -ne 0 ]] ; then
317 leonardop 1.1 debug-print "updating of ${omf} failed"
318    
319     # Add to the list of failures
320     fails[$(( ${#fails[@]} + 1 ))]=$omf
321    
322     retval=2
323     fi
324     done
325    
326     eend $retval
327    
328 remi 1.10 for f in "${fails[@]}" ; do
329     eerror "Failed to update OMF Makefile $f"
330 leonardop 1.1 done
331     }
332    
333 eva 1.27 # @FUNCTION: gnome2_scrollkeeper_savelist
334     # @DESCRIPTION:
335     # Find the scrolls that are about to be installed and save their location
336     # in the GNOME2_ECLASS_SCROLLS environment variable.
337     # This function should be called from pkg_preinst.
338     gnome2_scrollkeeper_savelist() {
339     has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
340     pushd "${ED}" &> /dev/null
341     export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null)
342     popd &> /dev/null
343     }
344    
345 eva 1.22 # @FUNCTION: gnome2_scrollkeeper_update
346     # @DESCRIPTION:
347 leonardop 1.1 # Updates the global scrollkeeper database.
348 eva 1.22 # This function should be called from pkg_postinst and pkg_postrm.
349 leonardop 1.1 gnome2_scrollkeeper_update() {
350 eva 1.18 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
351 eva 1.27 local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}"
352    
353     if [[ ! -x "${updater}" ]] ; then
354     debug-print "${updater} is not executable"
355     return
356     fi
357    
358     if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then
359     debug-print "No scroll cache to update"
360     return
361 leonardop 1.1 fi
362 eva 1.27
363     ebegin "Updating scrollkeeper database ..."
364     "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}"
365     eend $?
366 leonardop 1.1 }
367 eva 1.14
368 eva 1.22 # @FUNCTION: gnome2_schemas_savelist
369     # @DESCRIPTION:
370     # Find if there is any GSettings schema to install and save the list in
371     # GNOME2_ECLASS_GLIB_SCHEMAS variable.
372     # This function should be called from pkg_preinst.
373 eva 1.14 gnome2_schemas_savelist() {
374 eva 1.18 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
375     pushd "${ED}" &>/dev/null
376 eva 1.14 export GNOME2_ECLASS_GLIB_SCHEMAS=$(find 'usr/share/glib-2.0/schemas' -name '*.gschema.xml' 2>/dev/null)
377     popd &>/dev/null
378     }
379    
380 eva 1.22 # @FUNCTION: gnome2_schemas_update
381 tetromino 1.25 # @USAGE: gnome2_schemas_update
382 eva 1.22 # @DESCRIPTION:
383     # Updates GSettings schemas if GNOME2_ECLASS_GLIB_SCHEMAS has some.
384 tetromino 1.25 # This function should be called from pkg_postinst and pkg_postrm.
385 eva 1.14 gnome2_schemas_update() {
386 eva 1.18 has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
387     local updater="${EROOT}${GLIB_COMPILE_SCHEMAS}"
388 eva 1.14
389     if [[ ! -x ${updater} ]]; then
390     debug-print "${updater} is not executable"
391     return
392     fi
393    
394     if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then
395 eva 1.17 debug-print "No GSettings schemas to update"
396 eva 1.14 return
397     fi
398    
399     ebegin "Updating GSettings schemas"
400 eva 1.18 ${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null
401 eva 1.14 eend $?
402     }
403 naota 1.28
404 eva 1.32 # @FUNCTION: gnome2_gdk_pixbuf_savelist
405     # @DESCRIPTION:
406     # Find if there is any gdk-pixbuf loader to install and save the list in
407     # GNOME2_ECLASS_GDK_PIXBUF_LOADERS variable.
408     # This function should be called from pkg_preinst.
409     gnome2_gdk_pixbuf_savelist() {
410     has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
411     pushd "${ED}" 1>/dev/null
412     export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find "usr/$(get_libdir)/gdk-pixbuf-2.0" -type f 2>/dev/null)
413     popd 1>/dev/null
414     }
415    
416     # @FUNCTION: gnome2_gdk_pixbuf_update
417     # @USAGE: gnome2_gdk_pixbuf_update
418     # @DESCRIPTION:
419     # Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some.
420     # This function should be called from pkg_postinst and pkg_postrm.
421     gnome2_gdk_pixbuf_update() {
422     has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
423     local updater="${EROOT}${GDK_PIXBUF_UPDATE_BIN}"
424    
425     if [[ ! -x ${updater} ]]; then
426     debug-print "${updater} is not executable"
427     return
428     fi
429    
430     if [[ -z ${GNOME2_ECLASS_GDK_PIXBUF_LOADERS} ]]; then
431     debug-print "gdk-pixbuf loader cache does not need an update"
432     return
433     fi
434    
435     ebegin "Updating gdk-pixbuf loader cache"
436     local tmp_file=$(mktemp -t tmp.XXXXXXXXXX_gdkpixbuf)
437     ${updater} 1> "${tmp_file}" &&
438     chmod 0644 "${tmp_file}" &&
439     mv -f "${tmp_file}" "${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
440     eend $?
441     }
442    
443    
444 naota 1.28 # @FUNCTION: gnome2_query_immodules_gtk2
445     # @USAGE: gnome2_query_immodules_gtk2
446     # @DESCRIPTION:
447     # Updates gtk2 immodules/gdk-pixbuf loaders listing.
448     gnome2_query_immodules_gtk2() {
449 pacho 1.33 if has_version ">=x11-libs/gtk+-2.24.20:2"; then
450     "${EPREFIX}/usr/bin/gtk-query-immodules-2.0" --update-cache
451     else
452     local GTK2_CONFDIR="/etc/gtk-2.0/$(get_abi_CHOST)"
453 naota 1.28
454 pacho 1.33 local query_exec="${EPREFIX}/usr/bin/gtk-query-immodules-2.0"
455     local gtk_conf="${EPREFIX}${GTK2_CONFDIR}/gtk.immodules"
456     local gtk_conf_dir=$(dirname "${gtk_conf}")
457    
458     einfo "Generating Gtk2 immodules/gdk-pixbuf loaders listing:"
459     einfo "-> ${gtk_conf}"
460    
461     mkdir -p "${gtk_conf_dir}"
462     local tmp_file=$(mktemp -t tmp.XXXXXXXXXXgtk_query_immodules)
463     if [ -z "${tmp_file}" ]; then
464     ewarn "gtk_query_immodules: cannot create temporary file"
465     return 1
466     fi
467 naota 1.28
468 pacho 1.33 if ${query_exec} > "${tmp_file}"; then
469     cat "${tmp_file}" > "${gtk_conf}" || \
470     ewarn "Failed to write to ${gtk_conf}"
471     else
472     ewarn "Cannot update gtk.immodules, file generation failed"
473     fi
474     rm "${tmp_file}"
475 naota 1.28 fi
476     }
477    
478     # @FUNCTION: gnome2_query_immodules_gtk3
479     # @USAGE: gnome2_query_immodules_gtk3
480     # @DESCRIPTION:
481     # Updates gtk3 immodules/gdk-pixbuf loaders listing.
482     gnome2_query_immodules_gtk3() {
483     "${EPREFIX}/usr/bin/gtk-query-immodules-3.0" --update-cache
484     }
485 eva 1.30
486     # @FUNCTION: gnome2_disable_deprecation_warning
487     # @DESCRIPTION:
488     # Disable deprecation warnings commonly found in glib based packages.
489     # Should be called from src_prepare.
490     gnome2_disable_deprecation_warning() {
491     local retval=0
492     local fails=( )
493     local makefile
494    
495     ebegin "Disabling deprecation warnings"
496     # The sort is important to ensure .am is listed before the respective .in for
497     # maintainer mode regeneration not kicking in due to .am being newer than .in
498     while read makefile ; do
499     if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then
500     continue
501     fi
502    
503     LC_ALL=C sed -r -i \
504     -e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \
505     -e 's:-DGSEAL_ENABLE:$(NULL):g' \
506     -i "${makefile}"
507    
508     if [[ $? -ne 0 ]]; then
509     # Add to the list of failures
510     fails+=( "${makefile}" )
511     retval=2
512     fi
513     done < <(find "${S}" -name "Makefile.in" \
514     -o -name "Makefile.am" -o -name "Makefile.decl" \
515     | sort; echo configure)
516 tetromino 1.31 # TODO: sedding configure.ac can trigger maintainer mode; bug #439602
517     # -o -name "configure.ac" -o -name "configure.in" \
518     # | sort; echo configure)
519 eva 1.30 eend ${retval}
520    
521     for makefile in "${fails[@]}" ; do
522     ewarn "Failed to disable deprecation warnings in ${makefile}"
523     done
524     }

  ViewVC Help
Powered by ViewVC 1.1.20