app-office/libreoffice: Exclude clang from GCC version check
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>
Tue, 7 Jun 2016 23:43:33 +0000 (01:43 +0200)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Sat, 2 Jul 2016 21:15:52 +0000 (23:15 +0200)
Gentoo-bug: 460902

Package-Manager: portage-2.2.28

app-office/libreoffice/libreoffice-5.1.9999.ebuild
app-office/libreoffice/libreoffice-5.2.9999.ebuild
app-office/libreoffice/libreoffice-9999.ebuild

index 26d1209200849a2cdd3f5f4b0dc8b14fb166363f..5320fe3d0797419cc4390b40ada9a1c9a5aba03e 100644 (file)
@@ -260,9 +260,10 @@ pkg_pretend() {
        if [[ ${MERGE_TYPE} != binary ]]; then
                check-reqs_pkg_pretend
 
-               if [[ $(gcc-major-version) -lt 4 ]] || {
-                       [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; }
-               then
+               if [[ $(tc-getCC) == clang ]] ; then
+                       : # ignore clang, which works
+               elif [[ $(gcc-major-version) -lt 4 ]] || {
+                               [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; } then
                        eerror "Compilation with gcc older than 4.7 is not supported"
                        die "Too old gcc found."
                fi
index 4792129f3a2b2fa26ff77659f9afa7abf5f2c9d2..9b090c026610fb5cad54c7226ac54bc878a884f1 100644 (file)
@@ -258,9 +258,10 @@ pkg_pretend() {
        if [[ ${MERGE_TYPE} != binary ]]; then
                check-reqs_pkg_pretend
 
-               if [[ $(gcc-major-version) -lt 4 ]] || {
-                       [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; }
-               then
+               if [[ $(tc-getCC) == clang ]] ; then
+                       : # ignore clang, which works
+               elif [[ $(gcc-major-version) -lt 4 ]] || {
+                               [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; } then
                        eerror "Compilation with gcc older than 4.7 is not supported"
                        die "Too old gcc found."
                fi
index 4792129f3a2b2fa26ff77659f9afa7abf5f2c9d2..9b090c026610fb5cad54c7226ac54bc878a884f1 100644 (file)
@@ -258,9 +258,10 @@ pkg_pretend() {
        if [[ ${MERGE_TYPE} != binary ]]; then
                check-reqs_pkg_pretend
 
-               if [[ $(gcc-major-version) -lt 4 ]] || {
-                       [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; }
-               then
+               if [[ $(tc-getCC) == clang ]] ; then
+                       : # ignore clang, which works
+               elif [[ $(gcc-major-version) -lt 4 ]] || {
+                               [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; } then
                        eerror "Compilation with gcc older than 4.7 is not supported"
                        die "Too old gcc found."
                fi