media-video/mpv: adjust compiler checks in 9999
authorIlya Tumaykin <itumaykin@gmail.com>
Sat, 28 Jan 2017 15:56:55 +0000 (18:56 +0300)
committerDavid Seifert <soap@gentoo.org>
Sun, 29 Jan 2017 22:53:15 +0000 (23:53 +0100)
mpv doesn't build with GCC<4.5 due to missing compiler flags.
TLS is now used in generic GL code, so require it when GL is enabled.

Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/3718

media-video/mpv/mpv-9999.ebuild

index 488ac52d26f262eff2b6716070268aa4057f132d..bbc72b9d547006380b8a6435c0e91d8e03568e74 100644 (file)
@@ -135,8 +135,14 @@ PATCHES=(
 )
 
 mpv_check_compiler() {
-       if [[ ${MERGE_TYPE} != "binary" ]] && use vaapi && use egl && ! tc-has-tls; then
-               die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
+       if [[ ${MERGE_TYPE} != "binary" ]]; then
+               if tc-is-gcc && ( [[ $(gcc-major-version) -lt 4 ]] || \
+                       ( [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 5 ]] ) ); then
+                       die "${PN} requires GCC>=4.5."
+               fi
+               if ( use opengl || use egl ) && ! tc-has-tls; then
+                       die "Your compiler lacks C++11 TLS support. Use GCC>=4.8 or Clang>=3.3."
+               fi
        fi
 }