From 2acfd4c6169ae0084ebcfe7b1ca6d5d21754c663 Mon Sep 17 00:00:00 2001 From: Ilya Tumaykin Date: Sat, 28 Jan 2017 18:56:55 +0300 Subject: [PATCH] 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 488ac52d26f2..bbc72b9d5470 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 } -- 2.26.2