diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2012-10-14 12:19:32 +0000 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2012-10-14 12:19:32 +0000 |
commit | 73c0f4ba08cc906c41141392c0cf18a3411e05e6 (patch) | |
tree | 9c362c08153dbb79dfcc007b1953326bac8b25c6 /eclass | |
parent | Version bump. Install compability symlink for dev-util/devhelp. (diff) | |
download | historical-73c0f4ba08cc906c41141392c0cf18a3411e05e6.tar.gz historical-73c0f4ba08cc906c41141392c0cf18a3411e05e6.tar.bz2 historical-73c0f4ba08cc906c41141392c0cf18a3411e05e6.zip |
Add compiler version checking for LeechCraft
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/leechcraft.eclass | 24 |
2 files changed, 26 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index b867535706a0..7bdda40a0e50 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.443 2012/10/14 10:58:03 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.444 2012/10/14 12:19:32 pinkbyte Exp $ + + 14 Oct 2012; Sergey Popov <pinkbyte@gentoo.org> leechcraft.eclass: + Add compiler version checking for LeechCraft 14 Oct 2012; Michał Górny <mgorny@gentoo.org> +distutils-r1.eclass: Introduce distutils-r1, a new (and simpler) eclass for Python packages using 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 +} |