Make qt_assistant_cleanup() a no-op for Qt 4.7.4 and later (bug #386709).
authorDavide Pesavento <pesa@gentoo.org>
Sat, 19 Nov 2011 20:00:35 +0000 (20:00 +0000)
committerDavide Pesavento <pesa@gentoo.org>
Sat, 19 Nov 2011 20:00:35 +0000 (20:00 +0000)
eclass/ChangeLog
eclass/qt4-build.eclass

index 0d50f226e4e265e4abca7bd9d647e2d46bb1b9ad..f9b8e8d72be83d6ad2274cb1a866a1f2b9add3ed 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.17 2011/11/18 20:51:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.18 2011/11/19 20:00:35 pesa Exp $
+
+  19 Nov 2011; Davide Pesavento <pesa@gentoo.org> qt4-build.eclass:
+  Make qt_assistant_cleanup() a no-op for Qt 4.7.4 and later (bug #386709).
 
   18 Nov 2011; Michał Górny <mgorny@gentoo.org> scons-utils.eclass:
   Add DESTDIR-like variable to the example.
index 8f7fd5e3d50ecd37d5b735e048f73bae83cdf2ce..65ac13eafb1947de95c3c16a64d3c8259cdedaf8 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.98 2011/11/12 19:01:56 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.99 2011/11/19 20:00:35 pesa Exp $
 
 # @ECLASS: qt4-build.eclass
 # @MAINTAINER:
@@ -185,11 +185,12 @@ qt4-build_src_prepare() {
                                die "visibility fixing sed failed"
        fi
 
-       # fix libX11 dependency on non X packages
-       if version_is_at_least "4.7.0_beta2"; then
+       if version_is_at_least "4.7"; then
+               # fix libX11 dependency on non X packages
                local nolibx11_pkgs="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns"
                has ${PN} ${nolibx11_pkgs} && qt_nolibx11
-               [[ ${PN} == "qt-assistant" ]] && qt_assistant_cleanup
+
+               qt_assistant_cleanup
        fi
 
        if use aqua; then
@@ -823,9 +824,16 @@ qt_mkspecs_dir() {
 # @FUNCTION: qt_assistant_cleanup
 # @RETURN: nothing
 # @DESCRIPTION:
-# Tries to clean up tools.pro for qt-assistant ebuilds
-# Meant to be called in src_prepare
+# Tries to clean up tools.pro for qt-assistant ebuilds.
+# Meant to be called in src_prepare().
+# Since Qt 4.7.4 this function is a no-op.
 qt_assistant_cleanup() {
+       # apply patching to qt-assistant ebuilds only
+       [[ ${PN} != "qt-assistant" ]] && return
+
+       # no longer needed for 4.7.4 and later
+       version_is_at_least "4.7.4" && return
+
        # different versions (and branches...) may need different handling,
        # add a case if you need special handling
        case "${MY_PV_EXTRA}" in