1 |
commit: 41de2c819b4230ca790057cdb861efe3b3f4024c |
2 |
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Sep 23 14:33:59 2015 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 24 19:38:24 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41de2c81 |
7 |
|
8 |
kde5-functions.eclass: Make gcc version check configurable |
9 |
|
10 |
eclass/kde5-functions.eclass | 13 ++++++++++--- |
11 |
1 file changed, 10 insertions(+), 3 deletions(-) |
12 |
|
13 |
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass |
14 |
index e19d7fd..6bebf7f 100644 |
15 |
--- a/eclass/kde5-functions.eclass |
16 |
+++ b/eclass/kde5-functions.eclass |
17 |
@@ -38,6 +38,11 @@ esac |
18 |
# Minimal KDE Applicaions version to require for the package. |
19 |
: ${KDE_APPS_MINIMAL:=14.12.0} |
20 |
|
21 |
+# @ECLASS-VARIABLE: KDE_GCC_MINIMAL |
22 |
+# @DESCRIPTION: |
23 |
+# Minimal GCC version to require for the package. |
24 |
+: ${KDE_GCC_MINIMAL:=4.8} |
25 |
+ |
26 |
# @ECLASS-VARIABLE: KDEBASE |
27 |
# @DESCRIPTION: |
28 |
# This gets set to a non-zero value when a package is considered a kde or |
29 |
@@ -79,10 +84,12 @@ _check_gcc_version() { |
30 |
local version=$(gcc-version) |
31 |
local major=${version%.*} |
32 |
local minor=${version#*.} |
33 |
+ local min_major=${KDE_GCC_MINIMAL%.*} |
34 |
+ local min_minor=${KDE_GCC_MINIMAL#*.} |
35 |
|
36 |
- [[ ${major} -lt 4 ]] || \ |
37 |
- ( [[ ${major} -eq 4 && ${minor} -lt 8 ]] ) \ |
38 |
- && die "Sorry, but gcc-4.8 or later is required for KDE 5." |
39 |
+ [[ ${major} -lt ${min_major} ]] || \ |
40 |
+ ( [[ ${major} -eq ${min_major} && ${minor} -lt ${min_minor} ]] ) \ |
41 |
+ && die "Sorry, but gcc-${KDE_GCC_MINIMAL} or later is required for this package." |
42 |
fi |
43 |
} |