Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 463704

Summary: net-libs/webkit-gtk-2.0.0: extend compiler check to clang
Product: Gentoo Linux Reporter: Pacho Ramos <pacho>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: mgorny, ryao, voyageur
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 463242    

Description Pacho Ramos gentoo-dev 2013-03-29 10:39:11 UTC
webkit-gtk-2.0.0 needs either gcc >= 4.7 or clang >= 3.0, but I am unsure about how to check for clang (as I don't use it, I cannot really test if checking is working), then, we currently only have:
        if [[ $(tc-getCC) == *gcc ]] && ! version_is_at_least 4.7 $(gcc-version); then
                die "You need at least GCC 4.7.x for C++11-specific compiler flags"
        fi

How would you improve the check for clang?

Thanks

Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2013-03-29 10:39:53 UTC
CCing clang maintainers to ask for help 

Thanks!
Comment 2 iGentoo 2013-03-29 11:03:05 UTC
(In reply to comment #0)
> webkit-gtk-2.0.0 needs either gcc >= 4.7 or clang >= 3.0, but I am unsure
> about how to check for clang (as I don't use it, I cannot really test if
> checking is working), then, we currently only have:
>         if [[ $(tc-getCC) == *gcc ]] && ! version_is_at_least 4.7
> $(gcc-version); then
>                 die "You need at least GCC 4.7.x for C++11-specific compiler
> flags"
>         fi
> 
> How would you improve the check for clang?
> 
> Thanks
> 
> Reproducible: Always

Like this?

--- webkit-gtk-2.0.0.ebuild
+++ webkit-gtk-2.0.0.ebuild
@@ -83,7 +83,7 @@ pkg_pretend() {
 		check-reqs_pkg_pretend
 	fi
 
-	if [[ $(tc-getCC) == *gcc ]] && ! version_is_at_least 4.7 $(gcc-version); then
+	if ! test-flag-CXX -std=c++11; then
 		die "You need at least GCC 4.7.x for C++11-specific compiler flags"
 	fi
 }
Comment 3 Pacho Ramos gentoo-dev 2013-04-07 08:06:30 UTC
+  07 Apr 2013; Pacho Ramos <pacho@gentoo.org> -webkit-gtk-1.6.3-r200.ebuild,
+  -webkit-gtk-1.6.3-r300.ebuild, webkit-gtk-2.0.0.ebuild:
+  Improve compiler check (#463704 by Alphat-PC), drop old.
+