# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.108 2011/10/06 14:13:29 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.109 2011/10/21 23:00:19 dilfridge Exp $
# @ECLASS: kde4-base.eclass
# @MAINTAINER:
# In theory should be in pkg_pretend but we check it only for kdelibs there
# and for others we do just quick scan in pkg_setup because pkg_pretend
# executions consume quite some time.
- if [[ ${MERGE_TYPE} != binary ]]; then
- [[ $(gcc-major-version) -lt 4 ]] || \
- ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
- && die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)."
+ # We can only do this for EAPI 4 or later because the MERGE_TYPE variable
+ # is otherwise undefined.
+ if [[ ${EAPI:-0} != 3 ]]; then
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 3 ]] ) \
+ && die "Sorry, but gcc-4.3 and earlier wont work for KDE (see bug 354837)."
+ fi
fi
KDEDIR=/usr