commit:     2acfd4c6169ae0084ebcfe7b1ca6d5d21754c663
Author:     Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Sat Jan 28 15:56:55 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 22:53:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2acfd4c6

media-video/mpv: adjust compiler checks in 9999

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 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index 488ac52..bbc72b9 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -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
 }
 

Reply via email to