summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2012-10-14 12:19:32 +0000
committerSergey Popov <pinkbyte@gentoo.org>2012-10-14 12:19:32 +0000
commit73c0f4ba08cc906c41141392c0cf18a3411e05e6 (patch)
tree9c362c08153dbb79dfcc007b1953326bac8b25c6 /eclass/leechcraft.eclass
parentVersion bump. Install compability symlink for dev-util/devhelp. (diff)
downloadhistorical-73c0f4ba08cc906c41141392c0cf18a3411e05e6.tar.gz
historical-73c0f4ba08cc906c41141392c0cf18a3411e05e6.tar.bz2
historical-73c0f4ba08cc906c41141392c0cf18a3411e05e6.zip
Add compiler version checking for LeechCraft
Diffstat (limited to 'eclass/leechcraft.eclass')
-rw-r--r--eclass/leechcraft.eclass24
1 files changed, 22 insertions, 2 deletions
diff --git a/eclass/leechcraft.eclass b/eclass/leechcraft.eclass
index 55d35d693af0..1ef705e9907a 100644
--- a/eclass/leechcraft.eclass
+++ b/eclass/leechcraft.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/leechcraft.eclass,v 1.6 2012/09/27 16:35:41 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/leechcraft.eclass,v 1.7 2012/10/14 12:19:32 pinkbyte Exp $
#
# @ECLASS: leechcraft.eclass
# @MAINTAINER:
@@ -27,7 +27,7 @@ case ${EAPI:-0} in
*) die "Unknown EAPI, bug eclass maintainers" ;;
esac
-inherit cmake-utils versionator
+inherit cmake-utils toolchain-funcs versionator
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="git://github.com/0xd34df00d/leechcraft.git"
@@ -62,3 +62,23 @@ elif [[ ${PN} != leechcraft-core ]]; then
else
CMAKE_USE_DIR="${S}"/src
fi
+
+EXPORT_FUNCTIONS "pkg_pretend"
+
+# @FUNCTION: leechcraft_pkg_pretend
+# @DESCRIPTION:
+# Determine active compiler version and refuse to build
+# if it is not satisfied at least to minimal version,
+# supported by upstream developers
+leechcraft_pkg_pretend() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if version_is_at_least 0.5.85; then
+ # 0.5.85 and later requires at least gcc 4.6
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
+ && die "Sorry, but gcc 4.6 or higher is required."
+ fi
+ fi
+}