From: Gilles Dartiguelongue <eva@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] About disabling DISABLE_DEPRECATED
Date: Sun, 30 Sep 2012 23:44:05 +0200 [thread overview]
Message-ID: <1349041445.23985.20.camel@kanae> (raw)
[-- Attachment #1: Type: text/plain, Size: 900 bytes --]
Hi all,
as discussed this morning on #-desktop, I found out while reading
commits from April that we have quite a few ebuilds in tree doing this
manually.
The problem is that in those ~153 instances of the same command, some do
take care of problems such as i18n env, some don't, some delete whole
lines, some replace with $(NULL) or even other values.
I think it is high time we provide a reference solution for this, even
if the solution should be to push upstream to fix there build system as
usual.
You'll find in attachement a prototype patch from gnome2-utils eclass.
It does not take care of packages providing
--disable-deprecations{,-flags} on purpose for now since I have not
found a MACRO and hence a reliable way to make sure this works in
upstream tarballs. Some packages do have such configure switch but it
does not always work.
--
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo
[-- Attachment #2: deprecation-warnings.patch --]
[-- Type: text/x-patch, Size: 2134 bytes --]
Index: eclass/gnome2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v
retrieving revision 1.107
diff -u -B -r1.107 gnome2.eclass
--- eclass/gnome2.eclass 27 Sep 2012 16:35:41 -0000 1.107
+++ eclass/gnome2.eclass 30 Sep 2012 09:58:09 -0000
@@ -94,6 +94,9 @@
# 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}
Index: eclass/gnome2-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v
retrieving revision 1.29
diff -u -B -r1.29 gnome2-utils.eclass
--- eclass/gnome2-utils.eclass 27 Sep 2012 16:35:41 -0000 1.29
+++ eclass/gnome2-utils.eclass 30 Sep 2012 09:59:43 -0000
@@ -424,3 +424,40 @@
gnome2_query_immodules_gtk3() {
"${EPREFIX}/usr/bin/gtk-query-immodules-3.0" --update-cache
}
+
+# @FUNCTION: gnome2_disable_deprecation_warning
+# @USAGE: 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=( )
+
+ 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
+ for makefile in $(find "${S}" -name "Makefile.in" \
+ -o -name "Makefile.am" -o -name "Makefile.decl" | sort); do
+
+ if ! grep -qE "(DISABLE_DEPRECATED|GSEAL_ENABLE)" "${makefile}"; then
+ continue
+ fi
+
+ LC_ALL=C sed -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[$(( ${#fails[@]} + 1 ))]="${makefile}"
+
+ retval=2
+ fi
+ done
+ eend ${retval}
+
+ for makefile in "${fails[@]}" ; do
+ eerror "Failed to disable deprecation warnings in $makefile"
+ done
+}
next reply other threads:[~2012-09-30 21:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-30 21:44 Gilles Dartiguelongue [this message]
2012-10-03 2:57 ` [gentoo-dev] About disabling DISABLE_DEPRECATED Mike Frysinger
2012-10-08 3:37 ` Arfrever Frehtes Taifersar Arahesis
2012-10-23 20:34 ` Gilles Dartiguelongue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349041445.23985.20.camel@kanae \
--to=eva@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox