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

Diff of /eclass/gnome2-utils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.29 Revision 1.30
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.29 2012/09/27 16:35:41 axs Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.30 2012/10/23 20:32:51 eva Exp $
4 4
5# @ECLASS: gnome2-utils.eclass 5# @ECLASS: gnome2-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# gnome@gentoo.org 7# gnome@gentoo.org
8# @BLURB: Auxiliary functions commonly used by Gnome packages. 8# @BLURB: Auxiliary functions commonly used by Gnome packages.
422# @DESCRIPTION: 422# @DESCRIPTION:
423# Updates gtk3 immodules/gdk-pixbuf loaders listing. 423# Updates gtk3 immodules/gdk-pixbuf loaders listing.
424gnome2_query_immodules_gtk3() { 424gnome2_query_immodules_gtk3() {
425 "${EPREFIX}/usr/bin/gtk-query-immodules-3.0" --update-cache 425 "${EPREFIX}/usr/bin/gtk-query-immodules-3.0" --update-cache
426} 426}
427
428# @FUNCTION: gnome2_disable_deprecation_warning
429# @DESCRIPTION:
430# Disable deprecation warnings commonly found in glib based packages.
431# Should be called from src_prepare.
432gnome2_disable_deprecation_warning() {
433 local retval=0
434 local fails=( )
435 local makefile
436
437 ebegin "Disabling deprecation warnings"
438 # The sort is important to ensure .am is listed before the respective .in for
439 # maintainer mode regeneration not kicking in due to .am being newer than .in
440 while read makefile ; do
441 if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then
442 continue
443 fi
444
445 LC_ALL=C sed -r -i \
446 -e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \
447 -e 's:-DGSEAL_ENABLE:$(NULL):g' \
448 -i "${makefile}"
449
450 if [[ $? -ne 0 ]]; then
451 # Add to the list of failures
452 fails+=( "${makefile}" )
453 retval=2
454 fi
455 done < <(find "${S}" -name "Makefile.in" \
456 -o -name "Makefile.am" -o -name "Makefile.decl" \
457 -o -name "configure.ac" -o -name "configure.in" \
458 | sort; echo configure)
459 eend ${retval}
460
461 for makefile in "${fails[@]}" ; do
462 ewarn "Failed to disable deprecation warnings in ${makefile}"
463 done
464}

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.20