app-text/calibre: support any compiler other than gcc
authorDenis Pronin <dannftk@yandex.ru>
Mon, 17 Feb 2020 12:39:09 +0000 (15:39 +0300)
committerZac Medico <zmedico@gentoo.org>
Mon, 17 Feb 2020 17:58:02 +0000 (09:58 -0800)
Closes: https://github.com/gentoo/gentoo/pull/14682
Signed-off-by: Denis Pronin <dannftk@yandex.ru>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
app-text/calibre/calibre-4.10.1-r2.ebuild
app-text/calibre/calibre-4.9.1-r2.ebuild

index ff49270f89162018dca75c1445212722cc009c59..08411595122ffd22de2f3b27c3295b483232ce83 100644 (file)
@@ -109,7 +109,7 @@ DEPEND="${COMMON_DEPEND}
        virtual/pkgconfig"
 
 pkg_pretend() {
-       if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+       if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
                eerror "Calibre cannot be built with this version of gcc."
                eerror "You need at least gcc-6.0"
                die "Your C compiler is too old for this package."
index 9a06547f837d579ed4e6c6084866fda33ddd279e..799b96ca85b2321692b58e3fb51e032bd76ce73d 100644 (file)
@@ -109,7 +109,7 @@ DEPEND="${COMMON_DEPEND}
        virtual/pkgconfig"
 
 pkg_pretend() {
-       if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then
+       if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
                eerror "Calibre cannot be built with this version of gcc."
                eerror "You need at least gcc-6.0"
                die "Your C compiler is too old for this package."