diff options
author | 2012-10-23 20:32:51 +0000 | |
---|---|---|
committer | 2012-10-23 20:32:51 +0000 | |
commit | 881a53f06d9f4f154f564293095b3e35000ec718 (patch) | |
tree | 168495cbbafc9529f155884c284dfe3f328dcd43 /eclass | |
parent | Bypass dumb pkg-config install checks #438922 by Benjamin Peterson. (diff) | |
download | gentoo-2-881a53f06d9f4f154f564293095b3e35000ec718.tar.gz gentoo-2-881a53f06d9f4f154f564293095b3e35000ec718.tar.bz2 gentoo-2-881a53f06d9f4f154f564293095b3e35000ec718.zip |
Add gnome2_disable_deprecation_warning to gnome2-utils.eclass
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/gnome2-utils.eclass | 40 | ||||
-rw-r--r-- | eclass/gnome2.eclass | 5 |
3 files changed, 48 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index c8a8be2bbcd2..b88426e08548 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.459 2012/10/23 08:09:35 tetromino Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.460 2012/10/23 20:32:51 eva Exp $ + + 23 Oct 2012; Gilles Dartiguelongue <eva@gentoo.org> gnome2-utils.eclass, + gnome2.eclass: + Add gnome2_disable_deprecation_warning to gnome2-utils.eclass 23 Oct 2012; Alexandre Rostovtsev <tetromino@gentoo.org> gst-plugins-base.eclass: diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass index 91386c61bdb9..cba76d1b094a 100644 --- a/eclass/gnome2-utils.eclass +++ b/eclass/gnome2-utils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.29 2012/09/27 16:35:41 axs Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.30 2012/10/23 20:32:51 eva Exp $ # @ECLASS: gnome2-utils.eclass # @MAINTAINER: @@ -424,3 +424,41 @@ gnome2_query_immodules_gtk2() { gnome2_query_immodules_gtk3() { "${EPREFIX}/usr/bin/gtk-query-immodules-3.0" --update-cache } + +# @FUNCTION: gnome2_disable_deprecation_warning +# @DESCRIPTION: +# Disable deprecation warnings commonly found in glib based packages. +# Should be called from src_prepare. +gnome2_disable_deprecation_warning() { + local retval=0 + local fails=( ) + local makefile + + ebegin "Disabling deprecation warnings" + # The sort is important to ensure .am is listed before the respective .in for + # maintainer mode regeneration not kicking in due to .am being newer than .in + while read makefile ; do + if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then + continue + fi + + LC_ALL=C sed -r -i \ + -e 's:-D[A-Z_]+_DISABLE_DEPRECATED:$(NULL):g' \ + -e 's:-DGSEAL_ENABLE:$(NULL):g' \ + -i "${makefile}" + + if [[ $? -ne 0 ]]; then + # Add to the list of failures + fails+=( "${makefile}" ) + retval=2 + fi + done < <(find "${S}" -name "Makefile.in" \ + -o -name "Makefile.am" -o -name "Makefile.decl" \ + -o -name "configure.ac" -o -name "configure.in" \ + | sort; echo configure) + eend ${retval} + + for makefile in "${fails[@]}" ; do + ewarn "Failed to disable deprecation warnings in ${makefile}" + done +} diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass index 97f1d59eb745..0ac3fd1e2c2d 100644 --- a/eclass/gnome2.eclass +++ b/eclass/gnome2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.107 2012/09/27 16:35:41 axs Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.108 2012/10/23 20:32:51 eva Exp $ # @ECLASS: gnome2.eclass # @MAINTAINER: @@ -94,6 +94,9 @@ gnome2_src_prepare() { # Prevent scrollkeeper access violations gnome2_omf_fix + # Disable all deprecation warnings + gnome2_disable_deprecation_warning + # Run libtoolize if has ${EAPI:-0} 0 1 2 3; then elibtoolize ${ELTCONF} |