* [gentoo-dev] About disabling DISABLE_DEPRECATED
@ 2012-09-30 21:44 Gilles Dartiguelongue
2012-10-03 2:57 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Gilles Dartiguelongue @ 2012-09-30 21:44 UTC (permalink / raw
To: gentoo-dev
[-- 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
+}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-23 20:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 21:44 [gentoo-dev] About disabling DISABLE_DEPRECATED Gilles Dartiguelongue
2012-10-03 2:57 ` Mike Frysinger
2012-10-08 3:37 ` Arfrever Frehtes Taifersar Arahesis
2012-10-23 20:34 ` Gilles Dartiguelongue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox